暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

個人班表.vb 111KB

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