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

排班資料.vb 63KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820
  1. Option Strict Off
  2. Public Class 排班資料
  3. ReadOnly ds, ds1, ds2, ds3, ds4, ds5, ds6, ds7, ds8, ds9, ds10, ds11, ds12, ds13, ds14, ds15, ds16, ds17, ds18, ds19, ds20, ds21, ds22, ds23, ds24, ds25, ds26, ds27, ds28, ds29, ds30, ds31,
  4. ds32, ds33, ds34, ds35, ds36, ds37, ds38, ds39, ds40, ds41, ds42, ds43 As New DataSet
  5. Dim 星期 As String : Dim 天數, 總時數, 列高, 列高1 As Integer
  6. Dim 首次開啟 As Boolean
  7. Private Sub 年份_下拉表單資料載入()
  8. SQL_考勤明細表_年份_下拉()
  9. 年份_cb.Items.Clear()
  10. While (dr.Read()) : 年份_cb.Items.Add(dr("年份")) : End While
  11. conn.Close()
  12. End Sub
  13. Private Sub 讀取排班()
  14. 人員彙總_dgv.DataSource = Nothing : ds43.Clear()
  15. 人員彙總_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  16. 人員彙總_dgv.ColumnHeadersHeight = 40 : 人員彙總_dgv.AllowUserToAddRows = False
  17. SQL_排班系統_人員排班()
  18. da.Fill(ds43) : 人員彙總_dgv.DataSource = ds43.Tables(0) : conn.Close()
  19. 人員彙總_dgv.Columns(0).ReadOnly = True : 人員彙總_dgv.Columns(1).ReadOnly = True : 人員彙總_dgv.Columns(2).ReadOnly = True
  20. 人員彙總_dgv.Columns(3).ReadOnly = True : 人員彙總_dgv.Columns(4).ReadOnly = True
  21. 人員彙總_dgv.Columns(3).DefaultCellStyle.Format = "#,##0.0"
  22. 人員彙總_dgv.Columns(4).DefaultCellStyle.Format = "#,##0.0"
  23. End Sub
  24. Private Sub 讀取日期()
  25. 日期_dgv.DataSource = Nothing : ds.Clear()
  26. 日期_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  27. 日期_dgv.ColumnHeadersHeight = 25 : 日期_dgv.AllowUserToAddRows = False
  28. SQL_排班系統_月份()
  29. da.Fill(ds) : 日期_dgv.DataSource = ds.Tables(0) : conn.Close()
  30. End Sub
  31. Private Sub 讀取班別1()
  32. DataGridView1.DataSource = Nothing : ds1.Clear()
  33. DataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  34. DataGridView1.ColumnHeadersHeight = 列高1 : DataGridView1.AllowUserToAddRows = False : DataGridView1.RowTemplate.Height = 列高
  35. SQL_排班系統_當天排班()
  36. da.Fill(ds1) : DataGridView1.DataSource = ds1.Tables(0) : conn.Close()
  37. End Sub
  38. Private Sub 讀取班別2()
  39. DataGridView2.DataSource = Nothing : ds2.Clear()
  40. DataGridView2.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  41. DataGridView2.ColumnHeadersHeight = 列高1 : DataGridView2.AllowUserToAddRows = False : DataGridView2.RowTemplate.Height = 列高
  42. SQL_排班系統_當天排班()
  43. da.Fill(ds2) : DataGridView2.DataSource = ds2.Tables(0) : conn.Close()
  44. End Sub
  45. Private Sub 讀取班別3()
  46. DataGridView3.DataSource = Nothing : ds3.Clear()
  47. DataGridView3.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  48. DataGridView3.ColumnHeadersHeight = 列高1 : DataGridView3.AllowUserToAddRows = False : DataGridView3.RowTemplate.Height = 列高
  49. SQL_排班系統_當天排班()
  50. da.Fill(ds3) : DataGridView3.DataSource = ds3.Tables(0) : conn.Close()
  51. End Sub
  52. Private Sub 讀取班別4()
  53. DataGridView4.DataSource = Nothing : ds4.Clear()
  54. DataGridView4.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  55. DataGridView4.ColumnHeadersHeight = 列高1 : DataGridView4.AllowUserToAddRows = False : DataGridView4.RowTemplate.Height = 列高
  56. SQL_排班系統_當天排班()
  57. da.Fill(ds4) : DataGridView4.DataSource = ds4.Tables(0) : conn.Close()
  58. End Sub
  59. Private Sub 讀取班別5()
  60. DataGridView5.DataSource = Nothing : ds5.Clear()
  61. DataGridView5.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  62. DataGridView5.ColumnHeadersHeight = 列高1 : DataGridView5.AllowUserToAddRows = False : DataGridView5.RowTemplate.Height = 列高
  63. SQL_排班系統_當天排班()
  64. da.Fill(ds5) : DataGridView5.DataSource = ds5.Tables(0) : conn.Close()
  65. End Sub
  66. Private Sub 讀取班別6()
  67. DataGridView6.DataSource = Nothing : ds6.Clear()
  68. DataGridView6.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  69. DataGridView6.ColumnHeadersHeight = 列高1 : DataGridView6.AllowUserToAddRows = False : DataGridView6.RowTemplate.Height = 列高
  70. SQL_排班系統_當天排班()
  71. da.Fill(ds6) : DataGridView6.DataSource = ds6.Tables(0) : conn.Close()
  72. End Sub
  73. Private Sub 讀取班別7()
  74. DataGridView7.DataSource = Nothing : ds7.Clear()
  75. DataGridView7.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  76. DataGridView7.ColumnHeadersHeight = 列高1 : DataGridView7.AllowUserToAddRows = False : DataGridView7.RowTemplate.Height = 列高
  77. SQL_排班系統_當天排班()
  78. da.Fill(ds7) : DataGridView7.DataSource = ds7.Tables(0) : conn.Close()
  79. End Sub
  80. Private Sub 讀取班別8()
  81. DataGridView8.DataSource = Nothing : ds8.Clear()
  82. DataGridView8.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  83. DataGridView8.ColumnHeadersHeight = 列高1 : DataGridView8.AllowUserToAddRows = False : DataGridView8.RowTemplate.Height = 列高
  84. SQL_排班系統_當天排班()
  85. da.Fill(ds8) : DataGridView8.DataSource = ds8.Tables(0) : conn.Close()
  86. End Sub
  87. Private Sub 讀取班別9()
  88. DataGridView9.DataSource = Nothing : ds9.Clear()
  89. DataGridView9.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  90. DataGridView9.ColumnHeadersHeight = 列高1 : DataGridView9.AllowUserToAddRows = False : DataGridView9.RowTemplate.Height = 列高
  91. SQL_排班系統_當天排班()
  92. da.Fill(ds9) : DataGridView9.DataSource = ds9.Tables(0) : conn.Close()
  93. End Sub
  94. Private Sub 讀取班別10()
  95. DataGridView10.DataSource = Nothing : ds10.Clear()
  96. DataGridView10.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  97. DataGridView10.ColumnHeadersHeight = 列高1 : DataGridView10.AllowUserToAddRows = False : DataGridView10.RowTemplate.Height = 列高
  98. SQL_排班系統_當天排班()
  99. da.Fill(ds10) : DataGridView10.DataSource = ds10.Tables(0) : conn.Close()
  100. End Sub
  101. Private Sub 讀取班別11()
  102. DataGridView11.DataSource = Nothing : ds11.Clear()
  103. DataGridView11.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  104. DataGridView11.ColumnHeadersHeight = 列高1 : DataGridView11.AllowUserToAddRows = False : DataGridView11.RowTemplate.Height = 列高
  105. SQL_排班系統_當天排班()
  106. da.Fill(ds11) : DataGridView11.DataSource = ds11.Tables(0) : conn.Close()
  107. End Sub
  108. Private Sub 讀取班別12()
  109. DataGridView12.DataSource = Nothing : ds12.Clear()
  110. DataGridView12.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  111. DataGridView12.ColumnHeadersHeight = 列高1 : DataGridView12.AllowUserToAddRows = False : DataGridView12.RowTemplate.Height = 列高
  112. SQL_排班系統_當天排班()
  113. da.Fill(ds12) : DataGridView12.DataSource = ds12.Tables(0) : conn.Close()
  114. End Sub
  115. Private Sub 讀取班別13()
  116. DataGridView13.DataSource = Nothing : ds13.Clear()
  117. DataGridView13.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  118. DataGridView13.ColumnHeadersHeight = 列高1 : DataGridView13.AllowUserToAddRows = False : DataGridView13.RowTemplate.Height = 列高
  119. SQL_排班系統_當天排班()
  120. da.Fill(ds13) : DataGridView13.DataSource = ds13.Tables(0) : conn.Close()
  121. End Sub
  122. Private Sub 讀取班別14()
  123. DataGridView14.DataSource = Nothing : ds14.Clear()
  124. DataGridView14.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  125. DataGridView14.ColumnHeadersHeight = 列高1 : DataGridView14.AllowUserToAddRows = False : DataGridView14.RowTemplate.Height = 列高
  126. SQL_排班系統_當天排班()
  127. da.Fill(ds14) : DataGridView14.DataSource = ds14.Tables(0) : conn.Close()
  128. End Sub
  129. Private Sub 讀取班別15()
  130. DataGridView15.DataSource = Nothing : ds15.Clear()
  131. DataGridView15.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  132. DataGridView15.ColumnHeadersHeight = 列高1 : DataGridView15.AllowUserToAddRows = False : DataGridView15.RowTemplate.Height = 列高
  133. SQL_排班系統_當天排班()
  134. da.Fill(ds15) : DataGridView15.DataSource = ds15.Tables(0) : conn.Close()
  135. End Sub
  136. Private Sub 讀取班別16()
  137. DataGridView16.DataSource = Nothing : ds16.Clear()
  138. DataGridView16.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  139. DataGridView16.ColumnHeadersHeight = 列高1 : DataGridView16.AllowUserToAddRows = False : DataGridView16.RowTemplate.Height = 列高
  140. SQL_排班系統_當天排班()
  141. da.Fill(ds16) : DataGridView16.DataSource = ds16.Tables(0) : conn.Close()
  142. End Sub
  143. Private Sub 讀取班別17()
  144. DataGridView17.DataSource = Nothing : ds17.Clear()
  145. DataGridView17.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  146. DataGridView17.ColumnHeadersHeight = 列高1 : DataGridView17.AllowUserToAddRows = False : DataGridView17.RowTemplate.Height = 列高
  147. SQL_排班系統_當天排班()
  148. da.Fill(ds17) : DataGridView17.DataSource = ds17.Tables(0) : conn.Close()
  149. End Sub
  150. Private Sub 讀取班別18()
  151. DataGridView18.DataSource = Nothing : ds18.Clear()
  152. DataGridView18.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  153. DataGridView18.ColumnHeadersHeight = 列高1 : DataGridView18.AllowUserToAddRows = False : DataGridView18.RowTemplate.Height = 列高
  154. SQL_排班系統_當天排班()
  155. da.Fill(ds18) : DataGridView18.DataSource = ds18.Tables(0) : conn.Close()
  156. End Sub
  157. Private Sub 讀取班別19()
  158. DataGridView19.DataSource = Nothing : ds19.Clear()
  159. DataGridView19.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  160. DataGridView19.ColumnHeadersHeight = 列高1 : DataGridView19.AllowUserToAddRows = False : DataGridView19.RowTemplate.Height = 列高
  161. SQL_排班系統_當天排班()
  162. da.Fill(ds19) : DataGridView19.DataSource = ds19.Tables(0) : conn.Close()
  163. End Sub
  164. Private Sub 讀取班別20()
  165. DataGridView20.DataSource = Nothing : ds20.Clear()
  166. DataGridView20.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  167. DataGridView20.ColumnHeadersHeight = 列高1 : DataGridView20.AllowUserToAddRows = False : DataGridView20.RowTemplate.Height = 列高
  168. SQL_排班系統_當天排班()
  169. da.Fill(ds20) : DataGridView20.DataSource = ds20.Tables(0) : conn.Close()
  170. End Sub
  171. Private Sub 讀取班別21()
  172. DataGridView21.DataSource = Nothing : ds21.Clear()
  173. DataGridView21.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  174. DataGridView21.ColumnHeadersHeight = 列高1 : DataGridView21.AllowUserToAddRows = False : DataGridView21.RowTemplate.Height = 列高
  175. SQL_排班系統_當天排班()
  176. da.Fill(ds21) : DataGridView21.DataSource = ds21.Tables(0) : conn.Close()
  177. End Sub
  178. Private Sub 讀取班別22()
  179. DataGridView22.DataSource = Nothing : ds22.Clear()
  180. DataGridView22.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  181. DataGridView22.ColumnHeadersHeight = 列高1 : DataGridView22.AllowUserToAddRows = False : DataGridView22.RowTemplate.Height = 列高
  182. SQL_排班系統_當天排班()
  183. da.Fill(ds22) : DataGridView22.DataSource = ds22.Tables(0) : conn.Close()
  184. End Sub
  185. Private Sub 讀取班別23()
  186. DataGridView23.DataSource = Nothing : ds23.Clear()
  187. DataGridView23.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  188. DataGridView23.ColumnHeadersHeight = 列高1 : DataGridView23.AllowUserToAddRows = False : DataGridView23.RowTemplate.Height = 列高
  189. SQL_排班系統_當天排班()
  190. da.Fill(ds23) : DataGridView23.DataSource = ds23.Tables(0) : conn.Close()
  191. End Sub
  192. Private Sub 讀取班別24()
  193. DataGridView24.DataSource = Nothing : ds24.Clear()
  194. DataGridView24.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  195. DataGridView24.ColumnHeadersHeight = 列高1 : DataGridView24.AllowUserToAddRows = False : DataGridView24.RowTemplate.Height = 列高
  196. SQL_排班系統_當天排班()
  197. da.Fill(ds24) : DataGridView24.DataSource = ds24.Tables(0) : conn.Close()
  198. End Sub
  199. Private Sub 讀取班別25()
  200. DataGridView25.DataSource = Nothing : ds25.Clear()
  201. DataGridView25.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  202. DataGridView25.ColumnHeadersHeight = 列高1 : DataGridView25.AllowUserToAddRows = False : DataGridView25.RowTemplate.Height = 列高
  203. SQL_排班系統_當天排班()
  204. da.Fill(ds25) : DataGridView25.DataSource = ds25.Tables(0) : conn.Close()
  205. End Sub
  206. Private Sub 讀取班別26()
  207. DataGridView26.DataSource = Nothing : ds26.Clear()
  208. DataGridView26.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  209. DataGridView26.ColumnHeadersHeight = 列高1 : DataGridView26.AllowUserToAddRows = False : DataGridView26.RowTemplate.Height = 列高
  210. SQL_排班系統_當天排班()
  211. da.Fill(ds26) : DataGridView26.DataSource = ds26.Tables(0) : conn.Close()
  212. End Sub
  213. Private Sub 讀取班別27()
  214. DataGridView27.DataSource = Nothing : ds27.Clear()
  215. DataGridView27.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  216. DataGridView27.ColumnHeadersHeight = 列高 : DataGridView27.AllowUserToAddRows = False : DataGridView27.RowTemplate.Height = 列高
  217. SQL_排班系統_當天排班()
  218. da.Fill(ds27) : DataGridView27.DataSource = ds27.Tables(0) : conn.Close()
  219. End Sub
  220. Private Sub 讀取班別28()
  221. DataGridView28.DataSource = Nothing : ds28.Clear()
  222. DataGridView28.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  223. DataGridView28.ColumnHeadersHeight = 列高1 : DataGridView28.AllowUserToAddRows = False : DataGridView28.RowTemplate.Height = 列高
  224. SQL_排班系統_當天排班()
  225. da.Fill(ds28) : DataGridView28.DataSource = ds28.Tables(0) : conn.Close()
  226. End Sub
  227. Private Sub 讀取班別29()
  228. DataGridView29.DataSource = Nothing : ds29.Clear()
  229. DataGridView29.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  230. DataGridView29.ColumnHeadersHeight = 列高1 : DataGridView29.AllowUserToAddRows = False : DataGridView29.RowTemplate.Height = 列高
  231. SQL_排班系統_當天排班()
  232. da.Fill(ds29) : DataGridView29.DataSource = ds29.Tables(0) : conn.Close()
  233. End Sub
  234. Private Sub 讀取班別30()
  235. DataGridView30.DataSource = Nothing : ds30.Clear()
  236. DataGridView30.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  237. DataGridView30.ColumnHeadersHeight = 列高1 : DataGridView30.AllowUserToAddRows = False : DataGridView30.RowTemplate.Height = 列高
  238. SQL_排班系統_當天排班()
  239. da.Fill(ds30) : DataGridView30.DataSource = ds30.Tables(0) : conn.Close()
  240. End Sub
  241. Private Sub 讀取班別31()
  242. DataGridView31.DataSource = Nothing : ds31.Clear()
  243. DataGridView31.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  244. DataGridView31.ColumnHeadersHeight = 列高1 : DataGridView31.AllowUserToAddRows = False : DataGridView31.RowTemplate.Height = 列高
  245. SQL_排班系統_當天排班()
  246. da.Fill(ds31) : DataGridView31.DataSource = ds31.Tables(0) : conn.Close()
  247. End Sub
  248. Private Sub 讀取班別32()
  249. DataGridView32.DataSource = Nothing : ds32.Clear()
  250. DataGridView32.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  251. DataGridView32.ColumnHeadersHeight = 列高1 : DataGridView32.AllowUserToAddRows = False : DataGridView32.RowTemplate.Height = 列高
  252. SQL_排班系統_當天排班()
  253. da.Fill(ds32) : DataGridView32.DataSource = ds32.Tables(0) : conn.Close()
  254. End Sub
  255. Private Sub 讀取班別33()
  256. DataGridView33.DataSource = Nothing : ds33.Clear()
  257. DataGridView33.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  258. DataGridView33.ColumnHeadersHeight = 列高1 : DataGridView33.AllowUserToAddRows = False : DataGridView33.RowTemplate.Height = 列高
  259. SQL_排班系統_當天排班()
  260. da.Fill(ds33) : DataGridView33.DataSource = ds33.Tables(0) : conn.Close()
  261. End Sub
  262. Private Sub 讀取班別34()
  263. DataGridView34.DataSource = Nothing : ds34.Clear()
  264. DataGridView34.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  265. DataGridView34.ColumnHeadersHeight = 列高1 : DataGridView34.AllowUserToAddRows = False : DataGridView34.RowTemplate.Height = 列高
  266. SQL_排班系統_當天排班()
  267. da.Fill(ds34) : DataGridView34.DataSource = ds34.Tables(0) : conn.Close()
  268. End Sub
  269. Private Sub 讀取班別35()
  270. DataGridView35.DataSource = Nothing : ds35.Clear()
  271. DataGridView35.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  272. DataGridView35.ColumnHeadersHeight = 列高1 : DataGridView35.AllowUserToAddRows = False : DataGridView35.RowTemplate.Height = 列高
  273. SQL_排班系統_當天排班()
  274. da.Fill(ds35) : DataGridView35.DataSource = ds35.Tables(0) : conn.Close()
  275. End Sub
  276. Private Sub 讀取班別36()
  277. DataGridView36.DataSource = Nothing : ds36.Clear()
  278. DataGridView36.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  279. DataGridView36.ColumnHeadersHeight = 列高1 : DataGridView36.AllowUserToAddRows = False : DataGridView36.RowTemplate.Height = 列高
  280. SQL_排班系統_當天排班()
  281. da.Fill(ds36) : DataGridView36.DataSource = ds36.Tables(0) : conn.Close()
  282. End Sub
  283. Private Sub 讀取班別37()
  284. DataGridView37.DataSource = Nothing : ds37.Clear()
  285. DataGridView37.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  286. DataGridView37.ColumnHeadersHeight = 列高1 : DataGridView37.AllowUserToAddRows = False : DataGridView37.RowTemplate.Height = 列高
  287. SQL_排班系統_當天排班()
  288. da.Fill(ds37) : DataGridView37.DataSource = ds37.Tables(0) : conn.Close()
  289. End Sub
  290. Private Sub 讀取班別38()
  291. DataGridView38.DataSource = Nothing : ds38.Clear()
  292. DataGridView38.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  293. DataGridView38.ColumnHeadersHeight = 列高1 : DataGridView38.AllowUserToAddRows = False : DataGridView38.RowTemplate.Height = 列高
  294. SQL_排班系統_當天排班()
  295. da.Fill(ds38) : DataGridView38.DataSource = ds38.Tables(0) : conn.Close()
  296. End Sub
  297. Private Sub 讀取班別39()
  298. DataGridView39.DataSource = Nothing : ds39.Clear()
  299. DataGridView39.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  300. DataGridView39.ColumnHeadersHeight = 列高1 : DataGridView39.AllowUserToAddRows = False : DataGridView39.RowTemplate.Height = 列高
  301. SQL_排班系統_當天排班()
  302. da.Fill(ds39) : DataGridView39.DataSource = ds39.Tables(0) : conn.Close()
  303. End Sub
  304. Private Sub 讀取班別40()
  305. DataGridView40.DataSource = Nothing : ds40.Clear()
  306. DataGridView40.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  307. DataGridView40.ColumnHeadersHeight = 列高1 : DataGridView40.AllowUserToAddRows = False : DataGridView40.RowTemplate.Height = 列高
  308. SQL_排班系統_當天排班()
  309. da.Fill(ds40) : DataGridView40.DataSource = ds40.Tables(0) : conn.Close()
  310. End Sub
  311. Private Sub 讀取班別41()
  312. DataGridView41.DataSource = Nothing : ds41.Clear()
  313. DataGridView41.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  314. DataGridView41.ColumnHeadersHeight = 列高1 : DataGridView41.AllowUserToAddRows = False : DataGridView41.RowTemplate.Height = 列高
  315. SQL_排班系統_當天排班()
  316. da.Fill(ds41) : DataGridView41.DataSource = ds41.Tables(0) : conn.Close()
  317. End Sub
  318. Private Sub 讀取班別42()
  319. DataGridView42.DataSource = Nothing : ds42.Clear()
  320. DataGridView42.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  321. DataGridView42.ColumnHeadersHeight = 列高1 : DataGridView42.AllowUserToAddRows = False : DataGridView42.RowTemplate.Height = 列高
  322. SQL_排班系統_當天排班()
  323. da.Fill(ds42) : DataGridView42.DataSource = ds42.Tables(0) : conn.Close()
  324. End Sub
  325. Private Sub 日曆變動()
  326. 總時數 = 0
  327. For no As Integer = 1 To 42
  328. Dim Panels As Panel = CType(Me.Controls.Find("Panel" + no.ToString(), True)(0), Panel) : Panels.Visible = True
  329. Next
  330. Dim Q As Integer = 0
  331. 星期 = 日期_dgv.Rows(0).Cells("星期").Value.ToString : 天數 = 日期_dgv.Rows.Count
  332. If 星期 = "星期日" Then
  333. For no As Integer = 1 To 42
  334. If no > 天數 Then : Dim Panels As Panel = CType(Me.Controls.Find("Panel" + no.ToString(), True)(0), Panel) : Panels.Visible = False : End If
  335. Dim 日期_lb As Label = CType(Me.Controls.Find("日期_lb" + no.ToString(), True)(0), Label) : 日期_lb.Text = no
  336. If IsNumeric(Val(日期_lb.Text)) = True Then
  337. If no < 10 Then : PA = "0" & no : Else : PA = no : End If : PA = 年份_cb.Text & "/" & 月份_cb.Text & "/" & PA
  338. If no = 1 Then : 讀取班別1() : ElseIf no = 2 Then : 讀取班別2() : ElseIf no = 3 Then : 讀取班別3() : ElseIf no = 4 Then : 讀取班別4()
  339. ElseIf no = 5 Then : 讀取班別5() : ElseIf no = 6 Then : 讀取班別6() : ElseIf no = 7 Then : 讀取班別7() : ElseIf no = 8 Then : 讀取班別8()
  340. ElseIf no = 9 Then : 讀取班別9() : ElseIf no = 10 Then : 讀取班別10() : ElseIf no = 11 Then : 讀取班別11() : ElseIf no = 12 Then : 讀取班別12()
  341. ElseIf no = 13 Then : 讀取班別13() : ElseIf no = 14 Then : 讀取班別14() : ElseIf no = 15 Then : 讀取班別15() : ElseIf no = 16 Then : 讀取班別16()
  342. ElseIf no = 17 Then : 讀取班別17() : ElseIf no = 18 Then : 讀取班別18() : ElseIf no = 19 Then : 讀取班別19() : ElseIf no = 20 Then : 讀取班別20()
  343. ElseIf no = 21 Then : 讀取班別21() : ElseIf no = 22 Then : 讀取班別22() : ElseIf no = 23 Then : 讀取班別23() : ElseIf no = 24 Then : 讀取班別24()
  344. ElseIf no = 25 Then : 讀取班別25() : ElseIf no = 26 Then : 讀取班別26() : ElseIf no = 27 Then : 讀取班別27() : ElseIf no = 28 Then : 讀取班別28()
  345. ElseIf no = 29 Then : 讀取班別29() : ElseIf no = 30 Then : 讀取班別30() : ElseIf no = 31 Then : 讀取班別31() : ElseIf no = 32 Then : 讀取班別32()
  346. ElseIf no = 33 Then : 讀取班別33() : ElseIf no = 34 Then : 讀取班別34() : ElseIf no = 35 Then : 讀取班別35() : ElseIf no = 36 Then : 讀取班別36()
  347. ElseIf no = 37 Then : 讀取班別37() : ElseIf no = 38 Then : 讀取班別38() : ElseIf no = 39 Then : 讀取班別39() : ElseIf no = 40 Then : 讀取班別40()
  348. ElseIf no = 41 Then : 讀取班別41() : ElseIf no = 42 Then : 讀取班別42() : End If
  349. End If
  350. If no >= 1 And no <= 天數 Then
  351. Dim Labels As Label = CType(Me.Controls.Find("Label" + no.ToString(), True)(0), Label) : Labels.Text = 日期_dgv.Rows(Q).Cells("休假").Value.ToString
  352. If 日期_dgv.Rows(Q).Cells("休假").Value.ToString <> "國定假日" And 日期_dgv.Rows(Q).Cells("星期").Value.ToString <> "星期日" And
  353. 日期_dgv.Rows(Q).Cells("星期").Value.ToString <> "星期六" Then
  354. 總時數 += 8
  355. End If : Q += 1
  356. End If
  357. Next
  358. End If
  359. If 星期 = "星期一" Then
  360. For no As Integer = 1 To 42
  361. If no = 1 Then
  362. Dim Panels As Panel = CType(Me.Controls.Find("Panel" + no.ToString(), True)(0), Panel) : Panels.Visible = False : End If
  363. If no > 天數 + 1 Then : Dim Panels As Panel = CType(Me.Controls.Find("Panel" + no.ToString(), True)(0), Panel) : Panels.Visible = False : End If
  364. Dim 日期_lb As Label = CType(Me.Controls.Find("日期_lb" + no.ToString(), True)(0), Label) : 日期_lb.Text = no - 1
  365. If IsNumeric(Val(日期_lb.Text)) = True Then
  366. If no - 1 < 10 Then : PA = "0" & no - 1 : Else : PA = no - 1 : End If : PA = 年份_cb.Text & "/" & 月份_cb.Text & "/" & PA
  367. If no = 1 Then : 讀取班別1() : ElseIf no = 2 Then : 讀取班別2() : ElseIf no = 3 Then : 讀取班別3() : ElseIf no = 4 Then : 讀取班別4()
  368. ElseIf no = 5 Then : 讀取班別5() : ElseIf no = 6 Then : 讀取班別6() : ElseIf no = 7 Then : 讀取班別7() : ElseIf no = 8 Then : 讀取班別8()
  369. ElseIf no = 9 Then : 讀取班別9() : ElseIf no = 10 Then : 讀取班別10() : ElseIf no = 11 Then : 讀取班別11() : ElseIf no = 12 Then : 讀取班別12()
  370. ElseIf no = 13 Then : 讀取班別13() : ElseIf no = 14 Then : 讀取班別14() : ElseIf no = 15 Then : 讀取班別15() : ElseIf no = 16 Then : 讀取班別16()
  371. ElseIf no = 17 Then : 讀取班別17() : ElseIf no = 18 Then : 讀取班別18() : ElseIf no = 19 Then : 讀取班別19() : ElseIf no = 20 Then : 讀取班別20()
  372. ElseIf no = 21 Then : 讀取班別21() : ElseIf no = 22 Then : 讀取班別22() : ElseIf no = 23 Then : 讀取班別23() : ElseIf no = 24 Then : 讀取班別24()
  373. ElseIf no = 25 Then : 讀取班別25() : ElseIf no = 26 Then : 讀取班別26() : ElseIf no = 27 Then : 讀取班別27() : ElseIf no = 28 Then : 讀取班別28()
  374. ElseIf no = 29 Then : 讀取班別29() : ElseIf no = 30 Then : 讀取班別30() : ElseIf no = 31 Then : 讀取班別31() : ElseIf no = 32 Then : 讀取班別32()
  375. ElseIf no = 33 Then : 讀取班別33() : ElseIf no = 34 Then : 讀取班別34() : ElseIf no = 35 Then : 讀取班別35() : ElseIf no = 36 Then : 讀取班別36()
  376. ElseIf no = 37 Then : 讀取班別37() : ElseIf no = 38 Then : 讀取班別38() : ElseIf no = 39 Then : 讀取班別39() : ElseIf no = 40 Then : 讀取班別40()
  377. ElseIf no = 41 Then : 讀取班別41() : ElseIf no = 42 Then : 讀取班別42() : End If
  378. End If
  379. If no >= 2 And no <= 天數 + 1 Then
  380. Dim Labels As Label = CType(Me.Controls.Find("Label" + no.ToString(), True)(0), Label) : Labels.Text = 日期_dgv.Rows(Q).Cells("休假").Value.ToString
  381. If 日期_dgv.Rows(Q).Cells("休假").Value.ToString <> "國定假日" And 日期_dgv.Rows(Q).Cells("星期").Value.ToString <> "星期日" And
  382. 日期_dgv.Rows(Q).Cells("星期").Value.ToString <> "星期六" Then
  383. 總時數 += 8
  384. End If : Q += 1
  385. End If
  386. Next
  387. End If
  388. If 星期 = "星期二" Then
  389. For no As Integer = 1 To 42
  390. If no = 1 Or no = 2 Then
  391. Dim Panels As Panel = CType(Me.Controls.Find("Panel" + no.ToString(), True)(0), Panel) : Panels.Visible = False : End If
  392. If no > 天數 + 2 Then : Dim Panels As Panel = CType(Me.Controls.Find("Panel" + no.ToString(), True)(0), Panel) : Panels.Visible = False : End If
  393. Dim 日期_lb As Label = CType(Me.Controls.Find("日期_lb" + no.ToString(), True)(0), Label) : 日期_lb.Text = no - 2
  394. If IsNumeric(Val(日期_lb.Text)) = True Then
  395. If no - 2 < 10 Then : PA = "0" & no - 2 : Else : PA = no - 2 : End If : PA = 年份_cb.Text & "/" & 月份_cb.Text & "/" & PA
  396. If no = 1 Then : 讀取班別1() : ElseIf no = 2 Then : 讀取班別2() : ElseIf no = 3 Then : 讀取班別3() : ElseIf no = 4 Then : 讀取班別4()
  397. ElseIf no = 5 Then : 讀取班別5() : ElseIf no = 6 Then : 讀取班別6() : ElseIf no = 7 Then : 讀取班別7() : ElseIf no = 8 Then : 讀取班別8()
  398. ElseIf no = 9 Then : 讀取班別9() : ElseIf no = 10 Then : 讀取班別10() : ElseIf no = 11 Then : 讀取班別11() : ElseIf no = 12 Then : 讀取班別12()
  399. ElseIf no = 13 Then : 讀取班別13() : ElseIf no = 14 Then : 讀取班別14() : ElseIf no = 15 Then : 讀取班別15() : ElseIf no = 16 Then : 讀取班別16()
  400. ElseIf no = 17 Then : 讀取班別17() : ElseIf no = 18 Then : 讀取班別18() : ElseIf no = 19 Then : 讀取班別19() : ElseIf no = 20 Then : 讀取班別20()
  401. ElseIf no = 21 Then : 讀取班別21() : ElseIf no = 22 Then : 讀取班別22() : ElseIf no = 23 Then : 讀取班別23() : ElseIf no = 24 Then : 讀取班別24()
  402. ElseIf no = 25 Then : 讀取班別25() : ElseIf no = 26 Then : 讀取班別26() : ElseIf no = 27 Then : 讀取班別27() : ElseIf no = 28 Then : 讀取班別28()
  403. ElseIf no = 29 Then : 讀取班別29() : ElseIf no = 30 Then : 讀取班別30() : ElseIf no = 31 Then : 讀取班別31() : ElseIf no = 32 Then : 讀取班別32()
  404. ElseIf no = 33 Then : 讀取班別33() : ElseIf no = 34 Then : 讀取班別34() : ElseIf no = 35 Then : 讀取班別35() : ElseIf no = 36 Then : 讀取班別36()
  405. ElseIf no = 37 Then : 讀取班別37() : ElseIf no = 38 Then : 讀取班別38() : ElseIf no = 39 Then : 讀取班別39() : ElseIf no = 40 Then : 讀取班別40()
  406. ElseIf no = 41 Then : 讀取班別41() : ElseIf no = 42 Then : 讀取班別42() : End If
  407. End If
  408. If no >= 3 And no <= 天數 + 2 Then
  409. Dim Labels As Label = CType(Me.Controls.Find("Label" + no.ToString(), True)(0), Label) : Labels.Text = 日期_dgv.Rows(Q).Cells("休假").Value.ToString
  410. If 日期_dgv.Rows(Q).Cells("休假").Value.ToString <> "國定假日" And 日期_dgv.Rows(Q).Cells("星期").Value.ToString <> "星期日" And
  411. 日期_dgv.Rows(Q).Cells("星期").Value.ToString <> "星期六" Then
  412. 總時數 += 8
  413. End If : Q += 1
  414. End If
  415. Next
  416. End If
  417. If 星期 = "星期三" Then
  418. For no As Integer = 1 To 42
  419. If no = 1 Or no = 2 Or no = 3 Then
  420. Dim Panels As Panel = CType(Me.Controls.Find("Panel" + no.ToString(), True)(0), Panel) : Panels.Visible = False : End If
  421. If no > 天數 + 3 Then : Dim Panels As Panel = CType(Me.Controls.Find("Panel" + no.ToString(), True)(0), Panel) : Panels.Visible = False : End If
  422. Dim 日期_lb As Label = CType(Me.Controls.Find("日期_lb" + no.ToString(), True)(0), Label) : 日期_lb.Text = no - 3
  423. If IsNumeric(Val(日期_lb.Text)) = True Then
  424. If no - 3 < 10 Then : PA = "0" & no - 3 : Else : PA = no - 3 : End If : PA = 年份_cb.Text & "/" & 月份_cb.Text & "/" & PA
  425. If no = 1 Then : 讀取班別1() : ElseIf no = 2 Then : 讀取班別2() : ElseIf no = 3 Then : 讀取班別3() : ElseIf no = 4 Then : 讀取班別4()
  426. ElseIf no = 5 Then : 讀取班別5() : ElseIf no = 6 Then : 讀取班別6() : ElseIf no = 7 Then : 讀取班別7() : ElseIf no = 8 Then : 讀取班別8()
  427. ElseIf no = 9 Then : 讀取班別9() : ElseIf no = 10 Then : 讀取班別10() : ElseIf no = 11 Then : 讀取班別11() : ElseIf no = 12 Then : 讀取班別12()
  428. ElseIf no = 13 Then : 讀取班別13() : ElseIf no = 14 Then : 讀取班別14() : ElseIf no = 15 Then : 讀取班別15() : ElseIf no = 16 Then : 讀取班別16()
  429. ElseIf no = 17 Then : 讀取班別17() : ElseIf no = 18 Then : 讀取班別18() : ElseIf no = 19 Then : 讀取班別19() : ElseIf no = 20 Then : 讀取班別20()
  430. ElseIf no = 21 Then : 讀取班別21() : ElseIf no = 22 Then : 讀取班別22() : ElseIf no = 23 Then : 讀取班別23() : ElseIf no = 24 Then : 讀取班別24()
  431. ElseIf no = 25 Then : 讀取班別25() : ElseIf no = 26 Then : 讀取班別26() : ElseIf no = 27 Then : 讀取班別27() : ElseIf no = 28 Then : 讀取班別28()
  432. ElseIf no = 29 Then : 讀取班別29() : ElseIf no = 30 Then : 讀取班別30() : ElseIf no = 31 Then : 讀取班別31() : ElseIf no = 32 Then : 讀取班別32()
  433. ElseIf no = 33 Then : 讀取班別33() : ElseIf no = 34 Then : 讀取班別34() : ElseIf no = 35 Then : 讀取班別35() : ElseIf no = 36 Then : 讀取班別36()
  434. ElseIf no = 37 Then : 讀取班別37() : ElseIf no = 38 Then : 讀取班別38() : ElseIf no = 39 Then : 讀取班別39() : ElseIf no = 40 Then : 讀取班別40()
  435. ElseIf no = 41 Then : 讀取班別41() : ElseIf no = 42 Then : 讀取班別42() : End If
  436. End If
  437. If no >= 4 And no <= 天數 + 3 Then
  438. Dim Labels As Label = CType(Me.Controls.Find("Label" + no.ToString(), True)(0), Label) : Labels.Text = 日期_dgv.Rows(Q).Cells("休假").Value.ToString
  439. If 日期_dgv.Rows(Q).Cells("休假").Value.ToString <> "國定假日" And 日期_dgv.Rows(Q).Cells("星期").Value.ToString <> "星期日" And
  440. 日期_dgv.Rows(Q).Cells("星期").Value.ToString <> "星期六" Then
  441. 總時數 += 8
  442. End If : Q += 1
  443. End If
  444. Next
  445. End If
  446. If 星期 = "星期四" Then
  447. For no As Integer = 1 To 42
  448. If no = 1 Or no = 2 Or no = 3 Or no = 4 Then
  449. Dim Panels As Panel = CType(Me.Controls.Find("Panel" + no.ToString(), True)(0), Panel) : Panels.Visible = False : End If
  450. If no > 天數 + 4 Then : Dim Panels As Panel = CType(Me.Controls.Find("Panel" + no.ToString(), True)(0), Panel) : Panels.Visible = False : End If
  451. Dim 日期_lb As Label = CType(Me.Controls.Find("日期_lb" + no.ToString(), True)(0), Label) : 日期_lb.Text = no - 4
  452. If IsNumeric(Val(日期_lb.Text)) = True Then
  453. If no - 4 < 10 Then : PA = "0" & no - 4 : Else : PA = no - 4 : End If : PA = 年份_cb.Text & "/" & 月份_cb.Text & "/" & PA
  454. If no = 1 Then : 讀取班別1() : ElseIf no = 2 Then : 讀取班別2() : ElseIf no = 3 Then : 讀取班別3() : ElseIf no = 4 Then : 讀取班別4()
  455. ElseIf no = 5 Then : 讀取班別5() : ElseIf no = 6 Then : 讀取班別6() : ElseIf no = 7 Then : 讀取班別7() : ElseIf no = 8 Then : 讀取班別8()
  456. ElseIf no = 9 Then : 讀取班別9() : ElseIf no = 10 Then : 讀取班別10() : ElseIf no = 11 Then : 讀取班別11() : ElseIf no = 12 Then : 讀取班別12()
  457. ElseIf no = 13 Then : 讀取班別13() : ElseIf no = 14 Then : 讀取班別14() : ElseIf no = 15 Then : 讀取班別15() : ElseIf no = 16 Then : 讀取班別16()
  458. ElseIf no = 17 Then : 讀取班別17() : ElseIf no = 18 Then : 讀取班別18() : ElseIf no = 19 Then : 讀取班別19() : ElseIf no = 20 Then : 讀取班別20()
  459. ElseIf no = 21 Then : 讀取班別21() : ElseIf no = 22 Then : 讀取班別22() : ElseIf no = 23 Then : 讀取班別23() : ElseIf no = 24 Then : 讀取班別24()
  460. ElseIf no = 25 Then : 讀取班別25() : ElseIf no = 26 Then : 讀取班別26() : ElseIf no = 27 Then : 讀取班別27() : ElseIf no = 28 Then : 讀取班別28()
  461. ElseIf no = 29 Then : 讀取班別29() : ElseIf no = 30 Then : 讀取班別30() : ElseIf no = 31 Then : 讀取班別31() : ElseIf no = 32 Then : 讀取班別32()
  462. ElseIf no = 33 Then : 讀取班別33() : ElseIf no = 34 Then : 讀取班別34() : ElseIf no = 35 Then : 讀取班別35() : ElseIf no = 36 Then : 讀取班別36()
  463. ElseIf no = 37 Then : 讀取班別37() : ElseIf no = 38 Then : 讀取班別38() : ElseIf no = 39 Then : 讀取班別39() : ElseIf no = 40 Then : 讀取班別40()
  464. ElseIf no = 41 Then : 讀取班別41() : ElseIf no = 42 Then : 讀取班別42() : End If
  465. End If
  466. If no >= 5 And no <= 天數 + 4 Then
  467. Dim Labels As Label = CType(Me.Controls.Find("Label" + no.ToString(), True)(0), Label) : Labels.Text = 日期_dgv.Rows(Q).Cells("休假").Value.ToString
  468. If 日期_dgv.Rows(Q).Cells("休假").Value.ToString <> "國定假日" And 日期_dgv.Rows(Q).Cells("星期").Value.ToString <> "星期日" And
  469. 日期_dgv.Rows(Q).Cells("星期").Value.ToString <> "星期六" Then
  470. 總時數 += 8
  471. End If : Q += 1
  472. End If
  473. Next
  474. End If
  475. If 星期 = "星期五" Then
  476. For no As Integer = 1 To 42
  477. If no = 1 Or no = 2 Or no = 3 Or no = 4 Or no = 5 Then
  478. Dim Panels As Panel = CType(Me.Controls.Find("Panel" + no.ToString(), True)(0), Panel) : Panels.Visible = False : End If
  479. If no > 天數 + 5 Then : Dim Panels As Panel = CType(Me.Controls.Find("Panel" + no.ToString(), True)(0), Panel) : Panels.Visible = False : End If
  480. Dim 日期_lb As Label = CType(Me.Controls.Find("日期_lb" + no.ToString(), True)(0), Label) : 日期_lb.Text = no - 5
  481. If IsNumeric(Val(日期_lb.Text)) = True Then
  482. If no - 5 < 10 Then : PA = "0" & no - 5 : Else : PA = no - 5 : End If : PA = 年份_cb.Text & "/" & 月份_cb.Text & "/" & PA
  483. If no = 1 Then : 讀取班別1() : ElseIf no = 2 Then : 讀取班別2() : ElseIf no = 3 Then : 讀取班別3() : ElseIf no = 4 Then : 讀取班別4()
  484. ElseIf no = 5 Then : 讀取班別5() : ElseIf no = 6 Then : 讀取班別6() : ElseIf no = 7 Then : 讀取班別7() : ElseIf no = 8 Then : 讀取班別8()
  485. ElseIf no = 9 Then : 讀取班別9() : ElseIf no = 10 Then : 讀取班別10() : ElseIf no = 11 Then : 讀取班別11() : ElseIf no = 12 Then : 讀取班別12()
  486. ElseIf no = 13 Then : 讀取班別13() : ElseIf no = 14 Then : 讀取班別14() : ElseIf no = 15 Then : 讀取班別15() : ElseIf no = 16 Then : 讀取班別16()
  487. ElseIf no = 17 Then : 讀取班別17() : ElseIf no = 18 Then : 讀取班別18() : ElseIf no = 19 Then : 讀取班別19() : ElseIf no = 20 Then : 讀取班別20()
  488. ElseIf no = 21 Then : 讀取班別21() : ElseIf no = 22 Then : 讀取班別22() : ElseIf no = 23 Then : 讀取班別23() : ElseIf no = 24 Then : 讀取班別24()
  489. ElseIf no = 25 Then : 讀取班別25() : ElseIf no = 26 Then : 讀取班別26() : ElseIf no = 27 Then : 讀取班別27() : ElseIf no = 28 Then : 讀取班別28()
  490. ElseIf no = 29 Then : 讀取班別29() : ElseIf no = 30 Then : 讀取班別30() : ElseIf no = 31 Then : 讀取班別31() : ElseIf no = 32 Then : 讀取班別32()
  491. ElseIf no = 33 Then : 讀取班別33() : ElseIf no = 34 Then : 讀取班別34() : ElseIf no = 35 Then : 讀取班別35() : ElseIf no = 36 Then : 讀取班別36()
  492. ElseIf no = 37 Then : 讀取班別37() : ElseIf no = 38 Then : 讀取班別38() : ElseIf no = 39 Then : 讀取班別39() : ElseIf no = 40 Then : 讀取班別40()
  493. ElseIf no = 41 Then : 讀取班別41() : ElseIf no = 42 Then : 讀取班別42() : End If
  494. End If
  495. If no >= 6 And no <= 天數 + 5 Then
  496. Dim Labels As Label = CType(Me.Controls.Find("Label" + no.ToString(), True)(0), Label) : Labels.Text = 日期_dgv.Rows(Q).Cells("休假").Value.ToString
  497. If 日期_dgv.Rows(Q).Cells("休假").Value.ToString <> "國定假日" And 日期_dgv.Rows(Q).Cells("星期").Value.ToString <> "星期日" And
  498. 日期_dgv.Rows(Q).Cells("星期").Value.ToString <> "星期六" Then
  499. 總時數 += 8
  500. End If : Q += 1
  501. End If
  502. Next
  503. End If
  504. If 星期 = "星期六" Then
  505. For no As Integer = 1 To 42
  506. If no = 1 Or no = 2 Or no = 3 Or no = 4 Or no = 5 Or no = 6 Then
  507. Dim Panels As Panel = CType(Me.Controls.Find("Panel" + no.ToString(), True)(0), Panel) : Panels.Visible = False : End If
  508. If no > 天數 + 6 Then : Dim Panels As Panel = CType(Me.Controls.Find("Panel" + no.ToString(), True)(0), Panel) : Panels.Visible = False : End If
  509. Dim 日期_lb As Label = CType(Me.Controls.Find("日期_lb" + no.ToString(), True)(0), Label) : 日期_lb.Text = no - 6
  510. If IsNumeric(Val(日期_lb.Text)) = True Then
  511. If no - 6 < 10 Then : PA = "0" & no - 6 : Else : PA = no - 6 : End If : PA = 年份_cb.Text & "/" & 月份_cb.Text & "/" & PA
  512. If no = 1 Then : 讀取班別1() : ElseIf no = 2 Then : 讀取班別2() : ElseIf no = 3 Then : 讀取班別3() : ElseIf no = 4 Then : 讀取班別4()
  513. ElseIf no = 5 Then : 讀取班別5() : ElseIf no = 6 Then : 讀取班別6() : ElseIf no = 7 Then : 讀取班別7() : ElseIf no = 8 Then : 讀取班別8()
  514. ElseIf no = 9 Then : 讀取班別9() : ElseIf no = 10 Then : 讀取班別10() : ElseIf no = 11 Then : 讀取班別11() : ElseIf no = 12 Then : 讀取班別12()
  515. ElseIf no = 13 Then : 讀取班別13() : ElseIf no = 14 Then : 讀取班別14() : ElseIf no = 15 Then : 讀取班別15() : ElseIf no = 16 Then : 讀取班別16()
  516. ElseIf no = 17 Then : 讀取班別17() : ElseIf no = 18 Then : 讀取班別18() : ElseIf no = 19 Then : 讀取班別19() : ElseIf no = 20 Then : 讀取班別20()
  517. ElseIf no = 21 Then : 讀取班別21() : ElseIf no = 22 Then : 讀取班別22() : ElseIf no = 23 Then : 讀取班別23() : ElseIf no = 24 Then : 讀取班別24()
  518. ElseIf no = 25 Then : 讀取班別25() : ElseIf no = 26 Then : 讀取班別26() : ElseIf no = 27 Then : 讀取班別27() : ElseIf no = 28 Then : 讀取班別28()
  519. ElseIf no = 29 Then : 讀取班別29() : ElseIf no = 30 Then : 讀取班別30() : ElseIf no = 31 Then : 讀取班別31() : ElseIf no = 32 Then : 讀取班別32()
  520. ElseIf no = 33 Then : 讀取班別33() : ElseIf no = 34 Then : 讀取班別34() : ElseIf no = 35 Then : 讀取班別35() : ElseIf no = 36 Then : 讀取班別36()
  521. ElseIf no = 37 Then : 讀取班別37() : ElseIf no = 38 Then : 讀取班別38() : ElseIf no = 39 Then : 讀取班別39() : ElseIf no = 40 Then : 讀取班別40()
  522. ElseIf no = 41 Then : 讀取班別41() : ElseIf no = 42 Then : 讀取班別42() : End If
  523. End If
  524. If no >= 7 And no <= 天數 + 6 Then
  525. Dim Labels As Label = CType(Me.Controls.Find("Label" + no.ToString(), True)(0), Label) : Labels.Text = 日期_dgv.Rows(Q).Cells("休假").Value.ToString
  526. If 日期_dgv.Rows(Q).Cells("休假").Value.ToString <> "國定假日" And 日期_dgv.Rows(Q).Cells("星期").Value.ToString <> "星期日" And
  527. 日期_dgv.Rows(Q).Cells("星期").Value.ToString <> "星期六" Then
  528. 總時數 += 8
  529. End If : Q += 1
  530. End If
  531. Next
  532. End If
  533. End Sub
  534. Private Sub 排班資料_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  535. Me.MdiParent = GCM_ERP_SYS : Me.WindowState = 2 : Me.AutoScroll = True
  536. 列高 = 17 : 列高1 = 22
  537. 年份_下拉表單資料載入() : 日期_dgv.Visible = False
  538. 首次開啟 = False
  539. 年份_cb.Text = Year(Today) : 月份_cb.SelectedIndex = Month(Today) - 1
  540. PA1 = 年份_cb.Text : PA2 = 月份_cb.Text
  541. 首次開啟 = True
  542. 讀取日期() : 日曆變動()
  543. PA = 年份_cb.Text & "/" & 月份_cb.Text
  544. 讀取排班()
  545. For i As Integer = 0 To 人員彙總_dgv.Rows.Count - 1
  546. 人員彙總_dgv.Rows(i).Cells("本月應上時數").Value = 總時數
  547. 人員彙總_dgv.Rows(i).Cells("未排班時數").Value = 人員彙總_dgv.Rows(i).Cells("本月應上時數").Value - 人員彙總_dgv.Rows(i).Cells("已排班時數").Value
  548. Next
  549. End Sub
  550. Private Sub 人員彙總_dgv_CellClick(sender As Object, e As DataGridViewCellEventArgs) Handles 人員彙總_dgv.CellClick
  551. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 人員彙總_dgv.Rows(e.RowIndex).Cells("姓名").Value : 個人班表.Close() : 個人班表.ShowDialog()
  552. End Sub
  553. Private Sub 月份_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 月份_cb.SelectedIndexChanged
  554. If 首次開啟 = True Then
  555. PA1 = 年份_cb.Text : PA2 = 月份_cb.Text : 讀取日期() : 日曆變動()
  556. PA = 年份_cb.Text & "/" & 月份_cb.Text : 讀取排班()
  557. For i As Integer = 0 To 人員彙總_dgv.Rows.Count - 1
  558. 人員彙總_dgv.Rows(i).Cells("本月應上時數").Value = 總時數
  559. 人員彙總_dgv.Rows(i).Cells("未排班時數").Value = 人員彙總_dgv.Rows(i).Cells("本月應上時數").Value - 人員彙總_dgv.Rows(i).Cells("已排班時數").Value
  560. Next
  561. End If
  562. End Sub
  563. Private Sub 個人_bt_Click(sender As Object, e As EventArgs) Handles 個人_bt.Click
  564. 個人班表.Close() : 個人班表.Show()
  565. End Sub
  566. Private Sub B01_tb_Click(sender As Object, e As EventArgs) Handles B01_tb.Click
  567. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb1.Text : 排班明細.Show()
  568. End Sub
  569. Private Sub B02_tb_Click(sender As Object, e As EventArgs) Handles B02_tb.Click
  570. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb2.Text : 排班明細.Show()
  571. End Sub
  572. Private Sub B03_tb_Click(sender As Object, e As EventArgs) Handles B03_tb.Click
  573. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb3.Text : 排班明細.Show()
  574. End Sub
  575. Private Sub B04_tb_Click(sender As Object, e As EventArgs) Handles B04_tb.Click
  576. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb4.Text : 排班明細.Show()
  577. End Sub
  578. Private Sub B05_tb_Click(sender As Object, e As EventArgs) Handles B05_tb.Click
  579. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb5.Text : 排班明細.Show()
  580. End Sub
  581. Private Sub B06_tb_Click(sender As Object, e As EventArgs) Handles B06_tb.Click
  582. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb6.Text : 排班明細.Show()
  583. End Sub
  584. Private Sub B07_tb_Click(sender As Object, e As EventArgs) Handles B07_tb.Click
  585. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb7.Text : 排班明細.Show()
  586. End Sub
  587. Private Sub B08_tb_Click(sender As Object, e As EventArgs) Handles B08_tb.Click
  588. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb8.Text : 排班明細.Show()
  589. End Sub
  590. Private Sub B09_tb_Click(sender As Object, e As EventArgs) Handles B09_tb.Click
  591. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb9.Text : 排班明細.Show()
  592. End Sub
  593. Private Sub B10_tb_Click(sender As Object, e As EventArgs) Handles B10_tb.Click
  594. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb10.Text : 排班明細.Show()
  595. End Sub
  596. Private Sub B11_tb_Click(sender As Object, e As EventArgs) Handles B11_tb.Click
  597. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb11.Text : 排班明細.Show()
  598. End Sub
  599. Private Sub B12_tb_Click(sender As Object, e As EventArgs) Handles B12_tb.Click
  600. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb12.Text : 排班明細.Show()
  601. End Sub
  602. Private Sub B13_tb_Click(sender As Object, e As EventArgs) Handles B13_tb.Click
  603. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb13.Text : 排班明細.Show()
  604. End Sub
  605. Private Sub B14_tb_Click(sender As Object, e As EventArgs) Handles B14_tb.Click
  606. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb14.Text : 排班明細.Show()
  607. End Sub
  608. Private Sub B15_tb_Click(sender As Object, e As EventArgs) Handles B15_tb.Click
  609. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb15.Text : 排班明細.Show()
  610. End Sub
  611. Private Sub B16_tb_Click(sender As Object, e As EventArgs) Handles B16_tb.Click
  612. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb16.Text : 排班明細.Show()
  613. End Sub
  614. Private Sub B17_tb_Click(sender As Object, e As EventArgs) Handles B17_tb.Click
  615. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb17.Text : 排班明細.Show()
  616. End Sub
  617. Private Sub B18_tb_Click(sender As Object, e As EventArgs) Handles B18_tb.Click
  618. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb18.Text : 排班明細.Show()
  619. End Sub
  620. Private Sub B19_tb_Click(sender As Object, e As EventArgs) Handles B19_tb.Click
  621. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb19.Text : 排班明細.Show()
  622. End Sub
  623. Private Sub B20_tb_Click(sender As Object, e As EventArgs) Handles B20_tb.Click
  624. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb20.Text : 排班明細.Show()
  625. End Sub
  626. Private Sub B21_tb_Click(sender As Object, e As EventArgs) Handles B21_tb.Click
  627. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb21.Text : 排班明細.Show()
  628. End Sub
  629. Private Sub B22_tb_Click(sender As Object, e As EventArgs) Handles B22_tb.Click
  630. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb22.Text : 排班明細.Show()
  631. End Sub
  632. Private Sub B23_tb_Click(sender As Object, e As EventArgs) Handles B23_tb.Click
  633. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb23.Text : 排班明細.Show()
  634. End Sub
  635. Private Sub B24_tb_Click(sender As Object, e As EventArgs) Handles B24_tb.Click
  636. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb24.Text : 排班明細.Show()
  637. End Sub
  638. Private Sub B25_tb_Click(sender As Object, e As EventArgs) Handles B25_tb.Click
  639. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb25.Text : 排班明細.Show()
  640. End Sub
  641. Private Sub B26_tb_Click(sender As Object, e As EventArgs) Handles B26_tb.Click
  642. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb26.Text : 排班明細.Show()
  643. End Sub
  644. Private Sub B27_tb_Click(sender As Object, e As EventArgs) Handles B27_tb.Click
  645. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb27.Text : 排班明細.Show()
  646. End Sub
  647. Private Sub B28_tb_Click(sender As Object, e As EventArgs) Handles B28_tb.Click
  648. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb28.Text : 排班明細.Show()
  649. End Sub
  650. Private Sub B29_tb_Click(sender As Object, e As EventArgs) Handles B29_tb.Click
  651. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb29.Text : 排班明細.Show()
  652. End Sub
  653. Private Sub B30_tb_Click(sender As Object, e As EventArgs) Handles B30_tb.Click
  654. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb30.Text : 排班明細.Show()
  655. End Sub
  656. Private Sub B31_tb_Click(sender As Object, e As EventArgs) Handles B31_tb.Click
  657. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb31.Text : 排班明細.Show()
  658. End Sub
  659. Private Sub B32_tb_Click(sender As Object, e As EventArgs) Handles B32_tb.Click
  660. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb32.Text : 排班明細.Show()
  661. End Sub
  662. Private Sub B33_tb_Click(sender As Object, e As EventArgs) Handles B33_tb.Click
  663. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb33.Text : 排班明細.Show()
  664. End Sub
  665. Private Sub B34_tb_Click(sender As Object, e As EventArgs) Handles B34_tb.Click
  666. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb34.Text : 排班明細.Show()
  667. End Sub
  668. Private Sub B35_tb_Click(sender As Object, e As EventArgs) Handles B35_tb.Click
  669. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb35.Text : 排班明細.Show()
  670. End Sub
  671. Private Sub B36_tb_Click(sender As Object, e As EventArgs) Handles B36_tb.Click
  672. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb36.Text : 排班明細.Show()
  673. End Sub
  674. Private Sub B37_tb_Click(sender As Object, e As EventArgs) Handles B37_tb.Click
  675. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb37.Text : 排班明細.Show()
  676. End Sub
  677. Private Sub B38_tb_Click(sender As Object, e As EventArgs) Handles B38_tb.Click
  678. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb38.Text : 排班明細.Show()
  679. End Sub
  680. Private Sub B39_tb_Click(sender As Object, e As EventArgs) Handles B39_tb.Click
  681. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb39.Text : 排班明細.Show()
  682. End Sub
  683. Private Sub B40_tb_Click(sender As Object, e As EventArgs) Handles B40_tb.Click
  684. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb40.Text : 排班明細.Show()
  685. End Sub
  686. Private Sub B41_tb_Click(sender As Object, e As EventArgs) Handles B41_tb.Click
  687. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb41.Text : 排班明細.Show()
  688. End Sub
  689. Private Sub B42_tb_Click(sender As Object, e As EventArgs) Handles B42_tb.Click
  690. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb42.Text : 排班明細.Show()
  691. End Sub
  692. Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  693. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb1.Text : 排班明細_參考.Show()
  694. End Sub
  695. Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
  696. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb2.Text : 排班明細_參考.Show()
  697. End Sub
  698. Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
  699. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb3.Text : 排班明細_參考.Show()
  700. End Sub
  701. Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
  702. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb4.Text : 排班明細_參考.Show()
  703. End Sub
  704. Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
  705. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb5.Text : 排班明細_參考.Show()
  706. End Sub
  707. Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
  708. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb6.Text : 排班明細_參考.Show()
  709. End Sub
  710. Private Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click
  711. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb7.Text : 排班明細_參考.Show()
  712. End Sub
  713. Private Sub Button8_Click(sender As Object, e As EventArgs) Handles Button8.Click
  714. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb8.Text : 排班明細_參考.Show()
  715. End Sub
  716. Private Sub Button9_Click(sender As Object, e As EventArgs) Handles Button9.Click
  717. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb9.Text : 排班明細_參考.Show()
  718. End Sub
  719. Private Sub Button10_Click(sender As Object, e As EventArgs) Handles Button10.Click
  720. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb10.Text : 排班明細_參考.Show()
  721. End Sub
  722. Private Sub Button11_Click(sender As Object, e As EventArgs) Handles Button11.Click
  723. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb11.Text : 排班明細_參考.Show()
  724. End Sub
  725. Private Sub Button12_Click(sender As Object, e As EventArgs) Handles Button12.Click
  726. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb12.Text : 排班明細_參考.Show()
  727. End Sub
  728. Private Sub Button13_Click(sender As Object, e As EventArgs) Handles Button13.Click
  729. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb13.Text : 排班明細_參考.Show()
  730. End Sub
  731. Private Sub Button14_Click(sender As Object, e As EventArgs) Handles Button14.Click
  732. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb14.Text : 排班明細_參考.Show()
  733. End Sub
  734. Private Sub Button15_Click(sender As Object, e As EventArgs) Handles Button15.Click
  735. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb15.Text : 排班明細_參考.Show()
  736. End Sub
  737. Private Sub Button16_Click(sender As Object, e As EventArgs) Handles Button16.Click
  738. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb16.Text : 排班明細_參考.Show()
  739. End Sub
  740. Private Sub Button17_Click(sender As Object, e As EventArgs) Handles Button17.Click
  741. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb17.Text : 排班明細_參考.Show()
  742. End Sub
  743. Private Sub Button18_Click(sender As Object, e As EventArgs) Handles Button18.Click
  744. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb18.Text : 排班明細_參考.Show()
  745. End Sub
  746. Private Sub Button19_Click(sender As Object, e As EventArgs) Handles Button19.Click
  747. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb19.Text : 排班明細_參考.Show()
  748. End Sub
  749. Private Sub Button20_Click(sender As Object, e As EventArgs) Handles Button20.Click
  750. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb20.Text : 排班明細_參考.Show()
  751. End Sub
  752. Private Sub Button21_Click(sender As Object, e As EventArgs) Handles Button21.Click
  753. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb21.Text : 排班明細_參考.Show()
  754. End Sub
  755. Private Sub Button22_Click(sender As Object, e As EventArgs) Handles Button22.Click
  756. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb22.Text : 排班明細_參考.Show()
  757. End Sub
  758. Private Sub Button23_Click(sender As Object, e As EventArgs) Handles Button23.Click
  759. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb23.Text : 排班明細_參考.Show()
  760. End Sub
  761. Private Sub Button24_Click(sender As Object, e As EventArgs) Handles Button24.Click
  762. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb24.Text : 排班明細_參考.Show()
  763. End Sub
  764. Private Sub Button25_Click(sender As Object, e As EventArgs) Handles Button25.Click
  765. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb25.Text : 排班明細_參考.Show()
  766. End Sub
  767. Private Sub Button26_Click(sender As Object, e As EventArgs) Handles Button26.Click
  768. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb26.Text : 排班明細_參考.Show()
  769. End Sub
  770. Private Sub Button27_Click(sender As Object, e As EventArgs) Handles Button27.Click
  771. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb27.Text : 排班明細_參考.Show()
  772. End Sub
  773. Private Sub Button28_Click(sender As Object, e As EventArgs) Handles Button28.Click
  774. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb28.Text : 排班明細_參考.Show()
  775. End Sub
  776. Private Sub Button29_Click(sender As Object, e As EventArgs) Handles Button29.Click
  777. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb29.Text : 排班明細_參考.Show()
  778. End Sub
  779. Private Sub Button30_Click(sender As Object, e As EventArgs) Handles Button30.Click
  780. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb30.Text : 排班明細_參考.Show()
  781. End Sub
  782. Private Sub Button31_Click(sender As Object, e As EventArgs) Handles Button31.Click
  783. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb31.Text : 排班明細_參考.Show()
  784. End Sub
  785. Private Sub Button32_Click(sender As Object, e As EventArgs) Handles Button32.Click
  786. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb32.Text : 排班明細_參考.Show()
  787. End Sub
  788. Private Sub Button33_Click(sender As Object, e As EventArgs) Handles Button33.Click
  789. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb33.Text : 排班明細_參考.Show()
  790. End Sub
  791. Private Sub Button34_Click(sender As Object, e As EventArgs) Handles Button34.Click
  792. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb34.Text : 排班明細_參考.Show()
  793. End Sub
  794. Private Sub Button35_Click(sender As Object, e As EventArgs) Handles Button35.Click
  795. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb35.Text : 排班明細_參考.Show()
  796. End Sub
  797. Private Sub Button36_Click(sender As Object, e As EventArgs) Handles Button36.Click
  798. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb36.Text : 排班明細_參考.Show()
  799. End Sub
  800. Private Sub Button37_Click(sender As Object, e As EventArgs) Handles Button37.Click
  801. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb37.Text : 排班明細_參考.Show()
  802. End Sub
  803. Private Sub Button38_Click(sender As Object, e As EventArgs) Handles Button38.Click
  804. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb38.Text : 排班明細_參考.Show()
  805. End Sub
  806. Private Sub Button39_Click(sender As Object, e As EventArgs) Handles Button39.Click
  807. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb39.Text : 排班明細_參考.Show()
  808. End Sub
  809. Private Sub Button40_Click(sender As Object, e As EventArgs) Handles Button40.Click
  810. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb40.Text : 排班明細_參考.Show()
  811. End Sub
  812. Private Sub Button41_Click(sender As Object, e As EventArgs) Handles Button41.Click
  813. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb41.Text : 排班明細_參考.Show()
  814. End Sub
  815. Private Sub Button42_Click(sender As Object, e As EventArgs) Handles Button42.Click
  816. PA = 年份_cb.Text : PA1 = 月份_cb.Text : PA2 = 日期_lb42.Text : 排班明細_參考.Show()
  817. End Sub
  818. End Class