Ingen beskrivning
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.

排班明細.vb 137KB

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