What If : The Dream Company
Ever wonder what if when it comes to your imaginary corporation where you have an unlimited amount of money to spend on talent?
- Tara was my dba yelling at my programmers to ensure their SQL is solid. Backing up the databases and restoring them like no other. Ensuring my databases were running smoothly and fully optimized
- Jeff was smacking the junior developers around discussing how they should organize their code. HANDLE THAT AT THE FRONT END I TOLD YOU!! WHAT…you placed that in the db code…NO NO NO…this formatting should be done on the front end!
- Peso (Peter) was taking care of the other SQL developers and ensuring their code was clean, short, and optimized. Boy can that guy come up with great SQL. He’d also be the one to entertain all the new comers with SQL classes and how to truly understand the tools. We’d call him the gate keeper, and he’d be in charge of telling us whose fit for the corporation!
- Spirit (Mladen) was in charge of discovering new tools, testing, and preaching to the developers. HOW CAN YOU BE DOING THIS WITHOUT A DATABASE TIER!!! Who told you object orientated programming was that difficult? What do you mean you haven’t used the newly designed data extractor object that I invented!
- Brett was handling all of the dirty work including conversions from one system to another. Porting code over to different database vendors, writing T-SQL, and bumping heads with the front end folks for not listening to him in the first place!
- MVJ (Michal Valentine Jones…not sure if that is really his name) he’d be in charge of the final base code. Would be willing to give him a duplicate gate keeper key much like that of Peso’s. He’s the go to guy, the man with an answer to much anything when it comes to SQL. He’d come up with weird functions that handle dates…reusable code…ya the weird stuff that just seems to work!
- Kristen (http://www.sqlteam.com/forums/pop_profile.asp?mode=display&id=10539) the Director of the company. Ahh he makes the big bucks..but he’s well worth it. He steers the company in the direction of success…well most of the time. He’s been known for making programmers happy (which just doesn’t sound right). He actually made a couple of Mladen’s group laugh! He writes clean code…but he’s too good for that now. Sometimes MVJ gets frustrated with code he’s inventing, but putting him in the same office with Kristen and Peso he always comes out with a monster that works. But don’t piss Kristen off or you might become a twit: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=69568
- Jezemine (http://www.sqlteam.com/forums/pop_profile.asp?mode=display&id=24731) he would be the central brain of the entire company. The guy is brilliant IMHO. He’s like the Einstein of today (ok not that much but still he knows his stuff). He’s written some nice database documentation tool called SQLSpec http://www.elsasoft.org/. Of course the company would take ownership of it ;) (just kidding). Along with his brain he’d be in charge of the documentation support of the company. His role is essential to our customer base. Without him our customers are lost and frustrated. Him and Peso seem to find speed as a good topic to discuss when it comes to SQL: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=93911
- Graz…good ol graz…the one that put everyone together in one room. He insisted that it would work out…success comes with patience and hard work he would always say. He’s the heart of the corporation and when the heart stops we’re in for some trouble. Graz also runs many of the presentations and brings in special guests to help our developers and our customers as well!
We’d hire some major players as well guys / gals like:
We’d be a lot like google minus those colors and the lava lamps. Work environment would include jeans, tshirts, pajamas, and even shorts. Roller blading / biking to work would be an option. We’d all have lunch together … maybe Emerald would cook! We’d all become rich too…our stock options would supersede our pay rates just some day.
Maybe just maybe…Of course affording all of you would probably be impossible…but then again it’s just a dream.
This article relates to a couple of articles that are on the site. The original article was "Cool Tricks With The ASP.net Calendar". You can find this here: http://weblogs.sqlteam.com/jhermiz/archive/2007/12/10/Cool-Tricks-With-The-ASP.net-Calendar.aspx. The other article you might find useful is the "Additional Tip For that Calendar Control In ASP.net" this article can be found here: http://weblogs.sqlteam.com/jhermiz/archive/2007/12/11/Additional-Tip-For-That-Calendar-Control-In-ASP.net.aspx.
Have you ever wanted to create a nice calendar control much like the sharepoint calendar control? You know the calendar control with hyperlink data directly on each calendar day. The previous articles shows you how to use the DayRender Calendar control event to add image controls. But what about adding hyperlink controls as well as setting the NavigateURL property for each hyperlink to take you to another web page.
This process is very similiar to the second article where we added image controls to a calendar control. Now we want to simply add hyperlink controls.
To do this drag and drop a calendar control on your web page. Use your SQL knowledge to pull some data (with the date for each row of data) from your database table. Store this data in a datatable or a dataset. Then loop through your data and compare the date in your dataset / datatable with the day in the Calendar_DayRender event. If they are equal instantiate a Hyperlink object. Set its text property, its navigateurl property and whether or not you want a border.
From our previous examples here's some code to help you out:
Protected Sub Calendar13_DayRender(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DayRenderEventArgs) Handles Calendar13.DayRender
Dim nextDate As DateTime
Dim hl As HyperLink
Dim onmouseoverStyle As String = "this.style.backgroundColor='#D4EDFF'"
Dim onmouseoutStyle As String = "this.style.backgroundColor='@BackColor'"
Dim rowBackColor As String = String.Empty
Dim notTouched As Boolean
notTouched = True
If Not CType(Session("dsHolidays"), DataSet) Is Nothing Then
For Each dr As DataRow In CType(Session("dsHolidays"), DataSet).Tables(0).Rows
nextDate = CType(dr("HolidayDate"), DateTime)
If nextDate = e.Day.Date Then
e.Cell.BackColor = System.Drawing.Color.Pink
e.Cell.ForeColor = System.Drawing.ColorTranslator.FromHtml("#24618E")
notTouched = False
If Not CType(Session("dsRequests2"), DataSet) Is Nothing Then
For Each dr As DataRow In CType(Session("dsRequests2"), DataSet).Tables(0).Rows
nextDate = CType(dr("VacationDate"), DateTime)
If nextDate = e.Day.Date Then
hl = New HyperLink
hl.Text = CType(dr("ToolTip"), String)
hl.NavigateUrl = "Entry.aspx?ID=" & CType(dr("VacationID"), String)
hl.BorderColor = Color.Gray
hl.BorderWidth = 1
hl.ToolTip = "Click this item to get more detailed information."
hl.Font.Name = "Arial Narrow"
hl.Font.Bold = False
hl.ForeColor = System.Drawing.ColorTranslator.FromHtml("#24618E")
e.Cell.BackColor = Color.Azure
notTouched = False
If notTouched And Not e.Day.IsWeekend Then
e.Cell.Attributes.Add("onmouseout", onmouseoutStyle.Replace("@BackColor", rowBackColor))
Catch ex As Exception
Response.Write("Errors occurred: No RuleID / Hire Date specified for user! " & "Additional errors include: " & ex.ToString())