2008年1月27日 星期日

動態建立DataGrid Column

Function CreateBoundColumn(ByVal DataFieldValue As String, ByVal HeaderTextValue As String) As BoundColumn
' This version of CreateBoundColumn method sets only the ' DataField and HeaderText properties.
' Create a BoundColumn. Dim column As BoundColumn = New BoundColumn()
' Set the properties of the BoundColumn. column.DataField = DataFieldValue column.HeaderText = HeaderTextValue
Return column
End Function


Function CreateBoundColumn(ByVal DataFieldValue As String, _ ByVal HeaderTextValue As String, ByVal FormatValue As String, _ ByVal AlignValue As HorizontalAlign) As BoundColumn
' This version of CreateBoundColumn method sets the DataField, ' HeaderText, and DataFormatString properties. It also sets the ' HorizontalAlign property of the ItemStyle property of the column.
' Create a BoundColumn using the overloaded CreateBoundColumn method. Dim column As BoundColumn = CreateBoundColumn(DataFieldValue, HeaderTextValue)
' Set the properties of the BoundColumn. column.DataFormatString = FormatValue column.ItemStyle.HorizontalAlign = AlignValue
Return column
End Function



Function CreateLinkColumn(ByVal NavUrlValue As String, ByVal TargetValue As String, _ ByVal TextValue As String, ByVal HeaderTextValue As String) As HyperLinkColumn
' Create a BoundColumn. Dim column As HyperLinkColumn = New HyperLinkColumn()
' Set the properties of the ButtonColumn. column.NavigateUrl = NavUrlValue column.Target = TargetValue column.Text = TextValue column.HeaderText = HeaderTextValue
Return column
End Function

2008年1月24日 星期四

最輕鬆的工作

錢多事少離家近、睡覺睡到自然醒、位高權重責任輕;
老闆說話不用聽、五年就領退休金、領錢領到手抽筋;
旅遊出國休假勤、股票分紅拼命領、出差作事別人請;
金融風暴不擔心、月月出國去散心、雙B跑車任我行;
金卡銀卡刷不停、吃喝玩樂錢照領、全家出遊有獎金;
回來聊天談事情、經理來了不用停、只說謝謝你關心;
下班走人你最行、上班在家吃點心、遲到說是出外勤;