12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148 |
- Option Strict Off
- Public Class 排班資料
- ReadOnly ds, ds1, ds2, ds3, ds4, ds5, ds6, ds7, ds8, ds9, ds10, ds11, ds12, ds13, ds14, ds15, ds16, ds17, ds18, ds19, ds20, ds21, ds22, ds23, ds24, ds25, ds26, ds27, ds28, ds29, ds30, ds31,
- ds32, ds33, ds34, ds35, ds36, ds37, ds38, ds39, ds40, ds41, ds42, ds43 As New DataSet
- Dim 星期 As String : Dim 天數, 總時數, 列高, 列高1, 欄寬1, 欄寬2 As Integer
- Dim 首次開啟 As Boolean : Dim 對話框(13) As String
- Private Sub 年份_下拉表單資料載入()
- SQL_年份清單() : 年份_cb.Items.Clear() : While (dr.Read()) : 年份_cb.Items.Add(dr("年份")) : End While : conn.Close()
- End Sub
- Private Sub 讀取日期()
- 日期_dgv.DataSource = Nothing : ds.Clear()
- 日期_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- 日期_dgv.ColumnHeadersHeight = 25 : 日期_dgv.AllowUserToAddRows = False
- SQL_排班系統_月份()
- da.Fill(ds) : 日期_dgv.DataSource = ds.Tables(0) : conn.Close()
- For i As Integer = 0 To 日期_dgv.Rows.Count - 1 : 日期_dgv.Rows(i).Cells("休假").Value = "" : Next
- End Sub
- Private Sub 讀取班別1()
- DGV1.DataSource = Nothing : ds1.Clear()
- DGV1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV1.ColumnHeadersHeight = 列高1 : DGV1.AllowUserToAddRows = False : DGV1.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds1) : DGV1.DataSource = ds1.Tables(0) : conn.Close()
- DGV1.Columns(0).FillWeight = 欄寬1 : DGV1.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV1.Rows.Count - 1
- If DGV1.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV1.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV1.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV1.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV1.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV1.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV1.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV1.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV1.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV1.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV1.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV1.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別2()
- DGV2.DataSource = Nothing : ds2.Clear()
- DGV2.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV2.ColumnHeadersHeight = 列高1 : DGV2.AllowUserToAddRows = False : DGV2.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds2) : DGV2.DataSource = ds2.Tables(0) : conn.Close()
- DGV2.Columns(0).FillWeight = 欄寬1 : DGV2.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV2.Rows.Count - 1
- If DGV2.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV2.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV2.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV2.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV2.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV2.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV2.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV2.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV2.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV2.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV2.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV2.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別3()
- DGV3.DataSource = Nothing : ds3.Clear()
- DGV3.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV3.ColumnHeadersHeight = 列高1 : DGV3.AllowUserToAddRows = False : DGV3.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds3) : DGV3.DataSource = ds3.Tables(0) : conn.Close()
- DGV3.Columns(0).FillWeight = 欄寬1 : DGV3.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV3.Rows.Count - 1
- If DGV3.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV3.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV3.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV3.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV3.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV3.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV3.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV3.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV3.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV3.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV3.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV3.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別4()
- DGV4.DataSource = Nothing : ds4.Clear()
- DGV4.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV4.ColumnHeadersHeight = 列高1 : DGV4.AllowUserToAddRows = False : DGV4.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds4) : DGV4.DataSource = ds4.Tables(0) : conn.Close()
- DGV4.Columns(0).FillWeight = 欄寬1 : DGV4.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV4.Rows.Count - 1
- If DGV4.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV4.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV4.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV4.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV4.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV4.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV4.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV4.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV4.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV4.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV4.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV4.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別5()
- DGV5.DataSource = Nothing : ds5.Clear()
- DGV5.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV5.ColumnHeadersHeight = 列高1 : DGV5.AllowUserToAddRows = False : DGV5.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds5) : DGV5.DataSource = ds5.Tables(0) : conn.Close()
- DGV5.Columns(0).FillWeight = 欄寬1 : DGV5.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV5.Rows.Count - 1
- If DGV5.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV5.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV5.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV5.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV5.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV5.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV5.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV5.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV5.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV5.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV5.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV5.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別6()
- DGV6.DataSource = Nothing : ds6.Clear()
- DGV6.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV6.ColumnHeadersHeight = 列高1 : DGV6.AllowUserToAddRows = False : DGV6.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds6) : DGV6.DataSource = ds6.Tables(0) : conn.Close()
- DGV6.Columns(0).FillWeight = 欄寬1 : DGV6.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV6.Rows.Count - 1
- If DGV6.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV6.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV6.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV6.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV6.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV6.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV6.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV6.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV6.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV6.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV6.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV6.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別7()
- DGV7.DataSource = Nothing : ds7.Clear()
- DGV7.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV7.ColumnHeadersHeight = 列高1 : DGV7.AllowUserToAddRows = False : DGV7.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds7) : DGV7.DataSource = ds7.Tables(0) : conn.Close()
- DGV7.Columns(0).FillWeight = 欄寬1 : DGV7.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV7.Rows.Count - 1
- If DGV7.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV7.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV7.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV7.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV7.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV7.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV7.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV7.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV7.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV7.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV7.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV7.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別8()
- DGV8.DataSource = Nothing : ds8.Clear()
- DGV8.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV8.ColumnHeadersHeight = 列高1 : DGV8.AllowUserToAddRows = False : DGV8.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds8) : DGV8.DataSource = ds8.Tables(0) : conn.Close()
- DGV8.Columns(0).FillWeight = 欄寬1 : DGV8.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV8.Rows.Count - 1
- If DGV8.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV8.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV8.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV8.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV8.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV8.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV8.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV8.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV8.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV8.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV8.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV8.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別9()
- DGV9.DataSource = Nothing : ds9.Clear()
- DGV9.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV9.ColumnHeadersHeight = 列高1 : DGV9.AllowUserToAddRows = False : DGV9.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds9) : DGV9.DataSource = ds9.Tables(0) : conn.Close()
- DGV9.Columns(0).FillWeight = 欄寬1 : DGV9.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV9.Rows.Count - 1
- If DGV9.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV9.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV9.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV9.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV9.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV9.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV9.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV9.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV9.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV9.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV9.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV9.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別10()
- DGV10.DataSource = Nothing : ds10.Clear()
- DGV10.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV10.ColumnHeadersHeight = 列高1 : DGV10.AllowUserToAddRows = False : DGV10.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds10) : DGV10.DataSource = ds10.Tables(0) : conn.Close()
- DGV10.Columns(0).FillWeight = 欄寬1 : DGV10.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV10.Rows.Count - 1
- If DGV10.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV10.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV10.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV10.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV10.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV10.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV10.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV10.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV10.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV10.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV10.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV10.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別11()
- DGV11.DataSource = Nothing : ds11.Clear()
- DGV11.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV11.ColumnHeadersHeight = 列高1 : DGV11.AllowUserToAddRows = False : DGV11.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds11) : DGV11.DataSource = ds11.Tables(0) : conn.Close()
- DGV11.Columns(0).FillWeight = 欄寬1 : DGV11.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV11.Rows.Count - 1
- If DGV11.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV11.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV11.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV11.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV11.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV11.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV11.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV11.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV11.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV11.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV11.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV11.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別12()
- DGV12.DataSource = Nothing : ds12.Clear()
- DGV12.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV12.ColumnHeadersHeight = 列高1 : DGV12.AllowUserToAddRows = False : DGV12.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds12) : DGV12.DataSource = ds12.Tables(0) : conn.Close()
- DGV12.Columns(0).FillWeight = 欄寬1 : DGV12.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV12.Rows.Count - 1
- If DGV12.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV12.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV12.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV12.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV12.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV12.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV12.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV12.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV12.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV12.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV12.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV12.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別13()
- DGV13.DataSource = Nothing : ds13.Clear()
- DGV13.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV13.ColumnHeadersHeight = 列高1 : DGV13.AllowUserToAddRows = False : DGV13.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds13) : DGV13.DataSource = ds13.Tables(0) : conn.Close()
- DGV13.Columns(0).FillWeight = 欄寬1 : DGV13.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV13.Rows.Count - 1
- If DGV13.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV13.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV13.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV13.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV13.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV13.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV13.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV13.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV13.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV13.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV13.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV13.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別14()
- DGV14.DataSource = Nothing : ds14.Clear()
- DGV14.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV14.ColumnHeadersHeight = 列高1 : DGV14.AllowUserToAddRows = False : DGV14.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds14) : DGV14.DataSource = ds14.Tables(0) : conn.Close()
- DGV14.Columns(0).FillWeight = 欄寬1 : DGV14.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV14.Rows.Count - 1
- If DGV14.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV14.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV14.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV14.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV14.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV14.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV14.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV14.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV14.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV14.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV14.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV14.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別15()
- DGV15.DataSource = Nothing : ds15.Clear()
- DGV15.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV15.ColumnHeadersHeight = 列高1 : DGV15.AllowUserToAddRows = False : DGV15.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds15) : DGV15.DataSource = ds15.Tables(0) : conn.Close()
- DGV15.Columns(0).FillWeight = 欄寬1 : DGV15.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV15.Rows.Count - 1
- If DGV15.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV15.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV15.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV15.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV15.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV15.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV15.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV15.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV15.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV15.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV15.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV15.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別16()
- DGV16.DataSource = Nothing : ds16.Clear()
- DGV16.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV16.ColumnHeadersHeight = 列高1 : DGV16.AllowUserToAddRows = False : DGV16.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds16) : DGV16.DataSource = ds16.Tables(0) : conn.Close()
- DGV16.Columns(0).FillWeight = 欄寬1 : DGV16.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV16.Rows.Count - 1
- If DGV16.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV16.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV16.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV16.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV16.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV16.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV16.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV16.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV16.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV16.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV16.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV16.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別17()
- DGV17.DataSource = Nothing : ds17.Clear()
- DGV17.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV17.ColumnHeadersHeight = 列高1 : DGV17.AllowUserToAddRows = False : DGV17.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds17) : DGV17.DataSource = ds17.Tables(0) : conn.Close()
- DGV17.Columns(0).FillWeight = 欄寬1 : DGV17.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV17.Rows.Count - 1
- If DGV17.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV17.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV17.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV17.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV17.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV17.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV17.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV17.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV17.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV17.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV17.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV17.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別18()
- DGV18.DataSource = Nothing : ds18.Clear()
- DGV18.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV18.ColumnHeadersHeight = 列高1 : DGV18.AllowUserToAddRows = False : DGV18.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds18) : DGV18.DataSource = ds18.Tables(0) : conn.Close()
- DGV18.Columns(0).FillWeight = 欄寬1 : DGV18.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV18.Rows.Count - 1
- If DGV18.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV18.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV18.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV18.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV18.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV18.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV18.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV18.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV18.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV18.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV18.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV18.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別19()
- DGV19.DataSource = Nothing : ds19.Clear()
- DGV19.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV19.ColumnHeadersHeight = 列高1 : DGV19.AllowUserToAddRows = False : DGV19.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds19) : DGV19.DataSource = ds19.Tables(0) : conn.Close()
- DGV19.Columns(0).FillWeight = 欄寬1 : DGV19.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV19.Rows.Count - 1
- If DGV19.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV19.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV19.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV19.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV19.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV19.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV19.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV19.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV19.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV19.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV19.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV19.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別20()
- DGV20.DataSource = Nothing : ds20.Clear()
- DGV20.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV20.ColumnHeadersHeight = 列高1 : DGV20.AllowUserToAddRows = False : DGV20.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds20) : DGV20.DataSource = ds20.Tables(0) : conn.Close()
- DGV20.Columns(0).FillWeight = 欄寬1 : DGV20.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV20.Rows.Count - 1
- If DGV20.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV20.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV20.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV20.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV20.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV20.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV20.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV20.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV20.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV20.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV20.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV20.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別21()
- DGV21.DataSource = Nothing : ds21.Clear()
- DGV21.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV21.ColumnHeadersHeight = 列高1 : DGV21.AllowUserToAddRows = False : DGV21.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds21) : DGV21.DataSource = ds21.Tables(0) : conn.Close()
- DGV21.Columns(0).FillWeight = 欄寬1 : DGV21.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV21.Rows.Count - 1
- If DGV21.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV21.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV21.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV21.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV21.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV21.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV21.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV21.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV21.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV21.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV21.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV21.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別22()
- DGV22.DataSource = Nothing : ds22.Clear()
- DGV22.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV22.ColumnHeadersHeight = 列高1 : DGV22.AllowUserToAddRows = False : DGV22.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds22) : DGV22.DataSource = ds22.Tables(0) : conn.Close()
- DGV22.Columns(0).FillWeight = 欄寬1 : DGV22.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV22.Rows.Count - 1
- If DGV22.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV22.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV22.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV22.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV22.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV22.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV22.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV22.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV22.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV22.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV22.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV22.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別23()
- DGV23.DataSource = Nothing : ds23.Clear()
- DGV23.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV23.ColumnHeadersHeight = 列高1 : DGV23.AllowUserToAddRows = False : DGV23.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds23) : DGV23.DataSource = ds23.Tables(0) : conn.Close()
- DGV23.Columns(0).FillWeight = 欄寬1 : DGV23.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV23.Rows.Count - 1
- If DGV23.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV23.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV23.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV23.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV23.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV23.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV23.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV23.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV23.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV23.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV23.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV23.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別24()
- DGV24.DataSource = Nothing : ds24.Clear()
- DGV24.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV24.ColumnHeadersHeight = 列高1 : DGV24.AllowUserToAddRows = False : DGV24.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds24) : DGV24.DataSource = ds24.Tables(0) : conn.Close()
- DGV24.Columns(0).FillWeight = 欄寬1 : DGV24.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV24.Rows.Count - 1
- If DGV24.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV24.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV24.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV24.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV24.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV24.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV24.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV24.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV24.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV24.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV24.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV24.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別25()
- DGV25.DataSource = Nothing : ds25.Clear()
- DGV25.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV25.ColumnHeadersHeight = 列高1 : DGV25.AllowUserToAddRows = False : DGV25.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds25) : DGV25.DataSource = ds25.Tables(0) : conn.Close()
- DGV25.Columns(0).FillWeight = 欄寬1 : DGV25.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV25.Rows.Count - 1
- If DGV25.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV25.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV25.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV25.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV25.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV25.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV25.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV25.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV25.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV25.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV25.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV25.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別26()
- DGV26.DataSource = Nothing : ds26.Clear()
- DGV26.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV26.ColumnHeadersHeight = 列高1 : DGV26.AllowUserToAddRows = False : DGV26.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds26) : DGV26.DataSource = ds26.Tables(0) : conn.Close()
- DGV26.Columns(0).FillWeight = 欄寬1 : DGV26.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV26.Rows.Count - 1
- If DGV26.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV26.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV26.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV26.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV26.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV26.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV26.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV26.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV26.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV26.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV26.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV26.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別27()
- DGV27.DataSource = Nothing : ds27.Clear()
- DGV27.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV27.ColumnHeadersHeight = 列高1 : DGV27.AllowUserToAddRows = False : DGV27.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds27) : DGV27.DataSource = ds27.Tables(0) : conn.Close()
- DGV27.Columns(0).FillWeight = 欄寬1 : DGV27.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV27.Rows.Count - 1
- If DGV27.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV27.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV27.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV27.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV27.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV27.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV27.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV27.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV27.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV27.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV27.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV27.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別28()
- DGV28.DataSource = Nothing : ds28.Clear()
- DGV28.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV28.ColumnHeadersHeight = 列高1 : DGV28.AllowUserToAddRows = False : DGV28.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds28) : DGV28.DataSource = ds28.Tables(0) : conn.Close()
- DGV28.Columns(0).FillWeight = 欄寬1 : DGV28.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV28.Rows.Count - 1
- If DGV28.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV28.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV28.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV28.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV28.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV28.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV28.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV28.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV28.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV28.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV28.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV28.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別29()
- DGV29.DataSource = Nothing : ds29.Clear()
- DGV29.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV29.ColumnHeadersHeight = 列高1 : DGV29.AllowUserToAddRows = False : DGV29.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds29) : DGV29.DataSource = ds29.Tables(0) : conn.Close()
- DGV29.Columns(0).FillWeight = 欄寬1 : DGV29.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV29.Rows.Count - 1
- If DGV29.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV29.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV29.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV29.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV29.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV29.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV29.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV29.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV29.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV29.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV29.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV29.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別30()
- DGV30.DataSource = Nothing : ds30.Clear()
- DGV30.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV30.ColumnHeadersHeight = 列高1 : DGV30.AllowUserToAddRows = False : DGV30.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds30) : DGV30.DataSource = ds30.Tables(0) : conn.Close()
- DGV30.Columns(0).FillWeight = 欄寬1 : DGV30.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV30.Rows.Count - 1
- If DGV30.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV30.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV30.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV30.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV30.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV30.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV30.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV30.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV30.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV30.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV30.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV30.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別31()
- DGV31.DataSource = Nothing : ds31.Clear()
- DGV31.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV31.ColumnHeadersHeight = 列高1 : DGV31.AllowUserToAddRows = False : DGV31.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds31) : DGV31.DataSource = ds31.Tables(0) : conn.Close()
- DGV31.Columns(0).FillWeight = 欄寬1 : DGV31.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV31.Rows.Count - 1
- If DGV31.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV31.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV31.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV31.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV31.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV31.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV31.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV31.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV31.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV31.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV31.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV31.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別32()
- DGV32.DataSource = Nothing : ds32.Clear()
- DGV32.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV32.ColumnHeadersHeight = 列高1 : DGV32.AllowUserToAddRows = False : DGV32.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds32) : DGV32.DataSource = ds32.Tables(0) : conn.Close()
- DGV32.Columns(0).FillWeight = 欄寬1 : DGV32.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV32.Rows.Count - 1
- If DGV32.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV32.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV32.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV32.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV32.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV32.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV32.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV32.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV32.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV32.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV32.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV32.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別33()
- DGV33.DataSource = Nothing : ds33.Clear()
- DGV33.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV33.ColumnHeadersHeight = 列高1 : DGV33.AllowUserToAddRows = False : DGV33.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds33) : DGV33.DataSource = ds33.Tables(0) : conn.Close()
- DGV33.Columns(0).FillWeight = 欄寬1 : DGV33.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV33.Rows.Count - 1
- If DGV33.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV33.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV33.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV33.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV33.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV33.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV33.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV33.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV33.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV33.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV33.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV33.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別34()
- DGV34.DataSource = Nothing : ds34.Clear()
- DGV34.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV34.ColumnHeadersHeight = 列高1 : DGV34.AllowUserToAddRows = False : DGV34.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds34) : DGV34.DataSource = ds34.Tables(0) : conn.Close()
- DGV34.Columns(0).FillWeight = 欄寬1 : DGV34.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV34.Rows.Count - 1
- If DGV34.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV34.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV34.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV34.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV34.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV34.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV34.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV34.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV34.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV34.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV34.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV34.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別35()
- DGV35.DataSource = Nothing : ds35.Clear()
- DGV35.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV35.ColumnHeadersHeight = 列高1 : DGV35.AllowUserToAddRows = False : DGV35.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds35) : DGV35.DataSource = ds35.Tables(0) : conn.Close()
- DGV35.Columns(0).FillWeight = 欄寬1 : DGV35.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV35.Rows.Count - 1
- If DGV35.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV35.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV35.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV35.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV35.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV35.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV35.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV35.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV35.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV35.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV35.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV35.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別36()
- DGV36.DataSource = Nothing : ds36.Clear()
- DGV36.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV36.ColumnHeadersHeight = 列高1 : DGV36.AllowUserToAddRows = False : DGV36.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds36) : DGV36.DataSource = ds36.Tables(0) : conn.Close()
- DGV36.Columns(0).FillWeight = 欄寬1 : DGV36.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV36.Rows.Count - 1
- If DGV36.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV36.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV36.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV36.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV36.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV36.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV36.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV36.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV36.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV36.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV36.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV36.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別37()
- DGV37.DataSource = Nothing : ds37.Clear()
- DGV37.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV37.ColumnHeadersHeight = 列高1 : DGV37.AllowUserToAddRows = False : DGV37.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds37) : DGV37.DataSource = ds37.Tables(0) : conn.Close()
- DGV37.Columns(0).FillWeight = 欄寬1 : DGV37.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV37.Rows.Count - 1
- If DGV37.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV37.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV37.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV37.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV37.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV37.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV37.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV37.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV37.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV37.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV37.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV37.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別38()
- DGV38.DataSource = Nothing : ds38.Clear()
- DGV38.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV38.ColumnHeadersHeight = 列高1 : DGV38.AllowUserToAddRows = False : DGV38.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds38) : DGV38.DataSource = ds38.Tables(0) : conn.Close()
- DGV38.Columns(0).FillWeight = 欄寬1 : DGV38.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV38.Rows.Count - 1
- If DGV38.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV38.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV38.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV38.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV38.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV38.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV38.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV38.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV38.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV38.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV38.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV38.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別39()
- DGV39.DataSource = Nothing : ds39.Clear()
- DGV39.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV39.ColumnHeadersHeight = 列高1 : DGV39.AllowUserToAddRows = False : DGV39.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds39) : DGV39.DataSource = ds39.Tables(0) : conn.Close()
- DGV39.Columns(0).FillWeight = 欄寬1 : DGV39.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV39.Rows.Count - 1
- If DGV39.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV39.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV39.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV39.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV39.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV39.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV39.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV39.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV39.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV39.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV39.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV39.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別40()
- DGV40.DataSource = Nothing : ds40.Clear()
- DGV40.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV40.ColumnHeadersHeight = 列高1 : DGV40.AllowUserToAddRows = False : DGV40.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds40) : DGV40.DataSource = ds40.Tables(0) : conn.Close()
- DGV40.Columns(0).FillWeight = 欄寬1 : DGV40.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV40.Rows.Count - 1
- If DGV40.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV40.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV40.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV40.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV40.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV40.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV40.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV40.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV40.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV40.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV40.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV40.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別41()
- DGV41.DataSource = Nothing : ds41.Clear()
- DGV41.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV41.ColumnHeadersHeight = 列高1 : DGV41.AllowUserToAddRows = False : DGV41.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds41) : DGV41.DataSource = ds41.Tables(0) : conn.Close()
- DGV41.Columns(0).FillWeight = 欄寬1 : DGV41.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV41.Rows.Count - 1
- If DGV41.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV41.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV41.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV41.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV41.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV41.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV41.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV41.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV41.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV41.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV41.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV41.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 讀取班別42()
- DGV42.DataSource = Nothing : ds42.Clear()
- DGV42.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
- DGV42.ColumnHeadersHeight = 列高1 : DGV42.AllowUserToAddRows = False : DGV42.RowTemplate.Height = 列高
- SQL_排班系統_當天排班()
- da.Fill(ds42) : DGV42.DataSource = ds42.Tables(0) : conn.Close()
- DGV42.Columns(0).FillWeight = 欄寬1 : DGV42.Columns(1).FillWeight = 欄寬2
- For i As Integer = 0 To DGV42.Rows.Count - 1
- If DGV42.Rows(i).Cells(表頭(0)).Value.ToString = "" Then : DGV42.Rows(i).Cells(表頭(0)).Value = ""
- ElseIf DGV42.Rows(i).Cells(表頭(0)).Value.ToString = "1" Then : DGV42.Rows(i).Cells(表頭(0)).Value = 對話框(9)
- ElseIf DGV42.Rows(i).Cells(表頭(0)).Value.ToString = "2" Then : DGV42.Rows(i).Cells(表頭(0)).Value = 對話框(10)
- ElseIf DGV42.Rows(i).Cells(表頭(0)).Value.ToString = "3" Then : DGV42.Rows(i).Cells(表頭(0)).Value = 對話框(11)
- ElseIf DGV42.Rows(i).Cells(表頭(0)).Value.ToString = "4" Then : DGV42.Rows(i).Cells(表頭(0)).Value = 對話框(12)
- ElseIf DGV42.Rows(i).Cells(表頭(0)).Value.ToString = "5" Then : DGV42.Rows(i).Cells(表頭(0)).Value = 對話框(13) : End If
- Next
- End Sub
- Private Sub 日曆變動()
- If 日期_dgv.Rows.Count > 0 Then
- 總時數 = 0
- For no As Integer = 1 To 42
- Dim Panels As Panel = CType(Me.Controls.Find("Panel" + no.ToString(), True)(0), Panel) : Panels.Visible = True
- Next
- Dim Q As Integer = 0
- 星期 = 日期_dgv.Rows(0).Cells("星期").Value.ToString : 天數 = 日期_dgv.Rows.Count
- If 星期 = "星期日" Then
- For no As Integer = 1 To 42
- If no > 天數 Then : Dim Panels As Panel = CType(Me.Controls.Find("Panel" + no.ToString(), True)(0), Panel) : Panels.Visible = False : End If
- Dim 日期_lb As Label = CType(Me.Controls.Find("日期_lb" + no.ToString(), True)(0), Label) : 日期_lb.Text = no
- If IsNumeric(Val(日期_lb.Text)) = True Then
- If no < 10 Then : PA = "0" & no : Else : PA = no : End If : PA = 年份_cb.Text & "/" & 月份_cb.Text & "/" & PA
- If no = 1 Then : 讀取班別1() : ElseIf no = 2 Then : 讀取班別2() : ElseIf no = 3 Then : 讀取班別3() : ElseIf no = 4 Then : 讀取班別4()
- ElseIf no = 5 Then : 讀取班別5() : ElseIf no = 6 Then : 讀取班別6() : ElseIf no = 7 Then : 讀取班別7() : ElseIf no = 8 Then : 讀取班別8()
- ElseIf no = 9 Then : 讀取班別9() : ElseIf no = 10 Then : 讀取班別10() : ElseIf no = 11 Then : 讀取班別11() : ElseIf no = 12 Then : 讀取班別12()
- ElseIf no = 13 Then : 讀取班別13() : ElseIf no = 14 Then : 讀取班別14() : ElseIf no = 15 Then : 讀取班別15() : ElseIf no = 16 Then : 讀取班別16()
- ElseIf no = 17 Then : 讀取班別17() : ElseIf no = 18 Then : 讀取班別18() : ElseIf no = 19 Then : 讀取班別19() : ElseIf no = 20 Then : 讀取班別20()
- ElseIf no = 21 Then : 讀取班別21() : ElseIf no = 22 Then : 讀取班別22() : ElseIf no = 23 Then : 讀取班別23() : ElseIf no = 24 Then : 讀取班別24()
- ElseIf no = 25 Then : 讀取班別25() : ElseIf no = 26 Then : 讀取班別26() : ElseIf no = 27 Then : 讀取班別27() : ElseIf no = 28 Then : 讀取班別28()
- ElseIf no = 29 Then : 讀取班別29() : ElseIf no = 30 Then : 讀取班別30() : ElseIf no = 31 Then : 讀取班別31() : ElseIf no = 32 Then : 讀取班別32()
- ElseIf no = 33 Then : 讀取班別33() : ElseIf no = 34 Then : 讀取班別34() : ElseIf no = 35 Then : 讀取班別35() : ElseIf no = 36 Then : 讀取班別36()
- ElseIf no = 37 Then : 讀取班別37() : ElseIf no = 38 Then : 讀取班別38() : ElseIf no = 39 Then : 讀取班別39() : ElseIf no = 40 Then : 讀取班別40()
- ElseIf no = 41 Then : 讀取班別41() : ElseIf no = 42 Then : 讀取班別42() : End If
- End If
- If no >= 1 And no <= 天數 Then
- Dim Labels As Label = CType(Me.Controls.Find("Label" + no.ToString(), True)(0), Label) : Labels.Text = 日期_dgv.Rows(Q).Cells("休假").Value.ToString
- If 日期_dgv.Rows(Q).Cells("休假").Value.ToString <> "國定假日" And 日期_dgv.Rows(Q).Cells("星期").Value.ToString <> "星期日" And
- 日期_dgv.Rows(Q).Cells("星期").Value.ToString <> "星期六" Then
- 總時數 += 8
- End If : Q += 1
- End If
- Next
- End If
- If 星期 = "星期一" Then
- For no As Integer = 1 To 42
- If no = 1 Then
- Dim Panels As Panel = CType(Me.Controls.Find("Panel" + no.ToString(), True)(0), Panel) : Panels.Visible = False : End If
- If no > 天數 + 1 Then : Dim Panels As Panel = CType(Me.Controls.Find("Panel" + no.ToString(), True)(0), Panel) : Panels.Visible = False : End If
- Dim 日期_lb As Label = CType(Me.Controls.Find("日期_lb" + no.ToString(), True)(0), Label) : 日期_lb.Text = no - 1
- If IsNumeric(Val(日期_lb.Text)) = True Then
- If no - 1 < 10 Then : PA = "0" & no - 1 : Else : PA = no - 1 : End If : PA = 年份_cb.Text & "/" & 月份_cb.Text & "/" & PA
- If no = 1 Then : 讀取班別1() : ElseIf no = 2 Then : 讀取班別2() : ElseIf no = 3 Then : 讀取班別3() : ElseIf no = 4 Then : 讀取班別4()
- ElseIf no = 5 Then : 讀取班別5() : ElseIf no = 6 Then : 讀取班別6() : ElseIf no = 7 Then : 讀取班別7() : ElseIf no = 8 Then : 讀取班別8()
- ElseIf no = 9 Then : 讀取班別9() : ElseIf no = 10 Then : 讀取班別10() : ElseIf no = 11 Then : 讀取班別11() : ElseIf no = 12 Then : 讀取班別12()
- ElseIf no = 13 Then : 讀取班別13() : ElseIf no = 14 Then : 讀取班別14() : ElseIf no = 15 Then : 讀取班別15() : ElseIf no = 16 Then : 讀取班別16()
- ElseIf no = 17 Then : 讀取班別17() : ElseIf no = 18 Then : 讀取班別18() : ElseIf no = 19 Then : 讀取班別19() : ElseIf no = 20 Then : 讀取班別20()
- ElseIf no = 21 Then : 讀取班別21() : ElseIf no = 22 Then : 讀取班別22() : ElseIf no = 23 Then : 讀取班別23() : ElseIf no = 24 Then : 讀取班別24()
- ElseIf no = 25 Then : 讀取班別25() : ElseIf no = 26 Then : 讀取班別26() : ElseIf no = 27 Then : 讀取班別27() : ElseIf no = 28 Then : 讀取班別28()
- ElseIf no = 29 Then : 讀取班別29() : ElseIf no = 30 Then : 讀取班別30() : ElseIf no = 31 Then : 讀取班別31() : ElseIf no = 32 Then : 讀取班別32()
- ElseIf no = 33 Then : 讀取班別33() : ElseIf no = 34 Then : 讀取班別34() : ElseIf no = 35 Then : 讀取班別35() : ElseIf no = 36 Then : 讀取班別36()
- ElseIf no = 37 Then : 讀取班別37() : ElseIf no = 38 Then : 讀取班別38() : ElseIf no = 39 Then : 讀取班別39() : ElseIf no = 40 Then : 讀取班別40()
- ElseIf no = 41 Then : 讀取班別41() : ElseIf no = 42 Then : 讀取班別42() : End If
- End If
- If no >= 2 And no <= 天數 + 1 Then
- Dim Labels As Label = CType(Me.Controls.Find("Label" + no.ToString(), True)(0), Label) : Labels.Text = 日期_dgv.Rows(Q).Cells("休假").Value.ToString
- If 日期_dgv.Rows(Q).Cells("休假").Value.ToString <> "國定假日" And 日期_dgv.Rows(Q).Cells("星期").Value.ToString <> "星期日" And
- 日期_dgv.Rows(Q).Cells("星期").Value.ToString <> "星期六" Then
- 總時數 += 8
- End If : Q += 1
- End If
- Next
- End If
- If 星期 = "星期二" Then
- For no As Integer = 1 To 42
- If no = 1 Or no = 2 Then
- Dim Panels As Panel = CType(Me.Controls.Find("Panel" + no.ToString(), True)(0), Panel) : Panels.Visible = False : End If
- If no > 天數 + 2 Then : Dim Panels As Panel = CType(Me.Controls.Find("Panel" + no.ToString(), True)(0), Panel) : Panels.Visible = False : End If
- Dim 日期_lb As Label = CType(Me.Controls.Find("日期_lb" + no.ToString(), True)(0), Label) : 日期_lb.Text = no - 2
- If IsNumeric(Val(日期_lb.Text)) = True Then
- If no - 2 < 10 Then : PA = "0" & no - 2 : Else : PA = no - 2 : End If : PA = 年份_cb.Text & "/" & 月份_cb.Text & "/" & PA
- If no = 1 Then : 讀取班別1() : ElseIf no = 2 Then : 讀取班別2() : ElseIf no = 3 Then : 讀取班別3() : ElseIf no = 4 Then : 讀取班別4()
- ElseIf no = 5 Then : 讀取班別5() : ElseIf no = 6 Then : 讀取班別6() : ElseIf no = 7 Then : 讀取班別7() : ElseIf no = 8 Then : 讀取班別8()
- ElseIf no = 9 Then : 讀取班別9() : ElseIf no = 10 Then : 讀取班別10() : ElseIf no = 11 Then : 讀取班別11() : ElseIf no = 12 Then : 讀取班別12()
- ElseIf no = 13 Then : 讀取班別13() : ElseIf no = 14 Then : 讀取班別14() : ElseIf no = 15 Then : 讀取班別15() : ElseIf no = 16 Then : 讀取班別16()
- ElseIf no = 17 Then : 讀取班別17() : ElseIf no = 18 Then : 讀取班別18() : ElseIf no = 19 Then : 讀取班別19() : ElseIf no = 20 Then : 讀取班別20()
- ElseIf no = 21 Then : 讀取班別21() : ElseIf no = 22 Then : 讀取班別22() : ElseIf no = 23 Then : 讀取班別23() : ElseIf no = 24 Then : 讀取班別24()
- ElseIf no = 25 Then : 讀取班別25() : ElseIf no = 26 Then : 讀取班別26() : ElseIf no = 27 Then : 讀取班別27() : ElseIf no = 28 Then : 讀取班別28()
- ElseIf no = 29 Then : 讀取班別29() : ElseIf no = 30 Then : 讀取班別30() : ElseIf no = 31 Then : 讀取班別31() : ElseIf no = 32 Then : 讀取班別32()
- ElseIf no = 33 Then : 讀取班別33() : ElseIf no = 34 Then : 讀取班別34() : ElseIf no = 35 Then : 讀取班別35() : ElseIf no = 36 Then : 讀取班別36()
- ElseIf no = 37 Then : 讀取班別37() : ElseIf no = 38 Then : 讀取班別38() : ElseIf no = 39 Then : 讀取班別39() : ElseIf no = 40 Then : 讀取班別40()
- ElseIf no = 41 Then : 讀取班別41() : ElseIf no = 42 Then : 讀取班別42() : End If
- End If
- If no >= 3 And no <= 天數 + 2 Then
- Dim Labels As Label = CType(Me.Controls.Find("Label" + no.ToString(), True)(0), Label) : Labels.Text = 日期_dgv.Rows(Q).Cells("休假").Value.ToString
- If 日期_dgv.Rows(Q).Cells("休假").Value.ToString <> "國定假日" And 日期_dgv.Rows(Q).Cells("星期").Value.ToString <> "星期日" And
- 日期_dgv.Rows(Q).Cells("星期").Value.ToString <> "星期六" Then
- 總時數 += 8
- End If : Q += 1
- End If
- Next
- End If
- If 星期 = "星期三" Then
- For no As Integer = 1 To 42
- If no = 1 Or no = 2 Or no = 3 Then
- Dim Panels As Panel = CType(Me.Controls.Find("Panel" + no.ToString(), True)(0), Panel) : Panels.Visible = False : End If
- If no > 天數 + 3 Then : Dim Panels As Panel = CType(Me.Controls.Find("Panel" + no.ToString(), True)(0), Panel) : Panels.Visible = False : End If
- Dim 日期_lb As Label = CType(Me.Controls.Find("日期_lb" + no.ToString(), True)(0), Label) : 日期_lb.Text = no - 3
- If IsNumeric(Val(日期_lb.Text)) = True Then
- If no - 3 < 10 Then : PA = "0" & no - 3 : Else : PA = no - 3 : End If : PA = 年份_cb.Text & "/" & 月份_cb.Text & "/" & PA
- If no = 1 Then : 讀取班別1() : ElseIf no = 2 Then : 讀取班別2() : ElseIf no = 3 Then : 讀取班別3() : ElseIf no = 4 Then : 讀取班別4()
- ElseIf no = 5 Then : 讀取班別5() : ElseIf no = 6 Then : 讀取班別6() : ElseIf no = 7 Then : 讀取班別7() : ElseIf no = 8 Then : 讀取班別8()
- ElseIf no = 9 Then : 讀取班別9() : ElseIf no = 10 Then : 讀取班別10() : ElseIf no = 11 Then : 讀取班別11() : ElseIf no = 12 Then : 讀取班別12()
- ElseIf no = 13 Then : 讀取班別13() : ElseIf no = 14 Then : 讀取班別14() : ElseIf no = 15 Then : 讀取班別15() : ElseIf no = 16 Then : 讀取班別16()
- ElseIf no = 17 Then : 讀取班別17() : ElseIf no = 18 Then : 讀取班別18() : ElseIf no = 19 Then : 讀取班別19() : ElseIf no = 20 Then : 讀取班別20()
- ElseIf no = 21 Then : 讀取班別21() : ElseIf no = 22 Then : 讀取班別22() : ElseIf no = 23 Then : 讀取班別23() : ElseIf no = 24 Then : 讀取班別24()
- ElseIf no = 25 Then : 讀取班別25() : ElseIf no = 26 Then : 讀取班別26() : ElseIf no = 27 Then : 讀取班別27() : ElseIf no = 28 Then : 讀取班別28()
- ElseIf no = 29 Then : 讀取班別29() : ElseIf no = 30 Then : 讀取班別30() : ElseIf no = 31 Then : 讀取班別31() : ElseIf no = 32 Then : 讀取班別32()
- ElseIf no = 33 Then : 讀取班別33() : ElseIf no = 34 Then : 讀取班別34() : ElseIf no = 35 Then : 讀取班別35() : ElseIf no = 36 Then : 讀取班別36()
- ElseIf no = 37 Then : 讀取班別37() : ElseIf no = 38 Then : 讀取班別38() : ElseIf no = 39 Then : 讀取班別39() : ElseIf no = 40 Then : 讀取班別40()
- ElseIf no = 41 Then : 讀取班別41() : ElseIf no = 42 Then : 讀取班別42() : End If
- End If
- If no >= 4 And no <= 天數 + 3 Then
- Dim Labels As Label = CType(Me.Controls.Find("Label" + no.ToString(), True)(0), Label) : Labels.Text = 日期_dgv.Rows(Q).Cells("休假").Value.ToString
- If 日期_dgv.Rows(Q).Cells("休假").Value.ToString <> "國定假日" And 日期_dgv.Rows(Q).Cells("星期").Value.ToString <> "星期日" And
- 日期_dgv.Rows(Q).Cells("星期").Value.ToString <> "星期六" Then
- 總時數 += 8
- End If : Q += 1
- End If
- Next
- End If
- If 星期 = "星期四" Then
- For no As Integer = 1 To 42
- If no = 1 Or no = 2 Or no = 3 Or no = 4 Then
- Dim Panels As Panel = CType(Me.Controls.Find("Panel" + no.ToString(), True)(0), Panel) : Panels.Visible = False : End If
- If no > 天數 + 4 Then : Dim Panels As Panel = CType(Me.Controls.Find("Panel" + no.ToString(), True)(0), Panel) : Panels.Visible = False : End If
- Dim 日期_lb As Label = CType(Me.Controls.Find("日期_lb" + no.ToString(), True)(0), Label) : 日期_lb.Text = no - 4
- If IsNumeric(Val(日期_lb.Text)) = True Then
- If no - 4 < 10 Then : PA = "0" & no - 4 : Else : PA = no - 4 : End If : PA = 年份_cb.Text & "/" & 月份_cb.Text & "/" & PA
- If no = 1 Then : 讀取班別1() : ElseIf no = 2 Then : 讀取班別2() : ElseIf no = 3 Then : 讀取班別3() : ElseIf no = 4 Then : 讀取班別4()
- ElseIf no = 5 Then : 讀取班別5() : ElseIf no = 6 Then : 讀取班別6() : ElseIf no = 7 Then : 讀取班別7() : ElseIf no = 8 Then : 讀取班別8()
- ElseIf no = 9 Then : 讀取班別9() : ElseIf no = 10 Then : 讀取班別10() : ElseIf no = 11 Then : 讀取班別11() : ElseIf no = 12 Then : 讀取班別12()
- ElseIf no = 13 Then : 讀取班別13() : ElseIf no = 14 Then : 讀取班別14() : ElseIf no = 15 Then : 讀取班別15() : ElseIf no = 16 Then : 讀取班別16()
- ElseIf no = 17 Then : 讀取班別17() : ElseIf no = 18 Then : 讀取班別18() : ElseIf no = 19 Then : 讀取班別19() : ElseIf no = 20 Then : 讀取班別20()
- ElseIf no = 21 Then : 讀取班別21() : ElseIf no = 22 Then : 讀取班別22() : ElseIf no = 23 Then : 讀取班別23() : ElseIf no = 24 Then : 讀取班別24()
- ElseIf no = 25 Then : 讀取班別25() : ElseIf no = 26 Then : 讀取班別26() : ElseIf no = 27 Then : 讀取班別27() : ElseIf no = 28 Then : 讀取班別28()
- ElseIf no = 29 Then : 讀取班別29() : ElseIf no = 30 Then : 讀取班別30() : ElseIf no = 31 Then : 讀取班別31() : ElseIf no = 32 Then : 讀取班別32()
- ElseIf no = 33 Then : 讀取班別33() : ElseIf no = 34 Then : 讀取班別34() : ElseIf no = 35 Then : 讀取班別35() : ElseIf no = 36 Then : 讀取班別36()
- ElseIf no = 37 Then : 讀取班別37() : ElseIf no = 38 Then : 讀取班別38() : ElseIf no = 39 Then : 讀取班別39() : ElseIf no = 40 Then : 讀取班別40()
- ElseIf no = 41 Then : 讀取班別41() : ElseIf no = 42 Then : 讀取班別42() : End If
- End If
- If no >= 5 And no <= 天數 + 4 Then
- Dim Labels As Label = CType(Me.Controls.Find("Label" + no.ToString(), True)(0), Label) : Labels.Text = 日期_dgv.Rows(Q).Cells("休假").Value.ToString
- If 日期_dgv.Rows(Q).Cells("休假").Value.ToString <> "國定假日" And 日期_dgv.Rows(Q).Cells("星期").Value.ToString <> "星期日" And
- 日期_dgv.Rows(Q).Cells("星期").Value.ToString <> "星期六" Then
- 總時數 += 8
- End If : Q += 1
- End If
- Next
- End If
- If 星期 = "星期五" Then
- For no As Integer = 1 To 42
- If no = 1 Or no = 2 Or no = 3 Or no = 4 Or no = 5 Then
- Dim Panels As Panel = CType(Me.Controls.Find("Panel" + no.ToString(), True)(0), Panel) : Panels.Visible = False : End If
- If no > 天數 + 5 Then : Dim Panels As Panel = CType(Me.Controls.Find("Panel" + no.ToString(), True)(0), Panel) : Panels.Visible = False : End If
- Dim 日期_lb As Label = CType(Me.Controls.Find("日期_lb" + no.ToString(), True)(0), Label) : 日期_lb.Text = no - 5
- If IsNumeric(Val(日期_lb.Text)) = True Then
- If no - 5 < 10 Then : PA = "0" & no - 5 : Else : PA = no - 5 : End If : PA = 年份_cb.Text & "/" & 月份_cb.Text & "/" & PA
- If no = 1 Then : 讀取班別1() : ElseIf no = 2 Then : 讀取班別2() : ElseIf no = 3 Then : 讀取班別3() : ElseIf no = 4 Then : 讀取班別4()
- ElseIf no = 5 Then : 讀取班別5() : ElseIf no = 6 Then : 讀取班別6() : ElseIf no = 7 Then : 讀取班別7() : ElseIf no = 8 Then : 讀取班別8()
- ElseIf no = 9 Then : 讀取班別9() : ElseIf no = 10 Then : 讀取班別10() : ElseIf no = 11 Then : 讀取班別11() : ElseIf no = 12 Then : 讀取班別12()
- ElseIf no = 13 Then : 讀取班別13() : ElseIf no = 14 Then : 讀取班別14() : ElseIf no = 15 Then : 讀取班別15() : ElseIf no = 16 Then : 讀取班別16()
- ElseIf no = 17 Then : 讀取班別17() : ElseIf no = 18 Then : 讀取班別18() : ElseIf no = 19 Then : 讀取班別19() : ElseIf no = 20 Then : 讀取班別20()
- ElseIf no = 21 Then : 讀取班別21() : ElseIf no = 22 Then : 讀取班別22() : ElseIf no = 23 Then : 讀取班別23() : ElseIf no = 24 Then : 讀取班別24()
- ElseIf no = 25 Then : 讀取班別25() : ElseIf no = 26 Then : 讀取班別26() : ElseIf no = 27 Then : 讀取班別27() : ElseIf no = 28 Then : 讀取班別28()
- ElseIf no = 29 Then : 讀取班別29() : ElseIf no = 30 Then : 讀取班別30() : ElseIf no = 31 Then : 讀取班別31() : ElseIf no = 32 Then : 讀取班別32()
- ElseIf no = 33 Then : 讀取班別33() : ElseIf no = 34 Then : 讀取班別34() : ElseIf no = 35 Then : 讀取班別35() : ElseIf no = 36 Then : 讀取班別36()
- ElseIf no = 37 Then : 讀取班別37() : ElseIf no = 38 Then : 讀取班別38() : ElseIf no = 39 Then : 讀取班別39() : ElseIf no = 40 Then : 讀取班別40()
- ElseIf no = 41 Then : 讀取班別41() : ElseIf no = 42 Then : 讀取班別42() : End If
- End If
- If no >= 6 And no <= 天數 + 5 Then
- Dim Labels As Label = CType(Me.Controls.Find("Label" + no.ToString(), True)(0), Label) : Labels.Text = 日期_dgv.Rows(Q).Cells("休假").Value.ToString
- If 日期_dgv.Rows(Q).Cells("休假").Value.ToString <> "國定假日" And 日期_dgv.Rows(Q).Cells("星期").Value.ToString <> "星期日" And
- 日期_dgv.Rows(Q).Cells("星期").Value.ToString <> "星期六" Then
- 總時數 += 8
- End If : Q += 1
- End If
- Next
- End If
- If 星期 = "星期六" Then
- For no As Integer = 1 To 42
- If no = 1 Or no = 2 Or no = 3 Or no = 4 Or no = 5 Or no = 6 Then
- Dim Panels As Panel = CType(Me.Controls.Find("Panel" + no.ToString(), True)(0), Panel) : Panels.Visible = False : End If
- If no > 天數 + 6 Then : Dim Panels As Panel = CType(Me.Controls.Find("Panel" + no.ToString(), True)(0), Panel) : Panels.Visible = False : End If
- Dim 日期_lb As Label = CType(Me.Controls.Find("日期_lb" + no.ToString(), True)(0), Label) : 日期_lb.Text = no - 6
- If IsNumeric(Val(日期_lb.Text)) = True Then
- If no - 6 < 10 Then : PA = "0" & no - 6 : Else : PA = no - 6 : End If : PA = 年份_cb.Text & "/" & 月份_cb.Text & "/" & PA
- If no = 1 Then : 讀取班別1() : ElseIf no = 2 Then : 讀取班別2() : ElseIf no = 3 Then : 讀取班別3() : ElseIf no = 4 Then : 讀取班別4()
- ElseIf no = 5 Then : 讀取班別5() : ElseIf no = 6 Then : 讀取班別6() : ElseIf no = 7 Then : 讀取班別7() : ElseIf no = 8 Then : 讀取班別8()
- ElseIf no = 9 Then : 讀取班別9() : ElseIf no = 10 Then : 讀取班別10() : ElseIf no = 11 Then : 讀取班別11() : ElseIf no = 12 Then : 讀取班別12()
- ElseIf no = 13 Then : 讀取班別13() : ElseIf no = 14 Then : 讀取班別14() : ElseIf no = 15 Then : 讀取班別15() : ElseIf no = 16 Then : 讀取班別16()
- ElseIf no = 17 Then : 讀取班別17() : ElseIf no = 18 Then : 讀取班別18() : ElseIf no = 19 Then : 讀取班別19() : ElseIf no = 20 Then : 讀取班別20()
- ElseIf no = 21 Then : 讀取班別21() : ElseIf no = 22 Then : 讀取班別22() : ElseIf no = 23 Then : 讀取班別23() : ElseIf no = 24 Then : 讀取班別24()
- ElseIf no = 25 Then : 讀取班別25() : ElseIf no = 26 Then : 讀取班別26() : ElseIf no = 27 Then : 讀取班別27() : ElseIf no = 28 Then : 讀取班別28()
- ElseIf no = 29 Then : 讀取班別29() : ElseIf no = 30 Then : 讀取班別30() : ElseIf no = 31 Then : 讀取班別31() : ElseIf no = 32 Then : 讀取班別32()
- ElseIf no = 33 Then : 讀取班別33() : ElseIf no = 34 Then : 讀取班別34() : ElseIf no = 35 Then : 讀取班別35() : ElseIf no = 36 Then : 讀取班別36()
- ElseIf no = 37 Then : 讀取班別37() : ElseIf no = 38 Then : 讀取班別38() : ElseIf no = 39 Then : 讀取班別39() : ElseIf no = 40 Then : 讀取班別40()
- ElseIf no = 41 Then : 讀取班別41() : ElseIf no = 42 Then : 讀取班別42() : End If
- End If
- If no >= 7 And no <= 天數 + 6 Then
- Dim Labels As Label = CType(Me.Controls.Find("Label" + no.ToString(), True)(0), Label) : Labels.Text = 日期_dgv.Rows(Q).Cells("休假").Value.ToString
- If 日期_dgv.Rows(Q).Cells("休假").Value.ToString <> "國定假日" And 日期_dgv.Rows(Q).Cells("星期").Value.ToString <> "星期日" And
- 日期_dgv.Rows(Q).Cells("星期").Value.ToString <> "星期六" Then
- 總時數 += 8
- End If : Q += 1
- End If
- Next
- End If
- End If
- End Sub
- Private Sub 語言轉換讀取()
- If 系統語言 = "繁體中文" Then : 語言 = "CH" : ElseIf 系統語言 = "English" Then : 語言 = "EN" : ElseIf 系統語言 = "Indonesian" Then : 語言 = "IN" : End If
- Me.Text = 系統語言字典("H001-277-" & 語言)
- 星期日_lb.Text = 系統語言字典("H609-106-" & 語言) : 星期一_lb.Text = 系統語言字典("H609-100-" & 語言) : 星期二_lb.Text = 系統語言字典("H609-101-" & 語言)
- 星期三_lb.Text = 系統語言字典("H609-102-" & 語言) : 星期四_lb.Text = 系統語言字典("H609-103-" & 語言) : 星期五_lb.Text = 系統語言字典("H609-104-" & 語言)
- 星期六_lb.Text = 系統語言字典("H609-105-" & 語言) : 表頭(1) = 系統語言字典("H603-100-" & 語言)
- 對話框(9) = 系統語言字典("H609-133-" & 語言) : 對話框(10) = 系統語言字典("H609-134-" & 語言) : 對話框(11) = 系統語言字典("H609-135-" & 語言)
- 對話框(12) = 系統語言字典("H609-136-" & 語言) : 對話框(13) = 系統語言字典("H609-137-" & 語言) : 表頭(0) = 系統語言字典("H609-138-" & 語言)
- End Sub
- Private Sub 排班資料_Load(sender As Object, e As EventArgs) Handles MyBase.Load
- HX_PGS_ERP_SYS.WindowState = 2 : Me.MdiParent = HX_PGS_ERP_SYS : Me.WindowState = 2 : Me.AutoScroll = True
- 風格() : H(615) = True : 介面 = "H615" : 語言轉換讀取() : 列高 = 33 : 列高1 = 22 : 欄寬1 = 80 : 欄寬2 = 200
- 年份_下拉表單資料載入() : 日期_dgv.Visible = False
-
- 首次開啟 = False
- 年份_cb.Text = Year(Today) : 月份_cb.SelectedIndex = Month(Today) - 1
- PA1 = 年份_cb.Text : PA2 = 月份_cb.Text
- 首次開啟 = True
-
- 讀取日期() : 日曆變動()
- End Sub
- Private Sub 排班資料_Closing(sender As Object, e As EventArgs) Handles MyBase.Closed
- MyMod.虛擬桌面開啟()
- End Sub
- Private Sub 月份_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 月份_cb.SelectedIndexChanged
- If 首次開啟 = True Then
- PA1 = 年份_cb.Text : PA2 = 月份_cb.Text : 讀取日期() : 日曆變動()
- End If
- End Sub
-
- Private Sub 風格()
- If 深色風格 = False Then
- Me.BackColor = SystemColors.Control
- '----------------黑-------------------------------------------
- 星期一_lb.ForeColor = Color.Black : 星期二_lb.ForeColor = Color.Black : 星期三_lb.ForeColor = Color.Black : 星期四_lb.ForeColor = Color.Black
- 星期五_lb.ForeColor = Color.Black : 年份_lb.ForeColor = Color.Black : 月份_lb.ForeColor = Color.Black : Label43.ForeColor = Color.Black : Label44.ForeColor = Color.Black
- 日期_lb2.ForeColor = Color.Black : 日期_lb3.ForeColor = Color.Black : 日期_lb4.ForeColor = Color.Black : 日期_lb5.ForeColor = Color.Black : 日期_lb6.ForeColor = Color.Black
- 日期_lb9.ForeColor = Color.Black : 日期_lb10.ForeColor = Color.Black : 日期_lb11.ForeColor = Color.Black : 日期_lb12.ForeColor = Color.Black : 日期_lb13.ForeColor = Color.Black
- 日期_lb16.ForeColor = Color.Black : 日期_lb17.ForeColor = Color.Black : 日期_lb18.ForeColor = Color.Black : 日期_lb19.ForeColor = Color.Black : 日期_lb20.ForeColor = Color.Black
- 日期_lb23.ForeColor = Color.Black : 日期_lb24.ForeColor = Color.Black : 日期_lb25.ForeColor = Color.Black : 日期_lb26.ForeColor = Color.Black : 日期_lb27.ForeColor = Color.Black
- 日期_lb30.ForeColor = Color.Black : 日期_lb31.ForeColor = Color.Black : 日期_lb32.ForeColor = Color.Black : 日期_lb33.ForeColor = Color.Black : 日期_lb34.ForeColor = Color.Black
- 日期_lb37.ForeColor = Color.Black : 日期_lb38.ForeColor = Color.Black : 日期_lb39.ForeColor = Color.Black : 日期_lb40.ForeColor = Color.Black : 日期_lb41.ForeColor = Color.Black
- '----------------紅-------------------------------------------
- 星期日_lb.ForeColor = Color.Red : 日期_lb1.ForeColor = Color.Red : 日期_lb8.ForeColor = Color.Red : 日期_lb15.ForeColor = Color.Red
- 日期_lb22.ForeColor = Color.Red : 日期_lb29.ForeColor = Color.Red : 日期_lb36.ForeColor = Color.Red
- '----------------綠-------------------------------------------
- 星期六_lb.ForeColor = Color.Green : 日期_lb7.ForeColor = Color.Green : 日期_lb14.ForeColor = Color.Green : 日期_lb21.ForeColor = Color.Green
- 日期_lb28.ForeColor = Color.Green : 日期_lb35.ForeColor = Color.Green : 日期_lb42.ForeColor = Color.Green
-
- 語轉扭_bt.BackColor = Color.White : 語轉扭_bt.ForeColor = Color.Black : 年份_cb.BackColor = Color.White : 年份_cb.ForeColor = Color.Black
- 月份_cb.BackColor = Color.White : 月份_cb.ForeColor = Color.Black
-
- DGV2.EnableHeadersVisualStyles = True : DGV2.BackgroundColor = Color.White : DGV2.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black
- DGV2.DefaultCellStyle.BackColor = Color.White : DGV2.DefaultCellStyle.ForeColor = Color.Black
- DGV3.EnableHeadersVisualStyles = True : DGV3.BackgroundColor = Color.White : DGV3.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black
- DGV3.DefaultCellStyle.BackColor = Color.White : DGV3.DefaultCellStyle.ForeColor = Color.Black
- DGV4.EnableHeadersVisualStyles = True : DGV4.BackgroundColor = Color.White : DGV4.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black
- DGV4.DefaultCellStyle.BackColor = Color.White : DGV4.DefaultCellStyle.ForeColor = Color.Black
- DGV5.EnableHeadersVisualStyles = True : DGV5.BackgroundColor = Color.White : DGV5.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black
- DGV5.DefaultCellStyle.BackColor = Color.White : DGV5.DefaultCellStyle.ForeColor = Color.Black
- DGV6.EnableHeadersVisualStyles = True : DGV6.BackgroundColor = Color.White : DGV6.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black
- DGV6.DefaultCellStyle.BackColor = Color.White : DGV6.DefaultCellStyle.ForeColor = Color.Black
- DGV9.EnableHeadersVisualStyles = True : DGV9.BackgroundColor = Color.White : DGV9.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black
- DGV9.DefaultCellStyle.BackColor = Color.White : DGV9.DefaultCellStyle.ForeColor = Color.Black
- DGV10.EnableHeadersVisualStyles = True : DGV10.BackgroundColor = Color.White : DGV10.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black
- DGV10.DefaultCellStyle.BackColor = Color.White : DGV10.DefaultCellStyle.ForeColor = Color.Black
- DGV11.EnableHeadersVisualStyles = True : DGV11.BackgroundColor = Color.White : DGV11.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black
- DGV11.DefaultCellStyle.BackColor = Color.White : DGV11.DefaultCellStyle.ForeColor = Color.Black
- DGV12.EnableHeadersVisualStyles = True : DGV12.BackgroundColor = Color.White : DGV12.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black
- DGV12.DefaultCellStyle.BackColor = Color.White : DGV12.DefaultCellStyle.ForeColor = Color.Black
- DGV13.EnableHeadersVisualStyles = True : DGV13.BackgroundColor = Color.White : DGV13.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black
- DGV13.DefaultCellStyle.BackColor = Color.White : DGV13.DefaultCellStyle.ForeColor = Color.Black
- DGV16.EnableHeadersVisualStyles = True : DGV16.BackgroundColor = Color.White : DGV16.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black
- DGV16.DefaultCellStyle.BackColor = Color.White : DGV16.DefaultCellStyle.ForeColor = Color.Black
- DGV17.EnableHeadersVisualStyles = True : DGV17.BackgroundColor = Color.White : DGV17.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black
- DGV17.DefaultCellStyle.BackColor = Color.White : DGV17.DefaultCellStyle.ForeColor = Color.Black
- DGV18.EnableHeadersVisualStyles = True : DGV18.BackgroundColor = Color.White : DGV18.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black
- DGV18.DefaultCellStyle.BackColor = Color.White : DGV18.DefaultCellStyle.ForeColor = Color.Black
- DGV19.EnableHeadersVisualStyles = True : DGV19.BackgroundColor = Color.White : DGV19.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black
- DGV19.DefaultCellStyle.BackColor = Color.White : DGV19.DefaultCellStyle.ForeColor = Color.Black
- DGV20.EnableHeadersVisualStyles = True : DGV20.BackgroundColor = Color.White : DGV20.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black
- DGV20.DefaultCellStyle.BackColor = Color.White : DGV20.DefaultCellStyle.ForeColor = Color.Black
- DGV23.EnableHeadersVisualStyles = True : DGV23.BackgroundColor = Color.White : DGV23.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black
- DGV23.DefaultCellStyle.BackColor = Color.White : DGV23.DefaultCellStyle.ForeColor = Color.Black
- DGV24.EnableHeadersVisualStyles = True : DGV24.BackgroundColor = Color.White : DGV24.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black
- DGV24.DefaultCellStyle.BackColor = Color.White : DGV24.DefaultCellStyle.ForeColor = Color.Black
- DGV25.EnableHeadersVisualStyles = True : DGV25.BackgroundColor = Color.White : DGV25.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black
- DGV25.DefaultCellStyle.BackColor = Color.White : DGV25.DefaultCellStyle.ForeColor = Color.Black
- DGV26.EnableHeadersVisualStyles = True : DGV26.BackgroundColor = Color.White : DGV26.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black
- DGV26.DefaultCellStyle.BackColor = Color.White : DGV26.DefaultCellStyle.ForeColor = Color.Black
- DGV27.EnableHeadersVisualStyles = True : DGV27.BackgroundColor = Color.White : DGV27.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black
- DGV27.DefaultCellStyle.BackColor = Color.White : DGV27.DefaultCellStyle.ForeColor = Color.Black
- DGV30.EnableHeadersVisualStyles = True : DGV30.BackgroundColor = Color.White : DGV30.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black
- DGV30.DefaultCellStyle.BackColor = Color.White : DGV30.DefaultCellStyle.ForeColor = Color.Black
- DGV31.EnableHeadersVisualStyles = True : DGV31.BackgroundColor = Color.White : DGV31.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black
- DGV31.DefaultCellStyle.BackColor = Color.White : DGV31.DefaultCellStyle.ForeColor = Color.Black
- DGV32.EnableHeadersVisualStyles = True : DGV32.BackgroundColor = Color.White : DGV32.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black
- DGV32.DefaultCellStyle.BackColor = Color.White : DGV32.DefaultCellStyle.ForeColor = Color.Black
- DGV33.EnableHeadersVisualStyles = True : DGV33.BackgroundColor = Color.White : DGV33.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black
- DGV33.DefaultCellStyle.BackColor = Color.White : DGV33.DefaultCellStyle.ForeColor = Color.Black
- DGV34.EnableHeadersVisualStyles = True : DGV34.BackgroundColor = Color.White : DGV34.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black
- DGV34.DefaultCellStyle.BackColor = Color.White : DGV34.DefaultCellStyle.ForeColor = Color.Black
- DGV37.EnableHeadersVisualStyles = True : DGV37.BackgroundColor = Color.White : DGV37.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black
- DGV37.DefaultCellStyle.BackColor = Color.White : DGV37.DefaultCellStyle.ForeColor = Color.Black
- DGV38.EnableHeadersVisualStyles = True : DGV38.BackgroundColor = Color.White : DGV38.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black
- DGV38.DefaultCellStyle.BackColor = Color.White : DGV38.DefaultCellStyle.ForeColor = Color.Black
- DGV39.EnableHeadersVisualStyles = True : DGV39.BackgroundColor = Color.White : DGV39.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black
- DGV39.DefaultCellStyle.BackColor = Color.White : DGV39.DefaultCellStyle.ForeColor = Color.Black
- DGV40.EnableHeadersVisualStyles = True : DGV40.BackgroundColor = Color.White : DGV40.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black
- DGV40.DefaultCellStyle.BackColor = Color.White : DGV40.DefaultCellStyle.ForeColor = Color.Black
- DGV41.EnableHeadersVisualStyles = True : DGV41.BackgroundColor = Color.White : DGV41.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black
- DGV41.DefaultCellStyle.BackColor = Color.White : DGV41.DefaultCellStyle.ForeColor = Color.Black
-
- DGV1.EnableHeadersVisualStyles = True : DGV1.BackgroundColor = Color.White : DGV1.ColumnHeadersDefaultCellStyle.ForeColor = Color.Red
- DGV1.DefaultCellStyle.BackColor = Color.White : DGV1.DefaultCellStyle.ForeColor = Color.Red
- DGV8.EnableHeadersVisualStyles = True : DGV8.BackgroundColor = Color.White : DGV8.ColumnHeadersDefaultCellStyle.ForeColor = Color.Red
- DGV8.DefaultCellStyle.BackColor = Color.White : DGV8.DefaultCellStyle.ForeColor = Color.Red
- DGV15.EnableHeadersVisualStyles = True : DGV15.BackgroundColor = Color.White : DGV15.ColumnHeadersDefaultCellStyle.ForeColor = Color.Red
- DGV15.DefaultCellStyle.BackColor = Color.White : DGV15.DefaultCellStyle.ForeColor = Color.Red
- DGV22.EnableHeadersVisualStyles = True : DGV22.BackgroundColor = Color.White : DGV22.ColumnHeadersDefaultCellStyle.ForeColor = Color.Red
- DGV22.DefaultCellStyle.BackColor = Color.White : DGV22.DefaultCellStyle.ForeColor = Color.Red
- DGV29.EnableHeadersVisualStyles = True : DGV29.BackgroundColor = Color.White : DGV29.ColumnHeadersDefaultCellStyle.ForeColor = Color.Red
- DGV29.DefaultCellStyle.BackColor = Color.White : DGV29.DefaultCellStyle.ForeColor = Color.Red
- DGV36.EnableHeadersVisualStyles = True : DGV36.BackgroundColor = Color.White : DGV36.ColumnHeadersDefaultCellStyle.ForeColor = Color.Red
- DGV36.DefaultCellStyle.BackColor = Color.White : DGV36.DefaultCellStyle.ForeColor = Color.Red
-
- DGV7.EnableHeadersVisualStyles = True : DGV7.BackgroundColor = Color.White : DGV7.ColumnHeadersDefaultCellStyle.ForeColor = Color.Green
- DGV7.DefaultCellStyle.BackColor = Color.White : DGV7.DefaultCellStyle.ForeColor = Color.Green
- DGV14.EnableHeadersVisualStyles = True : DGV14.BackgroundColor = Color.White : DGV14.ColumnHeadersDefaultCellStyle.ForeColor = Color.Green
- DGV14.DefaultCellStyle.BackColor = Color.White : DGV14.DefaultCellStyle.ForeColor = Color.Green
- DGV21.EnableHeadersVisualStyles = True : DGV21.BackgroundColor = Color.White : DGV21.ColumnHeadersDefaultCellStyle.ForeColor = Color.Green
- DGV21.DefaultCellStyle.BackColor = Color.White : DGV21.DefaultCellStyle.ForeColor = Color.Green
- DGV28.EnableHeadersVisualStyles = True : DGV28.BackgroundColor = Color.White : DGV28.ColumnHeadersDefaultCellStyle.ForeColor = Color.Green
- DGV28.DefaultCellStyle.BackColor = Color.White : DGV28.DefaultCellStyle.ForeColor = Color.Green
- DGV35.EnableHeadersVisualStyles = True : DGV35.BackgroundColor = Color.White : DGV35.ColumnHeadersDefaultCellStyle.ForeColor = Color.Green
- DGV35.DefaultCellStyle.BackColor = Color.White : DGV35.DefaultCellStyle.ForeColor = Color.Green
- DGV42.EnableHeadersVisualStyles = True : DGV42.BackgroundColor = Color.White : DGV42.ColumnHeadersDefaultCellStyle.ForeColor = Color.Green
- DGV42.DefaultCellStyle.BackColor = Color.White : DGV42.DefaultCellStyle.ForeColor = Color.Green
- Else
- Me.BackColor = Color.Black
- '----------------黑-------------------------------------------
- 星期一_lb.ForeColor = Color.White : 星期二_lb.ForeColor = Color.White : 星期三_lb.ForeColor = Color.White : 星期四_lb.ForeColor = Color.White
- 星期五_lb.ForeColor = Color.White : 年份_lb.ForeColor = Color.White : 月份_lb.ForeColor = Color.White : Label43.ForeColor = Color.White : Label44.ForeColor = Color.White
- 日期_lb2.ForeColor = Color.White : 日期_lb3.ForeColor = Color.White : 日期_lb4.ForeColor = Color.White : 日期_lb5.ForeColor = Color.White : 日期_lb6.ForeColor = Color.White
- 日期_lb9.ForeColor = Color.White : 日期_lb10.ForeColor = Color.White : 日期_lb11.ForeColor = Color.White : 日期_lb12.ForeColor = Color.White : 日期_lb13.ForeColor = Color.White
- 日期_lb16.ForeColor = Color.White : 日期_lb17.ForeColor = Color.White : 日期_lb18.ForeColor = Color.White : 日期_lb19.ForeColor = Color.White : 日期_lb20.ForeColor = Color.White
- 日期_lb23.ForeColor = Color.White : 日期_lb24.ForeColor = Color.White : 日期_lb25.ForeColor = Color.White : 日期_lb26.ForeColor = Color.White : 日期_lb27.ForeColor = Color.White
- 日期_lb30.ForeColor = Color.White : 日期_lb31.ForeColor = Color.White : 日期_lb32.ForeColor = Color.White : 日期_lb33.ForeColor = Color.White : 日期_lb34.ForeColor = Color.White
- 日期_lb37.ForeColor = Color.White : 日期_lb38.ForeColor = Color.White : 日期_lb39.ForeColor = Color.White : 日期_lb40.ForeColor = Color.White : 日期_lb41.ForeColor = Color.White
- '----------------紅-------------------------------------------
- 星期日_lb.ForeColor = Color.LightPink : 日期_lb1.ForeColor = Color.LightPink : 日期_lb8.ForeColor = Color.LightPink : 日期_lb15.ForeColor = Color.LightPink
- 日期_lb22.ForeColor = Color.LightPink : 日期_lb29.ForeColor = Color.LightPink : 日期_lb36.ForeColor = Color.LightPink
- '----------------綠-------------------------------------------
- 星期六_lb.ForeColor = Color.LawnGreen : 日期_lb7.ForeColor = Color.LawnGreen : 日期_lb14.ForeColor = Color.LawnGreen : 日期_lb21.ForeColor = Color.LawnGreen
- 日期_lb28.ForeColor = Color.LawnGreen : 日期_lb35.ForeColor = Color.LawnGreen : 日期_lb42.ForeColor = Color.LawnGreen
-
- 語轉扭_bt.BackColor = Color.DimGray : 語轉扭_bt.ForeColor = Color.White : 年份_cb.BackColor = Color.DimGray : 年份_cb.ForeColor = Color.White
- 月份_cb.BackColor = Color.DimGray : 月份_cb.ForeColor = Color.White
-
- DGV2.EnableHeadersVisualStyles = False : DGV2.BackgroundColor = Color.DimGray : DGV2.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
- DGV2.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV2.DefaultCellStyle.BackColor = Color.Black : DGV2.DefaultCellStyle.ForeColor = Color.White
- DGV3.EnableHeadersVisualStyles = False : DGV3.BackgroundColor = Color.DimGray : DGV3.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
- DGV3.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV3.DefaultCellStyle.BackColor = Color.Black : DGV3.DefaultCellStyle.ForeColor = Color.White
- DGV4.EnableHeadersVisualStyles = False : DGV4.BackgroundColor = Color.DimGray : DGV4.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
- DGV4.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV4.DefaultCellStyle.BackColor = Color.Black : DGV4.DefaultCellStyle.ForeColor = Color.White
- DGV5.EnableHeadersVisualStyles = False : DGV5.BackgroundColor = Color.DimGray : DGV5.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
- DGV5.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV5.DefaultCellStyle.BackColor = Color.Black : DGV5.DefaultCellStyle.ForeColor = Color.White
- DGV6.EnableHeadersVisualStyles = False : DGV6.BackgroundColor = Color.DimGray : DGV6.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
- DGV6.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV6.DefaultCellStyle.BackColor = Color.Black : DGV6.DefaultCellStyle.ForeColor = Color.White
- DGV9.EnableHeadersVisualStyles = False : DGV9.BackgroundColor = Color.DimGray : DGV9.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
- DGV9.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV9.DefaultCellStyle.BackColor = Color.Black : DGV9.DefaultCellStyle.ForeColor = Color.White
- DGV10.EnableHeadersVisualStyles = False : DGV10.BackgroundColor = Color.DimGray : DGV10.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
- DGV10.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV10.DefaultCellStyle.BackColor = Color.Black : DGV10.DefaultCellStyle.ForeColor = Color.White
- DGV11.EnableHeadersVisualStyles = False : DGV11.BackgroundColor = Color.DimGray : DGV11.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
- DGV11.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV11.DefaultCellStyle.BackColor = Color.Black : DGV11.DefaultCellStyle.ForeColor = Color.White
- DGV12.EnableHeadersVisualStyles = False : DGV12.BackgroundColor = Color.DimGray : DGV12.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
- DGV12.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV12.DefaultCellStyle.BackColor = Color.Black : DGV12.DefaultCellStyle.ForeColor = Color.White
- DGV13.EnableHeadersVisualStyles = False : DGV13.BackgroundColor = Color.DimGray : DGV13.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
- DGV13.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV13.DefaultCellStyle.BackColor = Color.Black : DGV13.DefaultCellStyle.ForeColor = Color.White
- DGV16.EnableHeadersVisualStyles = False : DGV16.BackgroundColor = Color.DimGray : DGV16.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
- DGV16.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV16.DefaultCellStyle.BackColor = Color.Black : DGV16.DefaultCellStyle.ForeColor = Color.White
- DGV17.EnableHeadersVisualStyles = False : DGV17.BackgroundColor = Color.DimGray : DGV17.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
- DGV17.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV17.DefaultCellStyle.BackColor = Color.Black : DGV17.DefaultCellStyle.ForeColor = Color.White
- DGV18.EnableHeadersVisualStyles = False : DGV18.BackgroundColor = Color.DimGray : DGV18.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
- DGV18.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV18.DefaultCellStyle.BackColor = Color.Black : DGV18.DefaultCellStyle.ForeColor = Color.White
- DGV19.EnableHeadersVisualStyles = False : DGV19.BackgroundColor = Color.DimGray : DGV19.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
- DGV19.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV19.DefaultCellStyle.BackColor = Color.Black : DGV19.DefaultCellStyle.ForeColor = Color.White
- DGV20.EnableHeadersVisualStyles = False : DGV20.BackgroundColor = Color.DimGray : DGV20.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
- DGV20.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV20.DefaultCellStyle.BackColor = Color.Black : DGV20.DefaultCellStyle.ForeColor = Color.White
- DGV23.EnableHeadersVisualStyles = False : DGV23.BackgroundColor = Color.DimGray : DGV23.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
- DGV23.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV23.DefaultCellStyle.BackColor = Color.Black : DGV23.DefaultCellStyle.ForeColor = Color.White
- DGV24.EnableHeadersVisualStyles = False : DGV24.BackgroundColor = Color.DimGray : DGV24.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
- DGV24.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV24.DefaultCellStyle.BackColor = Color.Black : DGV24.DefaultCellStyle.ForeColor = Color.White
- DGV25.EnableHeadersVisualStyles = False : DGV25.BackgroundColor = Color.DimGray : DGV25.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
- DGV25.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV25.DefaultCellStyle.BackColor = Color.Black : DGV25.DefaultCellStyle.ForeColor = Color.White
- DGV26.EnableHeadersVisualStyles = False : DGV26.BackgroundColor = Color.DimGray : DGV26.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
- DGV26.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV26.DefaultCellStyle.BackColor = Color.Black : DGV26.DefaultCellStyle.ForeColor = Color.White
- DGV27.EnableHeadersVisualStyles = False : DGV27.BackgroundColor = Color.DimGray : DGV27.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
- DGV27.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV27.DefaultCellStyle.BackColor = Color.Black : DGV27.DefaultCellStyle.ForeColor = Color.White
- DGV30.EnableHeadersVisualStyles = False : DGV30.BackgroundColor = Color.DimGray : DGV30.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
- DGV30.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV30.DefaultCellStyle.BackColor = Color.Black : DGV30.DefaultCellStyle.ForeColor = Color.White
- DGV31.EnableHeadersVisualStyles = False : DGV31.BackgroundColor = Color.DimGray : DGV31.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
- DGV31.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV31.DefaultCellStyle.BackColor = Color.Black : DGV31.DefaultCellStyle.ForeColor = Color.White
- DGV32.EnableHeadersVisualStyles = False : DGV32.BackgroundColor = Color.DimGray : DGV32.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
- DGV32.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV32.DefaultCellStyle.BackColor = Color.Black : DGV32.DefaultCellStyle.ForeColor = Color.White
- DGV33.EnableHeadersVisualStyles = False : DGV33.BackgroundColor = Color.DimGray : DGV33.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
- DGV33.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV33.DefaultCellStyle.BackColor = Color.Black : DGV33.DefaultCellStyle.ForeColor = Color.White
- DGV34.EnableHeadersVisualStyles = False : DGV34.BackgroundColor = Color.DimGray : DGV34.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
- DGV34.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV34.DefaultCellStyle.BackColor = Color.Black : DGV34.DefaultCellStyle.ForeColor = Color.White
- DGV37.EnableHeadersVisualStyles = False : DGV37.BackgroundColor = Color.DimGray : DGV37.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
- DGV37.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV37.DefaultCellStyle.BackColor = Color.Black : DGV37.DefaultCellStyle.ForeColor = Color.White
- DGV38.EnableHeadersVisualStyles = False : DGV38.BackgroundColor = Color.DimGray : DGV38.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
- DGV38.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV38.DefaultCellStyle.BackColor = Color.Black : DGV38.DefaultCellStyle.ForeColor = Color.White
- DGV39.EnableHeadersVisualStyles = False : DGV39.BackgroundColor = Color.DimGray : DGV39.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
- DGV39.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV39.DefaultCellStyle.BackColor = Color.Black : DGV39.DefaultCellStyle.ForeColor = Color.White
- DGV40.EnableHeadersVisualStyles = False : DGV40.BackgroundColor = Color.DimGray : DGV40.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
- DGV40.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV40.DefaultCellStyle.BackColor = Color.Black : DGV40.DefaultCellStyle.ForeColor = Color.White
- DGV41.EnableHeadersVisualStyles = False : DGV41.BackgroundColor = Color.DimGray : DGV41.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
- DGV41.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV41.DefaultCellStyle.BackColor = Color.Black : DGV41.DefaultCellStyle.ForeColor = Color.White
-
- DGV1.EnableHeadersVisualStyles = False : DGV1.BackgroundColor = Color.DimGray : DGV1.ColumnHeadersDefaultCellStyle.ForeColor = Color.LightPink
- DGV1.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV1.DefaultCellStyle.BackColor = Color.Black : DGV1.DefaultCellStyle.ForeColor = Color.LightPink
- DGV8.EnableHeadersVisualStyles = False : DGV8.BackgroundColor = Color.DimGray : DGV8.ColumnHeadersDefaultCellStyle.ForeColor = Color.LightPink
- DGV8.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV8.DefaultCellStyle.BackColor = Color.Black : DGV8.DefaultCellStyle.ForeColor = Color.LightPink
- DGV15.EnableHeadersVisualStyles = False : DGV15.BackgroundColor = Color.DimGray : DGV15.ColumnHeadersDefaultCellStyle.ForeColor = Color.LightPink
- DGV15.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV15.DefaultCellStyle.BackColor = Color.Black : DGV15.DefaultCellStyle.ForeColor = Color.LightPink
- DGV22.EnableHeadersVisualStyles = False : DGV22.BackgroundColor = Color.DimGray : DGV22.ColumnHeadersDefaultCellStyle.ForeColor = Color.LightPink
- DGV22.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV22.DefaultCellStyle.BackColor = Color.Black : DGV22.DefaultCellStyle.ForeColor = Color.LightPink
- DGV29.EnableHeadersVisualStyles = False : DGV29.BackgroundColor = Color.DimGray : DGV29.ColumnHeadersDefaultCellStyle.ForeColor = Color.LightPink
- DGV29.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV29.DefaultCellStyle.BackColor = Color.Black : DGV29.DefaultCellStyle.ForeColor = Color.LightPink
- DGV36.EnableHeadersVisualStyles = False : DGV36.BackgroundColor = Color.DimGray : DGV36.ColumnHeadersDefaultCellStyle.ForeColor = Color.LightPink
- DGV36.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV36.DefaultCellStyle.BackColor = Color.Black : DGV36.DefaultCellStyle.ForeColor = Color.LightPink
-
- DGV7.EnableHeadersVisualStyles = False : DGV7.BackgroundColor = Color.DimGray : DGV7.ColumnHeadersDefaultCellStyle.ForeColor = Color.LightGreen
- DGV7.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV7.DefaultCellStyle.BackColor = Color.Black : DGV7.DefaultCellStyle.ForeColor = Color.LightGreen
- DGV14.EnableHeadersVisualStyles = False : DGV14.BackgroundColor = Color.DimGray : DGV14.ColumnHeadersDefaultCellStyle.ForeColor = Color.LightGreen
- DGV14.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV14.DefaultCellStyle.BackColor = Color.Black : DGV14.DefaultCellStyle.ForeColor = Color.LightGreen
- DGV21.EnableHeadersVisualStyles = False : DGV21.BackgroundColor = Color.DimGray : DGV21.ColumnHeadersDefaultCellStyle.ForeColor = Color.LightGreen
- DGV21.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV21.DefaultCellStyle.BackColor = Color.Black : DGV21.DefaultCellStyle.ForeColor = Color.LightGreen
- DGV28.EnableHeadersVisualStyles = False : DGV28.BackgroundColor = Color.DimGray : DGV28.ColumnHeadersDefaultCellStyle.ForeColor = Color.LightGreen
- DGV28.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV28.DefaultCellStyle.BackColor = Color.Black : DGV28.DefaultCellStyle.ForeColor = Color.LightGreen
- DGV35.EnableHeadersVisualStyles = False : DGV35.BackgroundColor = Color.DimGray : DGV35.ColumnHeadersDefaultCellStyle.ForeColor = Color.LightGreen
- DGV35.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV35.DefaultCellStyle.BackColor = Color.Black : DGV35.DefaultCellStyle.ForeColor = Color.LightGreen
- DGV42.EnableHeadersVisualStyles = False : DGV42.BackgroundColor = Color.DimGray : DGV42.ColumnHeadersDefaultCellStyle.ForeColor = Color.LightGreen
- DGV42.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : DGV42.DefaultCellStyle.BackColor = Color.Black : DGV42.DefaultCellStyle.ForeColor = Color.LightGreen
- End If
- End Sub
- End Class
|