新莊 頤品大飯店 (雲朗觀光 http://www.ldcgroup.com/?Psn=6085 ,君品、翰品的姊妹店)
這次婚宴舉辦在7樓香蘊廳(官方說法最大可以容納80桌,經由我實際參觀過,的確可以容納八十桌,但會非常擠,建議不超過50桌),如需要大容量廳也可以打通7樓的兩個廳(打通後會有兩根柱子)。
香蘊廳特色:目前應該是全台第一間三面環繞LED牆,中央舞臺有五百吋的LED牆,場地無柱方正,有兩個大門可以提供進出,新人進場建議走L型進場,提供專屬的新娘休息室(在香蘊廳旁有專屬電梯可以抵達,電梯可以直達B2與新娘休息室),下圖為飯店服務人員所提供七樓打通兩廳後的照片。
提供三種桌巾挑選 君品紫、愛馬仕橘、頻果綠
橘色:感覺很像藏傳彿教的感覺
紫色: 莊重的感覺
蘋果綠 : 活潑的感覺
我們是選擇蘋果綠
依你所選擇的顏色搭配婚宴佈置的顏色
===========================菜色部分===========================
這次我們選擇的是15990(+10%)的菜色,試菜的心得是帝王蟹要自己用很麻煩,中看不重吃的菜,甜湯太甜(可以調整),法式甜點集(很另人失望...),除此之外都很好吃,要給評分的話我給85分,吃過的喜宴中算是第二好吃的,至於第一好吃的就...在此不多說。
最後我們有更改幾道菜,因為長輩不吃牛所以我們把牛排改德國豬腳(降級,也可以升級為羊排,但需補差價400元/桌),童雞升級烏骨雞,說到這裡不得不說頤品真的很難凹東西,原本我們是打算降級兩道菜(旭蟹油飯降級鰻魚油飯),想說降級兩道菜有價差產生想凹一些東西,最後真的很硬而且與她們的業務經理有點不愉快,所以到最後就一升一降收場。我們遇到的業務經理真的很不推,這裡就不說明是哪位了(需要的話私下在說),目前進度在安排當天的婚宴流程,這次遇到的婚宴企劃就感覺很不錯,所以還是需要運氣的...待續
2014年11月19日 星期三
2014年10月21日 星期二
使用Datatable加入欄位、新增欄位各資料列
建立datatableDim mytable As New DataTable
建立欄位Dim mycolumn As New DataColumn
設定 DataColumn物件的各個屬性以定義欄位的結構描述mycolumn.DataType = System.Type.GetType("System.Int32")
將欄位加入至欄位集合中mytable.Columns.Add(mycolumn)
呼叫資料列集合(亦即DataRowCollection)的add方法將已指派資料值的DataRow物件新增至資料列集合中。
建立新的DataRow對象,並添加到DataTable中mytable.Rows.Add(mytable.NewRow())
mytable.Rows.Add(mytable.NewRow())
mytable.Rows.Add(mytable.NewRow())
將資料值將指派給新資料列的各個欄位mytable.Rows(0)(0) = 1
mytable.Rows(1)(0) = 2
mytable.Rows(1)(0) = 2
copy from: http://kennyfan88.pixnet.net/blog/trackback/ff0d96e5a0/84881604
2014年9月23日 星期二
Server.UrlDecode("XXXXXXXXXXXX")
Private Sub getArgDict(ByRef oArgDict As Generic.Dictionary(Of String, Object))
Try
oArgDict.Add("TAGNO", Request.QueryString("TagNo"))
oArgDict.Add("rptid", Request.QueryString("rptid"))
oArgDict.Add("txtDateStart", Request.QueryString("start"))
oArgDict.Add("txtDateEnd", Request.QueryString("end"))
oArgDict.Add("TagNo", Request.QueryString("TagNo"))
If IsNothing(Request.QueryString("UniqueContent")) = True Then
oArgDict.Add("UniqueContent", Server.UrlDecode(Request.QueryString("Content")))
Else
oArgDict.Add("UniqueContent", Server.UrlDecode(Request.QueryString("UniqueContent")))
End If
oArgDict.Add("ddlLevel", Request.QueryString("ddlLevel"))
If Me.txtResp.Text <> "全部責任區" Then
oArgDict.Add("RespArea", Request.QueryString("RespArea"))
Else
oArgDict.Add("RespArea", "")
End If
Catch ex As Exception
Utility.handleException(ex)
Throw ex
End Try
End Sub
Try
oArgDict.Add("TAGNO", Request.QueryString("TagNo"))
oArgDict.Add("rptid", Request.QueryString("rptid"))
oArgDict.Add("txtDateStart", Request.QueryString("start"))
oArgDict.Add("txtDateEnd", Request.QueryString("end"))
oArgDict.Add("TagNo", Request.QueryString("TagNo"))
If IsNothing(Request.QueryString("UniqueContent")) = True Then
oArgDict.Add("UniqueContent", Server.UrlDecode(Request.QueryString("Content")))
Else
oArgDict.Add("UniqueContent", Server.UrlDecode(Request.QueryString("UniqueContent")))
End If
oArgDict.Add("ddlLevel", Request.QueryString("ddlLevel"))
If Me.txtResp.Text <> "全部責任區" Then
oArgDict.Add("RespArea", Request.QueryString("RespArea"))
Else
oArgDict.Add("RespArea", "")
End If
Catch ex As Exception
Utility.handleException(ex)
Throw ex
End Try
End Sub
Server.UrlEncode("XXXXXXXXX")
Protected Sub gvCheckRec_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles gvCheckRec.RowDataBound
Dim js As String = ""
Dim js_Register As String = ""
Dim ProcessName As String = ""
Dim RespArea As String = ""
Dim dllclass As String = ""
Dim UniqueContent As String = ""
Dim button As New Button
Dim rank As Integer = 1
Try
If e.Row.RowType = DataControlRowType.Pager Then
e.Row.Style.Add("text-align", "center")
e.Row.Style.Add("height", "40px")
e.Row.Style.Add("background-image", "")
End If
'GV項次
If (e.Row.RowIndex >= 0 And e.Row.RowType = DataControlRowType.DataRow) Then
js = "javascript:window.open('RptDcsAlm_AnaTool_Detail.aspx?"
js &= "&rptid=RptDcsAlm_BasMgt_SumQuery.aspx"
js &= "&start=" & Me.txtDate_OccStart.Text
js &= "&end=" & Me.txtDate_OccEnd.Text
If Me.ddlLevelType.SelectedIndex = 1 Then
js &= "&ddlLevel=Level1"
ElseIf Me.ddlLevelType.SelectedIndex = 2 Then
js &= "&ddlLevel=Level2"
ElseIf Me.ddlLevelType.SelectedIndex = 3 Then
js &= "&ddlLevel=Level3"
Else
js &= "&ddlLevel="
End If
js &= "&class=" & dllclass
js &= "&TagNo=" & e.Row.Cells(1).Text
js &= "&process=" & ProcessName
js &= "&RespArea=" & RespArea
js &= "&UniqueContent=" & e.Row.Cells(3).Text
If e.Row.Cells(3).Text <> "" Then
Dim source As String = e.Row.Cells(3).Text
Dim str As String() = New String() {","}
Dim UniqueContentSplit As String() = source.Split(str, StringSplitOptions.RemoveEmptyEntries)
Dim Uniq As String
Uniq = UniqueContentSplit(0)
'If Uniq = "上下限管制異常:H " Then
' js &= "&UniqueContent=上下限管制異常: H"
'ElseIf Uniq = "上下限管制異常:HH " Then
' js &= "&UniqueContent=上下限管制異常: HH"
'ElseIf Uniq = "上下限管制異常:L " Then
' js &= "&UniqueContent=上下限管制異常: L"
'ElseIf Uniq = "上下限管制異常:LL " Then
' js &= "&UniqueContent=上下限管制異常: LL"
' 'Else
' ' js &= "&UniqueContent=" & UniqueContentSplit(0)
'End If
End If
js &= "','_blank', 'status=yes,left=350,top=200,width=1100,height=500');"
CType(e.Row.Cells(5).Controls(0), ImageButton).OnClientClick = js
js_Register = "javascript:window.showModalDialog('MntDcsAlm_BasMgt_AlmSumRegister.aspx?"
'js_Register = "javascript:window.open('MntDcsAlm_BasMgt_AlmSumRegister.aspx?"
js_Register &= "&rptid=RptDcsAlm_BasMgt_SumQuery.aspx"
js_Register &= "&start=" & Me.txtDate_OccStart.Text
js_Register &= "&end=" & Me.txtDate_OccEnd.Text
js_Register &= "&class=" & dllclass
If e.Row.Cells(2).Text = "輕故障" Then
js_Register &= "&ddlLevel=Level3"
ElseIf e.Row.Cells(2).Text = "中故障" Then
js_Register &= "&ddlLevel=Level2"
ElseIf e.Row.Cells(2).Text = "重故障" Then
js_Register &= "&ddlLevel=Level1"
Else
js_Register &= "&ddlLevel="
End If
js_Register &= "&TagNo=" & e.Row.Cells(1).Text
js_Register &= "&RespArea=" & Me.ddlRespArea.SelectedValue.ToString
js_Register &= "&RankNo=" & e.Row.Cells(0).Text
js_Register &= "&AlarmRank=" & Me.txt_AlarmRank.Text
'js_Register &= "&UniqueContent=" & e.Row.Cells(3).Text
'Dim a As String = e.Row.Cells(3).Text.Replace("%", "%25").Replace("﹦", "%3D").Replace("#", "%23").Replace("/", "%2F").Replace(":", "%3A").Replace(",", "%2C").Replace("-", "%2D").Replace(" ", "")
Dim a As String = e.Row.Cells(3).Text.Replace("﹦", "%3D").Replace(".", "%2E").Replace("#", "%23").Replace("%", "%25").Replace(":", "%3A").Replace(",", "%2C")
js_Register &= "&Content=" & Server.UrlEncode(a)
'上下限管制異常:H , C4530 #2DE-TOL 壓力控制 PV UPPER LIMIT 警示一 PV ﹦ 339 UNIT:Torr
js_Register &= "&AlmCnt=" & e.Row.Cells(4).Text
If e.Row.Cells(3).Text <> "" Then
Dim source As String = e.Row.Cells(3).Text
Dim str As String() = New String() {","}
Dim UniqueContentSplit As String() = source.Split(str, StringSplitOptions.RemoveEmptyEntries)
Dim Uniq As String
Uniq = UniqueContentSplit(0)
If Uniq = "上下限管制異常:H " Then
js_Register &= "&UniqueContent=" & Server.UrlEncode("上下限管制異常: H")
ElseIf Uniq = "上下限管制異常:HH " Then
js_Register &= "&UniqueContent=" & Server.UrlEncode("上下限管制異常: HH")
ElseIf Uniq = "上下限管制異常:L " Then
js_Register &= "&UniqueContent=" & Server.UrlEncode("上下限管制異常: L")
ElseIf Uniq = "上下限管制異常:LL " Then
js_Register &= "&UniqueContent=" & Server.UrlEncode("上下限管制異常: LL")
'Else
' js_Register &= UniqueContentSplit(0)
End If
End If
js_Register &= "&process=" & ProcessName
js_Register &= "','','dialogWidth=850px,dialogHeight=300px');window.close();"
Dim YorN As Boolean
YorN = Comparison(e.Row.Cells(1).Text, e.Row.Cells(3).Text)
If YorN = True Then
CType(e.Row.Cells(6).Controls(0), ImageButton).Visible = False
CType(e.Row.Cells(7).Controls(0), ImageButton).Visible = True
Else
CType(e.Row.Cells(6).Controls(0), ImageButton).OnClientClick = js_Register
CType(e.Row.Cells(7).Controls(0), ImageButton).Visible = False
End If
End If
Catch ex As Exception
MyBase.showAlertMsg(Utility.handlePageException(ex, MyBase.tracker))
End Try
End Sub
Dim js As String = ""
Dim js_Register As String = ""
Dim ProcessName As String = ""
Dim RespArea As String = ""
Dim dllclass As String = ""
Dim UniqueContent As String = ""
Dim button As New Button
Dim rank As Integer = 1
Try
If e.Row.RowType = DataControlRowType.Pager Then
e.Row.Style.Add("text-align", "center")
e.Row.Style.Add("height", "40px")
e.Row.Style.Add("background-image", "")
End If
'GV項次
If (e.Row.RowIndex >= 0 And e.Row.RowType = DataControlRowType.DataRow) Then
js = "javascript:window.open('RptDcsAlm_AnaTool_Detail.aspx?"
js &= "&rptid=RptDcsAlm_BasMgt_SumQuery.aspx"
js &= "&start=" & Me.txtDate_OccStart.Text
js &= "&end=" & Me.txtDate_OccEnd.Text
If Me.ddlLevelType.SelectedIndex = 1 Then
js &= "&ddlLevel=Level1"
ElseIf Me.ddlLevelType.SelectedIndex = 2 Then
js &= "&ddlLevel=Level2"
ElseIf Me.ddlLevelType.SelectedIndex = 3 Then
js &= "&ddlLevel=Level3"
Else
js &= "&ddlLevel="
End If
js &= "&class=" & dllclass
js &= "&TagNo=" & e.Row.Cells(1).Text
js &= "&process=" & ProcessName
js &= "&RespArea=" & RespArea
js &= "&UniqueContent=" & e.Row.Cells(3).Text
If e.Row.Cells(3).Text <> "" Then
Dim source As String = e.Row.Cells(3).Text
Dim str As String() = New String() {","}
Dim UniqueContentSplit As String() = source.Split(str, StringSplitOptions.RemoveEmptyEntries)
Dim Uniq As String
Uniq = UniqueContentSplit(0)
'If Uniq = "上下限管制異常:H " Then
' js &= "&UniqueContent=上下限管制異常: H"
'ElseIf Uniq = "上下限管制異常:HH " Then
' js &= "&UniqueContent=上下限管制異常: HH"
'ElseIf Uniq = "上下限管制異常:L " Then
' js &= "&UniqueContent=上下限管制異常: L"
'ElseIf Uniq = "上下限管制異常:LL " Then
' js &= "&UniqueContent=上下限管制異常: LL"
' 'Else
' ' js &= "&UniqueContent=" & UniqueContentSplit(0)
'End If
End If
js &= "','_blank', 'status=yes,left=350,top=200,width=1100,height=500');"
CType(e.Row.Cells(5).Controls(0), ImageButton).OnClientClick = js
js_Register = "javascript:window.showModalDialog('MntDcsAlm_BasMgt_AlmSumRegister.aspx?"
'js_Register = "javascript:window.open('MntDcsAlm_BasMgt_AlmSumRegister.aspx?"
js_Register &= "&rptid=RptDcsAlm_BasMgt_SumQuery.aspx"
js_Register &= "&start=" & Me.txtDate_OccStart.Text
js_Register &= "&end=" & Me.txtDate_OccEnd.Text
js_Register &= "&class=" & dllclass
If e.Row.Cells(2).Text = "輕故障" Then
js_Register &= "&ddlLevel=Level3"
ElseIf e.Row.Cells(2).Text = "中故障" Then
js_Register &= "&ddlLevel=Level2"
ElseIf e.Row.Cells(2).Text = "重故障" Then
js_Register &= "&ddlLevel=Level1"
Else
js_Register &= "&ddlLevel="
End If
js_Register &= "&TagNo=" & e.Row.Cells(1).Text
js_Register &= "&RespArea=" & Me.ddlRespArea.SelectedValue.ToString
js_Register &= "&RankNo=" & e.Row.Cells(0).Text
js_Register &= "&AlarmRank=" & Me.txt_AlarmRank.Text
'js_Register &= "&UniqueContent=" & e.Row.Cells(3).Text
'Dim a As String = e.Row.Cells(3).Text.Replace("%", "%25").Replace("﹦", "%3D").Replace("#", "%23").Replace("/", "%2F").Replace(":", "%3A").Replace(",", "%2C").Replace("-", "%2D").Replace(" ", "")
Dim a As String = e.Row.Cells(3).Text.Replace("﹦", "%3D").Replace(".", "%2E").Replace("#", "%23").Replace("%", "%25").Replace(":", "%3A").Replace(",", "%2C")
js_Register &= "&Content=" & Server.UrlEncode(a)
'上下限管制異常:H , C4530 #2DE-TOL 壓力控制 PV UPPER LIMIT 警示一 PV ﹦ 339 UNIT:Torr
js_Register &= "&AlmCnt=" & e.Row.Cells(4).Text
If e.Row.Cells(3).Text <> "" Then
Dim source As String = e.Row.Cells(3).Text
Dim str As String() = New String() {","}
Dim UniqueContentSplit As String() = source.Split(str, StringSplitOptions.RemoveEmptyEntries)
Dim Uniq As String
Uniq = UniqueContentSplit(0)
If Uniq = "上下限管制異常:H " Then
js_Register &= "&UniqueContent=" & Server.UrlEncode("上下限管制異常: H")
ElseIf Uniq = "上下限管制異常:HH " Then
js_Register &= "&UniqueContent=" & Server.UrlEncode("上下限管制異常: HH")
ElseIf Uniq = "上下限管制異常:L " Then
js_Register &= "&UniqueContent=" & Server.UrlEncode("上下限管制異常: L")
ElseIf Uniq = "上下限管制異常:LL " Then
js_Register &= "&UniqueContent=" & Server.UrlEncode("上下限管制異常: LL")
'Else
' js_Register &= UniqueContentSplit(0)
End If
End If
js_Register &= "&process=" & ProcessName
js_Register &= "','','dialogWidth=850px,dialogHeight=300px');window.close();"
Dim YorN As Boolean
YorN = Comparison(e.Row.Cells(1).Text, e.Row.Cells(3).Text)
If YorN = True Then
CType(e.Row.Cells(6).Controls(0), ImageButton).Visible = False
CType(e.Row.Cells(7).Controls(0), ImageButton).Visible = True
Else
CType(e.Row.Cells(6).Controls(0), ImageButton).OnClientClick = js_Register
CType(e.Row.Cells(7).Controls(0), ImageButton).Visible = False
End If
End If
Catch ex As Exception
MyBase.showAlertMsg(Utility.handlePageException(ex, MyBase.tracker))
End Try
End Sub
2014年8月13日 星期三
換成民國年
'換成民國年
Dim YrMn = Left(strLSYrMn, 4) - 1911 & strLSYrMn.Substring(4, 2)
If YrMn.Length = 4 Then
YrMn = YrMn.PadLeft(YrMn.Length + 1, Char.Parse(" "))
End If
Dim YrMn = Left(strLSYrMn, 4) - 1911 & strLSYrMn.Substring(4, 2)
If YrMn.Length = 4 Then
YrMn = YrMn.PadLeft(YrMn.Length + 1, Char.Parse(" "))
End If
迴圈開control ID
For i = 2 To 17
Dim ltemp As Label
ltemp = DirectCast(FindControl("Label" & i), Label)
ltemp.Text = "0"
Next
For i = 0 To sMTPLD.Length - 1
DirectCast(FindControl("TextBox" & i + 1), TextBox).Text = ""
DirectCast(FindControl("TextBox" & i + 17), TextBox).Text = ""
DirectCast(FindControl("DetailHyperLink" & i + 1), HyperLink).NavigateUrl = ""
Next
Dim ltemp As Label
ltemp = DirectCast(FindControl("Label" & i), Label)
ltemp.Text = "0"
Next
For i = 0 To sMTPLD.Length - 1
DirectCast(FindControl("TextBox" & i + 1), TextBox).Text = ""
DirectCast(FindControl("TextBox" & i + 17), TextBox).Text = ""
DirectCast(FindControl("DetailHyperLink" & i + 1), HyperLink).NavigateUrl = ""
Next
2014年7月29日 星期二
javascript:window.showModalDialog 需配合 gvCheckRec_RowCommand 才可以實現子視窗關閉後重新綁訂GridView
Protected Sub gvCheckRec_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles gvCheckRec.RowCommand
Try
bindGv()
Catch ex As Exception
MyBase.showAlertMsg(Utility.handlePageException(ex, MyBase.tracker))
End Try
End Sub
====================================================================
Protected Sub gvCheckRec_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles gvCheckRec.RowDataBound
Dim js As String = ""
Dim js_Register As String = ""
Dim ProcessName As String = ""
Dim RespArea As String = ""
Dim dllclass As String = ""
Dim UniqueContent As String = ""
Dim button As New Button
Dim rank As Integer = 1
Try
If e.Row.RowType = DataControlRowType.Pager Then
e.Row.Style.Add("text-align", "center")
e.Row.Style.Add("height", "40px")
e.Row.Style.Add("background-image", "")
End If
'GV項次
If (e.Row.RowIndex >= 0 And e.Row.RowType = DataControlRowType.DataRow) Then
js = "javascript:window.open('RptDcsAlm_AnaTool_Detail.aspx?"
js &= "&rptid=RptDcsAlm_BasMgt_SumQuery.aspx"
js &= "&start=" & Me.txtDate_OccStart.Text
js &= "&end=" & Me.txtDate_OccEnd.Text
js &= "&class=" & dllclass
js &= "&TagNo=" & e.Row.Cells(1).Text
js &= "&process=" & ProcessName
js &= "&RespArea=" & RespArea
'js &= "&UniqueContent=" & e.Row.Cells(3).Text
If e.Row.Cells(3).Text <> "" Then
Dim source As String = e.Row.Cells(3).Text
Dim str As String() = New String() {","}
Dim UniqueContentSplit As String() = source.Split(str, StringSplitOptions.RemoveEmptyEntries)
Dim Uniq As String
Uniq = UniqueContentSplit(0)
If Uniq = "上下限管制異常:H " Then
js &= "&UniqueContent=上下限管制異常: H"
ElseIf Uniq = "上下限管制異常:HH " Then
js &= "&UniqueContent=上下限管制異常: HH"
ElseIf Uniq = "上下限管制異常:L " Then
js &= "&UniqueContent=上下限管制異常: L"
ElseIf Uniq = "上下限管制異常:LL " Then
js &= "&UniqueContent=上下限管制異常: LL"
End If
End If
If Me.ddlLevelType.SelectedIndex = 1 Then
js &= "&ddlLevel=Level1"
ElseIf Me.ddlLevelType.SelectedIndex = 2 Then
js &= "&ddlLevel=Level2"
ElseIf Me.ddlLevelType.SelectedIndex = 3 Then
js &= "&ddlLevel=Level3"
Else
js &= "&ddlLevel="
End If
js &= "','_blank', 'status=yes,left=350,top=200,width=1100,height=500');"
CType(e.Row.Cells(5).Controls(0), ImageButton).OnClientClick = js
js_Register = "javascript:window.showModalDialog('MntDcsAlm_BasMgt_AlmSumRegister.aspx?"
'js_Register = "javascript:window.open('MntDcsAlm_BasMgt_AlmSumRegister.aspx?"
js_Register &= "&rptid=RptDcsAlm_BasMgt_SumQuery.aspx"
js_Register &= "&start=" & Me.txtDate_OccStart.Text
js_Register &= "&end=" & Me.txtDate_OccEnd.Text
js_Register &= "&class=" & dllclass
js_Register &= "&TagNo=" & e.Row.Cells(1).Text
js_Register &= "&process=" & ProcessName
js_Register &= "&RespArea=" & Me.ddlRespArea.SelectedValue.ToString
js_Register &= "&RankNo=" & e.Row.Cells(0).Text
js_Register &= "&AlarmRank=" & Me.txt_AlarmRank.Text
js_Register &= "&UniqueContent=" & e.Row.Cells(3).Text
js_Register &= "&AlmCnt=" & e.Row.Cells(4).Text
If e.Row.Cells(3).Text <> "" Then
Dim source As String = e.Row.Cells(3).Text
Dim str As String() = New String() {","}
Dim UniqueContentSplit As String() = source.Split(str, StringSplitOptions.RemoveEmptyEntries)
Dim Uniq As String
Uniq = UniqueContentSplit(0)
If Uniq = "上下限管制異常:H " Then
js_Register &= "&UniqueContent=上下限管制異常: H"
ElseIf Uniq = "上下限管制異常:HH " Then
js_Register &= "&UniqueContent=上下限管制異常: HH"
ElseIf Uniq = "上下限管制異常:L " Then
js_Register &= "&UniqueContent=上下限管制異常: L"
ElseIf Uniq = "上下限管制異常:LL " Then
js_Register &= "&UniqueContent=上下限管制異常: LL"
End If
End If
If e.Row.Cells(2).Text = "輕故障" Then
js_Register &= "&ddlLevel=Level3"
ElseIf e.Row.Cells(2).Text = "中故障" Then
js_Register &= "&ddlLevel=Level2"
ElseIf e.Row.Cells(2).Text = "重故障" Then
js_Register &= "&ddlLevel=Level1"
Else
js_Register &= "&ddlLevel="
End If
js_Register &= "','','dialogWidth=850px,dialogHeight=300px');window.close();"
Dim YorN As Boolean
If myenumber = e.Row.RowIndex Then
YorN = Comparison(dtCheckRecRank, myenumber)
myenumber += 1
If YorN = True Then
CType(e.Row.Cells(6).Controls(0), ImageButton).Visible = False
Else
CType(e.Row.Cells(6).Controls(0), ImageButton).OnClientClick = js_Register
End If
End If
Dim u As Integer = myenumber - 10
If u = e.Row.RowIndex Then
YorN = Comparison(dtCheckRecRank, u)
myenumber += 1
If YorN = True Then
CType(e.Row.Cells(6).Controls(0), ImageButton).Visible = False
Else
CType(e.Row.Cells(6).Controls(0), ImageButton).OnClientClick = js_Register
End If
End If
'Dim YorN As Boolean
'If myenumber <= dtCheckRecRank.Rows.Count - 1 Then
' 'If myenumber = dtCheckRec.Rows.Count - 1 Then
' ' myenumber = myenumber
' ' YorN = Comparison(dtCheckRec, myenumber)
' 'Else
' YorN = Comparison(dtCheckRecRank, myenumber)
' myenumber += 1
' 'End If
' If YorN = True Then
' CType(e.Row.Cells(6).Controls(0), ImageButton).Visible = False
' Else
' CType(e.Row.Cells(6).Controls(0), ImageButton).OnClientClick = js_Register
' End If
'Else
' myenumber = 0
' 'If myenumber = dtCheckRec.Rows.Count - 1 Then
' ' myenumber = myenumber
' ' YorN = Comparison(dtCheckRec, myenumber)
' 'Else
' YorN = Comparison(dtCheckRecRank, myenumber)
' myenumber += 1
' 'End If
' If YorN = True Then
' CType(e.Row.Cells(6).Controls(0), ImageButton).Visible = False
' Else
' CType(e.Row.Cells(6).Controls(0), ImageButton).OnClientClick = js_Register
' End If
'End If
End If
Catch ex As Exception
MyBase.showAlertMsg(Utility.handlePageException(ex, MyBase.tracker))
End Try
End Sub
Try
bindGv()
Catch ex As Exception
MyBase.showAlertMsg(Utility.handlePageException(ex, MyBase.tracker))
End Try
End Sub
====================================================================
Protected Sub gvCheckRec_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles gvCheckRec.RowDataBound
Dim js As String = ""
Dim js_Register As String = ""
Dim ProcessName As String = ""
Dim RespArea As String = ""
Dim dllclass As String = ""
Dim UniqueContent As String = ""
Dim button As New Button
Dim rank As Integer = 1
Try
If e.Row.RowType = DataControlRowType.Pager Then
e.Row.Style.Add("text-align", "center")
e.Row.Style.Add("height", "40px")
e.Row.Style.Add("background-image", "")
End If
'GV項次
If (e.Row.RowIndex >= 0 And e.Row.RowType = DataControlRowType.DataRow) Then
js = "javascript:window.open('RptDcsAlm_AnaTool_Detail.aspx?"
js &= "&rptid=RptDcsAlm_BasMgt_SumQuery.aspx"
js &= "&start=" & Me.txtDate_OccStart.Text
js &= "&end=" & Me.txtDate_OccEnd.Text
js &= "&class=" & dllclass
js &= "&TagNo=" & e.Row.Cells(1).Text
js &= "&process=" & ProcessName
js &= "&RespArea=" & RespArea
'js &= "&UniqueContent=" & e.Row.Cells(3).Text
If e.Row.Cells(3).Text <> "" Then
Dim source As String = e.Row.Cells(3).Text
Dim str As String() = New String() {","}
Dim UniqueContentSplit As String() = source.Split(str, StringSplitOptions.RemoveEmptyEntries)
Dim Uniq As String
Uniq = UniqueContentSplit(0)
If Uniq = "上下限管制異常:H " Then
js &= "&UniqueContent=上下限管制異常: H"
ElseIf Uniq = "上下限管制異常:HH " Then
js &= "&UniqueContent=上下限管制異常: HH"
ElseIf Uniq = "上下限管制異常:L " Then
js &= "&UniqueContent=上下限管制異常: L"
ElseIf Uniq = "上下限管制異常:LL " Then
js &= "&UniqueContent=上下限管制異常: LL"
End If
End If
If Me.ddlLevelType.SelectedIndex = 1 Then
js &= "&ddlLevel=Level1"
ElseIf Me.ddlLevelType.SelectedIndex = 2 Then
js &= "&ddlLevel=Level2"
ElseIf Me.ddlLevelType.SelectedIndex = 3 Then
js &= "&ddlLevel=Level3"
Else
js &= "&ddlLevel="
End If
js &= "','_blank', 'status=yes,left=350,top=200,width=1100,height=500');"
CType(e.Row.Cells(5).Controls(0), ImageButton).OnClientClick = js
js_Register = "javascript:window.showModalDialog('MntDcsAlm_BasMgt_AlmSumRegister.aspx?"
'js_Register = "javascript:window.open('MntDcsAlm_BasMgt_AlmSumRegister.aspx?"
js_Register &= "&rptid=RptDcsAlm_BasMgt_SumQuery.aspx"
js_Register &= "&start=" & Me.txtDate_OccStart.Text
js_Register &= "&end=" & Me.txtDate_OccEnd.Text
js_Register &= "&class=" & dllclass
js_Register &= "&TagNo=" & e.Row.Cells(1).Text
js_Register &= "&process=" & ProcessName
js_Register &= "&RespArea=" & Me.ddlRespArea.SelectedValue.ToString
js_Register &= "&RankNo=" & e.Row.Cells(0).Text
js_Register &= "&AlarmRank=" & Me.txt_AlarmRank.Text
js_Register &= "&UniqueContent=" & e.Row.Cells(3).Text
js_Register &= "&AlmCnt=" & e.Row.Cells(4).Text
If e.Row.Cells(3).Text <> "" Then
Dim source As String = e.Row.Cells(3).Text
Dim str As String() = New String() {","}
Dim UniqueContentSplit As String() = source.Split(str, StringSplitOptions.RemoveEmptyEntries)
Dim Uniq As String
Uniq = UniqueContentSplit(0)
If Uniq = "上下限管制異常:H " Then
js_Register &= "&UniqueContent=上下限管制異常: H"
ElseIf Uniq = "上下限管制異常:HH " Then
js_Register &= "&UniqueContent=上下限管制異常: HH"
ElseIf Uniq = "上下限管制異常:L " Then
js_Register &= "&UniqueContent=上下限管制異常: L"
ElseIf Uniq = "上下限管制異常:LL " Then
js_Register &= "&UniqueContent=上下限管制異常: LL"
End If
End If
If e.Row.Cells(2).Text = "輕故障" Then
js_Register &= "&ddlLevel=Level3"
ElseIf e.Row.Cells(2).Text = "中故障" Then
js_Register &= "&ddlLevel=Level2"
ElseIf e.Row.Cells(2).Text = "重故障" Then
js_Register &= "&ddlLevel=Level1"
Else
js_Register &= "&ddlLevel="
End If
js_Register &= "','','dialogWidth=850px,dialogHeight=300px');window.close();"
Dim YorN As Boolean
If myenumber = e.Row.RowIndex Then
YorN = Comparison(dtCheckRecRank, myenumber)
myenumber += 1
If YorN = True Then
CType(e.Row.Cells(6).Controls(0), ImageButton).Visible = False
Else
CType(e.Row.Cells(6).Controls(0), ImageButton).OnClientClick = js_Register
End If
End If
Dim u As Integer = myenumber - 10
If u = e.Row.RowIndex Then
YorN = Comparison(dtCheckRecRank, u)
myenumber += 1
If YorN = True Then
CType(e.Row.Cells(6).Controls(0), ImageButton).Visible = False
Else
CType(e.Row.Cells(6).Controls(0), ImageButton).OnClientClick = js_Register
End If
End If
'Dim YorN As Boolean
'If myenumber <= dtCheckRecRank.Rows.Count - 1 Then
' 'If myenumber = dtCheckRec.Rows.Count - 1 Then
' ' myenumber = myenumber
' ' YorN = Comparison(dtCheckRec, myenumber)
' 'Else
' YorN = Comparison(dtCheckRecRank, myenumber)
' myenumber += 1
' 'End If
' If YorN = True Then
' CType(e.Row.Cells(6).Controls(0), ImageButton).Visible = False
' Else
' CType(e.Row.Cells(6).Controls(0), ImageButton).OnClientClick = js_Register
' End If
'Else
' myenumber = 0
' 'If myenumber = dtCheckRec.Rows.Count - 1 Then
' ' myenumber = myenumber
' ' YorN = Comparison(dtCheckRec, myenumber)
' 'Else
' YorN = Comparison(dtCheckRecRank, myenumber)
' myenumber += 1
' 'End If
' If YorN = True Then
' CType(e.Row.Cells(6).Controls(0), ImageButton).Visible = False
' Else
' CType(e.Row.Cells(6).Controls(0), ImageButton).OnClientClick = js_Register
' End If
'End If
End If
Catch ex As Exception
MyBase.showAlertMsg(Utility.handlePageException(ex, MyBase.tracker))
End Try
End Sub
2014年7月23日 星期三
取出SQL 的Table名稱
Dim tablename As String = ""
Dim a As Char = " "
Dim split1 As String = DtDirectAccess.Rows(i)("SqlStatement")
split1 = split1.ToUpper
Dim split2 As String() = split1.Split(a)
For j As Integer = 0 To split2.Length - 1 Step 1
Dim Str1 As String = split2(j)
If Str1 = "FROM" Then
tablename = split2(j + 1)
End If
Next
Dim a As Char = " "
Dim split1 As String = DtDirectAccess.Rows(i)("SqlStatement")
split1 = split1.ToUpper
Dim split2 As String() = split1.Split(a)
For j As Integer = 0 To split2.Length - 1 Step 1
Dim Str1 As String = split2(j)
If Str1 = "FROM" Then
tablename = split2(j + 1)
End If
Next
2014年7月20日 星期日
[VB.NET] 時間轉換(上下午時間轉為24小時制)
Public Function ConvertTo24hr(ByVal time As String) As String
Dim IntAM, IntPM As Integer
Dim IntMStr, IntMStrDay, IntMStrMins, IntMStrYear, IntMStrMonth, IntMStrHours, IntMStrSec As String
IntAM = InStr(time, "上午") '不等於0為有上午字串
IntPM = InStr(time, "下午")
If time <> "" Then
If IntAM <> 0 Then
time = time.Replace("上午", "")
Dim time2 As String = time
Dim timSplit As String() = time.Split("/")
Dim timSplit2 As String() = time2.Split(" ")
IntMStrYear = timSplit(0)
IntMStrMonth = timSplit(1)
IntMStrMonth = IntMStrMonth.PadLeft(2, "0")
time = IntMStrYear + "-" + IntMStrMonth + "-" + timSplit(2)
IntMStrDay = time.Substring(7, 3)
IntMStrDay = IntMStrDay.Replace("-", "")
IntMStrDay = IntMStrDay.Replace(" ", "")
IntMStrDay = IntMStrDay.PadLeft(2, "0")
time = IntMStrYear + "-" + IntMStrMonth + "-" + IntMStrDay + " " + timSplit2(2)
Dim time3 As String() = time.Split(" ")
Dim HrMiSe As String = time3(1)
Dim HrMiSe2 As String() = HrMiSe.Split(":")
IntMStrHours = HrMiSe2(0)
IntMStrMins = HrMiSe2(1)
IntMStrSec = HrMiSe2(2)
IntMStr = Mid(time, 12, 2)
IntAM = Convert.ToInt32(IntMStr)
If IntAM = 12 Then
IntAM = IntAM - 12
IntMStr = IntAM.ToString
IntMStr = IntMStr.PadLeft(2, "0")
Else
IntAM = 0 + IntAM
IntMStr = IntAM.ToString
IntMStr = IntMStr.PadLeft(2, "0")
End If
time = IntMStrYear + "-" + IntMStrMonth + "-" + IntMStrDay + " " + IntMStr + ":" + IntMStrMins + ":" + IntMStrSec
ElseIf IntPM <> 0 Then
time = time.Replace("下午", "")
Dim time2 As String = time
Dim timSplit As String() = time.Split("/")
Dim timSplit2 As String() = time2.Split(" ")
IntMStrYear = timSplit(0)
IntMStrMonth = timSplit(1)
IntMStrMonth = IntMStrMonth.PadLeft(2, "0")
time = IntMStrYear + "-" + IntMStrMonth + "-" + timSplit(2)
IntMStrDay = time.Substring(7, 3)
IntMStrDay = IntMStrDay.Replace("-", "")
IntMStrDay = IntMStrDay.Replace(" ", "")
IntMStrDay = IntMStrDay.PadLeft(2, "0")
time = IntMStrYear + "-" + IntMStrMonth + "-" + IntMStrDay + " " + timSplit2(2)
Dim time3 As String() = time.Split(" ")
Dim HrMiSe As String = time3(1)
Dim HrMiSe2 As String() = HrMiSe.Split(":")
IntMStrHours = HrMiSe2(0)
IntMStrMins = HrMiSe2(1)
IntMStrSec = HrMiSe2(2)
IntMStr = Mid(time, 12, 2)
IntAM = Convert.ToInt32(IntMStr)
If IntAM = 12 Then
IntAM = IntAM
IntMStr = IntAM.ToString
IntMStr = IntMStr.PadLeft(2, "0")
Else
IntAM = 12 + IntAM
IntMStr = IntAM.ToString
IntMStr = IntMStr.PadLeft(2, "0")
End If
time = IntMStrYear + "-" + IntMStrMonth + "-" + IntMStrDay + " " + IntMStr + ":" + IntMStrMins + ":" + IntMStrSec
End If
End If
Return time
End Function
Dim IntAM, IntPM As Integer
Dim IntMStr, IntMStrDay, IntMStrMins, IntMStrYear, IntMStrMonth, IntMStrHours, IntMStrSec As String
IntAM = InStr(time, "上午") '不等於0為有上午字串
IntPM = InStr(time, "下午")
If time <> "" Then
If IntAM <> 0 Then
time = time.Replace("上午", "")
Dim time2 As String = time
Dim timSplit As String() = time.Split("/")
Dim timSplit2 As String() = time2.Split(" ")
IntMStrYear = timSplit(0)
IntMStrMonth = timSplit(1)
IntMStrMonth = IntMStrMonth.PadLeft(2, "0")
time = IntMStrYear + "-" + IntMStrMonth + "-" + timSplit(2)
IntMStrDay = time.Substring(7, 3)
IntMStrDay = IntMStrDay.Replace("-", "")
IntMStrDay = IntMStrDay.Replace(" ", "")
IntMStrDay = IntMStrDay.PadLeft(2, "0")
time = IntMStrYear + "-" + IntMStrMonth + "-" + IntMStrDay + " " + timSplit2(2)
Dim time3 As String() = time.Split(" ")
Dim HrMiSe As String = time3(1)
Dim HrMiSe2 As String() = HrMiSe.Split(":")
IntMStrHours = HrMiSe2(0)
IntMStrMins = HrMiSe2(1)
IntMStrSec = HrMiSe2(2)
IntMStr = Mid(time, 12, 2)
IntAM = Convert.ToInt32(IntMStr)
If IntAM = 12 Then
IntAM = IntAM - 12
IntMStr = IntAM.ToString
IntMStr = IntMStr.PadLeft(2, "0")
Else
IntAM = 0 + IntAM
IntMStr = IntAM.ToString
IntMStr = IntMStr.PadLeft(2, "0")
End If
time = IntMStrYear + "-" + IntMStrMonth + "-" + IntMStrDay + " " + IntMStr + ":" + IntMStrMins + ":" + IntMStrSec
ElseIf IntPM <> 0 Then
time = time.Replace("下午", "")
Dim time2 As String = time
Dim timSplit As String() = time.Split("/")
Dim timSplit2 As String() = time2.Split(" ")
IntMStrYear = timSplit(0)
IntMStrMonth = timSplit(1)
IntMStrMonth = IntMStrMonth.PadLeft(2, "0")
time = IntMStrYear + "-" + IntMStrMonth + "-" + timSplit(2)
IntMStrDay = time.Substring(7, 3)
IntMStrDay = IntMStrDay.Replace("-", "")
IntMStrDay = IntMStrDay.Replace(" ", "")
IntMStrDay = IntMStrDay.PadLeft(2, "0")
time = IntMStrYear + "-" + IntMStrMonth + "-" + IntMStrDay + " " + timSplit2(2)
Dim time3 As String() = time.Split(" ")
Dim HrMiSe As String = time3(1)
Dim HrMiSe2 As String() = HrMiSe.Split(":")
IntMStrHours = HrMiSe2(0)
IntMStrMins = HrMiSe2(1)
IntMStrSec = HrMiSe2(2)
IntMStr = Mid(time, 12, 2)
IntAM = Convert.ToInt32(IntMStr)
If IntAM = 12 Then
IntAM = IntAM
IntMStr = IntAM.ToString
IntMStr = IntMStr.PadLeft(2, "0")
Else
IntAM = 12 + IntAM
IntMStr = IntAM.ToString
IntMStr = IntMStr.PadLeft(2, "0")
End If
time = IntMStrYear + "-" + IntMStrMonth + "-" + IntMStrDay + " " + IntMStr + ":" + IntMStrMins + ":" + IntMStrSec
End If
End If
Return time
End Function
2014年5月27日 星期二
2014年5月20日 星期二
GridView 開起排序功能 表頭會有底線
GridView 開起排序功能 表頭會有底線
<asp:BoundField DataField="USER_DEPT" SortExpression="USER_DEPT" HeaderText="所屬部門">
<ItemStyle HorizontalAlign="Center" CssClass="LeftRightBorderCss"></ItemStyle>
<HeaderStyle HorizontalAlign="Center" Font-Bold="False"></HeaderStyle>
</asp:BoundField>
如要取消底線 只需把 SortExpression="USER_DEPT" 拿掉,但會失去排序功能。
<asp:BoundField DataField="USER_DEPT" SortExpression="USER_DEPT" HeaderText="所屬部門">
<ItemStyle HorizontalAlign="Center" CssClass="LeftRightBorderCss"></ItemStyle>
<HeaderStyle HorizontalAlign="Center" Font-Bold="False"></HeaderStyle>
</asp:BoundField>
如要取消底線 只需把 SortExpression="USER_DEPT" 拿掉,但會失去排序功能。
2014年5月15日 星期四
訂閱:
文章 (Atom)