Geen omschrijving
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

排班明細_參考.vb 125KB

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