Няма описание
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768
  1. Option Strict Off
  2. Imports System.Drawing.Imaging
  3. Imports System.IO
  4. Public Class 排班明細
  5. ReadOnly ds, ds1 As New DataSet
  6. Dim X1, XX, XXX, AA As Double
  7. Dim Q, 開始位置1, 開始位置2, 標準長度, 行(20), 選擇項, 選擇處 As Integer
  8. Private Sub 讀取人員資料表()
  9. 人員_dgv.DataSource = Nothing : ds.Clear()
  10. 人員_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  11. 人員_dgv.ColumnHeadersHeight = 25
  12. 人員_dgv.AllowUserToAddRows = False
  13. If 全_ch.Checked = False Then
  14. SQL_排班系統_班別_人員()
  15. Else
  16. SQL_排班系統_班別_人員_全()
  17. End If
  18. da.Fill(ds) : 人員_dgv.DataSource = ds.Tables(0) : conn.Close()
  19. 人員_dgv.Columns(0).FillWeight = 70 : 人員_dgv.Columns(1).Visible = False : 人員_dgv.Columns(2).FillWeight = 100
  20. For i As Integer = 0 To 人員_dgv.Rows.Count - 1
  21. 人員_dgv.Rows(i).Cells("No.").Value = i + 1
  22. Next
  23. End Sub
  24. Private Sub 讀取排班資料表()
  25. 排班明細_dgv.DataSource = Nothing : ds1.Clear()
  26. 排班明細_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  27. 排班明細_dgv.ColumnHeadersHeight = 25
  28. 排班明細_dgv.AllowUserToAddRows = False
  29. SQL_排班系統_班別_排班()
  30. da.Fill(ds1) : 排班明細_dgv.DataSource = ds1.Tables(0) : conn.Close()
  31. 排班明細_dgv.Sort(排班明細_dgv.Columns("項"), System.ComponentModel.ListSortDirection.Ascending)
  32. For i As Integer = 0 To 排班明細_dgv.Rows.Count - 1
  33. If IsDBNull(排班明細_dgv.Rows(i).Cells("請假類別").Value) = True Then
  34. 排班明細_dgv.Rows(i).Cells("請假類別").Value = ""
  35. End If
  36. If CInt(排班明細_dgv.Rows(i).Cells("項次").Value.ToString) < 10 Then
  37. 排班明細_dgv.Rows(i).Cells("項次").Value = ("0" & i + 1)
  38. Else : 排班明細_dgv.Rows(i).Cells("項次").Value = (i + 1) : End If
  39. Next
  40. End Sub
  41. Private Sub 班別_下拉表單資料載入()
  42. SQL_排班系統_班別_下拉()
  43. 班別_cb1.Items.Clear() : 班別_cb2.Items.Clear() : 班別_cb3.Items.Clear() : 班別_cb4.Items.Clear() : 班別_cb5.Items.Clear() : 班別_cb6.Items.Clear()
  44. 班別_cb7.Items.Clear() : 班別_cb7.Items.Clear() : 班別_cb8.Items.Clear() : 班別_cb9.Items.Clear() : 班別_cb10.Items.Clear() : 班別_cb11.Items.Clear()
  45. 班別_cb12.Items.Clear() : 班別_cb13.Items.Clear() : 班別_cb14.Items.Clear() : 班別_cb15.Items.Clear() : 班別_cb16.Items.Clear() : 班別_cb17.Items.Clear()
  46. 班別_cb18.Items.Clear() : 班別_cb19.Items.Clear() : 班別_cb20.Items.Clear()
  47. While (dr.Read())
  48. 班別_cb1.Items.Add(dr("時段")) : 班別_cb2.Items.Add(dr("時段")) : 班別_cb3.Items.Add(dr("時段")) : 班別_cb4.Items.Add(dr("時段")) : 班別_cb5.Items.Add(dr("時段"))
  49. 班別_cb6.Items.Add(dr("時段")) : 班別_cb7.Items.Add(dr("時段")) : 班別_cb8.Items.Add(dr("時段")) : 班別_cb9.Items.Add(dr("時段")) : 班別_cb10.Items.Add(dr("時段"))
  50. 班別_cb11.Items.Add(dr("時段")) : 班別_cb12.Items.Add(dr("時段")) : 班別_cb13.Items.Add(dr("時段")) : 班別_cb14.Items.Add(dr("時段")) : 班別_cb15.Items.Add(dr("時段"))
  51. 班別_cb16.Items.Add(dr("時段")) : 班別_cb17.Items.Add(dr("時段")) : 班別_cb18.Items.Add(dr("時段")) : 班別_cb19.Items.Add(dr("時段")) : 班別_cb20.Items.Add(dr("時段"))
  52. End While
  53. conn.Close()
  54. End Sub
  55. Private Sub 職務_下拉表單資料載入()
  56. SQL_排班系統_職務_下拉()
  57. ComboBox1.Items.Clear() : ComboBox2.Items.Clear() : ComboBox3.Items.Clear() : ComboBox4.Items.Clear() : ComboBox5.Items.Clear() : ComboBox6.Items.Clear()
  58. ComboBox7.Items.Clear() : ComboBox8.Items.Clear() : ComboBox9.Items.Clear() : ComboBox10.Items.Clear() : ComboBox11.Items.Clear() : ComboBox12.Items.Clear()
  59. ComboBox13.Items.Clear() : ComboBox14.Items.Clear() : ComboBox15.Items.Clear() : ComboBox16.Items.Clear() : ComboBox17.Items.Clear() : ComboBox18.Items.Clear()
  60. ComboBox19.Items.Clear() : ComboBox20.Items.Clear() : ComboBox21.Items.Clear() : ComboBox22.Items.Clear() : ComboBox23.Items.Clear() : ComboBox24.Items.Clear()
  61. ComboBox25.Items.Clear() : ComboBox26.Items.Clear() : ComboBox27.Items.Clear() : ComboBox28.Items.Clear() : ComboBox29.Items.Clear() : ComboBox30.Items.Clear()
  62. ComboBox31.Items.Clear() : ComboBox32.Items.Clear() : ComboBox33.Items.Clear() : ComboBox34.Items.Clear() : ComboBox35.Items.Clear() : ComboBox36.Items.Clear()
  63. ComboBox37.Items.Clear() : ComboBox38.Items.Clear() : ComboBox39.Items.Clear() : ComboBox40.Items.Clear()
  64. While (dr.Read())
  65. ComboBox1.Items.Add(dr("職務")) : ComboBox2.Items.Add(dr("職務")) : ComboBox3.Items.Add(dr("職務")) : ComboBox4.Items.Add(dr("職務")) : ComboBox5.Items.Add(dr("職務"))
  66. ComboBox6.Items.Add(dr("職務")) : ComboBox7.Items.Add(dr("職務")) : ComboBox8.Items.Add(dr("職務")) : ComboBox9.Items.Add(dr("職務")) : ComboBox10.Items.Add(dr("職務"))
  67. ComboBox11.Items.Add(dr("職務")) : ComboBox12.Items.Add(dr("職務")) : ComboBox13.Items.Add(dr("職務")) : ComboBox14.Items.Add(dr("職務")) : ComboBox15.Items.Add(dr("職務"))
  68. ComboBox16.Items.Add(dr("職務")) : ComboBox17.Items.Add(dr("職務")) : ComboBox18.Items.Add(dr("職務")) : ComboBox19.Items.Add(dr("職務")) : ComboBox20.Items.Add(dr("職務"))
  69. ComboBox21.Items.Add(dr("職務")) : ComboBox22.Items.Add(dr("職務")) : ComboBox23.Items.Add(dr("職務")) : ComboBox24.Items.Add(dr("職務")) : ComboBox25.Items.Add(dr("職務"))
  70. ComboBox26.Items.Add(dr("職務")) : ComboBox27.Items.Add(dr("職務")) : ComboBox28.Items.Add(dr("職務")) : ComboBox29.Items.Add(dr("職務")) : ComboBox30.Items.Add(dr("職務"))
  71. ComboBox31.Items.Add(dr("職務")) : ComboBox32.Items.Add(dr("職務")) : ComboBox33.Items.Add(dr("職務")) : ComboBox34.Items.Add(dr("職務")) : ComboBox35.Items.Add(dr("職務"))
  72. ComboBox36.Items.Add(dr("職務")) : ComboBox37.Items.Add(dr("職務")) : ComboBox38.Items.Add(dr("職務")) : ComboBox39.Items.Add(dr("職務")) : ComboBox40.Items.Add(dr("職務"))
  73. End While
  74. conn.Close()
  75. End Sub
  76. Private Sub 班表鎖定變化()
  77. If gUserName = "*系統管理者" Then 'Or gUserName = "蔡紋婷"
  78. 存檔_bt.Enabled = True : 人員_dgv.Enabled = True : 全_ch.Enabled = True
  79. For no As Integer = 1 To 20
  80. Dim 姓名_tbS As TextBox = CType(Me.Controls.Find("姓名_tb" + no.ToString(), True)(0), TextBox)
  81. Dim 班別_cbS As ComboBox = CType(Me.Controls.Find("班別_cb" + no.ToString(), True)(0), ComboBox)
  82. Dim A_lbS As Label = CType(Me.Controls.Find("A_lb" + no.ToString(), True)(0), Label)
  83. Dim CheckBoxS As CheckBox = CType(Me.Controls.Find("CheckBox" + no.ToString(), True)(0), CheckBox)
  84. Dim NumericUpDownS As NumericUpDown = CType(Me.Controls.Find("NumericUpDown" + no.ToString(), True)(0), NumericUpDown)
  85. Dim NUPS As NumericUpDown = CType(Me.Controls.Find("NUP" + no.ToString(), True)(0), NumericUpDown)
  86. Dim BUPS As NumericUpDown = CType(Me.Controls.Find("BUP" + no.ToString(), True)(0), NumericUpDown)
  87. 姓名_tbS.Enabled = True : 班別_cbS.Enabled = True : CheckBoxS.Enabled = True : NumericUpDownS.Enabled = True : NUPS.Enabled = True : BUPS.Enabled = True
  88. Next
  89. Else
  90. If CC(17) = False Then
  91. 存檔_bt.Enabled = False : 人員_dgv.Enabled = False : 全_ch.Enabled = False
  92. For no As Integer = 1 To 20
  93. Dim 姓名_tbS As TextBox = CType(Me.Controls.Find("姓名_tb" + no.ToString(), True)(0), TextBox)
  94. Dim 班別_cbS As ComboBox = CType(Me.Controls.Find("班別_cb" + no.ToString(), True)(0), ComboBox)
  95. Dim A_lbS As Label = CType(Me.Controls.Find("A_lb" + no.ToString(), True)(0), Label)
  96. Dim CheckBoxS As CheckBox = CType(Me.Controls.Find("CheckBox" + no.ToString(), True)(0), CheckBox)
  97. Dim NumericUpDownS As NumericUpDown = CType(Me.Controls.Find("NumericUpDown" + no.ToString(), True)(0), NumericUpDown)
  98. Dim NUPS As NumericUpDown = CType(Me.Controls.Find("NUP" + no.ToString(), True)(0), NumericUpDown)
  99. Dim BUPS As NumericUpDown = CType(Me.Controls.Find("BUP" + no.ToString(), True)(0), NumericUpDown)
  100. 姓名_tbS.Enabled = False : 班別_cbS.Enabled = False : CheckBoxS.Enabled = False : NumericUpDownS.Enabled = False : NUPS.Enabled = False : BUPS.Enabled = False
  101. Next
  102. Else
  103. 存檔_bt.Enabled = True : 人員_dgv.Enabled = True : 全_ch.Enabled = True
  104. For no As Integer = 1 To 20
  105. Dim 姓名_tbS As TextBox = CType(Me.Controls.Find("姓名_tb" + no.ToString(), True)(0), TextBox)
  106. Dim 班別_cbS As ComboBox = CType(Me.Controls.Find("班別_cb" + no.ToString(), True)(0), ComboBox)
  107. Dim A_lbS As Label = CType(Me.Controls.Find("A_lb" + no.ToString(), True)(0), Label)
  108. Dim CheckBoxS As CheckBox = CType(Me.Controls.Find("CheckBox" + no.ToString(), True)(0), CheckBox)
  109. Dim NumericUpDownS As NumericUpDown = CType(Me.Controls.Find("NumericUpDown" + no.ToString(), True)(0), NumericUpDown)
  110. Dim NUPS As NumericUpDown = CType(Me.Controls.Find("NUP" + no.ToString(), True)(0), NumericUpDown)
  111. Dim BUPS As NumericUpDown = CType(Me.Controls.Find("BUP" + no.ToString(), True)(0), NumericUpDown)
  112. 姓名_tbS.Enabled = True : 班別_cbS.Enabled = True : CheckBoxS.Enabled = True : NumericUpDownS.Enabled = True : NUPS.Enabled = True : BUPS.Enabled = True
  113. Next
  114. End If
  115. End If
  116. End Sub
  117. Private Sub 進度條變化1()
  118. If 姓名_tb1.Text <> "" Or 班別_cb1.Text <> "休" Then
  119. Do2 = NumericUpDown1.Value : 班條長度()
  120. ComboBox1.Size = New Size(標準長度 + XXX, 32) : ComboBox2.Size = New Size(標準長度 - XXX, 25)
  121. Do2 = BUP1.Value : 班條長度1() : ComboBox2.Size = New Size(ComboBox2.Size.Width + XXX, 25)
  122. If CheckBox1.Checked = False And Val(Strings.Left(班別_cb1.Text, 2)) < 17 Then : ComboBox2.Visible = True
  123. ElseIf CheckBox1.Checked = False And Val(Strings.Left(班別_cb1.Text, 2)) >= 17 Then : ComboBox2.Visible = False
  124. ElseIf CheckBox1.Checked = True Then : ComboBox2.Visible = False : End If
  125. End If
  126. End Sub
  127. Private Sub 進度條變化2()
  128. If 姓名_tb2.Text <> "" Or 班別_cb2.Text <> "休" Then
  129. Do2 = NumericUpDown2.Value : 班條長度()
  130. ComboBox3.Size = New Size(標準長度 + XXX, 32) : ComboBox4.Size = New Size(標準長度 - XXX, 25)
  131. Do2 = BUP2.Value : 班條長度1() : ComboBox4.Size = New Size(ComboBox4.Size.Width + XXX, 25)
  132. If CheckBox2.Checked = False And Val(Strings.Left(班別_cb2.Text, 2)) < 17 Then : ComboBox4.Visible = True
  133. ElseIf CheckBox2.Checked = False And Val(Strings.Left(班別_cb2.Text, 2)) >= 17 Then : ComboBox4.Visible = False
  134. ElseIf CheckBox2.Checked = True Then : ComboBox4.Visible = False : End If
  135. End If
  136. End Sub
  137. Private Sub 進度條變化3()
  138. If 姓名_tb3.Text <> "" Or 班別_cb3.Text <> "休" Then
  139. Do2 = NumericUpDown3.Value : 班條長度()
  140. ComboBox5.Size = New Size(標準長度 + XXX, 32) : ComboBox6.Size = New Size(標準長度 - XXX, 25)
  141. Do2 = BUP3.Value : 班條長度1() : ComboBox6.Size = New Size(ComboBox6.Size.Width + XXX, 25)
  142. If CheckBox3.Checked = False And Val(Strings.Left(班別_cb3.Text, 2)) < 17 Then : ComboBox6.Visible = True
  143. ElseIf CheckBox3.Checked = False And Val(Strings.Left(班別_cb3.Text, 2)) >= 17 Then : ComboBox6.Visible = False
  144. ElseIf CheckBox3.Checked = True Then : ComboBox6.Visible = False : End If
  145. End If
  146. End Sub
  147. Private Sub 進度條變化4()
  148. If 姓名_tb4.Text <> "" Or 班別_cb4.Text <> "休" Then
  149. Do2 = NumericUpDown4.Value : 班條長度()
  150. ComboBox7.Size = New Size(標準長度 + XXX, 32) : ComboBox8.Size = New Size(標準長度 - XXX, 25)
  151. Do2 = BUP4.Value : 班條長度1() : ComboBox8.Size = New Size(ComboBox8.Size.Width + XXX, 25)
  152. If CheckBox4.Checked = False And Val(Strings.Left(班別_cb4.Text, 2)) < 17 Then : ComboBox8.Visible = True
  153. ElseIf CheckBox4.Checked = False And Val(Strings.Left(班別_cb4.Text, 2)) >= 17 Then : ComboBox8.Visible = False
  154. ElseIf CheckBox4.Checked = True Then : ComboBox8.Visible = False : End If
  155. End If
  156. End Sub
  157. Private Sub 進度條變化5()
  158. If 姓名_tb5.Text <> "" Or 班別_cb5.Text <> "休" Then
  159. Do2 = NumericUpDown5.Value : 班條長度()
  160. ComboBox9.Size = New Size(標準長度 + XXX, 32) : ComboBox10.Size = New Size(標準長度 - XXX, 25)
  161. Do2 = BUP5.Value : 班條長度1() : ComboBox10.Size = New Size(ComboBox10.Size.Width + XXX, 25)
  162. If CheckBox5.Checked = False And Val(Strings.Left(班別_cb5.Text, 2)) < 17 Then : ComboBox10.Visible = True
  163. ElseIf CheckBox5.Checked = False And Val(Strings.Left(班別_cb5.Text, 2)) >= 17 Then : ComboBox10.Visible = False
  164. ElseIf CheckBox5.Checked = True Then : ComboBox10.Visible = False : End If
  165. End If
  166. End Sub
  167. Private Sub 進度條變化6()
  168. If 姓名_tb6.Text <> "" Or 班別_cb6.Text <> "休" Then
  169. Do2 = NumericUpDown6.Value : 班條長度()
  170. ComboBox11.Size = New Size(標準長度 + XXX, 32) : ComboBox12.Size = New Size(標準長度 - XXX, 25)
  171. Do2 = BUP6.Value : 班條長度1() : ComboBox12.Size = New Size(ComboBox12.Size.Width + XXX, 25)
  172. If CheckBox6.Checked = False And Val(Strings.Left(班別_cb6.Text, 2)) < 17 Then : ComboBox12.Visible = True
  173. ElseIf CheckBox6.Checked = False And Val(Strings.Left(班別_cb6.Text, 2)) >= 17 Then : ComboBox12.Visible = False
  174. ElseIf CheckBox6.Checked = True Then : ComboBox12.Visible = False : End If
  175. End If
  176. End Sub
  177. Private Sub 進度條變化7()
  178. If 姓名_tb7.Text <> "" Or 班別_cb7.Text <> "休" Then
  179. Do2 = NumericUpDown7.Value : 班條長度()
  180. ComboBox13.Size = New Size(標準長度 + XXX, 32) : ComboBox14.Size = New Size(標準長度 - XXX, 25)
  181. Do2 = BUP7.Value : 班條長度1() : ComboBox14.Size = New Size(ComboBox14.Size.Width + XXX, 25)
  182. If CheckBox7.Checked = False And Val(Strings.Left(班別_cb7.Text, 2)) < 17 Then : ComboBox14.Visible = True
  183. ElseIf CheckBox7.Checked = False And Val(Strings.Left(班別_cb7.Text, 2)) >= 17 Then : ComboBox14.Visible = False
  184. ElseIf CheckBox7.Checked = True Then : ComboBox14.Visible = False : End If
  185. End If
  186. End Sub
  187. Private Sub 進度條變化8()
  188. If 姓名_tb8.Text <> "" Or 班別_cb8.Text <> "休" Then
  189. Do2 = NumericUpDown8.Value : 班條長度()
  190. ComboBox15.Size = New Size(標準長度 + XXX, 32) : ComboBox16.Size = New Size(標準長度 - XXX, 25)
  191. Do2 = BUP8.Value : 班條長度1() : ComboBox16.Size = New Size(ComboBox16.Size.Width + XXX, 25)
  192. If CheckBox8.Checked = False And Val(Strings.Left(班別_cb8.Text, 2)) < 17 Then : ComboBox16.Visible = True
  193. ElseIf CheckBox8.Checked = False And Val(Strings.Left(班別_cb8.Text, 2)) >= 17 Then : ComboBox16.Visible = False
  194. ElseIf CheckBox8.Checked = True Then : ComboBox16.Visible = False : End If
  195. End If
  196. End Sub
  197. Private Sub 進度條變化9()
  198. If 姓名_tb9.Text <> "" Or 班別_cb9.Text <> "休" Then
  199. Do2 = NumericUpDown9.Value : 班條長度()
  200. ComboBox17.Size = New Size(標準長度 + XXX, 32) : ComboBox18.Size = New Size(標準長度 - XXX, 25)
  201. Do2 = BUP9.Value : 班條長度1() : ComboBox18.Size = New Size(ComboBox18.Size.Width + XXX, 25)
  202. If CheckBox9.Checked = False And Val(Strings.Left(班別_cb9.Text, 2)) < 17 Then : ComboBox18.Visible = True
  203. ElseIf CheckBox9.Checked = False And Val(Strings.Left(班別_cb9.Text, 2)) >= 17 Then : ComboBox18.Visible = False
  204. ElseIf CheckBox9.Checked = True Then : ComboBox18.Visible = False : End If
  205. End If
  206. End Sub
  207. Private Sub 進度條變化10()
  208. If 姓名_tb10.Text <> "" Or 班別_cb10.Text <> "休" Then
  209. Do2 = NumericUpDown10.Value : 班條長度()
  210. ComboBox19.Size = New Size(標準長度 + XXX, 32) : ComboBox20.Size = New Size(標準長度 - XXX, 25)
  211. Do2 = BUP10.Value : 班條長度1() : ComboBox20.Size = New Size(ComboBox20.Size.Width + XXX, 25)
  212. If CheckBox10.Checked = False And Val(Strings.Left(班別_cb10.Text, 2)) < 17 Then : ComboBox20.Visible = True
  213. ElseIf CheckBox10.Checked = False And Val(Strings.Left(班別_cb10.Text, 2)) >= 17 Then : ComboBox20.Visible = False
  214. ElseIf CheckBox10.Checked = True Then : ComboBox20.Visible = False : End If
  215. End If
  216. End Sub
  217. Private Sub 進度條變化11()
  218. If 姓名_tb11.Text <> "" Or 班別_cb11.Text <> "休" Then
  219. Do2 = NumericUpDown11.Value : 班條長度()
  220. ComboBox21.Size = New Size(標準長度 + XXX, 32) : ComboBox22.Size = New Size(標準長度 - XXX, 25)
  221. Do2 = BUP11.Value : 班條長度1() : ComboBox22.Size = New Size(ComboBox22.Size.Width + XXX, 25)
  222. If CheckBox11.Checked = False And Val(Strings.Left(班別_cb11.Text, 2)) < 17 Then : ComboBox22.Visible = True
  223. ElseIf CheckBox11.Checked = False And Val(Strings.Left(班別_cb11.Text, 2)) >= 17 Then : ComboBox22.Visible = False
  224. ElseIf CheckBox11.Checked = True Then : ComboBox22.Visible = False : End If
  225. End If
  226. End Sub
  227. Private Sub 進度條變化12()
  228. If 姓名_tb12.Text <> "" Or 班別_cb12.Text <> "休" Then
  229. Do2 = NumericUpDown12.Value : 班條長度()
  230. ComboBox23.Size = New Size(標準長度 + XXX, 32) : ComboBox24.Size = New Size(標準長度 - XXX, 25)
  231. Do2 = BUP12.Value : 班條長度1() : ComboBox24.Size = New Size(ComboBox24.Size.Width + XXX, 25)
  232. If CheckBox12.Checked = False And Val(Strings.Left(班別_cb12.Text, 2)) < 17 Then : ComboBox24.Visible = True
  233. ElseIf CheckBox12.Checked = False And Val(Strings.Left(班別_cb12.Text, 2)) >= 17 Then : ComboBox24.Visible = False
  234. ElseIf CheckBox12.Checked = True Then : ComboBox24.Visible = False : End If
  235. End If
  236. End Sub
  237. Private Sub 進度條變化13()
  238. If 姓名_tb13.Text <> "" Or 班別_cb13.Text <> "休" Then
  239. Do2 = NumericUpDown13.Value : 班條長度()
  240. ComboBox25.Size = New Size(標準長度 + XXX, 32) : ComboBox26.Size = New Size(標準長度 - XXX, 25)
  241. Do2 = BUP13.Value : 班條長度1() : ComboBox26.Size = New Size(ComboBox26.Size.Width + XXX, 25)
  242. If CheckBox13.Checked = False And Val(Strings.Left(班別_cb13.Text, 2)) < 17 Then : ComboBox26.Visible = True
  243. ElseIf CheckBox13.Checked = False And Val(Strings.Left(班別_cb13.Text, 2)) >= 17 Then : ComboBox26.Visible = False
  244. ElseIf CheckBox13.Checked = True Then : ComboBox26.Visible = False : End If
  245. End If
  246. End Sub
  247. Private Sub 進度條變化14()
  248. If 姓名_tb14.Text <> "" Or 班別_cb14.Text <> "休" Then
  249. Do2 = NumericUpDown14.Value : 班條長度()
  250. ComboBox27.Size = New Size(標準長度 + XXX, 32) : ComboBox28.Size = New Size(標準長度 - XXX, 25)
  251. Do2 = BUP14.Value : 班條長度1() : ComboBox28.Size = New Size(ComboBox28.Size.Width + XXX, 25)
  252. If CheckBox14.Checked = False And Val(Strings.Left(班別_cb14.Text, 2)) < 17 Then : ComboBox28.Visible = True
  253. ElseIf CheckBox14.Checked = False And Val(Strings.Left(班別_cb14.Text, 2)) >= 17 Then : ComboBox28.Visible = False
  254. ElseIf CheckBox14.Checked = True Then : ComboBox28.Visible = False : End If
  255. End If
  256. End Sub
  257. Private Sub 進度條變化15()
  258. If 姓名_tb15.Text <> "" Or 班別_cb15.Text <> "休" Then
  259. Do2 = NumericUpDown15.Value : 班條長度()
  260. ComboBox29.Size = New Size(標準長度 + XXX, 32) : ComboBox30.Size = New Size(標準長度 - XXX, 25)
  261. Do2 = BUP15.Value : 班條長度1() : ComboBox30.Size = New Size(ComboBox30.Size.Width + XXX, 25)
  262. If CheckBox15.Checked = False And Val(Strings.Left(班別_cb15.Text, 2)) < 17 Then : ComboBox30.Visible = True
  263. ElseIf CheckBox15.Checked = False And Val(Strings.Left(班別_cb15.Text, 2)) >= 17 Then : ComboBox30.Visible = False
  264. ElseIf CheckBox15.Checked = True Then : ComboBox30.Visible = False : End If
  265. End If
  266. End Sub
  267. Private Sub 進度條變化16()
  268. If 姓名_tb16.Text <> "" Or 班別_cb16.Text <> "休" Then
  269. Do2 = NumericUpDown16.Value : 班條長度()
  270. ComboBox31.Size = New Size(標準長度 + XXX, 32) : ComboBox32.Size = New Size(標準長度 - XXX, 25)
  271. Do2 = BUP16.Value : 班條長度1() : ComboBox32.Size = New Size(ComboBox32.Size.Width + XXX, 25)
  272. If CheckBox16.Checked = False And Val(Strings.Left(班別_cb16.Text, 2)) < 17 Then : ComboBox32.Visible = True
  273. ElseIf CheckBox16.Checked = False And Val(Strings.Left(班別_cb16.Text, 2)) >= 17 Then : ComboBox32.Visible = False
  274. ElseIf CheckBox16.Checked = True Then : ComboBox32.Visible = False : End If
  275. End If
  276. End Sub
  277. Private Sub 進度條變化17()
  278. If 姓名_tb17.Text <> "" Or 班別_cb17.Text <> "休" Then
  279. Do2 = NumericUpDown17.Value : 班條長度()
  280. ComboBox33.Size = New Size(標準長度 + XXX, 32) : ComboBox34.Size = New Size(標準長度 - XXX, 25)
  281. Do2 = BUP17.Value : 班條長度1() : ComboBox34.Size = New Size(ComboBox34.Size.Width + XXX, 25)
  282. If CheckBox17.Checked = False And Val(Strings.Left(班別_cb17.Text, 2)) < 17 Then : ComboBox34.Visible = True
  283. ElseIf CheckBox17.Checked = False And Val(Strings.Left(班別_cb17.Text, 2)) >= 17 Then : ComboBox34.Visible = False
  284. ElseIf CheckBox17.Checked = True Then : ComboBox34.Visible = False : End If
  285. End If
  286. End Sub
  287. Private Sub 進度條變化18()
  288. If 姓名_tb18.Text <> "" Or 班別_cb18.Text <> "休" Then
  289. Do2 = NumericUpDown18.Value : 班條長度()
  290. ComboBox35.Size = New Size(標準長度 + XXX, 32) : ComboBox36.Size = New Size(標準長度 - XXX, 25)
  291. Do2 = BUP18.Value : 班條長度1() : ComboBox36.Size = New Size(ComboBox36.Size.Width + XXX, 25)
  292. If CheckBox18.Checked = False And Val(Strings.Left(班別_cb18.Text, 2)) < 17 Then : ComboBox36.Visible = True
  293. ElseIf CheckBox18.Checked = False And Val(Strings.Left(班別_cb18.Text, 2)) >= 17 Then : ComboBox36.Visible = False
  294. ElseIf CheckBox18.Checked = True Then : ComboBox36.Visible = False : End If
  295. End If
  296. End Sub
  297. Private Sub 進度條變化19()
  298. If 姓名_tb19.Text <> "" Or 班別_cb19.Text <> "休" Then
  299. Do2 = NumericUpDown19.Value : 班條長度()
  300. ComboBox37.Size = New Size(標準長度 + XXX, 32) : ComboBox38.Size = New Size(標準長度 - XXX, 25)
  301. Do2 = BUP19.Value : 班條長度1() : ComboBox38.Size = New Size(ComboBox38.Size.Width + XXX, 25)
  302. If CheckBox19.Checked = False And Val(Strings.Left(班別_cb19.Text, 2)) < 17 Then : ComboBox38.Visible = True
  303. ElseIf CheckBox19.Checked = False And Val(Strings.Left(班別_cb19.Text, 2)) >= 17 Then : ComboBox38.Visible = False
  304. ElseIf CheckBox19.Checked = True Then : ComboBox38.Visible = False : End If
  305. End If
  306. End Sub
  307. Private Sub 進度條變化20()
  308. If 姓名_tb20.Text <> "" Or 班別_cb20.Text <> "休" Then
  309. Do2 = NumericUpDown20.Value : 班條長度()
  310. ComboBox39.Size = New Size(標準長度 + XXX, 32) : ComboBox40.Size = New Size(標準長度 - XXX, 25)
  311. Do2 = BUP20.Value : 班條長度1() : ComboBox40.Size = New Size(ComboBox40.Size.Width + XXX, 25)
  312. If CheckBox20.Checked = False And Val(Strings.Left(班別_cb20.Text, 2)) < 17 Then : ComboBox40.Visible = True
  313. ElseIf CheckBox20.Checked = False And Val(Strings.Left(班別_cb20.Text, 2)) >= 17 Then : ComboBox40.Visible = False
  314. ElseIf CheckBox20.Checked = True Then : ComboBox40.Visible = False : End If
  315. End If
  316. End Sub
  317. Private Sub 休息變化1()
  318. XX = Val(Strings.Left(班別_cb1.Text, 2)) * 60 + Val(Strings.Mid(班別_cb1.Text, 4, 2)) : 班別圖示計算載入()
  319. X1 = NUP1.Value : 休息長度() : Do2 = NumericUpDown1.Value : 班條長度()
  320. ComboBox1.Location = New Point(開始位置1 + XX, 行(1)) : ComboBox2.Location = New Point(開始位置2 + XX + X1 + XXX, 行(1))
  321. 進度條變化1()
  322. End Sub
  323. Private Sub 休息變化2()
  324. XX = Val(Strings.Left(班別_cb2.Text, 2)) * 60 + Val(Strings.Mid(班別_cb2.Text, 4, 2)) : 班別圖示計算載入()
  325. X1 = NUP2.Value : 休息長度() : Do2 = NumericUpDown2.Value : 班條長度()
  326. ComboBox3.Location = New Point(開始位置1 + XX, 行(2)) : ComboBox4.Location = New Point(開始位置2 + XX + X1 + XXX, 行(2))
  327. 進度條變化2()
  328. End Sub
  329. Private Sub 休息變化3()
  330. XX = Val(Strings.Left(班別_cb3.Text, 2)) * 60 + Val(Strings.Mid(班別_cb3.Text, 4, 2)) : 班別圖示計算載入()
  331. X1 = NUP3.Value : 休息長度() : Do2 = NumericUpDown3.Value : 班條長度()
  332. ComboBox5.Location = New Point(開始位置1 + XX, 行(3)) : ComboBox6.Location = New Point(開始位置2 + XX + X1 + XXX, 行(3))
  333. 進度條變化3()
  334. End Sub
  335. Private Sub 休息變化4()
  336. XX = Val(Strings.Left(班別_cb4.Text, 2)) * 60 + Val(Strings.Mid(班別_cb4.Text, 4, 2)) : 班別圖示計算載入()
  337. X1 = NUP4.Value : 休息長度() : Do2 = NumericUpDown4.Value : 班條長度()
  338. ComboBox7.Location = New Point(開始位置1 + XX, 行(4)) : ComboBox8.Location = New Point(開始位置2 + XX + X1 + XXX, 行(4))
  339. 進度條變化4()
  340. End Sub
  341. Private Sub 休息變化5()
  342. XX = Val(Strings.Left(班別_cb5.Text, 2)) * 60 + Val(Strings.Mid(班別_cb5.Text, 4, 2)) : 班別圖示計算載入()
  343. X1 = NUP5.Value : 休息長度() : Do2 = NumericUpDown5.Value : 班條長度()
  344. ComboBox9.Location = New Point(開始位置1 + XX, 行(5)) : ComboBox10.Location = New Point(開始位置2 + XX + X1 + XXX, 行(5))
  345. 進度條變化5()
  346. End Sub
  347. Private Sub 休息變化6()
  348. XX = Val(Strings.Left(班別_cb6.Text, 2)) * 60 + Val(Strings.Mid(班別_cb6.Text, 4, 2)) : 班別圖示計算載入()
  349. X1 = NUP6.Value : 休息長度() : Do2 = NumericUpDown6.Value : 班條長度()
  350. ComboBox11.Location = New Point(開始位置1 + XX, 行(6)) : ComboBox12.Location = New Point(開始位置2 + XX + X1 + XXX, 行(6))
  351. 進度條變化6()
  352. End Sub
  353. Private Sub 休息變化7()
  354. XX = Val(Strings.Left(班別_cb7.Text, 2)) * 60 + Val(Strings.Mid(班別_cb7.Text, 4, 2)) : 班別圖示計算載入()
  355. X1 = NUP7.Value : 休息長度() : Do2 = NumericUpDown7.Value : 班條長度()
  356. ComboBox13.Location = New Point(開始位置1 + XX, 行(7)) : ComboBox14.Location = New Point(開始位置2 + XX + X1 + XXX, 行(7))
  357. 進度條變化7()
  358. End Sub
  359. Private Sub 休息變化8()
  360. XX = Val(Strings.Left(班別_cb8.Text, 2)) * 60 + Val(Strings.Mid(班別_cb8.Text, 4, 2)) : 班別圖示計算載入()
  361. X1 = NUP8.Value : 休息長度() : Do2 = NumericUpDown8.Value : 班條長度()
  362. ComboBox15.Location = New Point(開始位置1 + XX, 行(8)) : ComboBox16.Location = New Point(開始位置2 + XX + X1 + XXX, 行(8))
  363. 進度條變化8()
  364. End Sub
  365. Private Sub 休息變化9()
  366. XX = Val(Strings.Left(班別_cb9.Text, 2)) * 60 + Val(Strings.Mid(班別_cb9.Text, 4, 2)) : 班別圖示計算載入()
  367. X1 = NUP9.Value : 休息長度() : Do2 = NumericUpDown9.Value : 班條長度()
  368. ComboBox17.Location = New Point(開始位置1 + XX, 行(9)) : ComboBox18.Location = New Point(開始位置2 + XX + X1 + XXX, 行(9))
  369. 進度條變化9()
  370. End Sub
  371. Private Sub 休息變化10()
  372. XX = Val(Strings.Left(班別_cb10.Text, 2)) * 60 + Val(Strings.Mid(班別_cb10.Text, 4, 2)) : 班別圖示計算載入()
  373. X1 = NUP10.Value : 休息長度() : Do2 = NumericUpDown10.Value : 班條長度()
  374. ComboBox19.Location = New Point(開始位置1 + XX, 行(10)) : ComboBox20.Location = New Point(開始位置2 + XX + X1 + XXX, 行(10))
  375. 進度條變化10()
  376. End Sub
  377. Private Sub 休息變化11()
  378. XX = Val(Strings.Left(班別_cb11.Text, 2)) * 60 + Val(Strings.Mid(班別_cb11.Text, 4, 2)) : 班別圖示計算載入()
  379. X1 = NUP11.Value : 休息長度() : Do2 = NumericUpDown11.Value : 班條長度()
  380. ComboBox21.Location = New Point(開始位置1 + XX, 行(11)) : ComboBox22.Location = New Point(開始位置2 + XX + X1 + XXX, 行(11))
  381. 進度條變化11()
  382. End Sub
  383. Private Sub 休息變化12()
  384. XX = Val(Strings.Left(班別_cb12.Text, 2)) * 60 + Val(Strings.Mid(班別_cb12.Text, 4, 2)) : 班別圖示計算載入()
  385. X1 = NUP12.Value : 休息長度() : Do2 = NumericUpDown12.Value : 班條長度()
  386. ComboBox23.Location = New Point(開始位置1 + XX, 行(12)) : ComboBox24.Location = New Point(開始位置2 + XX + X1 + XXX, 行(12))
  387. 進度條變化12()
  388. End Sub
  389. Private Sub 休息變化13()
  390. XX = Val(Strings.Left(班別_cb13.Text, 2)) * 60 + Val(Strings.Mid(班別_cb13.Text, 4, 2)) : 班別圖示計算載入()
  391. X1 = NUP13.Value : 休息長度() : Do2 = NumericUpDown13.Value : 班條長度()
  392. ComboBox25.Location = New Point(開始位置1 + XX, 行(13)) : ComboBox26.Location = New Point(開始位置2 + XX + X1 + XXX, 行(13))
  393. 進度條變化13()
  394. End Sub
  395. Private Sub 休息變化14()
  396. XX = Val(Strings.Left(班別_cb14.Text, 2)) * 60 + Val(Strings.Mid(班別_cb14.Text, 4, 2)) : 班別圖示計算載入()
  397. X1 = NUP14.Value : 休息長度() : Do2 = NumericUpDown14.Value : 班條長度()
  398. ComboBox27.Location = New Point(開始位置1 + XX, 行(14)) : ComboBox28.Location = New Point(開始位置2 + XX + X1 + XXX, 行(14))
  399. 進度條變化14()
  400. End Sub
  401. Private Sub 休息變化15()
  402. XX = Val(Strings.Left(班別_cb15.Text, 2)) * 60 + Val(Strings.Mid(班別_cb15.Text, 4, 2)) : 班別圖示計算載入()
  403. X1 = NUP15.Value : 休息長度() : Do2 = NumericUpDown15.Value : 班條長度()
  404. ComboBox29.Location = New Point(開始位置1 + XX, 行(15)) : ComboBox30.Location = New Point(開始位置2 + XX + X1 + XXX, 行(15))
  405. 進度條變化15()
  406. End Sub
  407. Private Sub 休息變化16()
  408. XX = Val(Strings.Left(班別_cb16.Text, 2)) * 60 + Val(Strings.Mid(班別_cb16.Text, 4, 2)) : 班別圖示計算載入()
  409. X1 = NUP16.Value : 休息長度() : Do2 = NumericUpDown16.Value : 班條長度()
  410. ComboBox31.Location = New Point(開始位置1 + XX, 行(16)) : ComboBox32.Location = New Point(開始位置2 + XX + X1 + XXX, 行(16))
  411. 進度條變化16()
  412. End Sub
  413. Private Sub 休息變化17()
  414. XX = Val(Strings.Left(班別_cb17.Text, 2)) * 60 + Val(Strings.Mid(班別_cb17.Text, 4, 2)) : 班別圖示計算載入()
  415. X1 = NUP17.Value : 休息長度() : Do2 = NumericUpDown17.Value : 班條長度()
  416. ComboBox33.Location = New Point(開始位置1 + XX, 行(17)) : ComboBox34.Location = New Point(開始位置2 + XX + X1 + XXX, 行(17))
  417. 進度條變化17()
  418. End Sub
  419. Private Sub 休息變化18()
  420. XX = Val(Strings.Left(班別_cb18.Text, 2)) * 60 + Val(Strings.Mid(班別_cb18.Text, 4, 2)) : 班別圖示計算載入()
  421. X1 = NUP18.Value : 休息長度() : Do2 = NumericUpDown18.Value : 班條長度()
  422. ComboBox35.Location = New Point(開始位置1 + XX, 行(18)) : ComboBox36.Location = New Point(開始位置2 + XX + X1 + XXX, 行(18))
  423. 進度條變化18()
  424. End Sub
  425. Private Sub 休息變化19()
  426. XX = Val(Strings.Left(班別_cb19.Text, 2)) * 60 + Val(Strings.Mid(班別_cb19.Text, 4, 2)) : 班別圖示計算載入()
  427. X1 = NUP19.Value : 休息長度() : Do2 = NumericUpDown19.Value : 班條長度()
  428. ComboBox37.Location = New Point(開始位置1 + XX, 行(19)) : ComboBox38.Location = New Point(開始位置2 + XX + X1 + XXX, 行(19))
  429. 進度條變化19()
  430. End Sub
  431. Private Sub 休息變化20()
  432. XX = Val(Strings.Left(班別_cb20.Text, 2)) * 60 + Val(Strings.Mid(班別_cb20.Text, 4, 2)) : 班別圖示計算載入()
  433. X1 = NUP20.Value : 休息長度() : Do2 = NumericUpDown20.Value : 班條長度()
  434. ComboBox39.Location = New Point(開始位置1 + XX, 行(20)) : ComboBox40.Location = New Point(開始位置2 + XX + X1 + XXX, 行(20))
  435. 進度條變化20()
  436. End Sub
  437. Private Sub 回復預設()
  438. For no As Integer = 1 To 20
  439. Dim NUPS As NumericUpDown = CType(Me.Controls.Find("NUP" + no.ToString(), True)(0), NumericUpDown) : NUPS.Value = 1
  440. Next
  441. XX = 0 : Q = 0
  442. For no As Integer = 1 To 20
  443. Dim 姓名_tbS As TextBox = CType(Me.Controls.Find("姓名_tb" + no.ToString(), True)(0), TextBox)
  444. Dim 班別_cbS As ComboBox = CType(Me.Controls.Find("班別_cb" + no.ToString(), True)(0), ComboBox)
  445. Dim ComboBoxsS1 As ComboBox = CType(Me.Controls.Find("ComboBox" + (no + 40 + Q).ToString(), True)(0), ComboBox)
  446. Dim ComboBoxsS2 As ComboBox = CType(Me.Controls.Find("ComboBox" + (no + 40 + 1 + Q).ToString(), True)(0), ComboBox)
  447. Dim ComboBoxs1 As ComboBox = CType(Me.Controls.Find("ComboBox" + (no + Q).ToString(), True)(0), ComboBox)
  448. Dim ComboBoxs2 As ComboBox = CType(Me.Controls.Find("ComboBox" + (no + 1 + Q).ToString(), True)(0), ComboBox)
  449. 姓名_tbS.Text = "" : 班別_cbS.Text = "休" : ComboBoxsS1.SelectedIndex = 0 : ComboBoxsS2.SelectedIndex = 0
  450. If 姓名_tbS.Text = "" Then
  451. ComboBoxs1.Visible = False : ComboBoxs2.Visible = False
  452. Else
  453. ComboBoxs1.Visible = True : ComboBoxs2.Visible = True
  454. End If
  455. Next
  456. ComboBox1.Location = New Point(開始位置1 + XX, 行(1)) : ComboBox2.Location = New Point(開始位置2 + XX, 行(1))
  457. ComboBox3.Location = New Point(開始位置1 + XX, 行(2)) : ComboBox4.Location = New Point(開始位置2 + XX, 行(2))
  458. ComboBox5.Location = New Point(開始位置1 + XX, 行(3)) : ComboBox6.Location = New Point(開始位置2 + XX, 行(3))
  459. ComboBox7.Location = New Point(開始位置1 + XX, 行(4)) : ComboBox8.Location = New Point(開始位置2 + XX, 行(4))
  460. ComboBox9.Location = New Point(開始位置1 + XX, 行(5)) : ComboBox10.Location = New Point(開始位置2 + XX, 行(5))
  461. ComboBox11.Location = New Point(開始位置1 + XX, 行(6)) : ComboBox12.Location = New Point(開始位置2 + XX, 行(6))
  462. ComboBox13.Location = New Point(開始位置1 + XX, 行(7)) : ComboBox14.Location = New Point(開始位置2 + XX, 行(7))
  463. ComboBox15.Location = New Point(開始位置1 + XX, 行(8)) : ComboBox16.Location = New Point(開始位置2 + XX, 行(8))
  464. ComboBox17.Location = New Point(開始位置1 + XX, 行(9)) : ComboBox18.Location = New Point(開始位置2 + XX, 行(9))
  465. ComboBox19.Location = New Point(開始位置1 + XX, 行(10)) : ComboBox20.Location = New Point(開始位置2 + XX, 行(10))
  466. ComboBox21.Location = New Point(開始位置1 + XX, 行(11)) : ComboBox22.Location = New Point(開始位置2 + XX, 行(11))
  467. ComboBox23.Location = New Point(開始位置1 + XX, 行(12)) : ComboBox24.Location = New Point(開始位置2 + XX, 行(12))
  468. ComboBox25.Location = New Point(開始位置1 + XX, 行(13)) : ComboBox26.Location = New Point(開始位置2 + XX, 行(13))
  469. ComboBox27.Location = New Point(開始位置1 + XX, 行(14)) : ComboBox28.Location = New Point(開始位置2 + XX, 行(14))
  470. ComboBox29.Location = New Point(開始位置1 + XX, 行(15)) : ComboBox30.Location = New Point(開始位置2 + XX, 行(15))
  471. ComboBox31.Location = New Point(開始位置1 + XX, 行(16)) : ComboBox32.Location = New Point(開始位置2 + XX, 行(16))
  472. ComboBox33.Location = New Point(開始位置1 + XX, 行(17)) : ComboBox34.Location = New Point(開始位置2 + XX, 行(17))
  473. ComboBox35.Location = New Point(開始位置1 + XX, 行(18)) : ComboBox36.Location = New Point(開始位置2 + XX, 行(18))
  474. ComboBox37.Location = New Point(開始位置1 + XX, 行(19)) : ComboBox38.Location = New Point(開始位置2 + XX, 行(19))
  475. ComboBox39.Location = New Point(開始位置1 + XX, 行(20)) : ComboBox40.Location = New Point(開始位置2 + XX, 行(20))
  476. End Sub
  477. Private Sub 重新讀取()
  478. SQL_排班簽核讀取()
  479. If dr.Read Then
  480. 值日生1_bt.Text = dr("值日生1").ToString : 值日生2_bt.Text = dr("值日生2").ToString
  481. If dr("班表簽認") = "Y" Then
  482. 鎖定_bt.Enabled = False
  483. Else
  484. 鎖定_bt.Enabled = True
  485. End If : Else
  486. 鎖定_bt.Enabled = True
  487. End If
  488. 班表鎖定變化()
  489. SQL_排班系統_星期() : If dr.Read Then : 星期_lb.Text = dr("星期") : End If : PA6 = 星期_lb.Text
  490. SQL_門診_健保()
  491. If dr.Read Then : B1_lb.Text = dr("早") : B2_lb.Text = dr("中") : B3_lb.Text = dr("晚")
  492. Else : B1_lb.Text = "" : B2_lb.Text = "" : B3_lb.Text = "" : End If
  493. SQL_門診_美容()
  494. If dr.Read Then : B4_lb.Text = dr("早") : B5_lb.Text = dr("中") : B6_lb.Text = dr("晚")
  495. Else : B4_lb.Text = "" : B5_lb.Text = "" : B6_lb.Text = "" : End If
  496. 讀取排班資料表() : 排班()
  497. End Sub
  498. Private Sub 排班()
  499. If 排班明細_dgv.Rows.Count > 0 Then
  500. Q = 0
  501. For no As Integer = 1 To 20
  502. Dim 姓名_tbS As TextBox = CType(Me.Controls.Find("姓名_tb" + no.ToString(), True)(0), TextBox)
  503. Dim 請假_tbS As TextBox = CType(Me.Controls.Find("請假_tb" + no.ToString(), True)(0), TextBox)
  504. Dim 班別_cbS As ComboBox = CType(Me.Controls.Find("班別_cb" + no.ToString(), True)(0), ComboBox)
  505. Dim A_lbS As Label = CType(Me.Controls.Find("A_lb" + no.ToString(), True)(0), Label)
  506. Dim CheckBoxS As CheckBox = CType(Me.Controls.Find("CheckBox" + no.ToString(), True)(0), CheckBox)
  507. Dim NumericUpDownS As NumericUpDown = CType(Me.Controls.Find("NumericUpDown" + no.ToString(), True)(0), NumericUpDown)
  508. Dim NUPS As NumericUpDown = CType(Me.Controls.Find("NUP" + no.ToString(), True)(0), NumericUpDown)
  509. Dim BUPS As NumericUpDown = CType(Me.Controls.Find("BUP" + no.ToString(), True)(0), NumericUpDown)
  510. Dim ComboBoxsS1 As ComboBox = CType(Me.Controls.Find("ComboBox" + (no + 40 + Q).ToString(), True)(0), ComboBox)
  511. Dim ComboBoxsS2 As ComboBox = CType(Me.Controls.Find("ComboBox" + (no + 40 + 1 + Q).ToString(), True)(0), ComboBox)
  512. Dim ComboBoxs1 As ComboBox = CType(Me.Controls.Find("ComboBox" + (no + Q).ToString(), True)(0), ComboBox)
  513. Dim ComboBoxs2 As ComboBox = CType(Me.Controls.Find("ComboBox" + (no + 1 + Q).ToString(), True)(0), ComboBox) : Q += 1
  514. ComboBoxs1.Text = 排班明細_dgv.Rows(no - 1).Cells("一段").Value
  515. ComboBoxs2.Text = 排班明細_dgv.Rows(no - 1).Cells("二段").Value
  516. ComboBoxsS1.Text = 排班明細_dgv.Rows(no - 1).Cells("顏色1").Value
  517. ComboBoxsS2.Text = 排班明細_dgv.Rows(no - 1).Cells("顏色2").Value
  518. NUPS.Value = 排班明細_dgv.Rows(no - 1).Cells("休息").Value
  519. BUPS.Value = 排班明細_dgv.Rows(no - 1).Cells("後段").Value
  520. NumericUpDownS.Value = 排班明細_dgv.Rows(no - 1).Cells("時數").Value
  521. CheckBoxS.Checked = 排班明細_dgv.Rows(no - 1).Cells("半天").Value
  522. 班別_cbS.Text = 排班明細_dgv.Rows(no - 1).Cells("班別").Value.ToString
  523. 姓名_tbS.Text = 排班明細_dgv.Rows(no - 1).Cells("姓名").Value.ToString
  524. 請假_tbS.Text = 排班明細_dgv.Rows(no - 1).Cells("請假類別").Value.ToString
  525. Next
  526. End If
  527. End Sub
  528. Private Sub 班別圖示計算載入()
  529. XX = (XX - 480) * 1.25
  530. End Sub
  531. Private Sub 班條長度()
  532. Dim 小時 As Double = 80
  533. If Do2 = 4 Or Do2 = 6.5 Or Do2 = 7 Or Do2 = 7.5 Or Do2 = 8 Then : XXX = 0
  534. ElseIf Do2 = 1 Then : XXX = -(小時 * 3)
  535. ElseIf Do2 = 2 Then : XXX = -(小時 * 2)
  536. ElseIf Do2 = 2.5 Then : XXX = -(小時) + (-(小時 / 2))
  537. ElseIf Do2 = 3 Then : XXX = -(小時)
  538. ElseIf Do2 = 3.5 Then : XXX = -(小時 / 2)
  539. ElseIf Do2 = 4.5 Then : XXX = 小時 / 2
  540. ElseIf Do2 = 5 Then : XXX = 小時
  541. ElseIf Do2 = 5.5 Then : XXX = 小時 + (小時 / 2)
  542. ElseIf Do2 = 6 Then : XXX = 小時 * 2
  543. End If
  544. End Sub
  545. Private Sub 班條長度1()
  546. Dim 小時 As Double = 75
  547. If Do2 = 4 Or Do2 = 6.5 Or Do2 = 7 Or Do2 = 7.5 Or Do2 = 8 Then : XXX = 0
  548. ElseIf Do2 = 1 Then : XXX = -(小時 * 3)
  549. ElseIf Do2 = 2 Then : XXX = -(小時 * 2)
  550. ElseIf Do2 = 2.5 Then : XXX = -(小時) + (-(小時 / 2))
  551. ElseIf Do2 = 3 Then : XXX = -(小時)
  552. ElseIf Do2 = 3.5 Then : XXX = -(小時 / 2)
  553. ElseIf Do2 = 4.5 Then : XXX = 小時 / 2
  554. ElseIf Do2 = 5 Then : XXX = 小時
  555. ElseIf Do2 = 5.5 Then : XXX = 小時 + (小時 / 2)
  556. ElseIf Do2 = 6 Then : XXX = 小時 * 2
  557. End If
  558. End Sub
  559. Private Sub 休息長度()
  560. X1 = (X1 - 1) * 8 * 10
  561. End Sub
  562. Private Sub 排班明細_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  563. '--------------坐標系設定---------------------------
  564. 開始位置1 = 592 : 開始位置2 = 967 : 行(0) = 27 : 標準長度 = 297
  565. 行(1) = 108 : 行(2) = 行(1) + 行(0) : 行(3) = 行(2) + 行(0) : 行(4) = 行(3) + 行(0) : 行(5) = 行(4) + 行(0) : 行(6) = 行(5) + 行(0) : 行(7) = 行(6) + 行(0) : 行(8) = 行(7) + 行(0)
  566. 行(9) = 行(8) + 行(0) : 行(10) = 行(9) + 行(0) : 行(11) = 行(10) + 行(0) : 行(12) = 行(11) + 行(0) : 行(13) = 行(12) + 行(0) : 行(14) = 行(13) + 行(0) : 行(15) = 行(14) + 行(0)
  567. 行(16) = 行(15) + 行(0) : 行(17) = 行(16) + 行(0) : 行(18) = 行(17) + 行(0) : 行(19) = 行(18) + 行(0) : 行(20) = 行(19) + 行(0)
  568. '--------------複製權限---------------------------
  569. If gUserName = "*系統管理者" Then 'Or gUserName = "蔡紋婷"
  570. 存檔_bt.Enabled = True : 複製班表_bt.Enabled = True : 人員_dgv.Enabled = True : 全_ch.Enabled = True : 備註存檔_tb.Enabled = True
  571. For no As Integer = 1 To 20
  572. Dim 姓名_tbS As TextBox = CType(Me.Controls.Find("姓名_tb" + no.ToString(), True)(0), TextBox)
  573. Dim 班別_cbS As ComboBox = CType(Me.Controls.Find("班別_cb" + no.ToString(), True)(0), ComboBox)
  574. Dim A_lbS As Label = CType(Me.Controls.Find("A_lb" + no.ToString(), True)(0), Label)
  575. Dim CheckBoxS As CheckBox = CType(Me.Controls.Find("CheckBox" + no.ToString(), True)(0), CheckBox)
  576. Dim NumericUpDownS As NumericUpDown = CType(Me.Controls.Find("NumericUpDown" + no.ToString(), True)(0), NumericUpDown)
  577. Dim NUPS As NumericUpDown = CType(Me.Controls.Find("NUP" + no.ToString(), True)(0), NumericUpDown)
  578. Dim BUPS As NumericUpDown = CType(Me.Controls.Find("BUP" + no.ToString(), True)(0), NumericUpDown)
  579. 姓名_tbS.Enabled = True : 班別_cbS.Enabled = True : CheckBoxS.Enabled = True : NumericUpDownS.Enabled = True : NUPS.Enabled = True : BUPS.Enabled = True
  580. Next
  581. Else
  582. If CC(17) = False Then
  583. 存檔_bt.Enabled = False : 複製班表_bt.Enabled = False : 人員_dgv.Enabled = False : 全_ch.Enabled = False : 備註存檔_tb.Enabled = False
  584. For no As Integer = 1 To 20
  585. Dim 姓名_tbS As TextBox = CType(Me.Controls.Find("姓名_tb" + no.ToString(), True)(0), TextBox)
  586. Dim 班別_cbS As ComboBox = CType(Me.Controls.Find("班別_cb" + no.ToString(), True)(0), ComboBox)
  587. Dim A_lbS As Label = CType(Me.Controls.Find("A_lb" + no.ToString(), True)(0), Label)
  588. Dim CheckBoxS As CheckBox = CType(Me.Controls.Find("CheckBox" + no.ToString(), True)(0), CheckBox)
  589. Dim NumericUpDownS As NumericUpDown = CType(Me.Controls.Find("NumericUpDown" + no.ToString(), True)(0), NumericUpDown)
  590. Dim NUPS As NumericUpDown = CType(Me.Controls.Find("NUP" + no.ToString(), True)(0), NumericUpDown)
  591. Dim BUPS As NumericUpDown = CType(Me.Controls.Find("BUP" + no.ToString(), True)(0), NumericUpDown)
  592. 姓名_tbS.Enabled = False : 班別_cbS.Enabled = False : CheckBoxS.Enabled = False : NumericUpDownS.Enabled = False : NUPS.Enabled = False : BUPS.Enabled = False
  593. Next
  594. Else
  595. 存檔_bt.Enabled = True : 複製班表_bt.Enabled = True : 人員_dgv.Enabled = True : 全_ch.Enabled = True : 備註存檔_tb.Enabled = True
  596. For no As Integer = 1 To 20
  597. Dim 姓名_tbS As TextBox = CType(Me.Controls.Find("姓名_tb" + no.ToString(), True)(0), TextBox)
  598. Dim 班別_cbS As ComboBox = CType(Me.Controls.Find("班別_cb" + no.ToString(), True)(0), ComboBox)
  599. Dim A_lbS As Label = CType(Me.Controls.Find("A_lb" + no.ToString(), True)(0), Label)
  600. Dim CheckBoxS As CheckBox = CType(Me.Controls.Find("CheckBox" + no.ToString(), True)(0), CheckBox)
  601. Dim NumericUpDownS As NumericUpDown = CType(Me.Controls.Find("NumericUpDown" + no.ToString(), True)(0), NumericUpDown)
  602. Dim NUPS As NumericUpDown = CType(Me.Controls.Find("NUP" + no.ToString(), True)(0), NumericUpDown)
  603. Dim BUPS As NumericUpDown = CType(Me.Controls.Find("BUP" + no.ToString(), True)(0), NumericUpDown)
  604. 姓名_tbS.Enabled = True : 班別_cbS.Enabled = True : CheckBoxS.Enabled = True : NumericUpDownS.Enabled = True : NUPS.Enabled = True : BUPS.Enabled = True
  605. Next
  606. End If
  607. End If
  608. 年_lb.Text = PA : 月_lb.Text = PA1
  609. End Sub
  610. Private Sub 排班明細_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown
  611. 班別_下拉表單資料載入() : 職務_下拉表單資料載入() : 讀取人員資料表()
  612. If Val(PA2) > 9 Then : 日_lb.Text = PA2 : Else : 日_lb.Text = "0" & PA2 : End If
  613. 回復預設()
  614. PA = 年_lb.Text & "/" & 月_lb.Text & "/" & 日_lb.Text
  615. 重新讀取()
  616. End Sub
  617. Private Sub 截圖_bt_Click(sender As Object, e As EventArgs) Handles 截圖_bt.Click
  618. Dim captureRectangle As New Rectangle(123, 0, 1698, 647) ' 指定要截取的範圍
  619. Dim bm As New Bitmap(captureRectangle.Width, captureRectangle.Height)
  620. Using g As Graphics = Graphics.FromImage(bm) ' 設定截圖的起點為 captureRectangle 左上角的位置
  621. g.CopyFromScreen(Me.PointToScreen(captureRectangle.Location), Point.Empty, captureRectangle.Size)
  622. End Using
  623. Me.Controls.SetChildIndex(PictureBox1, 0)
  624. My.Computer.Clipboard.SetImage(bm)
  625. PictureBox1.SendToBack()
  626. If 存檔_ch.Checked = True Then ' 保存圖片到桌面
  627. Dim desktopPath As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
  628. Dim filePath As String = Path.Combine(desktopPath, 年_lb.Text & 月_lb.Text & 日_lb.Text & 星期_lb.Text & ".png")
  629. bm.Save(filePath, ImageFormat.Png) : MsgBox("已將圖片存檔到桌面!!")
  630. End If
  631. End Sub
  632. Private Sub 上移_bt_Click(sender As Object, e As EventArgs) Handles 上移_bt.Click
  633. If 選擇項 <= 1 Then : Else
  634. If CInt(排班明細_dgv.Rows(選擇項 - 1).Cells("項次").Value) < 12 Then
  635. 排班明細_dgv.Rows(選擇項 - 1).Cells("項次").Value = "0" & CInt(排班明細_dgv.Rows(選擇項 - 1).Cells("項次").Value) - 2 & "-1"
  636. Else
  637. 排班明細_dgv.Rows(選擇項 - 1).Cells("項次").Value = CInt(排班明細_dgv.Rows(選擇項 - 1).Cells("項次").Value) - 2 & "-1"
  638. End If
  639. 排班明細_dgv.Sort(排班明細_dgv.Columns("項次"), System.ComponentModel.ListSortDirection.Ascending)
  640. For i As Integer = 0 To 排班明細_dgv.Rows.Count - 1 : 排班明細_dgv.Rows(i).Cells("項").Value = i + 1 : Next
  641. 排班明細_dgv.Sort(排班明細_dgv.Columns("項"), System.ComponentModel.ListSortDirection.Ascending)
  642. For i As Integer = 0 To 排班明細_dgv.Rows.Count - 1
  643. 排班明細_dgv.Rows(i).Cells("項次").Value = i + 1
  644. If CInt(排班明細_dgv.Rows(i).Cells("項次").Value) < 10 Then
  645. 排班明細_dgv.Rows(i).Cells("項次").Value = "0" & i + 1
  646. Else : 排班明細_dgv.Rows(i).Cells("項次").Value = i + 1 : End If
  647. Next : 選擇項 -= 1
  648. If 選擇項 <= 0 Then : 選擇項 = 0 : End If : 排班()
  649. End If
  650. End Sub
  651. Private Sub 下移_bt_Click(sender As Object, e As EventArgs) Handles 下移_bt.Click
  652. If 選擇項 = 0 Or 選擇項 = 1 Then : Else
  653. If CInt(排班明細_dgv.Rows(選擇項 - 1).Cells("項次").Value) < 9 Then
  654. 排班明細_dgv.Rows(選擇項 - 1).Cells("項次").Value = "0" & CInt(排班明細_dgv.Rows(選擇項 - 1).Cells("項次").Value) + 1 & "-1"
  655. Else
  656. 排班明細_dgv.Rows(選擇項 - 1).Cells("項次").Value = CInt(排班明細_dgv.Rows(選擇項 - 1).Cells("項次").Value) + 1 & "-1"
  657. End If
  658. 排班明細_dgv.Sort(排班明細_dgv.Columns("項次"), System.ComponentModel.ListSortDirection.Ascending)
  659. For i As Integer = 0 To 排班明細_dgv.Rows.Count - 1 : 排班明細_dgv.Rows(i).Cells("項").Value = i + 1 : Next
  660. 排班明細_dgv.Sort(排班明細_dgv.Columns("項"), System.ComponentModel.ListSortDirection.Ascending)
  661. For i As Integer = 0 To 排班明細_dgv.Rows.Count - 1
  662. 排班明細_dgv.Rows(i).Cells("項次").Value = i + 1
  663. If CInt(排班明細_dgv.Rows(i).Cells("項次").Value) < 10 Then
  664. 排班明細_dgv.Rows(i).Cells("項次").Value = "0" & i + 1
  665. Else : 排班明細_dgv.Rows(i).Cells("項次").Value = i + 1 : End If
  666. Next : 選擇項 += 1
  667. If 選擇項 >= 20 Then : 選擇項 = 20 : End If : 排班()
  668. End If
  669. End Sub
  670. Private Sub 備註存檔_tb_Click(sender As Object, e As EventArgs) Handles 備註存檔_tb.Click
  671. If 編號_tb.Text <> "" Then
  672. PA10 = 問題備註_tb.Text : PA11 = 人員職位_tb.Text : PA12 = 職務性質_tb.Text : PA13 = 早班_ch.Checked : PA14 = 晚班_ch.Checked : PA = 編號_tb.Text
  673. PA9 = 崗位01_ch.Checked : PA8 = 崗位02_ch.Checked : PA7 = 崗位03_ch.Checked : PA6 = 崗位04_ch.Checked : PA5 = 崗位05_ch.Checked : PA4 = 崗位06_ch.Checked
  674. PA3 = 崗位07_ch.Checked : PA2 = 崗位08_ch.Checked : PA1 = 穩定_ch.Checked
  675. SQL_人員備註修改() : MsgBox("存檔完成!!")
  676. End If
  677. End Sub
  678. Private Sub 人員資料讀取()
  679. PA = 人員_dgv("編號", 選擇處).Value.ToString : PA1 = 人員_dgv("姓名", 選擇處).Value.ToString
  680. 編號_tb.Text = 人員_dgv("編號", 選擇處).Value.ToString : 人員名稱_tb.Text = 人員_dgv("姓名", 選擇處).Value.ToString
  681. SQL_人員備註()
  682. If dr.Read Then
  683. 人員職位_tb.Text = dr("職位").ToString : 職務性質_tb.Text = dr("性質").ToString : 問題備註_tb.Text = dr("人員備註").ToString
  684. If IsDBNull(dr("早班")) Then : Else : 早班_ch.Checked = dr("早班") : End If : If IsDBNull(dr("晚班")) Then : Else : 晚班_ch.Checked = dr("晚班") : End If
  685. If IsDBNull(dr("崗位01")) Then : Else : 崗位01_ch.Checked = dr("崗位01") : End If : If IsDBNull(dr("崗位02")) Then : Else : 崗位02_ch.Checked = dr("崗位02") : End If
  686. If IsDBNull(dr("崗位03")) Then : Else : 崗位03_ch.Checked = dr("崗位03") : End If : If IsDBNull(dr("崗位04")) Then : Else : 崗位04_ch.Checked = dr("崗位04") : End If
  687. If IsDBNull(dr("崗位05")) Then : Else : 崗位05_ch.Checked = dr("崗位05") : End If : If IsDBNull(dr("崗位06")) Then : Else : 崗位06_ch.Checked = dr("崗位06") : End If
  688. If IsDBNull(dr("崗位07")) Then : Else : 崗位07_ch.Checked = dr("崗位07") : End If : If IsDBNull(dr("崗位08")) Then : Else : 崗位08_ch.Checked = dr("崗位08") : End If
  689. If IsDBNull(dr("穩定")) Then : Else : 穩定_ch.Checked = dr("穩定") : End If
  690. End If
  691. End Sub
  692. Private Sub 人員_dgv_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles 人員_dgv.CellClick
  693. If e.RowIndex = -1 Then : Else : 選擇處 = e.RowIndex : 人員資料讀取() : End If
  694. End Sub
  695. Private Sub 姓名1_tb_Click(sender As Object, e As EventArgs) Handles 姓名_tb1.Click
  696. 選擇項 = 1 : For i As Integer = 0 To 人員_dgv.Rows.Count - 1 : If 姓名_tb1.Text = 人員_dgv.Rows(i).Cells("姓名").Value.ToString Then : 選擇處 = i : 人員資料讀取() : End If : Next
  697. End Sub
  698. Private Sub 姓名2_tb_Click(sender As Object, e As EventArgs) Handles 姓名_tb2.Click
  699. 選擇項 = 2 : For i As Integer = 0 To 人員_dgv.Rows.Count - 1 : If 姓名_tb2.Text = 人員_dgv.Rows(i).Cells("姓名").Value.ToString Then : 選擇處 = i : 人員資料讀取() : End If : Next
  700. End Sub
  701. Private Sub 姓名3_tb_Click(sender As Object, e As EventArgs) Handles 姓名_tb3.Click
  702. 選擇項 = 3 : For i As Integer = 0 To 人員_dgv.Rows.Count - 1 : If 姓名_tb3.Text = 人員_dgv.Rows(i).Cells("姓名").Value.ToString Then : 選擇處 = i : 人員資料讀取() : End If : Next
  703. End Sub
  704. Private Sub 姓名4_tb_Click(sender As Object, e As EventArgs) Handles 姓名_tb4.Click
  705. 選擇項 = 4 : For i As Integer = 0 To 人員_dgv.Rows.Count - 1 : If 姓名_tb4.Text = 人員_dgv.Rows(i).Cells("姓名").Value.ToString Then : 選擇處 = i : 人員資料讀取() : End If : Next
  706. End Sub
  707. Private Sub 姓名5_tb_Click(sender As Object, e As EventArgs) Handles 姓名_tb5.Click
  708. 選擇項 = 5 : For i As Integer = 0 To 人員_dgv.Rows.Count - 1 : If 姓名_tb5.Text = 人員_dgv.Rows(i).Cells("姓名").Value.ToString Then : 選擇處 = i : 人員資料讀取() : End If : Next
  709. End Sub
  710. Private Sub 姓名6_tb_Click(sender As Object, e As EventArgs) Handles 姓名_tb6.Click
  711. 選擇項 = 6 : For i As Integer = 0 To 人員_dgv.Rows.Count - 1 : If 姓名_tb6.Text = 人員_dgv.Rows(i).Cells("姓名").Value.ToString Then : 選擇處 = i : 人員資料讀取() : End If : Next
  712. End Sub
  713. Private Sub 姓名7_tb_Click(sender As Object, e As EventArgs) Handles 姓名_tb7.Click
  714. 選擇項 = 7 : For i As Integer = 0 To 人員_dgv.Rows.Count - 1 : If 姓名_tb7.Text = 人員_dgv.Rows(i).Cells("姓名").Value.ToString Then : 選擇處 = i : 人員資料讀取() : End If : Next
  715. End Sub
  716. Private Sub 姓名8_tb_Click(sender As Object, e As EventArgs) Handles 姓名_tb8.Click
  717. 選擇項 = 8 : For i As Integer = 0 To 人員_dgv.Rows.Count - 1 : If 姓名_tb8.Text = 人員_dgv.Rows(i).Cells("姓名").Value.ToString Then : 選擇處 = i : 人員資料讀取() : End If : Next
  718. End Sub
  719. Private Sub 姓名9_tb_Click(sender As Object, e As EventArgs) Handles 姓名_tb9.Click
  720. 選擇項 = 9 : For i As Integer = 0 To 人員_dgv.Rows.Count - 1 : If 姓名_tb9.Text = 人員_dgv.Rows(i).Cells("姓名").Value.ToString Then : 選擇處 = i : 人員資料讀取() : End If : Next
  721. End Sub
  722. Private Sub 姓名10_tb_Click(sender As Object, e As EventArgs) Handles 姓名_tb10.Click
  723. 選擇項 = 10 : For i As Integer = 0 To 人員_dgv.Rows.Count - 1 : If 姓名_tb10.Text = 人員_dgv.Rows(i).Cells("姓名").Value.ToString Then : 選擇處 = i : 人員資料讀取() : End If : Next
  724. End Sub
  725. Private Sub 姓名11_tb_Click(sender As Object, e As EventArgs) Handles 姓名_tb11.Click
  726. 選擇項 = 11 : For i As Integer = 0 To 人員_dgv.Rows.Count - 1 : If 姓名_tb11.Text = 人員_dgv.Rows(i).Cells("姓名").Value.ToString Then : 選擇處 = i : 人員資料讀取() : End If : Next
  727. End Sub
  728. Private Sub 姓名12_tb_Click(sender As Object, e As EventArgs) Handles 姓名_tb12.Click
  729. 選擇項 = 12 : For i As Integer = 0 To 人員_dgv.Rows.Count - 1 : If 姓名_tb12.Text = 人員_dgv.Rows(i).Cells("姓名").Value.ToString Then : 選擇處 = i : 人員資料讀取() : End If : Next
  730. End Sub
  731. Private Sub 姓名13_tb_Click(sender As Object, e As EventArgs) Handles 姓名_tb13.Click
  732. 選擇項 = 13 : For i As Integer = 0 To 人員_dgv.Rows.Count - 1 : If 姓名_tb13.Text = 人員_dgv.Rows(i).Cells("姓名").Value.ToString Then : 選擇處 = i : 人員資料讀取() : End If : Next
  733. End Sub
  734. Private Sub 姓名14_tb_Click(sender As Object, e As EventArgs) Handles 姓名_tb14.Click
  735. 選擇項 = 14 : For i As Integer = 0 To 人員_dgv.Rows.Count - 1 : If 姓名_tb14.Text = 人員_dgv.Rows(i).Cells("姓名").Value.ToString Then : 選擇處 = i : 人員資料讀取() : End If : Next
  736. End Sub
  737. Private Sub 姓名15_tb_Click(sender As Object, e As EventArgs) Handles 姓名_tb15.Click
  738. 選擇項 = 15 : For i As Integer = 0 To 人員_dgv.Rows.Count - 1 : If 姓名_tb15.Text = 人員_dgv.Rows(i).Cells("姓名").Value.ToString Then : 選擇處 = i : 人員資料讀取() : End If : Next
  739. End Sub
  740. Private Sub 姓名16_tb_Click(sender As Object, e As EventArgs) Handles 姓名_tb16.Click
  741. 選擇項 = 16 : For i As Integer = 0 To 人員_dgv.Rows.Count - 1 : If 姓名_tb16.Text = 人員_dgv.Rows(i).Cells("姓名").Value.ToString Then : 選擇處 = i : 人員資料讀取() : End If : Next
  742. End Sub
  743. Private Sub 姓名17_tb_Click(sender As Object, e As EventArgs) Handles 姓名_tb17.Click
  744. 選擇項 = 17 : For i As Integer = 0 To 人員_dgv.Rows.Count - 1 : If 姓名_tb17.Text = 人員_dgv.Rows(i).Cells("姓名").Value.ToString Then : 選擇處 = i : 人員資料讀取() : End If : Next
  745. End Sub
  746. Private Sub 姓名18_tb_Click(sender As Object, e As EventArgs) Handles 姓名_tb18.Click
  747. 選擇項 = 18 : For i As Integer = 0 To 人員_dgv.Rows.Count - 1 : If 姓名_tb18.Text = 人員_dgv.Rows(i).Cells("姓名").Value.ToString Then : 選擇處 = i : 人員資料讀取() : End If : Next
  748. End Sub
  749. Private Sub 姓名19_tb_Click(sender As Object, e As EventArgs) Handles 姓名_tb19.Click
  750. 選擇項 = 19 : For i As Integer = 0 To 人員_dgv.Rows.Count - 1 : If 姓名_tb19.Text = 人員_dgv.Rows(i).Cells("姓名").Value.ToString Then : 選擇處 = i : 人員資料讀取() : End If : Next
  751. End Sub
  752. Private Sub 姓名20_tb_Click(sender As Object, e As EventArgs) Handles 姓名_tb20.Click
  753. 選擇項 = 20 : For i As Integer = 0 To 人員_dgv.Rows.Count - 1 : If 姓名_tb20.Text = 人員_dgv.Rows(i).Cells("姓名").Value.ToString Then : 選擇處 = i : 人員資料讀取() : End If : Next
  754. End Sub
  755. Private Sub 班別01_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 班別_cb1.SelectedIndexChanged
  756. If 班別_cb1.Text <> "休" Then : 休息變化1() : 半天變化1() : Else : ComboBox1.Visible = False : ComboBox2.Visible = False : End If
  757. End Sub
  758. Private Sub 班別02_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 班別_cb2.SelectedIndexChanged
  759. If 班別_cb2.Text <> "休" Then : 休息變化2() : 半天變化2() : Else : ComboBox3.Visible = False : ComboBox4.Visible = False : End If
  760. End Sub
  761. Private Sub 班別03_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 班別_cb3.SelectedIndexChanged
  762. If 班別_cb3.Text <> "休" Then : 休息變化3() : 半天變化3() : Else : ComboBox5.Visible = False : ComboBox6.Visible = False : End If
  763. End Sub
  764. Private Sub 班別04_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 班別_cb4.SelectedIndexChanged
  765. If 班別_cb4.Text <> "休" Then : 休息變化4() : 半天變化4() : Else : ComboBox7.Visible = False : ComboBox8.Visible = False : End If
  766. End Sub
  767. Private Sub 班別05_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 班別_cb5.SelectedIndexChanged
  768. If 班別_cb5.Text <> "休" Then : 休息變化5() : 半天變化5() : Else : ComboBox9.Visible = False : ComboBox10.Visible = False : End If
  769. End Sub
  770. Private Sub 班別06_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 班別_cb6.SelectedIndexChanged
  771. If 班別_cb6.Text <> "休" Then : 休息變化6() : 半天變化6() : Else : ComboBox11.Visible = False : ComboBox12.Visible = False : End If
  772. End Sub
  773. Private Sub 班別07_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 班別_cb7.SelectedIndexChanged
  774. If 班別_cb7.Text <> "休" Then : 休息變化7() : 半天變化7() : Else : ComboBox13.Visible = False : ComboBox14.Visible = False : End If
  775. End Sub
  776. Private Sub 班別08_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 班別_cb8.SelectedIndexChanged
  777. If 班別_cb8.Text <> "休" Then : 休息變化8() : 半天變化8() : Else : ComboBox15.Visible = False : ComboBox16.Visible = False : End If
  778. End Sub
  779. Private Sub 班別09_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 班別_cb9.SelectedIndexChanged
  780. If 班別_cb9.Text <> "休" Then : 休息變化9() : 半天變化9() : Else : ComboBox17.Visible = False : ComboBox18.Visible = False : End If
  781. End Sub
  782. Private Sub 班別10_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 班別_cb10.SelectedIndexChanged
  783. If 班別_cb10.Text <> "休" Then : 休息變化10() : 半天變化10() : Else : ComboBox19.Visible = False : ComboBox20.Visible = False : End If
  784. End Sub
  785. Private Sub 班別11_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 班別_cb11.SelectedIndexChanged
  786. If 班別_cb11.Text <> "休" Then : 休息變化11() : 半天變化11() : Else : ComboBox21.Visible = False : ComboBox22.Visible = False : End If
  787. End Sub
  788. Private Sub 班別12_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 班別_cb12.SelectedIndexChanged
  789. If 班別_cb12.Text <> "休" Then : 休息變化12() : 半天變化12() : Else : ComboBox23.Visible = False : ComboBox24.Visible = False : End If
  790. End Sub
  791. Private Sub 班別13_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 班別_cb13.SelectedIndexChanged
  792. If 班別_cb13.Text <> "休" Then : 休息變化13() : 半天變化13() : Else : ComboBox25.Visible = False : ComboBox26.Visible = False : End If
  793. End Sub
  794. Private Sub 班別14_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 班別_cb14.SelectedIndexChanged
  795. If 班別_cb14.Text <> "休" Then : 休息變化14() : 半天變化14() : Else : ComboBox27.Visible = False : ComboBox28.Visible = False : End If
  796. End Sub
  797. Private Sub 班別15_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 班別_cb15.SelectedIndexChanged
  798. If 班別_cb15.Text <> "休" Then : 休息變化15() : 半天變化15() : Else : ComboBox29.Visible = False : ComboBox30.Visible = False : End If
  799. End Sub
  800. Private Sub 班別16_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 班別_cb16.SelectedIndexChanged
  801. If 班別_cb16.Text <> "休" Then : 休息變化16() : 半天變化16() : Else : ComboBox31.Visible = False : ComboBox32.Visible = False : End If
  802. End Sub
  803. Private Sub 班別17_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 班別_cb17.SelectedIndexChanged
  804. If 班別_cb17.Text <> "休" Then : 休息變化17() : 半天變化17() : Else : ComboBox33.Visible = False : ComboBox34.Visible = False : End If
  805. End Sub
  806. Private Sub 班別18_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 班別_cb18.SelectedIndexChanged
  807. If 班別_cb18.Text <> "休" Then : 休息變化18() : 半天變化18() : Else : ComboBox35.Visible = False : ComboBox36.Visible = False : End If
  808. End Sub
  809. Private Sub 班別19_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 班別_cb19.SelectedIndexChanged
  810. If 班別_cb19.Text <> "休" Then : 休息變化19() : 半天變化19() : Else : ComboBox37.Visible = False : ComboBox38.Visible = False : End If
  811. End Sub
  812. Private Sub 班別20_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 班別_cb20.SelectedIndexChanged
  813. If 班別_cb20.Text <> "休" Then : 休息變化20() : 半天變化20() : Else : ComboBox39.Visible = False : ComboBox40.Visible = False : End If
  814. End Sub
  815. Private Sub CheckBox1_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox1.CheckedChanged
  816. If 班別_cb1.Text <> "休" Then : 休息變化1() : End If
  817. End Sub
  818. Private Sub CheckBox2_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox2.CheckedChanged
  819. If 班別_cb2.Text <> "休" Then : 休息變化2() : End If
  820. End Sub
  821. Private Sub CheckBox3_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox3.CheckedChanged
  822. If 班別_cb3.Text <> "休" Then : 休息變化3() : End If
  823. End Sub
  824. Private Sub CheckBox4_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox4.CheckedChanged
  825. If 班別_cb4.Text <> "休" Then : 休息變化4() : End If
  826. End Sub
  827. Private Sub CheckBox5_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox5.CheckedChanged
  828. If 班別_cb5.Text <> "休" Then : 休息變化5() : End If
  829. End Sub
  830. Private Sub CheckBox6_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox6.CheckedChanged
  831. If 班別_cb6.Text <> "休" Then : 休息變化6() : End If
  832. End Sub
  833. Private Sub CheckBox7_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox7.CheckedChanged
  834. If 班別_cb7.Text <> "休" Then : 休息變化7() : End If
  835. End Sub
  836. Private Sub CheckBox8_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox8.CheckedChanged
  837. If 班別_cb8.Text <> "休" Then : 休息變化8() : End If
  838. End Sub
  839. Private Sub CheckBox9_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox9.CheckedChanged
  840. If 班別_cb9.Text <> "休" Then : 休息變化9() : End If
  841. End Sub
  842. Private Sub CheckBox10_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox10.CheckedChanged
  843. If 班別_cb10.Text <> "休" Then : 休息變化10() : End If
  844. End Sub
  845. Private Sub CheckBox11_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox11.CheckedChanged
  846. If 班別_cb11.Text <> "休" Then : 休息變化11() : End If
  847. End Sub
  848. Private Sub CheckBox12_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox12.CheckedChanged
  849. If 班別_cb12.Text <> "休" Then : 休息變化12() : End If
  850. End Sub
  851. Private Sub CheckBox13_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox13.CheckedChanged
  852. If 班別_cb13.Text <> "休" Then : 休息變化13() : End If
  853. End Sub
  854. Private Sub CheckBox14_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox14.CheckedChanged
  855. If 班別_cb14.Text <> "休" Then : 休息變化14() : End If
  856. End Sub
  857. Private Sub CheckBox15_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox15.CheckedChanged
  858. If 班別_cb15.Text <> "休" Then : 休息變化15() : End If
  859. End Sub
  860. Private Sub CheckBox16_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox16.CheckedChanged
  861. If 班別_cb16.Text <> "休" Then : 休息變化16() : End If
  862. End Sub
  863. Private Sub CheckBox17_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox17.CheckedChanged
  864. If 班別_cb17.Text <> "休" Then : 休息變化17() : End If
  865. End Sub
  866. Private Sub CheckBox18_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox18.CheckedChanged
  867. If 班別_cb18.Text <> "休" Then : 休息變化18() : End If
  868. End Sub
  869. Private Sub CheckBox19_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox19.CheckedChanged
  870. If 班別_cb19.Text <> "休" Then : 休息變化19() : End If
  871. End Sub
  872. Private Sub CheckBox20_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox20.CheckedChanged
  873. If 班別_cb20.Text <> "休" Then : 休息變化20() : End If
  874. End Sub
  875. Private Sub NumericUpDown1_ValueChanged(sender As Object, e As EventArgs) Handles NumericUpDown1.ValueChanged
  876. If 班別_cb1.Text <> "休" Then : 休息變化1() : End If
  877. End Sub
  878. Private Sub NumericUpDown2_ValueChanged(sender As Object, e As EventArgs) Handles NumericUpDown2.ValueChanged
  879. If 班別_cb2.Text <> "休" Then : 休息變化2() : End If
  880. End Sub
  881. Private Sub NumericUpDown3_ValueChanged(sender As Object, e As EventArgs) Handles NumericUpDown3.ValueChanged
  882. If 班別_cb3.Text <> "休" Then : 休息變化3() : End If
  883. End Sub
  884. Private Sub NumericUpDown4_ValueChanged(sender As Object, e As EventArgs) Handles NumericUpDown4.ValueChanged
  885. If 班別_cb4.Text <> "休" Then : 休息變化4() : End If
  886. End Sub
  887. Private Sub NumericUpDown5_ValueChanged(sender As Object, e As EventArgs) Handles NumericUpDown5.ValueChanged
  888. If 班別_cb5.Text <> "休" Then : 休息變化5() : End If
  889. End Sub
  890. Private Sub NumericUpDown6_ValueChanged(sender As Object, e As EventArgs) Handles NumericUpDown6.ValueChanged
  891. If 班別_cb6.Text <> "休" Then : 休息變化6() : End If
  892. End Sub
  893. Private Sub NumericUpDown7_ValueChanged(sender As Object, e As EventArgs) Handles NumericUpDown7.ValueChanged
  894. If 班別_cb7.Text <> "休" Then : 休息變化7() : End If
  895. End Sub
  896. Private Sub NumericUpDown8_ValueChanged(sender As Object, e As EventArgs) Handles NumericUpDown8.ValueChanged
  897. If 班別_cb8.Text <> "休" Then : 休息變化8() : End If
  898. End Sub
  899. Private Sub NumericUpDown9_ValueChanged(sender As Object, e As EventArgs) Handles NumericUpDown9.ValueChanged
  900. If 班別_cb9.Text <> "休" Then : 休息變化9() : End If
  901. End Sub
  902. Private Sub NumericUpDown10_ValueChanged(sender As Object, e As EventArgs) Handles NumericUpDown10.ValueChanged
  903. If 班別_cb10.Text <> "休" Then : 休息變化10() : End If
  904. End Sub
  905. Private Sub NumericUpDown11_ValueChanged(sender As Object, e As EventArgs) Handles NumericUpDown11.ValueChanged
  906. If 班別_cb11.Text <> "休" Then : 休息變化11() : End If
  907. End Sub
  908. Private Sub NumericUpDown12_ValueChanged(sender As Object, e As EventArgs) Handles NumericUpDown12.ValueChanged
  909. If 班別_cb12.Text <> "休" Then : 休息變化12() : End If
  910. End Sub
  911. Private Sub NumericUpDown13_ValueChanged(sender As Object, e As EventArgs) Handles NumericUpDown13.ValueChanged
  912. If 班別_cb13.Text <> "休" Then : 休息變化13() : End If
  913. End Sub
  914. Private Sub NumericUpDown14_ValueChanged(sender As Object, e As EventArgs) Handles NumericUpDown14.ValueChanged
  915. If 班別_cb14.Text <> "休" Then : 休息變化14() : End If
  916. End Sub
  917. Private Sub NumericUpDown15_ValueChanged(sender As Object, e As EventArgs) Handles NumericUpDown15.ValueChanged
  918. If 班別_cb15.Text <> "休" Then : 休息變化15() : End If
  919. End Sub
  920. Private Sub NumericUpDown16_ValueChanged(sender As Object, e As EventArgs) Handles NumericUpDown16.ValueChanged
  921. If 班別_cb16.Text <> "休" Then : 休息變化16() : End If
  922. End Sub
  923. Private Sub NumericUpDown17_ValueChanged(sender As Object, e As EventArgs) Handles NumericUpDown17.ValueChanged
  924. If 班別_cb17.Text <> "休" Then : 休息變化17() : End If
  925. End Sub
  926. Private Sub NumericUpDown18_ValueChanged(sender As Object, e As EventArgs) Handles NumericUpDown18.ValueChanged
  927. If 班別_cb18.Text <> "休" Then : 休息變化18() : End If
  928. End Sub
  929. Private Sub NumericUpDown19_ValueChanged(sender As Object, e As EventArgs) Handles NumericUpDown19.ValueChanged
  930. If 班別_cb19.Text <> "休" Then : 休息變化19() : End If
  931. End Sub
  932. Private Sub BUP1_ValueChanged(sender As Object, e As EventArgs) Handles BUP1.ValueChanged
  933. If 班別_cb1.Text <> "休" Then : 進度條變化1() : End If
  934. End Sub
  935. Private Sub BUP2_ValueChanged(sender As Object, e As EventArgs) Handles BUP2.ValueChanged
  936. If 班別_cb2.Text <> "休" Then : 進度條變化2() : End If
  937. End Sub
  938. Private Sub BUP3_ValueChanged(sender As Object, e As EventArgs) Handles BUP3.ValueChanged
  939. If 班別_cb3.Text <> "休" Then : 進度條變化3() : End If
  940. End Sub
  941. Private Sub BUP4_ValueChanged(sender As Object, e As EventArgs) Handles BUP4.ValueChanged
  942. If 班別_cb4.Text <> "休" Then : 進度條變化4() : End If
  943. End Sub
  944. Private Sub BUP5_ValueChanged(sender As Object, e As EventArgs) Handles BUP5.ValueChanged
  945. If 班別_cb5.Text <> "休" Then : 進度條變化5() : End If
  946. End Sub
  947. Private Sub BUP6_ValueChanged(sender As Object, e As EventArgs) Handles BUP6.ValueChanged
  948. If 班別_cb6.Text <> "休" Then : 進度條變化6() : End If
  949. End Sub
  950. Private Sub BUP7_ValueChanged(sender As Object, e As EventArgs) Handles BUP7.ValueChanged
  951. If 班別_cb7.Text <> "休" Then : 進度條變化7() : End If
  952. End Sub
  953. Private Sub BUP8_ValueChanged(sender As Object, e As EventArgs) Handles BUP8.ValueChanged
  954. If 班別_cb8.Text <> "休" Then : 進度條變化8() : End If
  955. End Sub
  956. Private Sub BUP9_ValueChanged(sender As Object, e As EventArgs) Handles BUP9.ValueChanged
  957. If 班別_cb9.Text <> "休" Then : 進度條變化9() : End If
  958. End Sub
  959. Private Sub BUP10_ValueChanged(sender As Object, e As EventArgs) Handles BUP10.ValueChanged
  960. If 班別_cb10.Text <> "休" Then : 進度條變化10() : End If
  961. End Sub
  962. Private Sub BUP11_ValueChanged(sender As Object, e As EventArgs) Handles BUP11.ValueChanged
  963. If 班別_cb11.Text <> "休" Then : 進度條變化11() : End If
  964. End Sub
  965. Private Sub BUP12_ValueChanged(sender As Object, e As EventArgs) Handles BUP12.ValueChanged
  966. If 班別_cb12.Text <> "休" Then : 進度條變化12() : End If
  967. End Sub
  968. Private Sub BUP13_ValueChanged(sender As Object, e As EventArgs) Handles BUP13.ValueChanged
  969. If 班別_cb13.Text <> "休" Then : 進度條變化13() : End If
  970. End Sub
  971. Private Sub BUP14_ValueChanged(sender As Object, e As EventArgs) Handles BUP14.ValueChanged
  972. If 班別_cb14.Text <> "休" Then : 進度條變化14() : End If
  973. End Sub
  974. Private Sub BUP15_ValueChanged(sender As Object, e As EventArgs) Handles BUP15.ValueChanged
  975. If 班別_cb15.Text <> "休" Then : 進度條變化15() : End If
  976. End Sub
  977. Private Sub BUP16_ValueChanged(sender As Object, e As EventArgs) Handles BUP16.ValueChanged
  978. If 班別_cb16.Text <> "休" Then : 進度條變化16() : End If
  979. End Sub
  980. Private Sub BUP17_ValueChanged(sender As Object, e As EventArgs) Handles BUP17.ValueChanged
  981. If 班別_cb17.Text <> "休" Then : 進度條變化17() : End If
  982. End Sub
  983. Private Sub BUP18_ValueChanged(sender As Object, e As EventArgs) Handles BUP18.ValueChanged
  984. If 班別_cb18.Text <> "休" Then : 進度條變化18() : End If
  985. End Sub
  986. Private Sub BUP19_ValueChanged(sender As Object, e As EventArgs) Handles BUP19.ValueChanged
  987. If 班別_cb19.Text <> "休" Then : 進度條變化19() : End If
  988. End Sub
  989. Private Sub BUP20_ValueChanged(sender As Object, e As EventArgs) Handles BUP20.ValueChanged
  990. If 班別_cb20.Text <> "休" Then : 進度條變化20() : End If
  991. End Sub
  992. Private Sub NUP1_ValueChanged(sender As Object, e As EventArgs) Handles NUP1.ValueChanged
  993. If 班別_cb1.Text <> "休" Then : 休息變化1() : 半天變化1() : Else : ComboBox1.Visible = False : ComboBox2.Visible = False : End If
  994. End Sub
  995. Private Sub NUP2_ValueChanged(sender As Object, e As EventArgs) Handles NUP2.ValueChanged
  996. If 班別_cb2.Text <> "休" Then : 休息變化2() : 半天變化2() : Else : ComboBox3.Visible = False : ComboBox4.Visible = False : End If
  997. End Sub
  998. Private Sub NUP3_ValueChanged(sender As Object, e As EventArgs) Handles NUP3.ValueChanged
  999. If 班別_cb3.Text <> "休" Then : 休息變化3() : 半天變化3() : Else : ComboBox5.Visible = False : ComboBox6.Visible = False : End If
  1000. End Sub
  1001. Private Sub NUP4_ValueChanged(sender As Object, e As EventArgs) Handles NUP4.ValueChanged
  1002. If 班別_cb4.Text <> "休" Then : 休息變化4() : 半天變化4() : Else : ComboBox7.Visible = False : ComboBox8.Visible = False : End If
  1003. End Sub
  1004. Private Sub NUP5_ValueChanged(sender As Object, e As EventArgs) Handles NUP5.ValueChanged
  1005. If 班別_cb5.Text <> "休" Then : 休息變化5() : 半天變化5() : Else : ComboBox9.Visible = False : ComboBox10.Visible = False : End If
  1006. End Sub
  1007. Private Sub NUP6_ValueChanged(sender As Object, e As EventArgs) Handles NUP6.ValueChanged
  1008. If 班別_cb6.Text <> "休" Then : 休息變化6() : 半天變化6() : Else : ComboBox11.Visible = False : ComboBox12.Visible = False : End If
  1009. End Sub
  1010. Private Sub NUP7_ValueChanged(sender As Object, e As EventArgs) Handles NUP7.ValueChanged
  1011. If 班別_cb7.Text <> "休" Then : 休息變化7() : 半天變化7() : Else : ComboBox13.Visible = False : ComboBox14.Visible = False : End If
  1012. End Sub
  1013. Private Sub NUP8_ValueChanged(sender As Object, e As EventArgs) Handles NUP8.ValueChanged
  1014. If 班別_cb8.Text <> "休" Then : 休息變化8() : 半天變化8() : Else : ComboBox15.Visible = False : ComboBox16.Visible = False : End If
  1015. End Sub
  1016. Private Sub NUP9_ValueChanged(sender As Object, e As EventArgs) Handles NUP9.ValueChanged
  1017. If 班別_cb9.Text <> "休" Then : 休息變化9() : 半天變化9() : Else : ComboBox17.Visible = False : ComboBox18.Visible = False : End If
  1018. End Sub
  1019. Private Sub NUP10_ValueChanged(sender As Object, e As EventArgs) Handles NUP10.ValueChanged
  1020. If 班別_cb10.Text <> "休" Then : 休息變化10() : 半天變化10() : Else : ComboBox19.Visible = False : ComboBox20.Visible = False : End If
  1021. End Sub
  1022. Private Sub NUP11_ValueChanged(sender As Object, e As EventArgs) Handles NUP11.ValueChanged
  1023. If 班別_cb11.Text <> "休" Then : 休息變化11() : 半天變化11() : Else : ComboBox21.Visible = False : ComboBox22.Visible = False : End If
  1024. End Sub
  1025. Private Sub NUP12_ValueChanged(sender As Object, e As EventArgs) Handles NUP12.ValueChanged
  1026. If 班別_cb12.Text <> "休" Then : 休息變化12() : 半天變化12() : Else : ComboBox23.Visible = False : ComboBox24.Visible = False : End If
  1027. End Sub
  1028. Private Sub NUP13_ValueChanged(sender As Object, e As EventArgs) Handles NUP13.ValueChanged
  1029. If 班別_cb13.Text <> "休" Then : 休息變化13() : 半天變化13() : Else : ComboBox25.Visible = False : ComboBox26.Visible = False : End If
  1030. End Sub
  1031. Private Sub NUP14_ValueChanged(sender As Object, e As EventArgs) Handles NUP14.ValueChanged
  1032. If 班別_cb14.Text <> "休" Then : 休息變化14() : 半天變化14() : Else : ComboBox27.Visible = False : ComboBox28.Visible = False : End If
  1033. End Sub
  1034. Private Sub NUP15_ValueChanged(sender As Object, e As EventArgs) Handles NUP15.ValueChanged
  1035. If 班別_cb15.Text <> "休" Then : 休息變化15() : 半天變化15() : Else : ComboBox29.Visible = False : ComboBox30.Visible = False : End If
  1036. End Sub
  1037. Private Sub NUP16_ValueChanged(sender As Object, e As EventArgs) Handles NUP16.ValueChanged
  1038. If 班別_cb16.Text <> "休" Then : 休息變化16() : 半天變化16() : Else : ComboBox31.Visible = False : ComboBox32.Visible = False : End If
  1039. End Sub
  1040. Private Sub NUP17_ValueChanged(sender As Object, e As EventArgs) Handles NUP17.ValueChanged
  1041. If 班別_cb17.Text <> "休" Then : 休息變化17() : 半天變化17() : Else : ComboBox33.Visible = False : ComboBox34.Visible = False : End If
  1042. End Sub
  1043. Private Sub NUP18_ValueChanged(sender As Object, e As EventArgs) Handles NUP18.ValueChanged
  1044. If 班別_cb18.Text <> "休" Then : 休息變化18() : 半天變化18() : Else : ComboBox35.Visible = False : ComboBox36.Visible = False : End If
  1045. End Sub
  1046. Private Sub NUP19_ValueChanged(sender As Object, e As EventArgs) Handles NUP19.ValueChanged
  1047. If 班別_cb19.Text <> "休" Then : 休息變化19() : 半天變化19() : Else : ComboBox37.Visible = False : ComboBox38.Visible = False : End If
  1048. End Sub
  1049. Private Sub NUP20_ValueChanged(sender As Object, e As EventArgs) Handles NUP20.ValueChanged
  1050. If 班別_cb20.Text <> "休" Then : 休息變化20() : 半天變化20() : Else : ComboBox39.Visible = False : ComboBox40.Visible = False : End If
  1051. End Sub
  1052. Private Sub NumericUpDown20_ValueChanged(sender As Object, e As EventArgs) Handles NumericUpDown20.ValueChanged
  1053. If 班別_cb20.Text <> "休" Then : 休息變化20() : End If
  1054. End Sub
  1055. Private Sub 半天變化1()
  1056. If CheckBox1.Checked = False Then : ComboBox1.Visible = True : ComboBox2.Visible = True : Else : ComboBox1.Visible = True : ComboBox2.Visible = False : End If
  1057. End Sub
  1058. Private Sub 半天變化2()
  1059. If CheckBox2.Checked = False Then : ComboBox3.Visible = True : ComboBox4.Visible = True : Else : ComboBox3.Visible = True : ComboBox4.Visible = False : End If
  1060. End Sub
  1061. Private Sub 半天變化3()
  1062. If CheckBox3.Checked = False Then : ComboBox5.Visible = True : ComboBox6.Visible = True : Else : ComboBox5.Visible = True : ComboBox6.Visible = False : End If
  1063. End Sub
  1064. Private Sub 半天變化4()
  1065. If CheckBox4.Checked = False Then : ComboBox7.Visible = True : ComboBox8.Visible = True : Else : ComboBox7.Visible = True : ComboBox8.Visible = False : End If
  1066. End Sub
  1067. Private Sub 半天變化5()
  1068. If CheckBox5.Checked = False Then : ComboBox9.Visible = True : ComboBox10.Visible = True : Else : ComboBox9.Visible = True : ComboBox10.Visible = False : End If
  1069. End Sub
  1070. Private Sub 半天變化6()
  1071. If CheckBox6.Checked = False Then : ComboBox11.Visible = True : ComboBox12.Visible = True : Else : ComboBox11.Visible = True : ComboBox12.Visible = False : End If
  1072. End Sub
  1073. Private Sub 半天變化7()
  1074. If CheckBox7.Checked = False Then : ComboBox13.Visible = True : ComboBox14.Visible = True : Else : ComboBox13.Visible = True : ComboBox14.Visible = False : End If
  1075. End Sub
  1076. Private Sub 半天變化8()
  1077. If CheckBox8.Checked = False Then : ComboBox15.Visible = True : ComboBox16.Visible = True : Else : ComboBox15.Visible = True : ComboBox16.Visible = False : End If
  1078. End Sub
  1079. Private Sub 半天變化9()
  1080. If CheckBox9.Checked = False Then : ComboBox17.Visible = True : ComboBox18.Visible = True : Else : ComboBox17.Visible = True : ComboBox18.Visible = False : End If
  1081. End Sub
  1082. Private Sub 半天變化10()
  1083. If CheckBox10.Checked = False Then : ComboBox19.Visible = True : ComboBox20.Visible = True : Else : ComboBox19.Visible = True : ComboBox20.Visible = False : End If
  1084. End Sub
  1085. Private Sub 半天變化11()
  1086. If CheckBox11.Checked = False Then : ComboBox21.Visible = True : ComboBox22.Visible = True : Else : ComboBox21.Visible = True : ComboBox22.Visible = False : End If
  1087. End Sub
  1088. Private Sub 半天變化12()
  1089. If CheckBox12.Checked = False Then : ComboBox23.Visible = True : ComboBox24.Visible = True : Else : ComboBox23.Visible = True : ComboBox24.Visible = False : End If
  1090. End Sub
  1091. Private Sub 半天變化13()
  1092. If CheckBox13.Checked = False Then : ComboBox25.Visible = True : ComboBox26.Visible = True : Else : ComboBox25.Visible = True : ComboBox26.Visible = False : End If
  1093. End Sub
  1094. Private Sub 半天變化14()
  1095. If CheckBox14.Checked = False Then : ComboBox27.Visible = True : ComboBox28.Visible = True : Else : ComboBox27.Visible = True : ComboBox28.Visible = False : End If
  1096. End Sub
  1097. Private Sub 半天變化15()
  1098. If CheckBox15.Checked = False Then : ComboBox29.Visible = True : ComboBox30.Visible = True : Else : ComboBox29.Visible = True : ComboBox30.Visible = False : End If
  1099. End Sub
  1100. Private Sub 半天變化16()
  1101. If CheckBox16.Checked = False Then : ComboBox31.Visible = True : ComboBox32.Visible = True : Else : ComboBox31.Visible = True : ComboBox32.Visible = False : End If
  1102. End Sub
  1103. Private Sub 半天變化17()
  1104. If CheckBox17.Checked = False Then : ComboBox33.Visible = True : ComboBox34.Visible = True : Else : ComboBox33.Visible = True : ComboBox34.Visible = False : End If
  1105. End Sub
  1106. Private Sub 半天變化18()
  1107. If CheckBox18.Checked = False Then : ComboBox35.Visible = True : ComboBox36.Visible = True : Else : ComboBox35.Visible = True : ComboBox36.Visible = False : End If
  1108. End Sub
  1109. Private Sub 半天變化19()
  1110. If CheckBox19.Checked = False Then : ComboBox37.Visible = True : ComboBox38.Visible = True : Else : ComboBox37.Visible = True : ComboBox38.Visible = False : End If
  1111. End Sub
  1112. Private Sub 半天變化20()
  1113. If CheckBox20.Checked = False Then : ComboBox39.Visible = True : ComboBox40.Visible = True : Else : ComboBox39.Visible = True : ComboBox40.Visible = False : End If
  1114. End Sub
  1115. Private Sub 全_ch_CheckedChanged(sender As Object, e As EventArgs) Handles 全_ch.CheckedChanged
  1116. 讀取人員資料表()
  1117. End Sub
  1118. Private Sub 減一天_bt_Click(sender As Object, e As EventArgs) Handles 減一天_bt.Click
  1119. DTP1.Value = 年_lb.Text & "/" & 月_lb.Text & "/" & 日_lb.Text
  1120. DTP1.Value = DTP1.Value.AddDays(-1)
  1121. PA = Format(DTP1.Value, "yyyy/MM/dd")
  1122. 年_lb.Text = Strings.Left(PA, 4) : 月_lb.Text = Strings.Mid(PA, 6, 2) : PA2 = Strings.Right(PA, 2)
  1123. '----------------回復預設-----------------------------------------------------------------------------------------------
  1124. If Val(PA2) > 9 Then : 日_lb.Text = PA2 : Else : 日_lb.Text = "0" & Val(PA2) : End If
  1125. 回復預設() : 重新讀取()
  1126. End Sub
  1127. Private Sub 加一天_bt1_Click(sender As Object, e As EventArgs) Handles 加一天_bt1.Click
  1128. DTP1.Value = 年_lb.Text & "/" & 月_lb.Text & "/" & 日_lb.Text
  1129. DTP1.Value = DTP1.Value.AddDays(+1)
  1130. PA = Format(DTP1.Value, "yyyy/MM/dd")
  1131. 年_lb.Text = Strings.Left(PA, 4) : 月_lb.Text = Strings.Mid(PA, 6, 2) : PA2 = Strings.Right(PA, 2)
  1132. '----------------回復預設-----------------------------------------------------------------------------------------------
  1133. If Val(PA2) > 9 Then : 日_lb.Text = PA2 : Else : 日_lb.Text = "0" & Val(PA2) : End If
  1134. 回復預設() : 重新讀取()
  1135. End Sub
  1136. Private Sub ComboBox41_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox41.SelectedIndexChanged
  1137. If ComboBox41.SelectedIndex = 0 Then : ComboBox1.BackColor = Color.LawnGreen
  1138. ElseIf ComboBox41.SelectedIndex = 1 Then : ComboBox1.BackColor = Color.LightBlue
  1139. ElseIf ComboBox41.SelectedIndex = 2 Then : ComboBox1.BackColor = Color.LightCoral
  1140. ElseIf ComboBox41.SelectedIndex = 3 Then : ComboBox1.BackColor = Color.LightCyan
  1141. ElseIf ComboBox41.SelectedIndex = 4 Then : ComboBox1.BackColor = Color.LightGoldenrodYellow
  1142. ElseIf ComboBox41.SelectedIndex = 5 Then : ComboBox1.BackColor = Color.LightGray
  1143. ElseIf ComboBox41.SelectedIndex = 6 Then : ComboBox1.BackColor = Color.LightGreen
  1144. ElseIf ComboBox41.SelectedIndex = 7 Then : ComboBox1.BackColor = Color.LightPink
  1145. ElseIf ComboBox41.SelectedIndex = 8 Then : ComboBox1.BackColor = Color.LightSalmon
  1146. ElseIf ComboBox41.SelectedIndex = 9 Then : ComboBox1.BackColor = Color.Gray
  1147. End If
  1148. End Sub
  1149. Private Sub ComboBox42_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox42.SelectedIndexChanged
  1150. If ComboBox42.SelectedIndex = 0 Then : ComboBox2.BackColor = Color.LawnGreen
  1151. ElseIf ComboBox42.SelectedIndex = 1 Then : ComboBox2.BackColor = Color.LightBlue
  1152. ElseIf ComboBox42.SelectedIndex = 2 Then : ComboBox2.BackColor = Color.LightCoral
  1153. ElseIf ComboBox42.SelectedIndex = 3 Then : ComboBox2.BackColor = Color.LightCyan
  1154. ElseIf ComboBox42.SelectedIndex = 4 Then : ComboBox2.BackColor = Color.LightGoldenrodYellow
  1155. ElseIf ComboBox42.SelectedIndex = 5 Then : ComboBox2.BackColor = Color.LightGray
  1156. ElseIf ComboBox42.SelectedIndex = 6 Then : ComboBox2.BackColor = Color.LightGreen
  1157. ElseIf ComboBox42.SelectedIndex = 7 Then : ComboBox2.BackColor = Color.LightPink
  1158. ElseIf ComboBox42.SelectedIndex = 8 Then : ComboBox2.BackColor = Color.LightSalmon
  1159. ElseIf ComboBox42.SelectedIndex = 9 Then : ComboBox2.BackColor = Color.Gray
  1160. End If
  1161. End Sub
  1162. Private Sub ComboBox43_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox43.SelectedIndexChanged
  1163. If ComboBox43.SelectedIndex = 0 Then : ComboBox3.BackColor = Color.LawnGreen
  1164. ElseIf ComboBox43.SelectedIndex = 1 Then : ComboBox3.BackColor = Color.LightBlue
  1165. ElseIf ComboBox43.SelectedIndex = 2 Then : ComboBox3.BackColor = Color.LightCoral
  1166. ElseIf ComboBox43.SelectedIndex = 3 Then : ComboBox3.BackColor = Color.LightCyan
  1167. ElseIf ComboBox43.SelectedIndex = 4 Then : ComboBox3.BackColor = Color.LightGoldenrodYellow
  1168. ElseIf ComboBox43.SelectedIndex = 5 Then : ComboBox3.BackColor = Color.LightGray
  1169. ElseIf ComboBox43.SelectedIndex = 6 Then : ComboBox3.BackColor = Color.LightGreen
  1170. ElseIf ComboBox43.SelectedIndex = 7 Then : ComboBox3.BackColor = Color.LightPink
  1171. ElseIf ComboBox43.SelectedIndex = 8 Then : ComboBox3.BackColor = Color.LightSalmon
  1172. ElseIf ComboBox43.SelectedIndex = 9 Then : ComboBox3.BackColor = Color.Gray
  1173. End If
  1174. End Sub
  1175. Private Sub ComboBox44_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox44.SelectedIndexChanged
  1176. If ComboBox44.SelectedIndex = 0 Then : ComboBox4.BackColor = Color.LawnGreen
  1177. ElseIf ComboBox44.SelectedIndex = 1 Then : ComboBox4.BackColor = Color.LightBlue
  1178. ElseIf ComboBox44.SelectedIndex = 2 Then : ComboBox4.BackColor = Color.LightCoral
  1179. ElseIf ComboBox44.SelectedIndex = 3 Then : ComboBox4.BackColor = Color.LightCyan
  1180. ElseIf ComboBox44.SelectedIndex = 4 Then : ComboBox4.BackColor = Color.LightGoldenrodYellow
  1181. ElseIf ComboBox44.SelectedIndex = 5 Then : ComboBox4.BackColor = Color.LightGray
  1182. ElseIf ComboBox44.SelectedIndex = 6 Then : ComboBox4.BackColor = Color.LightGreen
  1183. ElseIf ComboBox44.SelectedIndex = 7 Then : ComboBox4.BackColor = Color.LightPink
  1184. ElseIf ComboBox44.SelectedIndex = 8 Then : ComboBox4.BackColor = Color.LightSalmon
  1185. ElseIf ComboBox44.SelectedIndex = 9 Then : ComboBox4.BackColor = Color.Gray
  1186. End If
  1187. End Sub
  1188. Private Sub ComboBox45_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox45.SelectedIndexChanged
  1189. If ComboBox45.SelectedIndex = 0 Then : ComboBox5.BackColor = Color.LawnGreen
  1190. ElseIf ComboBox45.SelectedIndex = 1 Then : ComboBox5.BackColor = Color.LightBlue
  1191. ElseIf ComboBox45.SelectedIndex = 2 Then : ComboBox5.BackColor = Color.LightCoral
  1192. ElseIf ComboBox45.SelectedIndex = 3 Then : ComboBox5.BackColor = Color.LightCyan
  1193. ElseIf ComboBox45.SelectedIndex = 4 Then : ComboBox5.BackColor = Color.LightGoldenrodYellow
  1194. ElseIf ComboBox45.SelectedIndex = 5 Then : ComboBox5.BackColor = Color.LightGray
  1195. ElseIf ComboBox45.SelectedIndex = 6 Then : ComboBox5.BackColor = Color.LightGreen
  1196. ElseIf ComboBox45.SelectedIndex = 7 Then : ComboBox5.BackColor = Color.LightPink
  1197. ElseIf ComboBox45.SelectedIndex = 8 Then : ComboBox5.BackColor = Color.LightSalmon
  1198. ElseIf ComboBox45.SelectedIndex = 9 Then : ComboBox5.BackColor = Color.Gray
  1199. End If
  1200. End Sub
  1201. Private Sub ComboBox46_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox46.SelectedIndexChanged
  1202. If ComboBox46.SelectedIndex = 0 Then : ComboBox6.BackColor = Color.LawnGreen
  1203. ElseIf ComboBox46.SelectedIndex = 1 Then : ComboBox6.BackColor = Color.LightBlue
  1204. ElseIf ComboBox46.SelectedIndex = 2 Then : ComboBox6.BackColor = Color.LightCoral
  1205. ElseIf ComboBox46.SelectedIndex = 3 Then : ComboBox6.BackColor = Color.LightCyan
  1206. ElseIf ComboBox46.SelectedIndex = 4 Then : ComboBox6.BackColor = Color.LightGoldenrodYellow
  1207. ElseIf ComboBox46.SelectedIndex = 5 Then : ComboBox6.BackColor = Color.LightGray
  1208. ElseIf ComboBox46.SelectedIndex = 6 Then : ComboBox6.BackColor = Color.LightGreen
  1209. ElseIf ComboBox46.SelectedIndex = 7 Then : ComboBox6.BackColor = Color.LightPink
  1210. ElseIf ComboBox46.SelectedIndex = 8 Then : ComboBox6.BackColor = Color.LightSalmon
  1211. ElseIf ComboBox46.SelectedIndex = 9 Then : ComboBox6.BackColor = Color.Gray
  1212. End If
  1213. End Sub
  1214. Private Sub ComboBox47_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox47.SelectedIndexChanged
  1215. If ComboBox47.SelectedIndex = 0 Then : ComboBox7.BackColor = Color.LawnGreen
  1216. ElseIf ComboBox47.SelectedIndex = 1 Then : ComboBox7.BackColor = Color.LightBlue
  1217. ElseIf ComboBox47.SelectedIndex = 2 Then : ComboBox7.BackColor = Color.LightCoral
  1218. ElseIf ComboBox47.SelectedIndex = 3 Then : ComboBox7.BackColor = Color.LightCyan
  1219. ElseIf ComboBox47.SelectedIndex = 4 Then : ComboBox7.BackColor = Color.LightGoldenrodYellow
  1220. ElseIf ComboBox47.SelectedIndex = 5 Then : ComboBox7.BackColor = Color.LightGray
  1221. ElseIf ComboBox47.SelectedIndex = 6 Then : ComboBox7.BackColor = Color.LightGreen
  1222. ElseIf ComboBox47.SelectedIndex = 7 Then : ComboBox7.BackColor = Color.LightPink
  1223. ElseIf ComboBox47.SelectedIndex = 8 Then : ComboBox7.BackColor = Color.LightSalmon
  1224. ElseIf ComboBox47.SelectedIndex = 9 Then : ComboBox7.BackColor = Color.Gray
  1225. End If
  1226. End Sub
  1227. Private Sub ComboBox48_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox48.SelectedIndexChanged
  1228. If ComboBox48.SelectedIndex = 0 Then : ComboBox8.BackColor = Color.LawnGreen
  1229. ElseIf ComboBox48.SelectedIndex = 1 Then : ComboBox8.BackColor = Color.LightBlue
  1230. ElseIf ComboBox48.SelectedIndex = 2 Then : ComboBox8.BackColor = Color.LightCoral
  1231. ElseIf ComboBox48.SelectedIndex = 3 Then : ComboBox8.BackColor = Color.LightCyan
  1232. ElseIf ComboBox48.SelectedIndex = 4 Then : ComboBox8.BackColor = Color.LightGoldenrodYellow
  1233. ElseIf ComboBox48.SelectedIndex = 5 Then : ComboBox8.BackColor = Color.LightGray
  1234. ElseIf ComboBox48.SelectedIndex = 6 Then : ComboBox8.BackColor = Color.LightGreen
  1235. ElseIf ComboBox48.SelectedIndex = 7 Then : ComboBox8.BackColor = Color.LightPink
  1236. ElseIf ComboBox48.SelectedIndex = 8 Then : ComboBox8.BackColor = Color.LightSalmon
  1237. ElseIf ComboBox48.SelectedIndex = 9 Then : ComboBox8.BackColor = Color.Gray
  1238. End If
  1239. End Sub
  1240. Private Sub ComboBox49_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox49.SelectedIndexChanged
  1241. If ComboBox49.SelectedIndex = 0 Then : ComboBox9.BackColor = Color.LawnGreen
  1242. ElseIf ComboBox49.SelectedIndex = 1 Then : ComboBox9.BackColor = Color.LightBlue
  1243. ElseIf ComboBox49.SelectedIndex = 2 Then : ComboBox9.BackColor = Color.LightCoral
  1244. ElseIf ComboBox49.SelectedIndex = 3 Then : ComboBox9.BackColor = Color.LightCyan
  1245. ElseIf ComboBox49.SelectedIndex = 4 Then : ComboBox9.BackColor = Color.LightGoldenrodYellow
  1246. ElseIf ComboBox49.SelectedIndex = 5 Then : ComboBox9.BackColor = Color.LightGray
  1247. ElseIf ComboBox49.SelectedIndex = 6 Then : ComboBox9.BackColor = Color.LightGreen
  1248. ElseIf ComboBox49.SelectedIndex = 7 Then : ComboBox9.BackColor = Color.LightPink
  1249. ElseIf ComboBox49.SelectedIndex = 8 Then : ComboBox9.BackColor = Color.LightSalmon
  1250. ElseIf ComboBox49.SelectedIndex = 9 Then : ComboBox9.BackColor = Color.Gray
  1251. End If
  1252. End Sub
  1253. Private Sub ComboBox50_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox50.SelectedIndexChanged
  1254. If ComboBox50.SelectedIndex = 0 Then : ComboBox10.BackColor = Color.LawnGreen
  1255. ElseIf ComboBox50.SelectedIndex = 1 Then : ComboBox10.BackColor = Color.LightBlue
  1256. ElseIf ComboBox50.SelectedIndex = 2 Then : ComboBox10.BackColor = Color.LightCoral
  1257. ElseIf ComboBox50.SelectedIndex = 3 Then : ComboBox10.BackColor = Color.LightCyan
  1258. ElseIf ComboBox50.SelectedIndex = 4 Then : ComboBox10.BackColor = Color.LightGoldenrodYellow
  1259. ElseIf ComboBox50.SelectedIndex = 5 Then : ComboBox10.BackColor = Color.LightGray
  1260. ElseIf ComboBox50.SelectedIndex = 6 Then : ComboBox10.BackColor = Color.LightGreen
  1261. ElseIf ComboBox50.SelectedIndex = 7 Then : ComboBox10.BackColor = Color.LightPink
  1262. ElseIf ComboBox50.SelectedIndex = 8 Then : ComboBox10.BackColor = Color.LightSalmon
  1263. ElseIf ComboBox50.SelectedIndex = 9 Then : ComboBox10.BackColor = Color.Gray
  1264. End If
  1265. End Sub
  1266. Private Sub ComboBox51_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox51.SelectedIndexChanged
  1267. If ComboBox51.SelectedIndex = 0 Then : ComboBox11.BackColor = Color.LawnGreen
  1268. ElseIf ComboBox51.SelectedIndex = 1 Then : ComboBox11.BackColor = Color.LightBlue
  1269. ElseIf ComboBox51.SelectedIndex = 2 Then : ComboBox11.BackColor = Color.LightCoral
  1270. ElseIf ComboBox51.SelectedIndex = 3 Then : ComboBox11.BackColor = Color.LightCyan
  1271. ElseIf ComboBox51.SelectedIndex = 4 Then : ComboBox11.BackColor = Color.LightGoldenrodYellow
  1272. ElseIf ComboBox51.SelectedIndex = 5 Then : ComboBox11.BackColor = Color.LightGray
  1273. ElseIf ComboBox51.SelectedIndex = 6 Then : ComboBox11.BackColor = Color.LightGreen
  1274. ElseIf ComboBox51.SelectedIndex = 7 Then : ComboBox11.BackColor = Color.LightPink
  1275. ElseIf ComboBox51.SelectedIndex = 8 Then : ComboBox11.BackColor = Color.LightSalmon
  1276. ElseIf ComboBox51.SelectedIndex = 9 Then : ComboBox11.BackColor = Color.Gray
  1277. End If
  1278. End Sub
  1279. Private Sub ComboBox52_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox52.SelectedIndexChanged
  1280. If ComboBox52.SelectedIndex = 0 Then : ComboBox12.BackColor = Color.LawnGreen
  1281. ElseIf ComboBox52.SelectedIndex = 1 Then : ComboBox12.BackColor = Color.LightBlue
  1282. ElseIf ComboBox52.SelectedIndex = 2 Then : ComboBox12.BackColor = Color.LightCoral
  1283. ElseIf ComboBox52.SelectedIndex = 3 Then : ComboBox12.BackColor = Color.LightCyan
  1284. ElseIf ComboBox52.SelectedIndex = 4 Then : ComboBox12.BackColor = Color.LightGoldenrodYellow
  1285. ElseIf ComboBox52.SelectedIndex = 5 Then : ComboBox12.BackColor = Color.LightGray
  1286. ElseIf ComboBox52.SelectedIndex = 6 Then : ComboBox12.BackColor = Color.LightGreen
  1287. ElseIf ComboBox52.SelectedIndex = 7 Then : ComboBox12.BackColor = Color.LightPink
  1288. ElseIf ComboBox52.SelectedIndex = 8 Then : ComboBox12.BackColor = Color.LightSalmon
  1289. ElseIf ComboBox52.SelectedIndex = 9 Then : ComboBox12.BackColor = Color.Gray
  1290. End If
  1291. End Sub
  1292. Private Sub ComboBox53_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox53.SelectedIndexChanged
  1293. If ComboBox53.SelectedIndex = 0 Then : ComboBox13.BackColor = Color.LawnGreen
  1294. ElseIf ComboBox53.SelectedIndex = 1 Then : ComboBox13.BackColor = Color.LightBlue
  1295. ElseIf ComboBox53.SelectedIndex = 2 Then : ComboBox13.BackColor = Color.LightCoral
  1296. ElseIf ComboBox53.SelectedIndex = 3 Then : ComboBox13.BackColor = Color.LightCyan
  1297. ElseIf ComboBox53.SelectedIndex = 4 Then : ComboBox13.BackColor = Color.LightGoldenrodYellow
  1298. ElseIf ComboBox53.SelectedIndex = 5 Then : ComboBox13.BackColor = Color.LightGray
  1299. ElseIf ComboBox53.SelectedIndex = 6 Then : ComboBox13.BackColor = Color.LightGreen
  1300. ElseIf ComboBox53.SelectedIndex = 7 Then : ComboBox13.BackColor = Color.LightPink
  1301. ElseIf ComboBox53.SelectedIndex = 8 Then : ComboBox13.BackColor = Color.LightSalmon
  1302. ElseIf ComboBox53.SelectedIndex = 9 Then : ComboBox13.BackColor = Color.Gray
  1303. End If
  1304. End Sub
  1305. Private Sub ComboBox54_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox54.SelectedIndexChanged
  1306. If ComboBox54.SelectedIndex = 0 Then : ComboBox14.BackColor = Color.LawnGreen
  1307. ElseIf ComboBox54.SelectedIndex = 1 Then : ComboBox14.BackColor = Color.LightBlue
  1308. ElseIf ComboBox54.SelectedIndex = 2 Then : ComboBox14.BackColor = Color.LightCoral
  1309. ElseIf ComboBox54.SelectedIndex = 3 Then : ComboBox14.BackColor = Color.LightCyan
  1310. ElseIf ComboBox54.SelectedIndex = 4 Then : ComboBox14.BackColor = Color.LightGoldenrodYellow
  1311. ElseIf ComboBox54.SelectedIndex = 5 Then : ComboBox14.BackColor = Color.LightGray
  1312. ElseIf ComboBox54.SelectedIndex = 6 Then : ComboBox14.BackColor = Color.LightGreen
  1313. ElseIf ComboBox54.SelectedIndex = 7 Then : ComboBox14.BackColor = Color.LightPink
  1314. ElseIf ComboBox54.SelectedIndex = 8 Then : ComboBox14.BackColor = Color.LightSalmon
  1315. ElseIf ComboBox54.SelectedIndex = 9 Then : ComboBox14.BackColor = Color.Gray
  1316. End If
  1317. End Sub
  1318. Private Sub ComboBox55_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox55.SelectedIndexChanged
  1319. If ComboBox55.SelectedIndex = 0 Then : ComboBox15.BackColor = Color.LawnGreen
  1320. ElseIf ComboBox55.SelectedIndex = 1 Then : ComboBox15.BackColor = Color.LightBlue
  1321. ElseIf ComboBox55.SelectedIndex = 2 Then : ComboBox15.BackColor = Color.LightCoral
  1322. ElseIf ComboBox55.SelectedIndex = 3 Then : ComboBox15.BackColor = Color.LightCyan
  1323. ElseIf ComboBox55.SelectedIndex = 4 Then : ComboBox15.BackColor = Color.LightGoldenrodYellow
  1324. ElseIf ComboBox55.SelectedIndex = 5 Then : ComboBox15.BackColor = Color.LightGray
  1325. ElseIf ComboBox55.SelectedIndex = 6 Then : ComboBox15.BackColor = Color.LightGreen
  1326. ElseIf ComboBox55.SelectedIndex = 7 Then : ComboBox15.BackColor = Color.LightPink
  1327. ElseIf ComboBox55.SelectedIndex = 8 Then : ComboBox15.BackColor = Color.LightSalmon
  1328. ElseIf ComboBox55.SelectedIndex = 9 Then : ComboBox15.BackColor = Color.Gray
  1329. End If
  1330. End Sub
  1331. Private Sub ComboBox56_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox56.SelectedIndexChanged
  1332. If ComboBox56.SelectedIndex = 0 Then : ComboBox16.BackColor = Color.LawnGreen
  1333. ElseIf ComboBox56.SelectedIndex = 1 Then : ComboBox16.BackColor = Color.LightBlue
  1334. ElseIf ComboBox56.SelectedIndex = 2 Then : ComboBox16.BackColor = Color.LightCoral
  1335. ElseIf ComboBox56.SelectedIndex = 3 Then : ComboBox16.BackColor = Color.LightCyan
  1336. ElseIf ComboBox56.SelectedIndex = 4 Then : ComboBox16.BackColor = Color.LightGoldenrodYellow
  1337. ElseIf ComboBox56.SelectedIndex = 5 Then : ComboBox16.BackColor = Color.LightGray
  1338. ElseIf ComboBox56.SelectedIndex = 6 Then : ComboBox16.BackColor = Color.LightGreen
  1339. ElseIf ComboBox56.SelectedIndex = 7 Then : ComboBox16.BackColor = Color.LightPink
  1340. ElseIf ComboBox56.SelectedIndex = 8 Then : ComboBox16.BackColor = Color.LightSalmon
  1341. ElseIf ComboBox56.SelectedIndex = 9 Then : ComboBox16.BackColor = Color.Gray
  1342. End If
  1343. End Sub
  1344. Private Sub ComboBox57_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox57.SelectedIndexChanged
  1345. If ComboBox57.SelectedIndex = 0 Then : ComboBox17.BackColor = Color.LawnGreen
  1346. ElseIf ComboBox57.SelectedIndex = 1 Then : ComboBox17.BackColor = Color.LightBlue
  1347. ElseIf ComboBox57.SelectedIndex = 2 Then : ComboBox17.BackColor = Color.LightCoral
  1348. ElseIf ComboBox57.SelectedIndex = 3 Then : ComboBox17.BackColor = Color.LightCyan
  1349. ElseIf ComboBox57.SelectedIndex = 4 Then : ComboBox17.BackColor = Color.LightGoldenrodYellow
  1350. ElseIf ComboBox57.SelectedIndex = 5 Then : ComboBox17.BackColor = Color.LightGray
  1351. ElseIf ComboBox57.SelectedIndex = 6 Then : ComboBox17.BackColor = Color.LightGreen
  1352. ElseIf ComboBox57.SelectedIndex = 7 Then : ComboBox17.BackColor = Color.LightPink
  1353. ElseIf ComboBox57.SelectedIndex = 8 Then : ComboBox17.BackColor = Color.LightSalmon
  1354. ElseIf ComboBox57.SelectedIndex = 9 Then : ComboBox17.BackColor = Color.Gray
  1355. End If
  1356. End Sub
  1357. Private Sub ComboBox58_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox58.SelectedIndexChanged
  1358. If ComboBox58.SelectedIndex = 0 Then : ComboBox18.BackColor = Color.LawnGreen
  1359. ElseIf ComboBox58.SelectedIndex = 1 Then : ComboBox18.BackColor = Color.LightBlue
  1360. ElseIf ComboBox58.SelectedIndex = 2 Then : ComboBox18.BackColor = Color.LightCoral
  1361. ElseIf ComboBox58.SelectedIndex = 3 Then : ComboBox18.BackColor = Color.LightCyan
  1362. ElseIf ComboBox58.SelectedIndex = 4 Then : ComboBox18.BackColor = Color.LightGoldenrodYellow
  1363. ElseIf ComboBox58.SelectedIndex = 5 Then : ComboBox18.BackColor = Color.LightGray
  1364. ElseIf ComboBox58.SelectedIndex = 6 Then : ComboBox18.BackColor = Color.LightGreen
  1365. ElseIf ComboBox58.SelectedIndex = 7 Then : ComboBox18.BackColor = Color.LightPink
  1366. ElseIf ComboBox58.SelectedIndex = 8 Then : ComboBox18.BackColor = Color.LightSalmon
  1367. ElseIf ComboBox58.SelectedIndex = 9 Then : ComboBox18.BackColor = Color.Gray
  1368. End If
  1369. End Sub
  1370. Private Sub ComboBox59_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox59.SelectedIndexChanged
  1371. If ComboBox59.SelectedIndex = 0 Then : ComboBox19.BackColor = Color.LawnGreen
  1372. ElseIf ComboBox59.SelectedIndex = 1 Then : ComboBox19.BackColor = Color.LightBlue
  1373. ElseIf ComboBox59.SelectedIndex = 2 Then : ComboBox19.BackColor = Color.LightCoral
  1374. ElseIf ComboBox59.SelectedIndex = 3 Then : ComboBox19.BackColor = Color.LightCyan
  1375. ElseIf ComboBox59.SelectedIndex = 4 Then : ComboBox19.BackColor = Color.LightGoldenrodYellow
  1376. ElseIf ComboBox59.SelectedIndex = 5 Then : ComboBox19.BackColor = Color.LightGray
  1377. ElseIf ComboBox59.SelectedIndex = 6 Then : ComboBox19.BackColor = Color.LightGreen
  1378. ElseIf ComboBox59.SelectedIndex = 7 Then : ComboBox19.BackColor = Color.LightPink
  1379. ElseIf ComboBox59.SelectedIndex = 8 Then : ComboBox19.BackColor = Color.LightSalmon
  1380. ElseIf ComboBox59.SelectedIndex = 9 Then : ComboBox19.BackColor = Color.Gray
  1381. End If
  1382. End Sub
  1383. Private Sub ComboBox60_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox60.SelectedIndexChanged
  1384. If ComboBox60.SelectedIndex = 0 Then : ComboBox20.BackColor = Color.LawnGreen
  1385. ElseIf ComboBox60.SelectedIndex = 1 Then : ComboBox20.BackColor = Color.LightBlue
  1386. ElseIf ComboBox60.SelectedIndex = 2 Then : ComboBox20.BackColor = Color.LightCoral
  1387. ElseIf ComboBox60.SelectedIndex = 3 Then : ComboBox20.BackColor = Color.LightCyan
  1388. ElseIf ComboBox60.SelectedIndex = 4 Then : ComboBox20.BackColor = Color.LightGoldenrodYellow
  1389. ElseIf ComboBox60.SelectedIndex = 5 Then : ComboBox20.BackColor = Color.LightGray
  1390. ElseIf ComboBox60.SelectedIndex = 6 Then : ComboBox20.BackColor = Color.LightGreen
  1391. ElseIf ComboBox60.SelectedIndex = 7 Then : ComboBox20.BackColor = Color.LightPink
  1392. ElseIf ComboBox60.SelectedIndex = 8 Then : ComboBox20.BackColor = Color.LightSalmon
  1393. ElseIf ComboBox60.SelectedIndex = 9 Then : ComboBox20.BackColor = Color.Gray
  1394. End If
  1395. End Sub
  1396. Private Sub ComboBox61_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox61.SelectedIndexChanged
  1397. If ComboBox61.SelectedIndex = 0 Then : ComboBox21.BackColor = Color.LawnGreen
  1398. ElseIf ComboBox61.SelectedIndex = 1 Then : ComboBox21.BackColor = Color.LightBlue
  1399. ElseIf ComboBox61.SelectedIndex = 2 Then : ComboBox21.BackColor = Color.LightCoral
  1400. ElseIf ComboBox61.SelectedIndex = 3 Then : ComboBox21.BackColor = Color.LightCyan
  1401. ElseIf ComboBox61.SelectedIndex = 4 Then : ComboBox21.BackColor = Color.LightGoldenrodYellow
  1402. ElseIf ComboBox61.SelectedIndex = 5 Then : ComboBox21.BackColor = Color.LightGray
  1403. ElseIf ComboBox61.SelectedIndex = 6 Then : ComboBox21.BackColor = Color.LightGreen
  1404. ElseIf ComboBox61.SelectedIndex = 7 Then : ComboBox21.BackColor = Color.LightPink
  1405. ElseIf ComboBox61.SelectedIndex = 8 Then : ComboBox21.BackColor = Color.LightSalmon
  1406. ElseIf ComboBox61.SelectedIndex = 9 Then : ComboBox21.BackColor = Color.Gray
  1407. End If
  1408. End Sub
  1409. Private Sub ComboBox62_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox62.SelectedIndexChanged
  1410. If ComboBox62.SelectedIndex = 0 Then : ComboBox22.BackColor = Color.LawnGreen
  1411. ElseIf ComboBox62.SelectedIndex = 1 Then : ComboBox22.BackColor = Color.LightBlue
  1412. ElseIf ComboBox62.SelectedIndex = 2 Then : ComboBox22.BackColor = Color.LightCoral
  1413. ElseIf ComboBox62.SelectedIndex = 3 Then : ComboBox22.BackColor = Color.LightCyan
  1414. ElseIf ComboBox62.SelectedIndex = 4 Then : ComboBox22.BackColor = Color.LightGoldenrodYellow
  1415. ElseIf ComboBox62.SelectedIndex = 5 Then : ComboBox22.BackColor = Color.LightGray
  1416. ElseIf ComboBox62.SelectedIndex = 6 Then : ComboBox22.BackColor = Color.LightGreen
  1417. ElseIf ComboBox62.SelectedIndex = 7 Then : ComboBox22.BackColor = Color.LightPink
  1418. ElseIf ComboBox62.SelectedIndex = 8 Then : ComboBox22.BackColor = Color.LightSalmon
  1419. ElseIf ComboBox62.SelectedIndex = 9 Then : ComboBox22.BackColor = Color.Gray
  1420. End If
  1421. End Sub
  1422. Private Sub ComboBox63_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox63.SelectedIndexChanged
  1423. If ComboBox63.SelectedIndex = 0 Then : ComboBox23.BackColor = Color.LawnGreen
  1424. ElseIf ComboBox63.SelectedIndex = 1 Then : ComboBox23.BackColor = Color.LightBlue
  1425. ElseIf ComboBox63.SelectedIndex = 2 Then : ComboBox23.BackColor = Color.LightCoral
  1426. ElseIf ComboBox63.SelectedIndex = 3 Then : ComboBox23.BackColor = Color.LightCyan
  1427. ElseIf ComboBox63.SelectedIndex = 4 Then : ComboBox23.BackColor = Color.LightGoldenrodYellow
  1428. ElseIf ComboBox63.SelectedIndex = 5 Then : ComboBox23.BackColor = Color.LightGray
  1429. ElseIf ComboBox63.SelectedIndex = 6 Then : ComboBox23.BackColor = Color.LightGreen
  1430. ElseIf ComboBox63.SelectedIndex = 7 Then : ComboBox23.BackColor = Color.LightPink
  1431. ElseIf ComboBox63.SelectedIndex = 8 Then : ComboBox23.BackColor = Color.LightSalmon
  1432. ElseIf ComboBox63.SelectedIndex = 9 Then : ComboBox23.BackColor = Color.Gray
  1433. End If
  1434. End Sub
  1435. Private Sub ComboBox64_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox64.SelectedIndexChanged
  1436. If ComboBox64.SelectedIndex = 0 Then : ComboBox24.BackColor = Color.LawnGreen
  1437. ElseIf ComboBox64.SelectedIndex = 1 Then : ComboBox24.BackColor = Color.LightBlue
  1438. ElseIf ComboBox64.SelectedIndex = 2 Then : ComboBox24.BackColor = Color.LightCoral
  1439. ElseIf ComboBox64.SelectedIndex = 3 Then : ComboBox24.BackColor = Color.LightCyan
  1440. ElseIf ComboBox64.SelectedIndex = 4 Then : ComboBox24.BackColor = Color.LightGoldenrodYellow
  1441. ElseIf ComboBox64.SelectedIndex = 5 Then : ComboBox24.BackColor = Color.LightGray
  1442. ElseIf ComboBox64.SelectedIndex = 6 Then : ComboBox24.BackColor = Color.LightGreen
  1443. ElseIf ComboBox64.SelectedIndex = 7 Then : ComboBox24.BackColor = Color.LightPink
  1444. ElseIf ComboBox64.SelectedIndex = 8 Then : ComboBox24.BackColor = Color.LightSalmon
  1445. ElseIf ComboBox64.SelectedIndex = 9 Then : ComboBox24.BackColor = Color.Gray
  1446. End If
  1447. End Sub
  1448. Private Sub ComboBox65_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox65.SelectedIndexChanged
  1449. If ComboBox65.SelectedIndex = 0 Then : ComboBox25.BackColor = Color.LawnGreen
  1450. ElseIf ComboBox65.SelectedIndex = 1 Then : ComboBox25.BackColor = Color.LightBlue
  1451. ElseIf ComboBox65.SelectedIndex = 2 Then : ComboBox25.BackColor = Color.LightCoral
  1452. ElseIf ComboBox65.SelectedIndex = 3 Then : ComboBox25.BackColor = Color.LightCyan
  1453. ElseIf ComboBox65.SelectedIndex = 4 Then : ComboBox25.BackColor = Color.LightGoldenrodYellow
  1454. ElseIf ComboBox65.SelectedIndex = 5 Then : ComboBox25.BackColor = Color.LightGray
  1455. ElseIf ComboBox65.SelectedIndex = 6 Then : ComboBox25.BackColor = Color.LightGreen
  1456. ElseIf ComboBox65.SelectedIndex = 7 Then : ComboBox25.BackColor = Color.LightPink
  1457. ElseIf ComboBox65.SelectedIndex = 8 Then : ComboBox25.BackColor = Color.LightSalmon
  1458. ElseIf ComboBox65.SelectedIndex = 9 Then : ComboBox25.BackColor = Color.Gray
  1459. End If
  1460. End Sub
  1461. Private Sub ComboBox66_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox66.SelectedIndexChanged
  1462. If ComboBox66.SelectedIndex = 0 Then : ComboBox26.BackColor = Color.LawnGreen
  1463. ElseIf ComboBox66.SelectedIndex = 1 Then : ComboBox26.BackColor = Color.LightBlue
  1464. ElseIf ComboBox66.SelectedIndex = 2 Then : ComboBox26.BackColor = Color.LightCoral
  1465. ElseIf ComboBox66.SelectedIndex = 3 Then : ComboBox26.BackColor = Color.LightCyan
  1466. ElseIf ComboBox66.SelectedIndex = 4 Then : ComboBox26.BackColor = Color.LightGoldenrodYellow
  1467. ElseIf ComboBox66.SelectedIndex = 5 Then : ComboBox26.BackColor = Color.LightGray
  1468. ElseIf ComboBox66.SelectedIndex = 6 Then : ComboBox26.BackColor = Color.LightGreen
  1469. ElseIf ComboBox66.SelectedIndex = 7 Then : ComboBox26.BackColor = Color.LightPink
  1470. ElseIf ComboBox66.SelectedIndex = 8 Then : ComboBox26.BackColor = Color.LightSalmon
  1471. ElseIf ComboBox66.SelectedIndex = 9 Then : ComboBox26.BackColor = Color.Gray
  1472. End If
  1473. End Sub
  1474. Private Sub ComboBox67_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox67.SelectedIndexChanged
  1475. If ComboBox67.SelectedIndex = 0 Then : ComboBox27.BackColor = Color.LawnGreen
  1476. ElseIf ComboBox67.SelectedIndex = 1 Then : ComboBox27.BackColor = Color.LightBlue
  1477. ElseIf ComboBox67.SelectedIndex = 2 Then : ComboBox27.BackColor = Color.LightCoral
  1478. ElseIf ComboBox67.SelectedIndex = 3 Then : ComboBox27.BackColor = Color.LightCyan
  1479. ElseIf ComboBox67.SelectedIndex = 4 Then : ComboBox27.BackColor = Color.LightGoldenrodYellow
  1480. ElseIf ComboBox67.SelectedIndex = 5 Then : ComboBox27.BackColor = Color.LightGray
  1481. ElseIf ComboBox67.SelectedIndex = 6 Then : ComboBox27.BackColor = Color.LightGreen
  1482. ElseIf ComboBox67.SelectedIndex = 7 Then : ComboBox27.BackColor = Color.LightPink
  1483. ElseIf ComboBox67.SelectedIndex = 8 Then : ComboBox27.BackColor = Color.LightSalmon
  1484. ElseIf ComboBox67.SelectedIndex = 9 Then : ComboBox27.BackColor = Color.Gray
  1485. End If
  1486. End Sub
  1487. Private Sub ComboBox68_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox68.SelectedIndexChanged
  1488. If ComboBox68.SelectedIndex = 0 Then : ComboBox28.BackColor = Color.LawnGreen
  1489. ElseIf ComboBox68.SelectedIndex = 1 Then : ComboBox28.BackColor = Color.LightBlue
  1490. ElseIf ComboBox68.SelectedIndex = 2 Then : ComboBox28.BackColor = Color.LightCoral
  1491. ElseIf ComboBox68.SelectedIndex = 3 Then : ComboBox28.BackColor = Color.LightCyan
  1492. ElseIf ComboBox68.SelectedIndex = 4 Then : ComboBox28.BackColor = Color.LightGoldenrodYellow
  1493. ElseIf ComboBox68.SelectedIndex = 5 Then : ComboBox28.BackColor = Color.LightGray
  1494. ElseIf ComboBox68.SelectedIndex = 6 Then : ComboBox28.BackColor = Color.LightGreen
  1495. ElseIf ComboBox68.SelectedIndex = 7 Then : ComboBox28.BackColor = Color.LightPink
  1496. ElseIf ComboBox68.SelectedIndex = 8 Then : ComboBox28.BackColor = Color.LightSalmon
  1497. ElseIf ComboBox68.SelectedIndex = 9 Then : ComboBox28.BackColor = Color.Gray
  1498. End If
  1499. End Sub
  1500. Private Sub ComboBox69_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox69.SelectedIndexChanged
  1501. If ComboBox69.SelectedIndex = 0 Then : ComboBox29.BackColor = Color.LawnGreen
  1502. ElseIf ComboBox69.SelectedIndex = 1 Then : ComboBox29.BackColor = Color.LightBlue
  1503. ElseIf ComboBox69.SelectedIndex = 2 Then : ComboBox29.BackColor = Color.LightCoral
  1504. ElseIf ComboBox69.SelectedIndex = 3 Then : ComboBox29.BackColor = Color.LightCyan
  1505. ElseIf ComboBox69.SelectedIndex = 4 Then : ComboBox29.BackColor = Color.LightGoldenrodYellow
  1506. ElseIf ComboBox69.SelectedIndex = 5 Then : ComboBox29.BackColor = Color.LightGray
  1507. ElseIf ComboBox69.SelectedIndex = 6 Then : ComboBox29.BackColor = Color.LightGreen
  1508. ElseIf ComboBox69.SelectedIndex = 7 Then : ComboBox29.BackColor = Color.LightPink
  1509. ElseIf ComboBox69.SelectedIndex = 8 Then : ComboBox29.BackColor = Color.LightSalmon
  1510. ElseIf ComboBox69.SelectedIndex = 9 Then : ComboBox29.BackColor = Color.Gray
  1511. End If
  1512. End Sub
  1513. Private Sub ComboBox70_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox70.SelectedIndexChanged
  1514. If ComboBox70.SelectedIndex = 0 Then : ComboBox30.BackColor = Color.LawnGreen
  1515. ElseIf ComboBox70.SelectedIndex = 1 Then : ComboBox30.BackColor = Color.LightBlue
  1516. ElseIf ComboBox70.SelectedIndex = 2 Then : ComboBox30.BackColor = Color.LightCoral
  1517. ElseIf ComboBox70.SelectedIndex = 3 Then : ComboBox30.BackColor = Color.LightCyan
  1518. ElseIf ComboBox70.SelectedIndex = 4 Then : ComboBox30.BackColor = Color.LightGoldenrodYellow
  1519. ElseIf ComboBox70.SelectedIndex = 5 Then : ComboBox30.BackColor = Color.LightGray
  1520. ElseIf ComboBox70.SelectedIndex = 6 Then : ComboBox30.BackColor = Color.LightGreen
  1521. ElseIf ComboBox70.SelectedIndex = 7 Then : ComboBox30.BackColor = Color.LightPink
  1522. ElseIf ComboBox70.SelectedIndex = 8 Then : ComboBox30.BackColor = Color.LightSalmon
  1523. ElseIf ComboBox70.SelectedIndex = 9 Then : ComboBox30.BackColor = Color.Gray
  1524. End If
  1525. End Sub
  1526. Private Sub ComboBox71_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox71.SelectedIndexChanged
  1527. If ComboBox71.SelectedIndex = 0 Then : ComboBox31.BackColor = Color.LawnGreen
  1528. ElseIf ComboBox71.SelectedIndex = 1 Then : ComboBox31.BackColor = Color.LightBlue
  1529. ElseIf ComboBox71.SelectedIndex = 2 Then : ComboBox31.BackColor = Color.LightCoral
  1530. ElseIf ComboBox71.SelectedIndex = 3 Then : ComboBox31.BackColor = Color.LightCyan
  1531. ElseIf ComboBox71.SelectedIndex = 4 Then : ComboBox31.BackColor = Color.LightGoldenrodYellow
  1532. ElseIf ComboBox71.SelectedIndex = 5 Then : ComboBox31.BackColor = Color.LightGray
  1533. ElseIf ComboBox71.SelectedIndex = 6 Then : ComboBox31.BackColor = Color.LightGreen
  1534. ElseIf ComboBox71.SelectedIndex = 7 Then : ComboBox31.BackColor = Color.LightPink
  1535. ElseIf ComboBox71.SelectedIndex = 8 Then : ComboBox31.BackColor = Color.LightSalmon
  1536. ElseIf ComboBox71.SelectedIndex = 9 Then : ComboBox31.BackColor = Color.Gray
  1537. End If
  1538. End Sub
  1539. Private Sub ComboBox72_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox72.SelectedIndexChanged
  1540. If ComboBox72.SelectedIndex = 0 Then : ComboBox32.BackColor = Color.LawnGreen
  1541. ElseIf ComboBox72.SelectedIndex = 1 Then : ComboBox32.BackColor = Color.LightBlue
  1542. ElseIf ComboBox72.SelectedIndex = 2 Then : ComboBox32.BackColor = Color.LightCoral
  1543. ElseIf ComboBox72.SelectedIndex = 3 Then : ComboBox32.BackColor = Color.LightCyan
  1544. ElseIf ComboBox72.SelectedIndex = 4 Then : ComboBox32.BackColor = Color.LightGoldenrodYellow
  1545. ElseIf ComboBox72.SelectedIndex = 5 Then : ComboBox32.BackColor = Color.LightGray
  1546. ElseIf ComboBox72.SelectedIndex = 6 Then : ComboBox32.BackColor = Color.LightGreen
  1547. ElseIf ComboBox72.SelectedIndex = 7 Then : ComboBox32.BackColor = Color.LightPink
  1548. ElseIf ComboBox72.SelectedIndex = 8 Then : ComboBox32.BackColor = Color.LightSalmon
  1549. ElseIf ComboBox72.SelectedIndex = 9 Then : ComboBox32.BackColor = Color.Gray
  1550. End If
  1551. End Sub
  1552. Private Sub ComboBox73_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox73.SelectedIndexChanged
  1553. If ComboBox73.SelectedIndex = 0 Then : ComboBox33.BackColor = Color.LawnGreen
  1554. ElseIf ComboBox73.SelectedIndex = 1 Then : ComboBox33.BackColor = Color.LightBlue
  1555. ElseIf ComboBox73.SelectedIndex = 2 Then : ComboBox33.BackColor = Color.LightCoral
  1556. ElseIf ComboBox73.SelectedIndex = 3 Then : ComboBox33.BackColor = Color.LightCyan
  1557. ElseIf ComboBox73.SelectedIndex = 4 Then : ComboBox33.BackColor = Color.LightGoldenrodYellow
  1558. ElseIf ComboBox73.SelectedIndex = 5 Then : ComboBox33.BackColor = Color.LightGray
  1559. ElseIf ComboBox73.SelectedIndex = 6 Then : ComboBox33.BackColor = Color.LightGreen
  1560. ElseIf ComboBox73.SelectedIndex = 7 Then : ComboBox33.BackColor = Color.LightPink
  1561. ElseIf ComboBox73.SelectedIndex = 8 Then : ComboBox33.BackColor = Color.LightSalmon
  1562. ElseIf ComboBox73.SelectedIndex = 9 Then : ComboBox33.BackColor = Color.Gray
  1563. End If
  1564. End Sub
  1565. Private Sub ComboBox74_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox74.SelectedIndexChanged
  1566. If ComboBox74.SelectedIndex = 0 Then : ComboBox34.BackColor = Color.LawnGreen
  1567. ElseIf ComboBox74.SelectedIndex = 1 Then : ComboBox34.BackColor = Color.LightBlue
  1568. ElseIf ComboBox74.SelectedIndex = 2 Then : ComboBox34.BackColor = Color.LightCoral
  1569. ElseIf ComboBox74.SelectedIndex = 3 Then : ComboBox34.BackColor = Color.LightCyan
  1570. ElseIf ComboBox74.SelectedIndex = 4 Then : ComboBox34.BackColor = Color.LightGoldenrodYellow
  1571. ElseIf ComboBox74.SelectedIndex = 5 Then : ComboBox34.BackColor = Color.LightGray
  1572. ElseIf ComboBox74.SelectedIndex = 6 Then : ComboBox34.BackColor = Color.LightGreen
  1573. ElseIf ComboBox74.SelectedIndex = 7 Then : ComboBox34.BackColor = Color.LightPink
  1574. ElseIf ComboBox74.SelectedIndex = 8 Then : ComboBox34.BackColor = Color.LightSalmon
  1575. ElseIf ComboBox74.SelectedIndex = 9 Then : ComboBox34.BackColor = Color.Gray
  1576. End If
  1577. End Sub
  1578. Private Sub ComboBox75_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox75.SelectedIndexChanged
  1579. If ComboBox75.SelectedIndex = 0 Then : ComboBox35.BackColor = Color.LawnGreen
  1580. ElseIf ComboBox75.SelectedIndex = 1 Then : ComboBox35.BackColor = Color.LightBlue
  1581. ElseIf ComboBox75.SelectedIndex = 2 Then : ComboBox35.BackColor = Color.LightCoral
  1582. ElseIf ComboBox75.SelectedIndex = 3 Then : ComboBox35.BackColor = Color.LightCyan
  1583. ElseIf ComboBox75.SelectedIndex = 4 Then : ComboBox35.BackColor = Color.LightGoldenrodYellow
  1584. ElseIf ComboBox75.SelectedIndex = 5 Then : ComboBox35.BackColor = Color.LightGray
  1585. ElseIf ComboBox75.SelectedIndex = 6 Then : ComboBox35.BackColor = Color.LightGreen
  1586. ElseIf ComboBox75.SelectedIndex = 7 Then : ComboBox35.BackColor = Color.LightPink
  1587. ElseIf ComboBox75.SelectedIndex = 8 Then : ComboBox35.BackColor = Color.LightSalmon
  1588. ElseIf ComboBox75.SelectedIndex = 9 Then : ComboBox35.BackColor = Color.Gray
  1589. End If
  1590. End Sub
  1591. Private Sub ComboBox76_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox76.SelectedIndexChanged
  1592. If ComboBox76.SelectedIndex = 0 Then : ComboBox36.BackColor = Color.LawnGreen
  1593. ElseIf ComboBox76.SelectedIndex = 1 Then : ComboBox36.BackColor = Color.LightBlue
  1594. ElseIf ComboBox76.SelectedIndex = 2 Then : ComboBox36.BackColor = Color.LightCoral
  1595. ElseIf ComboBox76.SelectedIndex = 3 Then : ComboBox36.BackColor = Color.LightCyan
  1596. ElseIf ComboBox76.SelectedIndex = 4 Then : ComboBox36.BackColor = Color.LightGoldenrodYellow
  1597. ElseIf ComboBox76.SelectedIndex = 5 Then : ComboBox36.BackColor = Color.LightGray
  1598. ElseIf ComboBox76.SelectedIndex = 6 Then : ComboBox36.BackColor = Color.LightGreen
  1599. ElseIf ComboBox76.SelectedIndex = 7 Then : ComboBox36.BackColor = Color.LightPink
  1600. ElseIf ComboBox76.SelectedIndex = 8 Then : ComboBox36.BackColor = Color.LightSalmon
  1601. ElseIf ComboBox76.SelectedIndex = 9 Then : ComboBox36.BackColor = Color.Gray
  1602. End If
  1603. End Sub
  1604. Private Sub ComboBox77_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox77.SelectedIndexChanged
  1605. If ComboBox77.SelectedIndex = 0 Then : ComboBox37.BackColor = Color.LawnGreen
  1606. ElseIf ComboBox77.SelectedIndex = 1 Then : ComboBox37.BackColor = Color.LightBlue
  1607. ElseIf ComboBox77.SelectedIndex = 2 Then : ComboBox37.BackColor = Color.LightCoral
  1608. ElseIf ComboBox77.SelectedIndex = 3 Then : ComboBox37.BackColor = Color.LightCyan
  1609. ElseIf ComboBox77.SelectedIndex = 4 Then : ComboBox37.BackColor = Color.LightGoldenrodYellow
  1610. ElseIf ComboBox77.SelectedIndex = 5 Then : ComboBox37.BackColor = Color.LightGray
  1611. ElseIf ComboBox77.SelectedIndex = 6 Then : ComboBox37.BackColor = Color.LightGreen
  1612. ElseIf ComboBox77.SelectedIndex = 7 Then : ComboBox37.BackColor = Color.LightPink
  1613. ElseIf ComboBox77.SelectedIndex = 8 Then : ComboBox37.BackColor = Color.LightSalmon
  1614. ElseIf ComboBox77.SelectedIndex = 9 Then : ComboBox37.BackColor = Color.Gray
  1615. End If
  1616. End Sub
  1617. Private Sub ComboBox78_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox78.SelectedIndexChanged
  1618. If ComboBox78.SelectedIndex = 0 Then : ComboBox38.BackColor = Color.LawnGreen
  1619. ElseIf ComboBox78.SelectedIndex = 1 Then : ComboBox38.BackColor = Color.LightBlue
  1620. ElseIf ComboBox78.SelectedIndex = 2 Then : ComboBox38.BackColor = Color.LightCoral
  1621. ElseIf ComboBox78.SelectedIndex = 3 Then : ComboBox38.BackColor = Color.LightCyan
  1622. ElseIf ComboBox78.SelectedIndex = 4 Then : ComboBox38.BackColor = Color.LightGoldenrodYellow
  1623. ElseIf ComboBox78.SelectedIndex = 5 Then : ComboBox38.BackColor = Color.LightGray
  1624. ElseIf ComboBox78.SelectedIndex = 6 Then : ComboBox38.BackColor = Color.LightGreen
  1625. ElseIf ComboBox78.SelectedIndex = 7 Then : ComboBox38.BackColor = Color.LightPink
  1626. ElseIf ComboBox78.SelectedIndex = 8 Then : ComboBox38.BackColor = Color.LightSalmon
  1627. ElseIf ComboBox78.SelectedIndex = 9 Then : ComboBox38.BackColor = Color.Gray
  1628. End If
  1629. End Sub
  1630. Private Sub ComboBox79_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox79.SelectedIndexChanged
  1631. If ComboBox79.SelectedIndex = 0 Then : ComboBox39.BackColor = Color.LawnGreen
  1632. ElseIf ComboBox79.SelectedIndex = 1 Then : ComboBox39.BackColor = Color.LightBlue
  1633. ElseIf ComboBox79.SelectedIndex = 2 Then : ComboBox39.BackColor = Color.LightCoral
  1634. ElseIf ComboBox79.SelectedIndex = 3 Then : ComboBox39.BackColor = Color.LightCyan
  1635. ElseIf ComboBox79.SelectedIndex = 4 Then : ComboBox39.BackColor = Color.LightGoldenrodYellow
  1636. ElseIf ComboBox79.SelectedIndex = 5 Then : ComboBox39.BackColor = Color.LightGray
  1637. ElseIf ComboBox79.SelectedIndex = 6 Then : ComboBox39.BackColor = Color.LightGreen
  1638. ElseIf ComboBox79.SelectedIndex = 7 Then : ComboBox39.BackColor = Color.LightPink
  1639. ElseIf ComboBox79.SelectedIndex = 8 Then : ComboBox39.BackColor = Color.LightSalmon
  1640. ElseIf ComboBox79.SelectedIndex = 9 Then : ComboBox39.BackColor = Color.Gray
  1641. End If
  1642. End Sub
  1643. Private Sub ComboBox80_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox80.SelectedIndexChanged
  1644. If ComboBox80.SelectedIndex = 0 Then : ComboBox40.BackColor = Color.LawnGreen
  1645. ElseIf ComboBox80.SelectedIndex = 1 Then : ComboBox40.BackColor = Color.LightBlue
  1646. ElseIf ComboBox80.SelectedIndex = 2 Then : ComboBox40.BackColor = Color.LightCoral
  1647. ElseIf ComboBox80.SelectedIndex = 3 Then : ComboBox40.BackColor = Color.LightCyan
  1648. ElseIf ComboBox80.SelectedIndex = 4 Then : ComboBox40.BackColor = Color.LightGoldenrodYellow
  1649. ElseIf ComboBox80.SelectedIndex = 5 Then : ComboBox40.BackColor = Color.LightGray
  1650. ElseIf ComboBox80.SelectedIndex = 6 Then : ComboBox40.BackColor = Color.LightGreen
  1651. ElseIf ComboBox80.SelectedIndex = 7 Then : ComboBox40.BackColor = Color.LightPink
  1652. ElseIf ComboBox80.SelectedIndex = 8 Then : ComboBox40.BackColor = Color.LightSalmon
  1653. ElseIf ComboBox80.SelectedIndex = 9 Then : ComboBox40.BackColor = Color.Gray
  1654. End If
  1655. End Sub
  1656. Private Sub 鎖定_bt_Click(sender As Object, e As EventArgs) Handles 鎖定_bt.Click
  1657. PA = 年_lb.Text & "/" & 月_lb.Text & "/" & 日_lb.Text : SQL_排班簽核() : MsgBox("簽核完畢!!!")
  1658. 鎖定_bt.Enabled = False
  1659. 班表鎖定變化()
  1660. End Sub
  1661. Private Sub 解鎖_ch_CheckedChanged(sender As Object, e As EventArgs) Handles 解鎖_ch.Click
  1662. If 解鎖_ch.Checked = True Then
  1663. PA = InputBox("修改已鎖定班表請輸入密碼!!")
  1664. If PA = "753582" Then
  1665. 解鎖_ch.Checked = True
  1666. 鎖定_bt.Enabled = True
  1667. 班表鎖定變化()
  1668. Else
  1669. MsgBox("密碼錯誤!!")
  1670. 解鎖_ch.Checked = False
  1671. 鎖定_bt.Enabled = False
  1672. 班表鎖定變化()
  1673. End If
  1674. ElseIf 解鎖_ch.Checked = False Then
  1675. 解鎖_ch.Checked = False
  1676. 鎖定_bt.Enabled = False
  1677. 班表鎖定變化()
  1678. End If
  1679. End Sub
  1680. Private Sub ComboBox40_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox40.TextChanged
  1681. If ComboBox40.Text = "" Then : ComboBox40.DropDownStyle = 1 : Else : ComboBox40.DropDownStyle = 0 : End If
  1682. End Sub
  1683. Private Sub 存檔_bt_Click(sender As Object, e As EventArgs) Handles 存檔_bt.Click
  1684. PA = 年_lb.Text & "/" & 月_lb.Text & "/" & 日_lb.Text
  1685. SQL_排班明細_判斷是否有資料()
  1686. If dr.Read() Then
  1687. SQL_排班明細_刪除當天()
  1688. End If
  1689. Q = 0
  1690. For no As Integer = 1 To 20
  1691. Dim 姓名_tbS As TextBox = CType(Me.Controls.Find("姓名_tb" + no.ToString(), True)(0), TextBox)
  1692. Dim 班別_cbS As ComboBox = CType(Me.Controls.Find("班別_cb" + no.ToString(), True)(0), ComboBox)
  1693. Dim A_lbS As Label = CType(Me.Controls.Find("A_lb" + no.ToString(), True)(0), Label)
  1694. Dim CheckBoxS As CheckBox = CType(Me.Controls.Find("CheckBox" + no.ToString(), True)(0), CheckBox)
  1695. Dim NumericUpDownS As NumericUpDown = CType(Me.Controls.Find("NumericUpDown" + no.ToString(), True)(0), NumericUpDown)
  1696. Dim NUPS As NumericUpDown = CType(Me.Controls.Find("NUP" + no.ToString(), True)(0), NumericUpDown)
  1697. Dim BUPS As NumericUpDown = CType(Me.Controls.Find("BUP" + no.ToString(), True)(0), NumericUpDown)
  1698. Dim ComboBoxsS1 As ComboBox = CType(Me.Controls.Find("ComboBox" + (no + 40 + Q).ToString(), True)(0), ComboBox)
  1699. Dim ComboBoxsS2 As ComboBox = CType(Me.Controls.Find("ComboBox" + (no + 40 + 1 + Q).ToString(), True)(0), ComboBox)
  1700. Dim ComboBoxs1 As ComboBox = CType(Me.Controls.Find("ComboBox" + (no + Q).ToString(), True)(0), ComboBox)
  1701. Dim ComboBoxs2 As ComboBox = CType(Me.Controls.Find("ComboBox" + (no + 1 + Q).ToString(), True)(0), ComboBox) : Q += 1
  1702. PA1 = A_lbS.Text : PA2 = 姓名_tbS.Text : PA3 = 班別_cbS.Text : BL1 = CheckBoxS.Checked : Do1 = NUPS.Value
  1703. PA5 = ComboBoxs1.Text : PA6 = ComboBoxs2.Text : PA7 = ComboBoxsS1.Text : PA8 = ComboBoxsS2.Text : PA9 = BUPS.Value
  1704. SQL_排班明細_上午上班()
  1705. If dr.Read() Then : PA4 = dr("上午上班") : End If
  1706. If CheckBoxS.Checked = False Then : Do3 = 8 : Else : Do3 = NumericUpDownS.Value : End If
  1707. Do2 = NumericUpDownS.Value
  1708. SQL_排班明細_新增當天()
  1709. Next
  1710. PA = 年_lb.Text & "/" & 月_lb.Text & "/" & 日_lb.Text : PA13 = 值日生1_bt.Text : PA14 = 值日生2_bt.Text
  1711. SQL_值日生存檔() : 解鎖_ch.Checked = False : 重新讀取() : MsgBox("存檔完成!!")
  1712. End Sub
  1713. Private Sub 複製班表_bt_Click(sender As Object, e As EventArgs) Handles 複製班表_bt.Click
  1714. Dim FF = MsgBox("確定要已該班表做模板複製到 " & Format(指定日期_dtp.Value, "yyyy/MM/dd") & " 去嗎 ?", MsgBoxStyle.OkCancel)
  1715. If FF = MsgBoxResult.Ok Then
  1716. PA = Format(指定日期_dtp.Value, "yyyy/MM/dd")
  1717. SQL_排班明細_判斷是否有資料()
  1718. If dr.Read() Then
  1719. SQL_排班明細_刪除當天()
  1720. End If
  1721. Q = 0
  1722. For no As Integer = 1 To 20
  1723. Dim 姓名_tbS As TextBox = CType(Me.Controls.Find("姓名_tb" + no.ToString(), True)(0), TextBox)
  1724. Dim 班別_cbS As ComboBox = CType(Me.Controls.Find("班別_cb" + no.ToString(), True)(0), ComboBox)
  1725. Dim A_lbS As Label = CType(Me.Controls.Find("A_lb" + no.ToString(), True)(0), Label)
  1726. Dim CheckBoxS As CheckBox = CType(Me.Controls.Find("CheckBox" + no.ToString(), True)(0), CheckBox)
  1727. Dim NumericUpDownS As NumericUpDown = CType(Me.Controls.Find("NumericUpDown" + no.ToString(), True)(0), NumericUpDown)
  1728. Dim NUPS As NumericUpDown = CType(Me.Controls.Find("NUP" + no.ToString(), True)(0), NumericUpDown)
  1729. Dim BUPS As NumericUpDown = CType(Me.Controls.Find("BUP" + no.ToString(), True)(0), NumericUpDown)
  1730. Dim ComboBoxsS1 As ComboBox = CType(Me.Controls.Find("ComboBox" + (no + 40 + Q).ToString(), True)(0), ComboBox)
  1731. Dim ComboBoxsS2 As ComboBox = CType(Me.Controls.Find("ComboBox" + (no + 40 + 1 + Q).ToString(), True)(0), ComboBox)
  1732. Dim ComboBoxs1 As ComboBox = CType(Me.Controls.Find("ComboBox" + (no + Q).ToString(), True)(0), ComboBox)
  1733. Dim ComboBoxs2 As ComboBox = CType(Me.Controls.Find("ComboBox" + (no + 1 + Q).ToString(), True)(0), ComboBox) : Q += 1
  1734. PA1 = A_lbS.Text : PA2 = 姓名_tbS.Text : PA3 = 班別_cbS.Text : BL1 = CheckBoxS.Checked : Do1 = NUPS.Value
  1735. PA5 = ComboBoxs1.Text : PA6 = ComboBoxs2.Text : PA7 = ComboBoxsS1.Text : PA8 = ComboBoxsS2.Text : PA9 = BUPS.Value
  1736. SQL_排班明細_上午上班()
  1737. If dr.Read() Then : PA4 = dr("上午上班") : End If
  1738. If CheckBoxS.Checked = False Then : Do3 = 8 : Else : Do3 = NumericUpDownS.Value : End If
  1739. Do2 = NumericUpDownS.Value
  1740. SQL_排班明細_新增當天()
  1741. Next : MsgBox("存檔完成,請切換到指定日期去查看!!")
  1742. End If
  1743. End Sub
  1744. Private Sub 人員_dgv_CellContentClick_1(sender As Object, e As DataGridViewCellEventArgs) Handles 人員_dgv.CellDoubleClick
  1745. If e.RowIndex = -1 Then : Else
  1746. PA = 人員_dgv("編號", e.RowIndex).Value.ToString : PA1 = 人員_dgv("姓名", e.RowIndex).Value.ToString
  1747. End If
  1748. For no As Integer = 1 To 20
  1749. Dim 姓名_tbS As TextBox = CType(Me.Controls.Find("姓名_tb" + no.ToString(), True)(0), TextBox)
  1750. If 姓名_tbS.Text = PA1 Then
  1751. MsgBox("該人員已在班表內,無須再新增!!") : Exit Sub
  1752. End If
  1753. Next
  1754. For no As Integer = 1 To 20
  1755. Dim 姓名_tbS As TextBox = CType(Me.Controls.Find("姓名_tb" + no.ToString(), True)(0), TextBox)
  1756. If 姓名_tbS.Text <> "" Then
  1757. Else
  1758. 姓名_tbS.Text = PA1 : Exit For
  1759. End If
  1760. Next
  1761. End Sub
  1762. End Class