Няма описание
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.

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