瀏覽代碼

版本號 : 2020092501

更新內容如下 :
1、樣品單(開發介面)新增階段分類 - Proto
2、樣品單列印新增 - 後套裡印刷 - 選項
3、訂單控制表列印成EXCEL功能中新增自動彙總表功能

Signed-off-by: B70340 <b70340@gmail.com>
B70340 4 年之前
父節點
當前提交
b16b28471c
共有 37 個檔案被更改,包括 4774 行新增3861 行删除
  1. 二進制
      .vs/TENDEN-MES-SYS/v16/.suo
  2. 1
    1
      TENDEN-MES-SYS/Module/Module1.vb
  3. 二進制
      TENDEN-MES-SYS/bin/Debug/TENDEN-ERP-SYS.exe
  4. 二進制
      TENDEN-MES-SYS/bin/Debug/TENDEN-ERP-SYS.pdb
  5. 二進制
      TENDEN-MES-SYS/obj/Debug/TENDEN-ERP-SYS.exe
  6. 二進制
      TENDEN-MES-SYS/obj/Debug/TENDEN-ERP-SYS.pdb
  7. 二進制
      TENDEN-MES-SYS/obj/Debug/天盾國際管理系統.訂單列印選擇.resources
  8. 二進制
      TENDEN-MES-SYS/obj/Debug/天盾系統.vbproj.GenerateResource.cache
  9. 二進制
      TENDEN-MES-SYS/obj/Debug/天盾系統.vbprojAssemblyReference.cache
  10. 339
    339
      TENDEN-MES-SYS/彙總報表管理/訂單分析報表一.Designer.vb
  11. 239
    204
      TENDEN-MES-SYS/彙總報表管理/訂單分析報表一.vb
  12. 160
    160
      TENDEN-MES-SYS/彙總報表管理/訂單分析報表七.Designer.vb
  13. 202
    138
      TENDEN-MES-SYS/彙總報表管理/訂單分析報表七.vb
  14. 340
    340
      TENDEN-MES-SYS/彙總報表管理/訂單分析報表三.Designer.vb
  15. 118
    118
      TENDEN-MES-SYS/彙總報表管理/訂單分析報表三.vb
  16. 189
    189
      TENDEN-MES-SYS/彙總報表管理/訂單分析報表二.Designer.vb
  17. 124
    124
      TENDEN-MES-SYS/彙總報表管理/訂單分析報表二.vb
  18. 686
    686
      TENDEN-MES-SYS/彙總報表管理/訂單分析報表五.Designer.vb
  19. 235
    230
      TENDEN-MES-SYS/彙總報表管理/訂單分析報表五.vb
  20. 66
    66
      TENDEN-MES-SYS/彙總報表管理/訂單分析報表四.Designer.vb
  21. 51
    51
      TENDEN-MES-SYS/彙總報表管理/訂單分析報表四.vb
  22. 1
    1
      TENDEN-MES-SYS/樣品訂單管理/中文樣品單.Designer.vb
  23. 15
    5
      TENDEN-MES-SYS/樣品訂單管理/中文樣品單.vb
  24. 1
    1
      TENDEN-MES-SYS/樣品訂單管理/中文樣品單清單.Designer.vb
  25. 15
    2
      TENDEN-MES-SYS/樣品訂單管理/中文樣品單階段.Designer.vb
  26. 14
    6
      TENDEN-MES-SYS/樣品訂單管理/中文樣品單階段.vb
  27. 15
    2
      TENDEN-MES-SYS/樣品訂單管理/列印_中文樣品單.Designer.vb
  28. 5
    2
      TENDEN-MES-SYS/樣品訂單管理/列印_中文樣品單.vb
  29. 78
    78
      TENDEN-MES-SYS/資料庫系統管理/FTP資料夾管理.Designer.vb
  30. 20
    19
      TENDEN-MES-SYS/資料庫系統管理/FTP資料夾管理.vb
  31. 52
    52
      TENDEN-MES-SYS/資料庫系統管理/人員ID卡系統配置設定.Designer.vb
  32. 16
    16
      TENDEN-MES-SYS/資料庫系統管理/人員ID卡系統配置設定.vb
  33. 477
    95
      TENDEN-MES-SYS/量產訂單管理/訂單列印選擇.Designer.vb
  34. 3
    0
      TENDEN-MES-SYS/量產訂單管理/訂單列印選擇.resx
  35. 526
    150
      TENDEN-MES-SYS/量產訂單管理/訂單列印選擇.vb
  36. 515
    515
      TENDEN-MES-SYS/量產訂單管理/鞋盒資料控制表.Designer.vb
  37. 271
    271
      TENDEN-MES-SYS/量產訂單管理/鞋盒資料控制表.vb

二進制
.vs/TENDEN-MES-SYS/v16/.suo 查看文件


+ 1
- 1
TENDEN-MES-SYS/Module/Module1.vb 查看文件

@@ -4,7 +4,7 @@
4 4
     Public Target As String : Public Target1 As String : Public Target2 As String : Public FTP帳號 As String : Public FTP密碼 As String : Public 登入人IP As String
5 5
     Public CC(99) As Boolean : Public AA(99) As String : Public 登入判斷 As Boolean
6 6
     '----系統版本-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
7
-    Public 版本 As String = "2020072401"
7
+    Public 版本 As String = "2020092501"
8 8
     '----系統用全域變數-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
9 9
     Public SQL1 As String
10 10
     Public 匯率 As Double

二進制
TENDEN-MES-SYS/bin/Debug/TENDEN-ERP-SYS.exe 查看文件


二進制
TENDEN-MES-SYS/bin/Debug/TENDEN-ERP-SYS.pdb 查看文件


二進制
TENDEN-MES-SYS/obj/Debug/TENDEN-ERP-SYS.exe 查看文件


二進制
TENDEN-MES-SYS/obj/Debug/TENDEN-ERP-SYS.pdb 查看文件


二進制
TENDEN-MES-SYS/obj/Debug/天盾國際管理系統.訂單列印選擇.resources 查看文件


二進制
TENDEN-MES-SYS/obj/Debug/天盾系統.vbproj.GenerateResource.cache 查看文件


二進制
TENDEN-MES-SYS/obj/Debug/天盾系統.vbprojAssemblyReference.cache 查看文件


+ 339
- 339
TENDEN-MES-SYS/彙總報表管理/訂單分析報表一.Designer.vb
文件差異過大導致無法顯示
查看文件


+ 239
- 204
TENDEN-MES-SYS/彙總報表管理/訂單分析報表一.vb 查看文件

@@ -9,14 +9,14 @@ Public Class 訂單分析報表一
9 9
     Dim dr As SqlDataReader
10 10
     Dim 條件 As String
11 11
     Private  Sub Set_DGV1載入前設定()
12
-        DataGridView1.DataSource = Nothing : ds.Clear()
13
-        DataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
14
-        DataGridView1.ColumnHeadersHeight = 25
15
-        DataGridView1.AllowUserToAddRows = False
12
+        圖片資料庫_dgv.DataSource = Nothing : ds.Clear()
13
+        圖片資料庫_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
14
+        圖片資料庫_dgv.ColumnHeadersHeight = 25
15
+        圖片資料庫_dgv.AllowUserToAddRows = False
16 16
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
17 17
     End Sub
18 18
     Private  Sub Set_DGV1載入後設定()
19
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds) : DataGridView1.DataSource = ds.Tables(0) : conn.Close()
19
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds) : 圖片資料庫_dgv.DataSource = ds.Tables(0) : conn.Close()
20 20
     End Sub
21 21
     Private  Sub Set_圖片清單()
22 22
         Set_DGV1載入前設定()
@@ -24,19 +24,19 @@ Public Class 訂單分析報表一
24 24
         Set_DGV1載入後設定()
25 25
     End Sub
26 26
     Private  Sub Set_grid1()
27
-        DataGridView1.Columns(0).Width = 90 : DataGridView1.Columns(1).Width = 60
28
-        DataGridView1.Columns(1).DefaultCellStyle.Format = "#,##0"
29
-        DataGridView1.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView1.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
27
+        圖片資料庫_dgv.Columns(0).Width = 90 : 圖片資料庫_dgv.Columns(1).Width = 60
28
+        圖片資料庫_dgv.Columns(1).DefaultCellStyle.Format = "#,##0"
29
+        圖片資料庫_dgv.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 圖片資料庫_dgv.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
30 30
     End Sub
31 31
     Private  Sub Set_DGV2載入前設定()
32
-        DataGridView2.DataSource = Nothing : ds1.Clear()
33
-        DataGridView2.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
34
-        DataGridView2.ColumnHeadersHeight = 25
35
-        DataGridView2.AllowUserToAddRows = False
32
+        中文樣品單資料庫_dgv.DataSource = Nothing : ds1.Clear()
33
+        中文樣品單資料庫_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
34
+        中文樣品單資料庫_dgv.ColumnHeadersHeight = 25
35
+        中文樣品單資料庫_dgv.AllowUserToAddRows = False
36 36
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
37 37
     End Sub
38 38
     Private  Sub Set_DGV2載入後設定()
39
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds1) : DataGridView2.DataSource = ds1.Tables(0) : conn.Close()
39
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds1) : 中文樣品單資料庫_dgv.DataSource = ds1.Tables(0) : conn.Close()
40 40
     End Sub
41 41
     Private  Sub Set_樣品單清單()
42 42
         Set_DGV2載入前設定()
@@ -47,21 +47,24 @@ Public Class 訂單分析報表一
47 47
         Set_DGV2載入後設定()
48 48
     End Sub
49 49
     Private  Sub Set_grid2()
50
-        DataGridView2.Columns(0).Width = 50 : DataGridView2.Columns(1).Width = 50 : DataGridView2.Columns(2).Width = 50 : DataGridView2.Columns(3).Width = 60 : DataGridView2.Columns(4).Width = 60
51
-        DataGridView2.Columns(3).DefaultCellStyle.Format = "#,##0"
52
-        DataGridView2.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView2.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
53
-        DataGridView2.Columns(4).DefaultCellStyle.Format = "#,##0"
54
-        DataGridView2.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView2.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
50
+        中文樣品單資料庫_dgv.Columns(0).Width = 50 : 中文樣品單資料庫_dgv.Columns(1).Width = 50 : 中文樣品單資料庫_dgv.Columns(2).Width = 50 : 中文樣品單資料庫_dgv.Columns(3).Width = 60
51
+        中文樣品單資料庫_dgv.Columns(4).Width = 60
52
+        中文樣品單資料庫_dgv.Columns(3).DefaultCellStyle.Format = "#,##0"
53
+        中文樣品單資料庫_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
54
+        中文樣品單資料庫_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
55
+        中文樣品單資料庫_dgv.Columns(4).DefaultCellStyle.Format = "#,##0"
56
+        中文樣品單資料庫_dgv.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
57
+        中文樣品單資料庫_dgv.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
55 58
     End Sub
56 59
     Private  Sub Set_DGV3載入前設定()
57
-        DataGridView3.DataSource = Nothing : ds2.Clear()
58
-        DataGridView3.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
59
-        DataGridView3.ColumnHeadersHeight = 25
60
-        DataGridView3.AllowUserToAddRows = False
60
+        掛牌資料庫_dgv.DataSource = Nothing : ds2.Clear()
61
+        掛牌資料庫_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
62
+        掛牌資料庫_dgv.ColumnHeadersHeight = 25
63
+        掛牌資料庫_dgv.AllowUserToAddRows = False
61 64
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
62 65
     End Sub
63 66
     Private  Sub Set_DGV3載入後設定()
64
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds2) : DataGridView3.DataSource = ds2.Tables(0) : conn.Close()
67
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds2) : 掛牌資料庫_dgv.DataSource = ds2.Tables(0) : conn.Close()
65 68
     End Sub
66 69
     Private  Sub Set_吊牌清單()
67 70
         Set_DGV3載入前設定()
@@ -72,21 +75,24 @@ Public Class 訂單分析報表一
72 75
         Set_DGV3載入後設定()
73 76
     End Sub
74 77
     Private  Sub Set_grid3()
75
-        DataGridView3.Columns(0).Width = 50 : DataGridView3.Columns(1).Width = 50 : DataGridView3.Columns(2).Width = 50 : DataGridView3.Columns(3).Width = 60 : DataGridView3.Columns(4).Width = 60
76
-        DataGridView3.Columns(3).DefaultCellStyle.Format = "#,##0"
77
-        DataGridView3.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView3.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
78
-        DataGridView3.Columns(4).DefaultCellStyle.Format = "#,##0"
79
-        DataGridView3.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView3.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
78
+        掛牌資料庫_dgv.Columns(0).Width = 50 : 掛牌資料庫_dgv.Columns(1).Width = 50 : 掛牌資料庫_dgv.Columns(2).Width = 50 : 掛牌資料庫_dgv.Columns(3).Width = 60
79
+        掛牌資料庫_dgv.Columns(4).Width = 60
80
+        掛牌資料庫_dgv.Columns(3).DefaultCellStyle.Format = "#,##0"
81
+        掛牌資料庫_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
82
+        掛牌資料庫_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
83
+        掛牌資料庫_dgv.Columns(4).DefaultCellStyle.Format = "#,##0"
84
+        掛牌資料庫_dgv.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
85
+        掛牌資料庫_dgv.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
80 86
     End Sub
81 87
     Private  Sub Set_DGV4載入前設定()
82
-        DataGridView4.DataSource = Nothing : ds3.Clear()
83
-        DataGridView4.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
84
-        DataGridView4.ColumnHeadersHeight = 25
85
-        DataGridView4.AllowUserToAddRows = False
88
+        確認通知書_dgv.DataSource = Nothing : ds3.Clear()
89
+        確認通知書_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
90
+        確認通知書_dgv.ColumnHeadersHeight = 25
91
+        確認通知書_dgv.AllowUserToAddRows = False
86 92
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
87 93
     End Sub
88 94
     Private  Sub Set_DGV4載入後設定()
89
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds3) : DataGridView4.DataSource = ds3.Tables(0) : conn.Close()
95
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds3) : 確認通知書_dgv.DataSource = ds3.Tables(0) : conn.Close()
90 96
     End Sub
91 97
     Private  Sub Set_確認通知單()
92 98
         Set_DGV4載入前設定()
@@ -96,17 +102,18 @@ Public Class 訂單分析報表一
96 102
         Set_DGV4載入後設定()
97 103
     End Sub
98 104
     Private  Sub Set_grid4()
99
-        DataGridView4.Columns(0).Width = 50 : DataGridView4.Columns(1).Width = 50 : DataGridView4.Columns(2).Width = 90 : DataGridView4.Columns(3).Width = 90
105
+        確認通知書_dgv.Columns(0).Width = 50 : 確認通知書_dgv.Columns(1).Width = 50 : 確認通知書_dgv.Columns(2).Width = 90 : 確認通知書_dgv.Columns(3).Width = 90
100 106
     End Sub
101 107
     Private  Sub Set_DGV5載入前設定()
102
-        DataGridView5.DataSource = Nothing : ds4.Clear()
103
-        DataGridView5.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
104
-        DataGridView5.ColumnHeadersHeight = 25
105
-        DataGridView5.AllowUserToAddRows = False
108
+        量產樣品控制表未出貨數_dgv.DataSource = Nothing : ds4.Clear()
109
+        量產樣品控制表未出貨數_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
110
+        量產樣品控制表未出貨數_dgv.ColumnHeadersHeight = 25
111
+        量產樣品控制表未出貨數_dgv.AllowUserToAddRows = False
106 112
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
107 113
     End Sub
108 114
     Private  Sub Set_DGV5載入後設定()
109
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds4) : DataGridView5.DataSource = ds4.Tables(0) : conn.Close()
115
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds4)
116
+        量產樣品控制表未出貨數_dgv.DataSource = ds4.Tables(0) : conn.Close()
110 117
     End Sub
111 118
     Private  Sub Set_量產樣品控制表未出貨數()
112 119
         Set_DGV5載入前設定()
@@ -116,75 +123,84 @@ Public Class 訂單分析報表一
116 123
         Set_DGV5載入後設定()
117 124
     End Sub
118 125
     Private  Sub Set_grid5()
119
-        DataGridView5.Columns(0).Width = 45 : DataGridView5.Columns(1).Width = 120 : DataGridView5.Columns(2).Width = 40 : DataGridView5.Columns(3).Width = 58 : DataGridView5.Columns(4).Width = 58
120
-        DataGridView5.Columns(5).Width = 58
121
-        DataGridView5.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView5.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
122
-        DataGridView5.Columns(4).DefaultCellStyle.Format = "#,##0"
123
-        DataGridView5.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView5.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
124
-        DataGridView5.Columns(5).DefaultCellStyle.Format = "#,##0"
125
-        DataGridView5.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView5.Columns(5).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
126
+        量產樣品控制表未出貨數_dgv.Columns(0).Width = 45 : 量產樣品控制表未出貨數_dgv.Columns(1).Width = 120 : 量產樣品控制表未出貨數_dgv.Columns(2).Width = 40
127
+        量產樣品控制表未出貨數_dgv.Columns(3).Width = 58 : 量產樣品控制表未出貨數_dgv.Columns(4).Width = 58
128
+        量產樣品控制表未出貨數_dgv.Columns(5).Width = 58
129
+        量產樣品控制表未出貨數_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
130
+        量產樣品控制表未出貨數_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
131
+        量產樣品控制表未出貨數_dgv.Columns(4).DefaultCellStyle.Format = "#,##0"
132
+        量產樣品控制表未出貨數_dgv.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
133
+        量產樣品控制表未出貨數_dgv.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
134
+        量產樣品控制表未出貨數_dgv.Columns(5).DefaultCellStyle.Format = "#,##0"
135
+        量產樣品控制表未出貨數_dgv.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
136
+        量產樣品控制表未出貨數_dgv.Columns(5).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
126 137
     End Sub
127 138
     Private  Sub Set_DGV6載入前設定()
128
-        DataGridView6.DataSource = Nothing : ds5.Clear()
129
-        DataGridView6.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
130
-        DataGridView6.ColumnHeadersHeight = 25
131
-        DataGridView6.AllowUserToAddRows = False
139
+        CXL數_dgv.DataSource = Nothing : ds5.Clear()
140
+        CXL數_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
141
+        CXL數_dgv.ColumnHeadersHeight = 25
142
+        CXL數_dgv.AllowUserToAddRows = False
132 143
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
133 144
     End Sub
134
-    Private  Sub Set_DGV6載入後設定()
135
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds5) : DataGridView6.DataSource = ds5.Tables(0) : conn.Close()
145
+    Private Sub Set_DGV6載入後設定()
146
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds5) : CXL數_dgv.DataSource = ds5.Tables(0) : conn.Close()
136 147
     End Sub
137
-    Private  Sub Set_量產樣品控制表CXL數()
148
+    Private Sub Set_量產樣品控制表CXL數()
138 149
         Set_DGV6載入前設定()
139 150
         SQL1 = "SELECT 年份, Sample_Type, FTY, COUNT(Style) AS 樣品單數, SUM(資料筆數) AS 顏色筆數, SUM(總雙數) AS 總雙數 FROM (SELECT 年份, Sample_Type, FTY, Style, COUNT(Style) AS 資料筆數, " &
140 151
                "SUM(QTY) AS 總雙數 FROM 量產樣品控制表 WHERE (CXL = 1) AND (年份 LIKE '" & 季度_cb.Text & "') GROUP BY 年份, Sample_Type, FTY, Style) AS Q " &
141 152
                "GROUP BY 年份, Sample_Type, FTY"
142 153
         Set_DGV6載入後設定()
143 154
     End Sub
144
-    Private  Sub Set_grid6()
145
-        DataGridView6.Columns(0).Width = 45 : DataGridView6.Columns(1).Width = 120 : DataGridView6.Columns(2).Width = 40 : DataGridView6.Columns(3).Width = 58 : DataGridView6.Columns(4).Width = 58
146
-        DataGridView6.Columns(5).Width = 58
147
-        DataGridView6.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView6.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
148
-        DataGridView6.Columns(4).DefaultCellStyle.Format = "#,##0"
149
-        DataGridView6.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView6.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
150
-        DataGridView6.Columns(5).DefaultCellStyle.Format = "#,##0"
151
-        DataGridView6.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView6.Columns(5).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
152
-    End Sub
153
-    Private  Sub Set_DGV7載入前設定()
154
-        DataGridView7.DataSource = Nothing : ds6.Clear()
155
-        DataGridView7.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
156
-        DataGridView7.ColumnHeadersHeight = 25
157
-        DataGridView7.AllowUserToAddRows = False
155
+    Private Sub Set_grid6()
156
+        CXL數_dgv.Columns(0).Width = 45 : CXL數_dgv.Columns(1).Width = 120 : CXL數_dgv.Columns(2).Width = 40 : CXL數_dgv.Columns(3).Width = 58 : CXL數_dgv.Columns(4).Width = 58
157
+        CXL數_dgv.Columns(5).Width = 58
158
+        CXL數_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : CXL數_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
159
+        CXL數_dgv.Columns(4).DefaultCellStyle.Format = "#,##0"
160
+        CXL數_dgv.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : CXL數_dgv.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
161
+        CXL數_dgv.Columns(5).DefaultCellStyle.Format = "#,##0"
162
+        CXL數_dgv.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : CXL數_dgv.Columns(5).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
163
+    End Sub
164
+    Private Sub Set_DGV7載入前設定()
165
+        量產樣品控制表已出貨數_dgv.DataSource = Nothing : ds6.Clear()
166
+        量產樣品控制表已出貨數_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
167
+        量產樣品控制表已出貨數_dgv.ColumnHeadersHeight = 25
168
+        量產樣品控制表已出貨數_dgv.AllowUserToAddRows = False
158 169
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
159 170
     End Sub
160
-    Private  Sub Set_DGV7載入後設定()
161
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds6) : DataGridView7.DataSource = ds6.Tables(0) : conn.Close()
171
+    Private Sub Set_DGV7載入後設定()
172
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds6)
173
+        量產樣品控制表已出貨數_dgv.DataSource = ds6.Tables(0) : conn.Close()
162 174
     End Sub
163
-    Private  Sub Set_量產樣品控制表已出貨數()
175
+    Private Sub Set_量產樣品控制表已出貨數()
164 176
         Set_DGV7載入前設定()
165 177
         SQL1 = "SELECT 年份, Sample_Type, FTY, COUNT(Style) AS 樣品單數, SUM(資料筆數) AS 顏色筆數, SUM(總雙數) AS 總雙數 FROM (SELECT 年份, Sample_Type, FTY, Style, COUNT(Style) AS 資料筆數, " &
166 178
                "SUM(QTY) AS 總雙數 FROM 量產樣品控制表 WHERE (CXL = 0) AND (QTY - 出貨數量 = 0) AND (年份 LIKE '" & 季度_cb.Text & "') GROUP BY 年份, Sample_Type, FTY, Style) AS Q " &
167 179
                "GROUP BY 年份, Sample_Type, FTY"
168 180
         Set_DGV7載入後設定()
169 181
     End Sub
170
-    Private  Sub Set_grid7()
171
-        DataGridView7.Columns(0).Width = 45 : DataGridView7.Columns(1).Width = 120 : DataGridView7.Columns(2).Width = 40 : DataGridView7.Columns(3).Width = 58 : DataGridView7.Columns(4).Width = 58
172
-        DataGridView7.Columns(5).Width = 58
173
-        DataGridView7.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView7.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
174
-        DataGridView7.Columns(4).DefaultCellStyle.Format = "#,##0"
175
-        DataGridView7.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView7.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
176
-    End Sub
177
-    Private  Sub Set_DGV8載入前設定()
178
-        DataGridView8.DataSource = Nothing : ds7.Clear()
179
-        DataGridView8.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
180
-        DataGridView8.ColumnHeadersHeight = 25
181
-        DataGridView8.AllowUserToAddRows = False
182
+    Private Sub Set_grid7()
183
+        量產樣品控制表已出貨數_dgv.Columns(0).Width = 45 : 量產樣品控制表已出貨數_dgv.Columns(1).Width = 120 : 量產樣品控制表已出貨數_dgv.Columns(2).Width = 40
184
+        量產樣品控制表已出貨數_dgv.Columns(3).Width = 58 : 量產樣品控制表已出貨數_dgv.Columns(4).Width = 58
185
+        量產樣品控制表已出貨數_dgv.Columns(5).Width = 58
186
+        量產樣品控制表已出貨數_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
187
+        量產樣品控制表已出貨數_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
188
+        量產樣品控制表已出貨數_dgv.Columns(4).DefaultCellStyle.Format = "#,##0"
189
+        量產樣品控制表已出貨數_dgv.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
190
+        量產樣品控制表已出貨數_dgv.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
191
+    End Sub
192
+    Private Sub Set_DGV8載入前設定()
193
+        訂單控制表未出貨數_dgv.DataSource = Nothing : ds7.Clear()
194
+        訂單控制表未出貨數_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
195
+        訂單控制表未出貨數_dgv.ColumnHeadersHeight = 25
196
+        訂單控制表未出貨數_dgv.AllowUserToAddRows = False
182 197
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
183 198
     End Sub
184
-    Private  Sub Set_DGV8載入後設定()
185
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds7) : DataGridView8.DataSource = ds7.Tables(0) : conn.Close()
199
+    Private Sub Set_DGV8載入後設定()
200
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds7)
201
+        訂單控制表未出貨數_dgv.DataSource = ds7.Tables(0) : conn.Close()
186 202
     End Sub
187
-    Private  Sub Set_訂單控制表未出貨數()
203
+    Private Sub Set_訂單控制表未出貨數()
188 204
         Set_DGV8載入前設定()
189 205
         If 量產訂單依季度篩選_cb.Checked = True Then
190 206
             SQL1 = "SELECT 交期, LEFT(年份季度,4) AS 季度, 生產工廠 AS 工廠, COUNT(形體號) AS 訂單數量, SUM(訂單總數) AS 訂單總數 FROM (SELECT LEFT(客戶交期, 7) AS 交期, " &
@@ -204,23 +220,27 @@ Public Class 訂單分析報表一
204 220
         End If
205 221
         Set_DGV8載入後設定()
206 222
     End Sub
207
-    Private  Sub Set_grid8()
208
-        DataGridView8.Columns(0).Width = 65 : DataGridView8.Columns(1).Width = 60 : DataGridView8.Columns(2).Width = 60 : DataGridView8.Columns(3).Width = 60 : DataGridView8.Columns(4).Width = 60
209
-        DataGridView8.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView8.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
210
-        DataGridView8.Columns(4).DefaultCellStyle.Format = "#,##0"
211
-        DataGridView8.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView8.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
212
-    End Sub
213
-    Private  Sub Set_DGV9載入前設定()
214
-        DataGridView9.DataSource = Nothing : ds8.Clear()
215
-        DataGridView9.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
216
-        DataGridView9.ColumnHeadersHeight = 25
217
-        DataGridView9.AllowUserToAddRows = False
223
+    Private Sub Set_grid8()
224
+        訂單控制表未出貨數_dgv.Columns(0).Width = 65 : 訂單控制表未出貨數_dgv.Columns(1).Width = 60 : 訂單控制表未出貨數_dgv.Columns(2).Width = 60
225
+        訂單控制表未出貨數_dgv.Columns(3).Width = 60 : 訂單控制表未出貨數_dgv.Columns(4).Width = 60
226
+        訂單控制表未出貨數_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
227
+        訂單控制表未出貨數_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
228
+        訂單控制表未出貨數_dgv.Columns(4).DefaultCellStyle.Format = "#,##0"
229
+        訂單控制表未出貨數_dgv.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
230
+        訂單控制表未出貨數_dgv.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
231
+    End Sub
232
+    Private Sub Set_DGV9載入前設定()
233
+        訂單控制表已出貨數_dgv.DataSource = Nothing : ds8.Clear()
234
+        訂單控制表已出貨數_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
235
+        訂單控制表已出貨數_dgv.ColumnHeadersHeight = 25
236
+        訂單控制表已出貨數_dgv.AllowUserToAddRows = False
218 237
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
219 238
     End Sub
220
-    Private  Sub Set_DGV9載入後設定()
221
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds8) : DataGridView9.DataSource = ds8.Tables(0) : conn.Close()
239
+    Private Sub Set_DGV9載入後設定()
240
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds8)
241
+        訂單控制表已出貨數_dgv.DataSource = ds8.Tables(0) : conn.Close()
222 242
     End Sub
223
-    Private  Sub Set_訂單控制表已出貨數()
243
+    Private Sub Set_訂單控制表已出貨數()
224 244
         Set_DGV9載入前設定()
225 245
         If 量產訂單依季度篩選_cb.Checked = True Then
226 246
             SQL1 = "SELECT 交期, LEFT(年份季度,4) AS 季度, 生產工廠 AS 工廠, COUNT(形體號) AS 訂單數量, SUM(訂單總數) AS 訂單總數 FROM (SELECT LEFT(客戶交期, 7) AS 交期, " &
@@ -235,28 +255,33 @@ Public Class 訂單分析報表一
235 255
             End If
236 256
             SQL1 = "SELECT 交期, LEFT(年份季度,4) AS 季度, 生產工廠 AS 工廠, COUNT(形體號) AS 訂單數量, SUM(訂單總數) AS 訂單總數 FROM (SELECT LEFT(" & 條件 & ", 7) AS 交期, " &
237 257
                    "LEFT(年份季度,4) AS 年份季度, 生產工廠, 形體號, SUM(訂單數量) AS 訂單總數 " &
238
-                   "FROM 訂單控制表 WHERE (LEFT(" & 條件 & ", 4) LIKE '" & 年度_cb.Text & "%') AND (CXL = 0 OR CXL IS NULL) AND (訂單數量 - 出貨數量 = 0) GROUP BY LEFT(" & 條件 & ", 7), LEFT(年份季度,4), " &
239
-                   "生產工廠, 形體號) AS Q GROUP BY LEFT(年份季度,4), 生產工廠, 交期 ORDER BY 生產工廠, 交期 DESC"
258
+                   "FROM 訂單控制表 
259
+                   WHERE (LEFT(" & 條件 & ", 4) LIKE '" & 年度_cb.Text & "%') AND (CXL = 0 OR CXL IS NULL) AND (訂單數量 - 出貨數量 = 0) 
260
+                   GROUP BY LEFT(" & 條件 & ", 7), LEFT(年份季度,4), 生產工廠, 形體號) AS Q GROUP BY LEFT(年份季度,4), 生產工廠, 交期 ORDER BY 生產工廠, 交期 DESC"
240 261
         End If
241 262
         Set_DGV9載入後設定()
242 263
     End Sub
243
-    Private  Sub Set_grid9()
244
-        DataGridView9.Columns(0).Width = 65 : DataGridView9.Columns(1).Width = 60 : DataGridView9.Columns(2).Width = 60 : DataGridView9.Columns(3).Width = 60 : DataGridView9.Columns(4).Width = 60
245
-        DataGridView9.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView9.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
246
-        DataGridView9.Columns(4).DefaultCellStyle.Format = "#,##0"
247
-        DataGridView9.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView9.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
248
-    End Sub
249
-    Private  Sub Set_DGV10載入前設定()
250
-        DataGridView10.DataSource = Nothing : ds9.Clear()
251
-        DataGridView10.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
252
-        DataGridView10.ColumnHeadersHeight = 25
253
-        DataGridView10.AllowUserToAddRows = False
264
+    Private Sub Set_grid9()
265
+        訂單控制表已出貨數_dgv.Columns(0).Width = 65 : 訂單控制表已出貨數_dgv.Columns(1).Width = 60 : 訂單控制表已出貨數_dgv.Columns(2).Width = 60
266
+        訂單控制表已出貨數_dgv.Columns(3).Width = 60 : 訂單控制表已出貨數_dgv.Columns(4).Width = 60
267
+        訂單控制表已出貨數_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
268
+        訂單控制表已出貨數_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
269
+        訂單控制表已出貨數_dgv.Columns(4).DefaultCellStyle.Format = "#,##0"
270
+        訂單控制表已出貨數_dgv.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
271
+        訂單控制表已出貨數_dgv.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
272
+    End Sub
273
+    Private Sub Set_DGV10載入前設定()
274
+        訂單控制表CXL數_dgv.DataSource = Nothing : ds9.Clear()
275
+        訂單控制表CXL數_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
276
+        訂單控制表CXL數_dgv.ColumnHeadersHeight = 25
277
+        訂單控制表CXL數_dgv.AllowUserToAddRows = False
254 278
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
255 279
     End Sub
256
-    Private  Sub Set_DGV10載入後設定()
257
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds9) : DataGridView10.DataSource = ds9.Tables(0) : conn.Close()
280
+    Private Sub Set_DGV10載入後設定()
281
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds9)
282
+        訂單控制表CXL數_dgv.DataSource = ds9.Tables(0) : conn.Close()
258 283
     End Sub
259
-    Private  Sub Set_訂單控制表CXL數()
284
+    Private Sub Set_訂單控制表CXL數()
260 285
         Set_DGV10載入前設定()
261 286
         If 量產訂單依季度篩選_cb.Checked = True Then
262 287
             SQL1 = "SELECT 交期, LEFT(年份季度,4) AS 季度, 生產工廠 AS 工廠, COUNT(形體號) AS 訂單數量, SUM(訂單總數) AS 訂單總數 FROM (SELECT LEFT(客戶交期, 7) AS 交期, " &
@@ -276,13 +301,16 @@ Public Class 訂單分析報表一
276 301
         End If
277 302
         Set_DGV10載入後設定()
278 303
     End Sub
279
-    Private  Sub Set_grid10()
280
-        DataGridView10.Columns(0).Width = 65 : DataGridView10.Columns(1).Width = 60 : DataGridView10.Columns(2).Width = 60 : DataGridView10.Columns(3).Width = 60 : DataGridView10.Columns(4).Width = 60
281
-        DataGridView10.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView10.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
282
-        DataGridView10.Columns(4).DefaultCellStyle.Format = "#,##0"
283
-        DataGridView10.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView10.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
304
+    Private Sub Set_grid10()
305
+        訂單控制表CXL數_dgv.Columns(0).Width = 65 : 訂單控制表CXL數_dgv.Columns(1).Width = 60 : 訂單控制表CXL數_dgv.Columns(2).Width = 60
306
+        訂單控制表CXL數_dgv.Columns(3).Width = 60 : 訂單控制表CXL數_dgv.Columns(4).Width = 60
307
+        訂單控制表CXL數_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
308
+        訂單控制表CXL數_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
309
+        訂單控制表CXL數_dgv.Columns(4).DefaultCellStyle.Format = "#,##0"
310
+        訂單控制表CXL數_dgv.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
311
+        訂單控制表CXL數_dgv.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
284 312
     End Sub
285
-    Private  Sub ComboBox2下拉表單資料載入()
313
+    Private Sub ComboBox2下拉表單資料載入()
286 314
         conn.Close()
287 315
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
288 316
         SQL1 = "SELECT 年份季度 FROM 訂單控制表年份季度清單 ORDER BY 年份季度 DESC"
@@ -290,100 +318,107 @@ Public Class 訂單分析報表一
290 318
         季度_cb.Items.Clear()
291 319
         While (dr.Read()) : 季度_cb.Items.Add(dr("年份季度")) : End While : conn.Close()
292 320
     End Sub
293
-    Private  Sub 查詢()
321
+    Private Sub 查詢()
294 322
         Set_圖片清單() : Set_grid1() : Set_樣品單清單() : Set_grid2() : Set_吊牌清單() : Set_grid3() : Set_確認通知單() : Set_grid4() : Set_量產樣品控制表未出貨數() : Set_grid5()
295 323
         Set_量產樣品控制表CXL數() : Set_grid6() : Set_量產樣品控制表已出貨數() : Set_grid7() : Set_訂單控制表未出貨數() : Set_grid8() : Set_訂單控制表已出貨數() : Set_grid9()
296 324
         Set_訂單控制表CXL數() : Set_grid10() : Set_自動彙總1()
297 325
     End Sub
298
-    Private  Sub Set_自動彙總1()
326
+    Private Sub Set_自動彙總1()
299 327
         Dim 加總(34) As Double
300
-        For i As Integer = 0 To DataGridView1.Rows.Count - 1
301
-            If DataGridView1.RowCount = 0 Then : 加總(0) += 0 : Else : 加總(0) += DataGridView1.Rows(i).Cells("圖片數量").Value : End If
328
+        For i As Integer = 0 To 圖片資料庫_dgv.Rows.Count - 1
329
+            If 圖片資料庫_dgv.RowCount = 0 Then : 加總(0) += 0 : Else : 加總(0) += 圖片資料庫_dgv.Rows(i).Cells("圖片數量").Value : End If
302 330
         Next i
303 331
         加總(1) = 0 : 加總(2) = 0 : 加總(3) = 0 : 加總(4) = 0 : 加總(5) = 0 : 加總(6) = 0 : 加總(7) = 0 : 加總(8) = 0 : 加總(9) = 0 : 加總(10) = 0
304
-        For i As Integer = 0 To DataGridView2.Rows.Count - 1
305
-            If DataGridView2.Rows(i).Cells("階段").Value = "ILR" Then
306
-                If DataGridView2.RowCount = 0 Then : 加總(1) += 0 : Else : 加總(1) += DataGridView2.Rows(i).Cells("樣品單數").Value : End If
307
-                If DataGridView2.RowCount = 0 Then : 加總(2) += 0 : Else : 加總(2) += DataGridView2.Rows(i).Cells("顏色筆數").Value : End If
308
-            ElseIf DataGridView2.Rows(i).Cells("階段").Value = "FLR" Then
309
-                If DataGridView2.RowCount = 0 Then : 加總(3) += 0 : Else : 加總(3) += DataGridView2.Rows(i).Cells("樣品單數").Value : End If
310
-                If DataGridView2.RowCount = 0 Then : 加總(4) += 0 : Else : 加總(4) += DataGridView2.Rows(i).Cells("顏色筆數").Value : End If
311
-            ElseIf DataGridView2.Rows(i).Cells("階段").Value = "SMS" Then
312
-                If DataGridView2.RowCount = 0 Then : 加總(5) += 0 : Else : 加總(5) += DataGridView2.Rows(i).Cells("樣品單數").Value : End If
313
-                If DataGridView2.RowCount = 0 Then : 加總(6) += 0 : Else : 加總(6) += DataGridView2.Rows(i).Cells("顏色筆數").Value : End If
314
-            ElseIf DataGridView2.Rows(i).Cells("階段").Value = "SMU" Then
315
-                If DataGridView2.RowCount = 0 Then : 加總(7) += 0 : Else : 加總(7) += DataGridView2.Rows(i).Cells("樣品單數").Value : End If
316
-                If DataGridView2.RowCount = 0 Then : 加總(8) += 0 : Else : 加總(8) += DataGridView2.Rows(i).Cells("顏色筆數").Value : End If
317
-            ElseIf DataGridView2.Rows(i).Cells("階段").Value = "CFM" Then
318
-                If DataGridView2.RowCount = 0 Then : 加總(9) += 0 : Else : 加總(9) += DataGridView2.Rows(i).Cells("樣品單數").Value : End If
319
-                If DataGridView2.RowCount = 0 Then : 加總(10) += 0 : Else : 加總(10) += DataGridView2.Rows(i).Cells("顏色筆數").Value : End If
332
+        For i As Integer = 0 To 中文樣品單資料庫_dgv.Rows.Count - 1
333
+            If 中文樣品單資料庫_dgv.Rows(i).Cells("階段").Value = "ILR" Then
334
+                If 中文樣品單資料庫_dgv.RowCount = 0 Then : 加總(1) += 0 : Else : 加總(1) += 中文樣品單資料庫_dgv.Rows(i).Cells("樣品單數").Value : End If
335
+                If 中文樣品單資料庫_dgv.RowCount = 0 Then : 加總(2) += 0 : Else : 加總(2) += 中文樣品單資料庫_dgv.Rows(i).Cells("顏色筆數").Value : End If
336
+            ElseIf 中文樣品單資料庫_dgv.Rows(i).Cells("階段").Value = "FLR" Then
337
+                If 中文樣品單資料庫_dgv.RowCount = 0 Then : 加總(3) += 0 : Else : 加總(3) += 中文樣品單資料庫_dgv.Rows(i).Cells("樣品單數").Value : End If
338
+                If 中文樣品單資料庫_dgv.RowCount = 0 Then : 加總(4) += 0 : Else : 加總(4) += 中文樣品單資料庫_dgv.Rows(i).Cells("顏色筆數").Value : End If
339
+            ElseIf 中文樣品單資料庫_dgv.Rows(i).Cells("階段").Value = "SMS" Then
340
+                If 中文樣品單資料庫_dgv.RowCount = 0 Then : 加總(5) += 0 : Else : 加總(5) += 中文樣品單資料庫_dgv.Rows(i).Cells("樣品單數").Value : End If
341
+                If 中文樣品單資料庫_dgv.RowCount = 0 Then : 加總(6) += 0 : Else : 加總(6) += 中文樣品單資料庫_dgv.Rows(i).Cells("顏色筆數").Value : End If
342
+            ElseIf 中文樣品單資料庫_dgv.Rows(i).Cells("階段").Value = "SMU" Then
343
+                If 中文樣品單資料庫_dgv.RowCount = 0 Then : 加總(7) += 0 : Else : 加總(7) += 中文樣品單資料庫_dgv.Rows(i).Cells("樣品單數").Value : End If
344
+                If 中文樣品單資料庫_dgv.RowCount = 0 Then : 加總(8) += 0 : Else : 加總(8) += 中文樣品單資料庫_dgv.Rows(i).Cells("顏色筆數").Value : End If
345
+            ElseIf 中文樣品單資料庫_dgv.Rows(i).Cells("階段").Value = "CFM" Then
346
+                If 中文樣品單資料庫_dgv.RowCount = 0 Then : 加總(9) += 0 : Else : 加總(9) += 中文樣品單資料庫_dgv.Rows(i).Cells("樣品單數").Value : End If
347
+                If 中文樣品單資料庫_dgv.RowCount = 0 Then : 加總(10) += 0 : Else : 加總(10) += 中文樣品單資料庫_dgv.Rows(i).Cells("顏色筆數").Value : End If
320 348
             End If
321 349
         Next i
322
-        For i As Integer = 0 To DataGridView5.Rows.Count - 1
323
-            If DataGridView5.RowCount = 0 Then : 加總(11) += 0 : Else : 加總(11) += DataGridView5.Rows(i).Cells("樣品單數").Value : End If
324
-            If DataGridView5.RowCount = 0 Then : 加總(12) += 0 : Else : 加總(12) += DataGridView5.Rows(i).Cells("總雙數").Value : End If
350
+        For i As Integer = 0 To 量產樣品控制表未出貨數_dgv.Rows.Count - 1
351
+            If 量產樣品控制表未出貨數_dgv.RowCount = 0 Then : 加總(11) += 0 : Else : 加總(11) += 量產樣品控制表未出貨數_dgv.Rows(i).Cells("樣品單數").Value : End If
352
+            If 量產樣品控制表未出貨數_dgv.RowCount = 0 Then : 加總(12) += 0 : Else : 加總(12) += 量產樣品控制表未出貨數_dgv.Rows(i).Cells("總雙數").Value : End If
325 353
         Next i
326
-        For i As Integer = 0 To DataGridView6.Rows.Count - 1
327
-            If DataGridView6.RowCount = 0 Then : 加總(13) += 0 : Else : 加總(13) += DataGridView6.Rows(i).Cells("樣品單數").Value : End If
328
-            If DataGridView6.RowCount = 0 Then : 加總(14) += 0 : Else : 加總(14) += DataGridView6.Rows(i).Cells("總雙數").Value : End If
354
+        For i As Integer = 0 To CXL數_dgv.Rows.Count - 1
355
+            If CXL數_dgv.RowCount = 0 Then : 加總(13) += 0 : Else : 加總(13) += CXL數_dgv.Rows(i).Cells("樣品單數").Value : End If
356
+            If CXL數_dgv.RowCount = 0 Then : 加總(14) += 0 : Else : 加總(14) += CXL數_dgv.Rows(i).Cells("總雙數").Value : End If
329 357
         Next i
330
-        For i As Integer = 0 To DataGridView7.Rows.Count - 1
331
-            If DataGridView7.RowCount = 0 Then : 加總(15) += 0 : Else : 加總(15) += DataGridView7.Rows(i).Cells("樣品單數").Value : End If
332
-            If DataGridView7.RowCount = 0 Then : 加總(16) += 0 : Else : 加總(16) += DataGridView7.Rows(i).Cells("總雙數").Value : End If
358
+        For i As Integer = 0 To 量產樣品控制表已出貨數_dgv.Rows.Count - 1
359
+            If 量產樣品控制表已出貨數_dgv.RowCount = 0 Then : 加總(15) += 0 : Else : 加總(15) += 量產樣品控制表已出貨數_dgv.Rows(i).Cells("樣品單數").Value : End If
360
+            If 量產樣品控制表已出貨數_dgv.RowCount = 0 Then : 加總(16) += 0 : Else : 加總(16) += 量產樣品控制表已出貨數_dgv.Rows(i).Cells("總雙數").Value : End If
333 361
         Next i
334
-        For i As Integer = 0 To DataGridView8.Rows.Count - 1
335
-            If DataGridView8.Rows(i).Cells("工廠").Value = "NJ" Then
336
-                If DataGridView8.RowCount = 0 Then : 加總(17) += 0 : Else : 加總(17) += DataGridView8.Rows(i).Cells("訂單數量").Value : End If
337
-                If DataGridView8.RowCount = 0 Then : 加總(18) += 0 : Else : 加總(18) += DataGridView8.Rows(i).Cells("訂單總數").Value : End If
338
-            ElseIf DataGridView8.Rows(i).Cells("工廠").Value = "JH" Then
339
-                If DataGridView8.RowCount = 0 Then : 加總(19) += 0 : Else : 加總(19) += DataGridView8.Rows(i).Cells("訂單數量").Value : End If
340
-                If DataGridView8.RowCount = 0 Then : 加總(20) += 0 : Else : 加總(20) += DataGridView8.Rows(i).Cells("訂單總數").Value : End If
341
-            ElseIf DataGridView8.Rows(i).Cells("工廠").Value = "SK" Then
342
-                If DataGridView8.RowCount = 0 Then : 加總(21) += 0 : Else : 加總(21) += DataGridView8.Rows(i).Cells("訂單數量").Value : End If
343
-                If DataGridView8.RowCount = 0 Then : 加總(22) += 0 : Else : 加總(22) += DataGridView8.Rows(i).Cells("訂單總數").Value : End If
362
+        For i As Integer = 0 To 訂單控制表未出貨數_dgv.Rows.Count - 1
363
+            If 訂單控制表未出貨數_dgv.Rows(i).Cells("工廠").Value = "NJ" Then
364
+                If 訂單控制表未出貨數_dgv.RowCount = 0 Then : 加總(17) += 0 : Else : 加總(17) += 訂單控制表未出貨數_dgv.Rows(i).Cells("訂單數量").Value : End If
365
+                If 訂單控制表未出貨數_dgv.RowCount = 0 Then : 加總(18) += 0 : Else : 加總(18) += 訂單控制表未出貨數_dgv.Rows(i).Cells("訂單總數").Value : End If
366
+            ElseIf 訂單控制表未出貨數_dgv.Rows(i).Cells("工廠").Value = "JH" Then
367
+                If 訂單控制表未出貨數_dgv.RowCount = 0 Then : 加總(19) += 0 : Else : 加總(19) += 訂單控制表未出貨數_dgv.Rows(i).Cells("訂單數量").Value : End If
368
+                If 訂單控制表未出貨數_dgv.RowCount = 0 Then : 加總(20) += 0 : Else : 加總(20) += 訂單控制表未出貨數_dgv.Rows(i).Cells("訂單總數").Value : End If
369
+            ElseIf 訂單控制表未出貨數_dgv.Rows(i).Cells("工廠").Value = "SK" Then
370
+                If 訂單控制表未出貨數_dgv.RowCount = 0 Then : 加總(21) += 0 : Else : 加總(21) += 訂單控制表未出貨數_dgv.Rows(i).Cells("訂單數量").Value : End If
371
+                If 訂單控制表未出貨數_dgv.RowCount = 0 Then : 加總(22) += 0 : Else : 加總(22) += 訂單控制表未出貨數_dgv.Rows(i).Cells("訂單總數").Value : End If
344 372
             End If
345 373
         Next i
346
-        For i As Integer = 0 To DataGridView9.Rows.Count - 1
347
-            If DataGridView9.Rows(i).Cells("工廠").Value = "NJ" Then
348
-                If DataGridView9.RowCount = 0 Then : 加總(23) += 0 : Else : 加總(23) += DataGridView9.Rows(i).Cells("訂單數量").Value : End If
349
-                If DataGridView9.RowCount = 0 Then : 加總(24) += 0 : Else : 加總(24) += DataGridView9.Rows(i).Cells("訂單總數").Value : End If
350
-            ElseIf DataGridView9.Rows(i).Cells("工廠").Value = "JH" Then
351
-                If DataGridView9.RowCount = 0 Then : 加總(25) += 0 : Else : 加總(25) += DataGridView9.Rows(i).Cells("訂單數量").Value : End If
352
-                If DataGridView9.RowCount = 0 Then : 加總(26) += 0 : Else : 加總(26) += DataGridView9.Rows(i).Cells("訂單總數").Value : End If
353
-            ElseIf DataGridView9.Rows(i).Cells("工廠").Value = "SK" Then
354
-                If DataGridView9.RowCount = 0 Then : 加總(27) += 0 : Else : 加總(27) += DataGridView9.Rows(i).Cells("訂單數量").Value : End If
355
-                If DataGridView9.RowCount = 0 Then : 加總(28) += 0 : Else : 加總(28) += DataGridView9.Rows(i).Cells("訂單總數").Value : End If
374
+        For i As Integer = 0 To 訂單控制表已出貨數_dgv.Rows.Count - 1
375
+            If 訂單控制表已出貨數_dgv.Rows(i).Cells("工廠").Value = "NJ" Then
376
+                If 訂單控制表已出貨數_dgv.RowCount = 0 Then : 加總(23) += 0 : Else : 加總(23) += 訂單控制表已出貨數_dgv.Rows(i).Cells("訂單數量").Value : End If
377
+                If 訂單控制表已出貨數_dgv.RowCount = 0 Then : 加總(24) += 0 : Else : 加總(24) += 訂單控制表已出貨數_dgv.Rows(i).Cells("訂單總數").Value : End If
378
+            ElseIf 訂單控制表已出貨數_dgv.Rows(i).Cells("工廠").Value = "JH" Then
379
+                If 訂單控制表已出貨數_dgv.RowCount = 0 Then : 加總(25) += 0 : Else : 加總(25) += 訂單控制表已出貨數_dgv.Rows(i).Cells("訂單數量").Value : End If
380
+                If 訂單控制表已出貨數_dgv.RowCount = 0 Then : 加總(26) += 0 : Else : 加總(26) += 訂單控制表已出貨數_dgv.Rows(i).Cells("訂單總數").Value : End If
381
+            ElseIf 訂單控制表已出貨數_dgv.Rows(i).Cells("工廠").Value = "SK" Then
382
+                If 訂單控制表已出貨數_dgv.RowCount = 0 Then : 加總(27) += 0 : Else : 加總(27) += 訂單控制表已出貨數_dgv.Rows(i).Cells("訂單數量").Value : End If
383
+                If 訂單控制表已出貨數_dgv.RowCount = 0 Then : 加總(28) += 0 : Else : 加總(28) += 訂單控制表已出貨數_dgv.Rows(i).Cells("訂單總數").Value : End If
356 384
             End If
357 385
         Next i
358
-        For i As Integer = 0 To DataGridView10.Rows.Count - 1
359
-            If DataGridView10.Rows(i).Cells("工廠").Value = "NJ" Then
360
-                If DataGridView10.RowCount = 0 Then : 加總(29) += 0 : Else : 加總(29) += DataGridView10.Rows(i).Cells("訂單數量").Value : End If
361
-                If DataGridView10.RowCount = 0 Then : 加總(30) += 0 : Else : 加總(30) += DataGridView10.Rows(i).Cells("訂單總數").Value : End If
362
-            ElseIf DataGridView10.Rows(i).Cells("工廠").Value = "JH" Then
363
-                If DataGridView10.RowCount = 0 Then : 加總(31) += 0 : Else : 加總(31) += DataGridView10.Rows(i).Cells("訂單數量").Value : End If
364
-                If DataGridView10.RowCount = 0 Then : 加總(32) += 0 : Else : 加總(32) += DataGridView10.Rows(i).Cells("訂單總數").Value : End If
365
-            ElseIf DataGridView10.Rows(i).Cells("工廠").Value = "SK" Then
366
-                If DataGridView10.RowCount = 0 Then : 加總(33) += 0 : Else : 加總(33) += DataGridView10.Rows(i).Cells("訂單數量").Value : End If
367
-                If DataGridView10.RowCount = 0 Then : 加總(34) += 0 : Else : 加總(34) += DataGridView10.Rows(i).Cells("訂單總數").Value : End If
386
+        For i As Integer = 0 To 訂單控制表CXL數_dgv.Rows.Count - 1
387
+            If 訂單控制表CXL數_dgv.Rows(i).Cells("工廠").Value = "NJ" Then
388
+                If 訂單控制表CXL數_dgv.RowCount = 0 Then : 加總(29) += 0 : Else : 加總(29) += 訂單控制表CXL數_dgv.Rows(i).Cells("訂單數量").Value : End If
389
+                If 訂單控制表CXL數_dgv.RowCount = 0 Then : 加總(30) += 0 : Else : 加總(30) += 訂單控制表CXL數_dgv.Rows(i).Cells("訂單總數").Value : End If
390
+            ElseIf 訂單控制表CXL數_dgv.Rows(i).Cells("工廠").Value = "JH" Then
391
+                If 訂單控制表CXL數_dgv.RowCount = 0 Then : 加總(31) += 0 : Else : 加總(31) += 訂單控制表CXL數_dgv.Rows(i).Cells("訂單數量").Value : End If
392
+                If 訂單控制表CXL數_dgv.RowCount = 0 Then : 加總(32) += 0 : Else : 加總(32) += 訂單控制表CXL數_dgv.Rows(i).Cells("訂單總數").Value : End If
393
+            ElseIf 訂單控制表CXL數_dgv.Rows(i).Cells("工廠").Value = "SK" Then
394
+                If 訂單控制表CXL數_dgv.RowCount = 0 Then : 加總(33) += 0 : Else : 加總(33) += 訂單控制表CXL數_dgv.Rows(i).Cells("訂單數量").Value : End If
395
+                If 訂單控制表CXL數_dgv.RowCount = 0 Then : 加總(34) += 0 : Else : 加總(34) += 訂單控制表CXL數_dgv.Rows(i).Cells("訂單總數").Value : End If
368 396
             End If
369 397
         Next i
370
-        TextBox1.Text = Format(Val(加總(0)), "#,##0") : TextBox2.Text = Format(Val(加總(1)), "#,##0") : TextBox38.Text = Format(Val(加總(2)), "#,##0") : TextBox3.Text = Format(Val(加總(3)), "#,##0")
371
-        TextBox39.Text = Format(Val(加總(4)), "#,##0") : TextBox4.Text = Format(Val(加總(5)), "#,##0") : TextBox40.Text = Format(Val(加總(6)), "#,##0") : TextBox5.Text = Format(Val(加總(7)), "#,##0")
372
-        TextBox41.Text = Format(Val(加總(8)), "#,##0") : TextBox6.Text = Format(Val(加總(9)), "#,##0") : TextBox42.Text = Format(Val(加總(10)), "#,##0") : TextBox7.Text = DataGridView4.Rows.Count
373
-        TextBox8.Text = Format(Val(加總(11)), "#,##0") : TextBox9.Text = Format(Val(加總(12)), "#,##0") : TextBox10.Text = Format(Val(加總(15)), "#,##0") : TextBox11.Text = Format(Val(加總(16)), "#,##0")
374
-        TextBox12.Text = Format(Val(加總(13)), "#,##0") : TextBox13.Text = Format(Val(加總(14)), "#,##0")
398
+        圖片資料庫_tb.Text = Format(Val(加總(0)), "#,##0") : 開發ILR中文樣品單數量_tb.Text = Format(Val(加總(1)), "#,##0")
399
+        開發ILR樣品單顏色總數_tb.Text = Format(Val(加總(2)), "#,##0") : 開發FLR中文樣品單數量_tb.Text = Format(Val(加總(3)), "#,##0")
400
+        開發FLR樣品單顏色總數_tb.Text = Format(Val(加總(4)), "#,##0") : 開發SMS中文樣品單數量_tb.Text = Format(Val(加總(5)), "#,##0")
401
+        開發SMS樣品單顏色總數_tb.Text = Format(Val(加總(6)), "#,##0") : 開發SMU中文樣品單數量_tb.Text = Format(Val(加總(7)), "#,##0")
402
+        開發SMU樣品單顏色總數_tb.Text = Format(Val(加總(8)), "#,##0") : 確認CFM中文樣品單數量_tb.Text = Format(Val(加總(9)), "#,##0")
403
+        確認CFM樣品單顏色總數_tb.Text = Format(Val(加總(10)), "#,##0") : 確認通知書單量_tb.Text = 確認通知書_dgv.Rows.Count
404
+        量產樣品未出貨樣品單數_tb.Text = Format(Val(加總(11)), "#,##0") : 量產樣品未出貨總雙數_tb.Text = Format(Val(加總(12)), "#,##0")
405
+        量產樣品已出貨樣品單數_tb.Text = Format(Val(加總(15)), "#,##0") : 量產樣品已出貨總雙數_tb.Text = Format(Val(加總(16)), "#,##0")
406
+        量產樣品CXL樣品單數_tb.Text = Format(Val(加總(13)), "#,##0") : 量產樣品CXL總雙數_tb.Text = Format(Val(加總(14)), "#,##0")
375 407
 
376
-        NJ未出貨訂單數_tb.Text = Format(Val(加總(17)), "#,##0") : NJ未出貨總雙數_tb.Text = Format(Val(加總(18)), "#,##0") : JH未出貨訂單數_tb.Text = Format(Val(加總(19)), "#,##0") : JH未出貨總雙數_tb.Text = Format(Val(加總(20)), "#,##0")
408
+        NJ未出貨訂單數_tb.Text = Format(Val(加總(17)), "#,##0") : NJ未出貨總雙數_tb.Text = Format(Val(加總(18)), "#,##0")
409
+        JH未出貨訂單數_tb.Text = Format(Val(加總(19)), "#,##0") : JH未出貨總雙數_tb.Text = Format(Val(加總(20)), "#,##0")
377 410
         SK未出貨訂單數_tb.Text = Format(Val(加總(21)), "#,##0") : SK未出貨總雙數_tb.Text = Format(Val(加總(22)), "#,##0")
378 411
         未出貨訂單數_tb.Text = Format(Val(加總(17) + 加總(19) + 加總(21)), "#,##0")
379 412
         未出貨總雙數_tb.Text = Format(Val(加總(18) + 加總(20) + 加總(22)), "#,##0")
380 413
 
381
-        NJ已出貨訂單數_tb.Text = Format(Val(加總(23)), "#,##0") : NJ已出貨總雙數_tb.Text = Format(Val(加總(24)), "#,##0") : JH已出貨訂單數_tb.Text = Format(Val(加總(25)), "#,##0") : JH已出貨總雙數_tb.Text = Format(Val(加總(26)), "#,##0")
414
+        NJ已出貨訂單數_tb.Text = Format(Val(加總(23)), "#,##0") : NJ已出貨總雙數_tb.Text = Format(Val(加總(24)), "#,##0")
415
+        JH已出貨訂單數_tb.Text = Format(Val(加總(25)), "#,##0") : JH已出貨總雙數_tb.Text = Format(Val(加總(26)), "#,##0")
382 416
         SK已出貨訂單數_tb.Text = Format(Val(加總(27)), "#,##0") : SK已出貨總雙數_tb.Text = Format(Val(加總(28)), "#,##0")
383 417
         已出貨訂單數_tb.Text = Format(Val(加總(23) + 加總(25) + 加總(27)), "#,##0")
384 418
         已出貨總雙數_tb.Text = Format(Val(加總(24) + 加總(26) + 加總(28)), "#,##0")
385 419
 
386
-        NJCXL訂單數_tb.Text = Format(Val(加總(29)), "#,##0") : NJCXL總雙數_tb.Text = Format(Val(加總(30)), "#,##0") : JHCXL訂單數_tb.Text = Format(Val(加總(31)), "#,##0") : JHCXL總雙數_tb.Text = Format(Val(加總(32)), "#,##0")
420
+        NJCXL訂單數_tb.Text = Format(Val(加總(29)), "#,##0") : NJCXL總雙數_tb.Text = Format(Val(加總(30)), "#,##0")
421
+        JHCXL訂單數_tb.Text = Format(Val(加總(31)), "#,##0") : JHCXL總雙數_tb.Text = Format(Val(加總(32)), "#,##0")
387 422
         SKCXL訂單數_tb.Text = Format(Val(加總(33)), "#,##0") : SKCXL總雙數_tb.Text = Format(Val(加總(34)), "#,##0")
388 423
         CXL訂單數_tb.Text = Format(Val(加總(29) + 加總(31) + 加總(33)), "#,##0")
389 424
         CXL總雙數_tb.Text = Format(Val(加總(30) + 加總(32) + 加總(34)), "#,##0")
@@ -394,7 +429,7 @@ Public Class 訂單分析報表一
394 429
         ComboBox2下拉表單資料載入() : 季度_cb.SelectedIndex = 0
395 430
         年度_cb.Text = Year(Today)
396 431
     End Sub
397
-    Private  Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
432
+    Private  Sub Button1_Click(sender As Object, e As EventArgs) Handles 樣品資料庫管理_bt.Click
398 433
         樣品資料庫管理.Close() : 樣品資料庫管理.Show()
399 434
     End Sub
400 435
     Private  Sub ComboBox2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 季度_cb.SelectedIndexChanged
@@ -422,43 +457,43 @@ Public Class 訂單分析報表一
422 457
         End If
423 458
         查詢()
424 459
     End Sub
425
-    Private  Sub DataGridView8_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles DataGridView8.RowPostPaint
460
+    Private  Sub DataGridView8_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles 訂單控制表未出貨數_dgv.RowPostPaint
426 461
         Dim linePen As New Pen(Color.Blue, 2)
427
-        If e.RowIndex = DataGridView8.Rows.Count - 1 Then
462
+        If e.RowIndex = 訂單控制表未出貨數_dgv.Rows.Count - 1 Then
428 463
             Exit Sub
429 464
         Else
430
-            If DataGridView8(2, e.RowIndex).Value.ToString <> DataGridView8(2, e.RowIndex + 1).Value.ToString Then
431
-                Dim startX As Integer = IIf(DataGridView8.RowHeadersVisible, DataGridView8.RowHeadersWidth, 0)
465
+            If 訂單控制表未出貨數_dgv(2, e.RowIndex).Value.ToString <> 訂單控制表未出貨數_dgv(2, e.RowIndex + 1).Value.ToString Then
466
+                Dim startX As Integer = IIf(訂單控制表未出貨數_dgv.RowHeadersVisible, 訂單控制表未出貨數_dgv.RowHeadersWidth, 0)
432 467
                 Dim startY As Integer = e.RowBounds.Top + e.RowBounds.Height - 1
433
-                Dim endX As Integer = startX + DataGridView8.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - DataGridView8.HorizontalScrollingOffset
468
+                Dim endX As Integer = startX + 訂單控制表未出貨數_dgv.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - 訂單控制表未出貨數_dgv.HorizontalScrollingOffset
434 469
                 e.Graphics.DrawLine(linePen, startX, startY, endX, startY)
435 470
                 Exit Sub
436 471
             End If
437 472
         End If
438 473
     End Sub
439
-    Private  Sub DataGridView9_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles DataGridView9.RowPostPaint
474
+    Private  Sub DataGridView9_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles 訂單控制表已出貨數_dgv.RowPostPaint
440 475
         Dim linePen As New Pen(Color.Blue, 2)
441
-        If e.RowIndex = DataGridView9.Rows.Count - 1 Then
476
+        If e.RowIndex = 訂單控制表已出貨數_dgv.Rows.Count - 1 Then
442 477
             Exit Sub
443 478
         Else
444
-            If DataGridView9(2, e.RowIndex).Value.ToString <> DataGridView9(2, e.RowIndex + 1).Value.ToString Then
445
-                Dim startX As Integer = IIf(DataGridView9.RowHeadersVisible, DataGridView9.RowHeadersWidth, 0)
479
+            If 訂單控制表已出貨數_dgv(2, e.RowIndex).Value.ToString <> 訂單控制表已出貨數_dgv(2, e.RowIndex + 1).Value.ToString Then
480
+                Dim startX As Integer = IIf(訂單控制表已出貨數_dgv.RowHeadersVisible, 訂單控制表已出貨數_dgv.RowHeadersWidth, 0)
446 481
                 Dim startY As Integer = e.RowBounds.Top + e.RowBounds.Height - 1
447
-                Dim endX As Integer = startX + DataGridView9.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - DataGridView9.HorizontalScrollingOffset
482
+                Dim endX As Integer = startX + 訂單控制表已出貨數_dgv.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - 訂單控制表已出貨數_dgv.HorizontalScrollingOffset
448 483
                 e.Graphics.DrawLine(linePen, startX, startY, endX, startY)
449 484
                 Exit Sub
450 485
             End If
451 486
         End If
452 487
     End Sub
453
-    Private  Sub DataGridView10_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles DataGridView10.RowPostPaint
488
+    Private  Sub DataGridView10_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles 訂單控制表CXL數_dgv.RowPostPaint
454 489
         Dim linePen As New Pen(Color.Blue, 2)
455
-        If e.RowIndex = DataGridView10.Rows.Count - 1 Then
490
+        If e.RowIndex = 訂單控制表CXL數_dgv.Rows.Count - 1 Then
456 491
             Exit Sub
457 492
         Else
458
-            If DataGridView10(2, e.RowIndex).Value.ToString <> DataGridView10(2, e.RowIndex + 1).Value.ToString Then
459
-                Dim startX As Integer = IIf(DataGridView10.RowHeadersVisible, DataGridView10.RowHeadersWidth, 0)
493
+            If 訂單控制表CXL數_dgv(2, e.RowIndex).Value.ToString <> 訂單控制表CXL數_dgv(2, e.RowIndex + 1).Value.ToString Then
494
+                Dim startX As Integer = IIf(訂單控制表CXL數_dgv.RowHeadersVisible, 訂單控制表CXL數_dgv.RowHeadersWidth, 0)
460 495
                 Dim startY As Integer = e.RowBounds.Top + e.RowBounds.Height - 1
461
-                Dim endX As Integer = startX + DataGridView10.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - DataGridView10.HorizontalScrollingOffset
496
+                Dim endX As Integer = startX + 訂單控制表CXL數_dgv.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - 訂單控制表CXL數_dgv.HorizontalScrollingOffset
462 497
                 e.Graphics.DrawLine(linePen, startX, startY, endX, startY)
463 498
                 Exit Sub
464 499
             End If

+ 160
- 160
TENDEN-MES-SYS/彙總報表管理/訂單分析報表七.Designer.vb 查看文件

@@ -22,59 +22,59 @@ Partial Class 訂單分析報表七
22 22
     '請勿使用程式碼編輯器進行修改。
23 23
     <System.Diagnostics.DebuggerStepThrough()> _
24 24
     Private Sub InitializeComponent()
25
-        Dim DataGridViewCellStyle7 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
26
-        Dim DataGridViewCellStyle8 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
27
-        Dim DataGridViewCellStyle9 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
28
-        Dim DataGridViewCellStyle10 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
29
-        Dim DataGridViewCellStyle11 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
30
-        Dim DataGridViewCellStyle12 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
31
-        Me.Button2 = New System.Windows.Forms.Button()
32
-        Me.Button1 = New System.Windows.Forms.Button()
25
+        Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
26
+        Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
27
+        Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
28
+        Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
29
+        Dim DataGridViewCellStyle5 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
30
+        Dim DataGridViewCellStyle6 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
31
+        Me.當月_bt = New System.Windows.Forms.Button()
32
+        Me.當日_bt = New System.Windows.Forms.Button()
33 33
         Me.Label4 = New System.Windows.Forms.Label()
34
-        Me.DateTimePicker2 = New System.Windows.Forms.DateTimePicker()
35
-        Me.DateTimePicker1 = New System.Windows.Forms.DateTimePicker()
36
-        Me.DataGridView1 = New System.Windows.Forms.DataGridView()
34
+        Me.日期1_dtp = New System.Windows.Forms.DateTimePicker()
35
+        Me.日期_dtp = New System.Windows.Forms.DateTimePicker()
36
+        Me.每種形體有賺頭前50名_dgv = New System.Windows.Forms.DataGridView()
37 37
         Me.Label1 = New System.Windows.Forms.Label()
38 38
         Me.Label2 = New System.Windows.Forms.Label()
39
-        Me.DataGridView2 = New System.Windows.Forms.DataGridView()
39
+        Me.每種形體做爽的倒數50名_dgv = New System.Windows.Forms.DataGridView()
40 40
         Me.Label3 = New System.Windows.Forms.Label()
41
-        Me.DataGridView3 = New System.Windows.Forms.DataGridView()
41
+        Me.每種形體開發來玩的倒數50名_dgv = New System.Windows.Forms.DataGridView()
42 42
         Me.Label5 = New System.Windows.Forms.Label()
43
-        Me.DataGridView4 = New System.Windows.Forms.DataGridView()
43
+        Me.每種形體數量大前50名_dgv = New System.Windows.Forms.DataGridView()
44 44
         Me.Label6 = New System.Windows.Forms.Label()
45
-        Me.DataGridView5 = New System.Windows.Forms.DataGridView()
45
+        Me.時間區間內倒數50名聊尾仔_dgv = New System.Windows.Forms.DataGridView()
46 46
         Me.Label7 = New System.Windows.Forms.Label()
47
-        Me.DataGridView6 = New System.Windows.Forms.DataGridView()
48
-        Me.Button3 = New System.Windows.Forms.Button()
49
-        CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).BeginInit()
50
-        CType(Me.DataGridView2, System.ComponentModel.ISupportInitialize).BeginInit()
51
-        CType(Me.DataGridView3, System.ComponentModel.ISupportInitialize).BeginInit()
52
-        CType(Me.DataGridView4, System.ComponentModel.ISupportInitialize).BeginInit()
53
-        CType(Me.DataGridView5, System.ComponentModel.ISupportInitialize).BeginInit()
54
-        CType(Me.DataGridView6, System.ComponentModel.ISupportInitialize).BeginInit()
47
+        Me.時間區間內有前途_dgv = New System.Windows.Forms.DataGridView()
48
+        Me.列印_bt = New System.Windows.Forms.Button()
49
+        CType(Me.每種形體有賺頭前50名_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
50
+        CType(Me.每種形體做爽的倒數50名_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
51
+        CType(Me.每種形體開發來玩的倒數50名_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
52
+        CType(Me.每種形體數量大前50名_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
53
+        CType(Me.時間區間內倒數50名聊尾仔_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
54
+        CType(Me.時間區間內有前途_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
55 55
         Me.SuspendLayout()
56 56
         '
57
-        'Button2
57
+        '當月_bt
58 58
         '
59
-        Me.Button2.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
60
-        Me.Button2.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
61
-        Me.Button2.Location = New System.Drawing.Point(370, 6)
62
-        Me.Button2.Name = "Button2"
63
-        Me.Button2.Size = New System.Drawing.Size(117, 24)
64
-        Me.Button2.TabIndex = 1093
65
-        Me.Button2.Text = "當月"
66
-        Me.Button2.UseVisualStyleBackColor = True
59
+        Me.當月_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
60
+        Me.當月_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
61
+        Me.當月_bt.Location = New System.Drawing.Point(370, 6)
62
+        Me.當月_bt.Name = "當月_bt"
63
+        Me.當月_bt.Size = New System.Drawing.Size(117, 24)
64
+        Me.當月_bt.TabIndex = 1093
65
+        Me.當月_bt.Text = "當月"
66
+        Me.當月_bt.UseVisualStyleBackColor = True
67 67
         '
68
-        'Button1
68
+        '當日_bt
69 69
         '
70
-        Me.Button1.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
71
-        Me.Button1.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
72
-        Me.Button1.Location = New System.Drawing.Point(249, 6)
73
-        Me.Button1.Name = "Button1"
74
-        Me.Button1.Size = New System.Drawing.Size(117, 24)
75
-        Me.Button1.TabIndex = 1092
76
-        Me.Button1.Text = "當日"
77
-        Me.Button1.UseVisualStyleBackColor = True
70
+        Me.當日_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
71
+        Me.當日_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
72
+        Me.當日_bt.Location = New System.Drawing.Point(249, 6)
73
+        Me.當日_bt.Name = "當日_bt"
74
+        Me.當日_bt.Size = New System.Drawing.Size(117, 24)
75
+        Me.當日_bt.TabIndex = 1092
76
+        Me.當日_bt.Text = "當日"
77
+        Me.當日_bt.UseVisualStyleBackColor = True
78 78
         '
79 79
         'Label4
80 80
         '
@@ -85,35 +85,35 @@ Partial Class 訂單分析報表七
85 85
         Me.Label4.TabIndex = 1091
86 86
         Me.Label4.Text = "到"
87 87
         '
88
-        'DateTimePicker2
88
+        '日期1_dtp
89 89
         '
90
-        Me.DateTimePicker2.DropDownAlign = System.Windows.Forms.LeftRightAlignment.Right
91
-        Me.DateTimePicker2.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
92
-        Me.DateTimePicker2.Location = New System.Drawing.Point(138, 6)
93
-        Me.DateTimePicker2.Name = "DateTimePicker2"
94
-        Me.DateTimePicker2.Size = New System.Drawing.Size(105, 23)
95
-        Me.DateTimePicker2.TabIndex = 1090
90
+        Me.日期1_dtp.DropDownAlign = System.Windows.Forms.LeftRightAlignment.Right
91
+        Me.日期1_dtp.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
92
+        Me.日期1_dtp.Location = New System.Drawing.Point(138, 6)
93
+        Me.日期1_dtp.Name = "日期1_dtp"
94
+        Me.日期1_dtp.Size = New System.Drawing.Size(105, 23)
95
+        Me.日期1_dtp.TabIndex = 1090
96 96
         '
97
-        'DateTimePicker1
97
+        '日期_dtp
98 98
         '
99
-        Me.DateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
100
-        Me.DateTimePicker1.Location = New System.Drawing.Point(6, 6)
101
-        Me.DateTimePicker1.Name = "DateTimePicker1"
102
-        Me.DateTimePicker1.Size = New System.Drawing.Size(105, 23)
103
-        Me.DateTimePicker1.TabIndex = 1089
99
+        Me.日期_dtp.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
100
+        Me.日期_dtp.Location = New System.Drawing.Point(6, 6)
101
+        Me.日期_dtp.Name = "日期_dtp"
102
+        Me.日期_dtp.Size = New System.Drawing.Size(105, 23)
103
+        Me.日期_dtp.TabIndex = 1089
104 104
         '
105
-        'DataGridView1
105
+        '每種形體有賺頭前50名_dgv
106 106
         '
107
-        DataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
108
-        Me.DataGridView1.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle7
109
-        Me.DataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
110
-        Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
111
-        Me.DataGridView1.Location = New System.Drawing.Point(8, 67)
112
-        Me.DataGridView1.Name = "DataGridView1"
113
-        Me.DataGridView1.RowHeadersWidth = 5
114
-        Me.DataGridView1.RowTemplate.Height = 24
115
-        Me.DataGridView1.Size = New System.Drawing.Size(628, 435)
116
-        Me.DataGridView1.TabIndex = 1094
107
+        DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
108
+        Me.每種形體有賺頭前50名_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
109
+        Me.每種形體有賺頭前50名_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
110
+        Me.每種形體有賺頭前50名_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
111
+        Me.每種形體有賺頭前50名_dgv.Location = New System.Drawing.Point(8, 67)
112
+        Me.每種形體有賺頭前50名_dgv.Name = "每種形體有賺頭前50名_dgv"
113
+        Me.每種形體有賺頭前50名_dgv.RowHeadersWidth = 5
114
+        Me.每種形體有賺頭前50名_dgv.RowTemplate.Height = 24
115
+        Me.每種形體有賺頭前50名_dgv.Size = New System.Drawing.Size(628, 435)
116
+        Me.每種形體有賺頭前50名_dgv.TabIndex = 1094
117 117
         '
118 118
         'Label1
119 119
         '
@@ -137,18 +137,18 @@ Partial Class 訂單分析報表七
137 137
         Me.Label2.TabIndex = 1097
138 138
         Me.Label2.Text = "每種形體,加權平均利潤, (做爽的) 倒數 50 名"
139 139
         '
140
-        'DataGridView2
140
+        '每種形體做爽的倒數50名_dgv
141 141
         '
142
-        DataGridViewCellStyle8.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
143
-        Me.DataGridView2.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle8
144
-        Me.DataGridView2.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
145
-        Me.DataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
146
-        Me.DataGridView2.Location = New System.Drawing.Point(8, 540)
147
-        Me.DataGridView2.Name = "DataGridView2"
148
-        Me.DataGridView2.RowHeadersWidth = 5
149
-        Me.DataGridView2.RowTemplate.Height = 24
150
-        Me.DataGridView2.Size = New System.Drawing.Size(628, 435)
151
-        Me.DataGridView2.TabIndex = 1096
142
+        DataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
143
+        Me.每種形體做爽的倒數50名_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2
144
+        Me.每種形體做爽的倒數50名_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
145
+        Me.每種形體做爽的倒數50名_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
146
+        Me.每種形體做爽的倒數50名_dgv.Location = New System.Drawing.Point(8, 540)
147
+        Me.每種形體做爽的倒數50名_dgv.Name = "每種形體做爽的倒數50名_dgv"
148
+        Me.每種形體做爽的倒數50名_dgv.RowHeadersWidth = 5
149
+        Me.每種形體做爽的倒數50名_dgv.RowTemplate.Height = 24
150
+        Me.每種形體做爽的倒數50名_dgv.Size = New System.Drawing.Size(628, 435)
151
+        Me.每種形體做爽的倒數50名_dgv.TabIndex = 1096
152 152
         '
153 153
         'Label3
154 154
         '
@@ -161,18 +161,18 @@ Partial Class 訂單分析報表七
161 161
         Me.Label3.TabIndex = 1101
162 162
         Me.Label3.Text = "每種形體,訂單加總數, (開發來玩的) 倒數 50 名"
163 163
         '
164
-        'DataGridView3
164
+        '每種形體開發來玩的倒數50名_dgv
165 165
         '
166
-        DataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
167
-        Me.DataGridView3.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle9
168
-        Me.DataGridView3.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
169
-        Me.DataGridView3.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
170
-        Me.DataGridView3.Location = New System.Drawing.Point(642, 540)
171
-        Me.DataGridView3.Name = "DataGridView3"
172
-        Me.DataGridView3.RowHeadersWidth = 5
173
-        Me.DataGridView3.RowTemplate.Height = 24
174
-        Me.DataGridView3.Size = New System.Drawing.Size(628, 435)
175
-        Me.DataGridView3.TabIndex = 1100
166
+        DataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
167
+        Me.每種形體開發來玩的倒數50名_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
168
+        Me.每種形體開發來玩的倒數50名_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
169
+        Me.每種形體開發來玩的倒數50名_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
170
+        Me.每種形體開發來玩的倒數50名_dgv.Location = New System.Drawing.Point(642, 540)
171
+        Me.每種形體開發來玩的倒數50名_dgv.Name = "每種形體開發來玩的倒數50名_dgv"
172
+        Me.每種形體開發來玩的倒數50名_dgv.RowHeadersWidth = 5
173
+        Me.每種形體開發來玩的倒數50名_dgv.RowTemplate.Height = 24
174
+        Me.每種形體開發來玩的倒數50名_dgv.Size = New System.Drawing.Size(628, 435)
175
+        Me.每種形體開發來玩的倒數50名_dgv.TabIndex = 1100
176 176
         '
177 177
         'Label5
178 178
         '
@@ -185,18 +185,18 @@ Partial Class 訂單分析報表七
185 185
         Me.Label5.TabIndex = 1099
186 186
         Me.Label5.Text = "每種形體,訂單加總數, (數量大) 前 50 名"
187 187
         '
188
-        'DataGridView4
188
+        '每種形體數量大前50名_dgv
189 189
         '
190
-        DataGridViewCellStyle10.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
191
-        Me.DataGridView4.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle10
192
-        Me.DataGridView4.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
193
-        Me.DataGridView4.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
194
-        Me.DataGridView4.Location = New System.Drawing.Point(642, 67)
195
-        Me.DataGridView4.Name = "DataGridView4"
196
-        Me.DataGridView4.RowHeadersWidth = 5
197
-        Me.DataGridView4.RowTemplate.Height = 24
198
-        Me.DataGridView4.Size = New System.Drawing.Size(628, 435)
199
-        Me.DataGridView4.TabIndex = 1098
190
+        DataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
191
+        Me.每種形體數量大前50名_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle4
192
+        Me.每種形體數量大前50名_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
193
+        Me.每種形體數量大前50名_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
194
+        Me.每種形體數量大前50名_dgv.Location = New System.Drawing.Point(642, 67)
195
+        Me.每種形體數量大前50名_dgv.Name = "每種形體數量大前50名_dgv"
196
+        Me.每種形體數量大前50名_dgv.RowHeadersWidth = 5
197
+        Me.每種形體數量大前50名_dgv.RowTemplate.Height = 24
198
+        Me.每種形體數量大前50名_dgv.Size = New System.Drawing.Size(628, 435)
199
+        Me.每種形體數量大前50名_dgv.TabIndex = 1098
200 200
         '
201 201
         'Label6
202 202
         '
@@ -209,18 +209,18 @@ Partial Class 訂單分析報表七
209 209
         Me.Label6.TabIndex = 1105
210 210
         Me.Label6.Text = "時間區間內,每總形體,創造利潤,倒數 50 名 (聊尾仔)" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10)
211 211
         '
212
-        'DataGridView5
212
+        '時間區間內倒數50名聊尾仔_dgv
213 213
         '
214
-        DataGridViewCellStyle11.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
215
-        Me.DataGridView5.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle11
216
-        Me.DataGridView5.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
217
-        Me.DataGridView5.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
218
-        Me.DataGridView5.Location = New System.Drawing.Point(1276, 540)
219
-        Me.DataGridView5.Name = "DataGridView5"
220
-        Me.DataGridView5.RowHeadersWidth = 5
221
-        Me.DataGridView5.RowTemplate.Height = 24
222
-        Me.DataGridView5.Size = New System.Drawing.Size(628, 435)
223
-        Me.DataGridView5.TabIndex = 1104
214
+        DataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
215
+        Me.時間區間內倒數50名聊尾仔_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle5
216
+        Me.時間區間內倒數50名聊尾仔_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
217
+        Me.時間區間內倒數50名聊尾仔_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
218
+        Me.時間區間內倒數50名聊尾仔_dgv.Location = New System.Drawing.Point(1276, 540)
219
+        Me.時間區間內倒數50名聊尾仔_dgv.Name = "時間區間內倒數50名聊尾仔_dgv"
220
+        Me.時間區間內倒數50名聊尾仔_dgv.RowHeadersWidth = 5
221
+        Me.時間區間內倒數50名聊尾仔_dgv.RowTemplate.Height = 24
222
+        Me.時間區間內倒數50名聊尾仔_dgv.Size = New System.Drawing.Size(628, 435)
223
+        Me.時間區間內倒數50名聊尾仔_dgv.TabIndex = 1104
224 224
         '
225 225
         'Label7
226 226
         '
@@ -233,84 +233,84 @@ Partial Class 訂單分析報表七
233 233
         Me.Label7.TabIndex = 1103
234 234
         Me.Label7.Text = "時間區間內,每總形體,創造利潤,前 50 名  (有前途)"
235 235
         '
236
-        'DataGridView6
237
-        '
238
-        DataGridViewCellStyle12.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
239
-        Me.DataGridView6.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle12
240
-        Me.DataGridView6.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
241
-        Me.DataGridView6.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
242
-        Me.DataGridView6.Location = New System.Drawing.Point(1276, 67)
243
-        Me.DataGridView6.Name = "DataGridView6"
244
-        Me.DataGridView6.RowHeadersWidth = 5
245
-        Me.DataGridView6.RowTemplate.Height = 24
246
-        Me.DataGridView6.Size = New System.Drawing.Size(628, 435)
247
-        Me.DataGridView6.TabIndex = 1102
248
-        '
249
-        'Button3
250
-        '
251
-        Me.Button3.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
252
-        Me.Button3.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
253
-        Me.Button3.Location = New System.Drawing.Point(493, 5)
254
-        Me.Button3.Name = "Button3"
255
-        Me.Button3.Size = New System.Drawing.Size(117, 24)
256
-        Me.Button3.TabIndex = 1106
257
-        Me.Button3.Text = "列印"
258
-        Me.Button3.UseVisualStyleBackColor = True
236
+        '時間區間內有前途_dgv
237
+        '
238
+        DataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
239
+        Me.時間區間內有前途_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle6
240
+        Me.時間區間內有前途_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
241
+        Me.時間區間內有前途_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
242
+        Me.時間區間內有前途_dgv.Location = New System.Drawing.Point(1276, 67)
243
+        Me.時間區間內有前途_dgv.Name = "時間區間內有前途_dgv"
244
+        Me.時間區間內有前途_dgv.RowHeadersWidth = 5
245
+        Me.時間區間內有前途_dgv.RowTemplate.Height = 24
246
+        Me.時間區間內有前途_dgv.Size = New System.Drawing.Size(628, 435)
247
+        Me.時間區間內有前途_dgv.TabIndex = 1102
248
+        '
249
+        '列印_bt
250
+        '
251
+        Me.列印_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
252
+        Me.列印_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
253
+        Me.列印_bt.Location = New System.Drawing.Point(493, 5)
254
+        Me.列印_bt.Name = "列印_bt"
255
+        Me.列印_bt.Size = New System.Drawing.Size(117, 24)
256
+        Me.列印_bt.TabIndex = 1106
257
+        Me.列印_bt.Text = "列印"
258
+        Me.列印_bt.UseVisualStyleBackColor = True
259 259
         '
260 260
         '訂單分析報表七
261 261
         '
262 262
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
263 263
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
264 264
         Me.ClientSize = New System.Drawing.Size(1914, 991)
265
-        Me.Controls.Add(Me.Button3)
265
+        Me.Controls.Add(Me.列印_bt)
266 266
         Me.Controls.Add(Me.Label6)
267
-        Me.Controls.Add(Me.DataGridView5)
267
+        Me.Controls.Add(Me.時間區間內倒數50名聊尾仔_dgv)
268 268
         Me.Controls.Add(Me.Label7)
269
-        Me.Controls.Add(Me.DataGridView6)
269
+        Me.Controls.Add(Me.時間區間內有前途_dgv)
270 270
         Me.Controls.Add(Me.Label3)
271
-        Me.Controls.Add(Me.DataGridView3)
271
+        Me.Controls.Add(Me.每種形體開發來玩的倒數50名_dgv)
272 272
         Me.Controls.Add(Me.Label5)
273
-        Me.Controls.Add(Me.DataGridView4)
273
+        Me.Controls.Add(Me.每種形體數量大前50名_dgv)
274 274
         Me.Controls.Add(Me.Label2)
275
-        Me.Controls.Add(Me.DataGridView2)
275
+        Me.Controls.Add(Me.每種形體做爽的倒數50名_dgv)
276 276
         Me.Controls.Add(Me.Label1)
277
-        Me.Controls.Add(Me.DataGridView1)
278
-        Me.Controls.Add(Me.Button2)
279
-        Me.Controls.Add(Me.Button1)
277
+        Me.Controls.Add(Me.每種形體有賺頭前50名_dgv)
278
+        Me.Controls.Add(Me.當月_bt)
279
+        Me.Controls.Add(Me.當日_bt)
280 280
         Me.Controls.Add(Me.Label4)
281
-        Me.Controls.Add(Me.DateTimePicker2)
282
-        Me.Controls.Add(Me.DateTimePicker1)
281
+        Me.Controls.Add(Me.日期1_dtp)
282
+        Me.Controls.Add(Me.日期_dtp)
283 283
         Me.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
284 284
         Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
285 285
         Me.Name = "訂單分析報表七"
286 286
         Me.Text = "Product sales profit analysis table"
287
-        CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).EndInit()
288
-        CType(Me.DataGridView2, System.ComponentModel.ISupportInitialize).EndInit()
289
-        CType(Me.DataGridView3, System.ComponentModel.ISupportInitialize).EndInit()
290
-        CType(Me.DataGridView4, System.ComponentModel.ISupportInitialize).EndInit()
291
-        CType(Me.DataGridView5, System.ComponentModel.ISupportInitialize).EndInit()
292
-        CType(Me.DataGridView6, System.ComponentModel.ISupportInitialize).EndInit()
287
+        CType(Me.每種形體有賺頭前50名_dgv, System.ComponentModel.ISupportInitialize).EndInit()
288
+        CType(Me.每種形體做爽的倒數50名_dgv, System.ComponentModel.ISupportInitialize).EndInit()
289
+        CType(Me.每種形體開發來玩的倒數50名_dgv, System.ComponentModel.ISupportInitialize).EndInit()
290
+        CType(Me.每種形體數量大前50名_dgv, System.ComponentModel.ISupportInitialize).EndInit()
291
+        CType(Me.時間區間內倒數50名聊尾仔_dgv, System.ComponentModel.ISupportInitialize).EndInit()
292
+        CType(Me.時間區間內有前途_dgv, System.ComponentModel.ISupportInitialize).EndInit()
293 293
         Me.ResumeLayout(False)
294 294
         Me.PerformLayout()
295 295
 
296 296
     End Sub
297 297
 
298
-    Friend WithEvents Button2 As Button
299
-    Friend WithEvents Button1 As Button
298
+    Friend WithEvents 當月_bt As Button
299
+    Friend WithEvents 當日_bt As Button
300 300
     Friend WithEvents Label4 As Label
301
-    Friend WithEvents DateTimePicker2 As DateTimePicker
302
-    Friend WithEvents DateTimePicker1 As DateTimePicker
303
-    Friend WithEvents DataGridView1 As DataGridView
301
+    Friend WithEvents 日期1_dtp As DateTimePicker
302
+    Friend WithEvents 日期_dtp As DateTimePicker
303
+    Friend WithEvents 每種形體有賺頭前50名_dgv As DataGridView
304 304
     Friend WithEvents Label1 As Label
305 305
     Friend WithEvents Label2 As Label
306
-    Friend WithEvents DataGridView2 As DataGridView
306
+    Friend WithEvents 每種形體做爽的倒數50名_dgv As DataGridView
307 307
     Friend WithEvents Label3 As Label
308
-    Friend WithEvents DataGridView3 As DataGridView
308
+    Friend WithEvents 每種形體開發來玩的倒數50名_dgv As DataGridView
309 309
     Friend WithEvents Label5 As Label
310
-    Friend WithEvents DataGridView4 As DataGridView
310
+    Friend WithEvents 每種形體數量大前50名_dgv As DataGridView
311 311
     Friend WithEvents Label6 As Label
312
-    Friend WithEvents DataGridView5 As DataGridView
312
+    Friend WithEvents 時間區間內倒數50名聊尾仔_dgv As DataGridView
313 313
     Friend WithEvents Label7 As Label
314
-    Friend WithEvents DataGridView6 As DataGridView
315
-    Friend WithEvents Button3 As Button
314
+    Friend WithEvents 時間區間內有前途_dgv As DataGridView
315
+    Friend WithEvents 列印_bt As Button
316 316
 End Class

+ 202
- 138
TENDEN-MES-SYS/彙總報表管理/訂單分析報表七.vb 查看文件

@@ -27,197 +27,261 @@ Public Class 訂單分析報表七
27 27
                             - SUM(訂單控制表.訂單數量 * 訂單價格利潤明細表.FTYPrice)) / SUM(訂單控制表.訂單數量) AS 加權平均利潤
28 28
                 FROM        訂單價格利潤明細表 FULL OUTER JOIN
29 29
                             訂單控制表 ON 訂單價格利潤明細表.資料流水號 = 訂單控制表.資料流水號
30
-                WHERE     (訂單控制表.客戶交期 BETWEEN '" & Strings.Format(DateTimePicker1.Value, "yyyy/MM/dd") & "' AND '" & Strings.Format(DateTimePicker2.Value, "yyyy/MM/dd") & "') AND 
30
+                WHERE     (訂單控制表.客戶交期 BETWEEN '" & Strings.Format(日期_dtp.Value, "yyyy/MM/dd") & "' AND '" & Strings.Format(日期1_dtp.Value, "yyyy/MM/dd") & "') AND 
31 31
                           (訂單價格利潤明細表.FTYPrice > 0) AND  (訂單控制表.訂單數量 > 0)
32 32
                 GROUP BY   訂單控制表.形體號"
33 33
     End Sub
34 34
     Private Sub Set_訂單清單1()
35
-        DataGridView1.DataSource = Nothing : ds.Clear()
36
-        DataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
37
-        DataGridView1.ColumnHeadersHeight = RR
38
-        DataGridView1.AllowUserToAddRows = False : DataGridView1.RowTemplate.Height = SS
35
+        每種形體有賺頭前50名_dgv.DataSource = Nothing : ds.Clear()
36
+        每種形體有賺頭前50名_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
37
+        每種形體有賺頭前50名_dgv.ColumnHeadersHeight = RR
38
+        每種形體有賺頭前50名_dgv.AllowUserToAddRows = False : 每種形體有賺頭前50名_dgv.RowTemplate.Height = SS
39 39
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
40 40
         Set_SQL()
41 41
         SQL1 = MYSQL1 & " ORDER BY   加權平均利潤 DESC"
42
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds) : DataGridView1.DataSource = ds.Tables(0) : conn.Close()
42
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds)
43
+        每種形體有賺頭前50名_dgv.DataSource = ds.Tables(0) : conn.Close()
43 44
 
44
-        DataGridView1.Columns(0).FillWeight = 40 : DataGridView1.Columns(1).FillWeight = 170 : DataGridView1.Columns(2).FillWeight = 100 : DataGridView1.Columns(3).FillWeight = 100
45
-        DataGridView1.Columns(4).FillWeight = 100 : DataGridView1.Columns(5).FillWeight = 100 : DataGridView1.Columns(6).FillWeight = 100
45
+        每種形體有賺頭前50名_dgv.Columns(0).FillWeight = 40 : 每種形體有賺頭前50名_dgv.Columns(1).FillWeight = 170 : 每種形體有賺頭前50名_dgv.Columns(2).FillWeight = 100
46
+        每種形體有賺頭前50名_dgv.Columns(4).FillWeight = 100 : 每種形體有賺頭前50名_dgv.Columns(5).FillWeight = 100 : 每種形體有賺頭前50名_dgv.Columns(6).FillWeight = 100
47
+        每種形體有賺頭前50名_dgv.Columns(3).FillWeight = 100
46 48
 
47
-        DataGridView1.Columns(6).DefaultCellStyle.Format = "#,##0.00" : DataGridView1.Columns(2).DefaultCellStyle.Format = "#,##0" : DataGridView1.Columns(3).DefaultCellStyle.Format = "#,##0"
48
-        DataGridView1.Columns(4).DefaultCellStyle.Format = "#,##0" : DataGridView1.Columns(5).DefaultCellStyle.Format = "#,##0"
49
-        DataGridView1.Columns(6).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView1.Columns(6).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
50
-        DataGridView1.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView1.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
51
-        DataGridView1.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView1.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
52
-        DataGridView1.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView1.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
53
-        DataGridView1.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView1.Columns(5).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
54
-        For i As Integer = 0 To DataGridView1.Rows.Count - 1
55
-            DataGridView1(0, i).Value = i + 1
49
+        每種形體有賺頭前50名_dgv.Columns(6).DefaultCellStyle.Format = "#,##0.00" : 每種形體有賺頭前50名_dgv.Columns(2).DefaultCellStyle.Format = "#,##0"
50
+        每種形體有賺頭前50名_dgv.Columns(4).DefaultCellStyle.Format = "#,##0" : 每種形體有賺頭前50名_dgv.Columns(5).DefaultCellStyle.Format = "#,##0"
51
+        每種形體有賺頭前50名_dgv.Columns(3).DefaultCellStyle.Format = "#,##0"
52
+
53
+        每種形體有賺頭前50名_dgv.Columns(6).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
54
+        每種形體有賺頭前50名_dgv.Columns(6).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
55
+        每種形體有賺頭前50名_dgv.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
56
+        每種形體有賺頭前50名_dgv.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
57
+        每種形體有賺頭前50名_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
58
+        每種形體有賺頭前50名_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
59
+        每種形體有賺頭前50名_dgv.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
60
+        每種形體有賺頭前50名_dgv.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
61
+        每種形體有賺頭前50名_dgv.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
62
+        每種形體有賺頭前50名_dgv.Columns(5).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
63
+        For i As Integer = 0 To 每種形體有賺頭前50名_dgv.Rows.Count - 1
64
+            每種形體有賺頭前50名_dgv(0, i).Value = i + 1
56 65
         Next
57 66
     End Sub
58 67
     Private Sub Set_訂單清單2()
59
-        DataGridView2.DataSource = Nothing : ds1.Clear()
60
-        DataGridView2.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
61
-        DataGridView2.ColumnHeadersHeight = RR
62
-        DataGridView2.AllowUserToAddRows = False : DataGridView2.RowTemplate.Height = SS
68
+        每種形體做爽的倒數50名_dgv.DataSource = Nothing : ds1.Clear()
69
+        每種形體做爽的倒數50名_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
70
+        每種形體做爽的倒數50名_dgv.ColumnHeadersHeight = RR
71
+        每種形體做爽的倒數50名_dgv.AllowUserToAddRows = False : 每種形體做爽的倒數50名_dgv.RowTemplate.Height = SS
63 72
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
64 73
         Set_SQL()
65 74
         SQL1 = MYSQL1 & " ORDER BY   加權平均利潤"
66
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds1) : DataGridView2.DataSource = ds1.Tables(0) : conn.Close()
75
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds1)
76
+        每種形體做爽的倒數50名_dgv.DataSource = ds1.Tables(0) : conn.Close()
77
+
78
+        每種形體做爽的倒數50名_dgv.Columns(0).FillWeight = 40 : 每種形體做爽的倒數50名_dgv.Columns(1).FillWeight = 170 : 每種形體做爽的倒數50名_dgv.Columns(2).FillWeight = 100
79
+        每種形體做爽的倒數50名_dgv.Columns(4).FillWeight = 100 : 每種形體做爽的倒數50名_dgv.Columns(5).FillWeight = 100 : 每種形體做爽的倒數50名_dgv.Columns(6).FillWeight = 100
80
+        每種形體做爽的倒數50名_dgv.Columns(3).FillWeight = 100
67 81
 
68
-        DataGridView2.Columns(0).FillWeight = 40 : DataGridView2.Columns(1).FillWeight = 170 : DataGridView2.Columns(2).FillWeight = 100 : DataGridView2.Columns(3).FillWeight = 100
69
-        DataGridView2.Columns(4).FillWeight = 100 : DataGridView2.Columns(5).FillWeight = 100 : DataGridView2.Columns(6).FillWeight = 100
82
+        每種形體做爽的倒數50名_dgv.Columns(6).DefaultCellStyle.Format = "#,##0.00" : 每種形體做爽的倒數50名_dgv.Columns(2).DefaultCellStyle.Format = "#,##0"
83
+        每種形體做爽的倒數50名_dgv.Columns(4).DefaultCellStyle.Format = "#,##0" : 每種形體做爽的倒數50名_dgv.Columns(5).DefaultCellStyle.Format = "#,##0"
84
+        每種形體做爽的倒數50名_dgv.Columns(3).DefaultCellStyle.Format = "#,##0"
70 85
 
71
-        DataGridView2.Columns(6).DefaultCellStyle.Format = "#,##0.00" : DataGridView2.Columns(2).DefaultCellStyle.Format = "#,##0" : DataGridView2.Columns(3).DefaultCellStyle.Format = "#,##0"
72
-        DataGridView2.Columns(4).DefaultCellStyle.Format = "#,##0" : DataGridView2.Columns(5).DefaultCellStyle.Format = "#,##0"
73
-        DataGridView2.Columns(6).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView2.Columns(6).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
74
-        DataGridView2.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView2.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
75
-        DataGridView2.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView2.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
76
-        DataGridView2.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView2.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
77
-        DataGridView2.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView2.Columns(5).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
78
-        For i As Integer = 0 To DataGridView2.Rows.Count - 1
79
-            DataGridView2(0, i).Value = i + 1
86
+        每種形體做爽的倒數50名_dgv.Columns(6).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
87
+        每種形體做爽的倒數50名_dgv.Columns(6).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
88
+        每種形體做爽的倒數50名_dgv.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
89
+        每種形體做爽的倒數50名_dgv.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
90
+        每種形體做爽的倒數50名_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
91
+        每種形體做爽的倒數50名_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
92
+        每種形體做爽的倒數50名_dgv.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
93
+        每種形體做爽的倒數50名_dgv.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
94
+        每種形體做爽的倒數50名_dgv.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
95
+        每種形體做爽的倒數50名_dgv.Columns(5).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
96
+        For i As Integer = 0 To 每種形體做爽的倒數50名_dgv.Rows.Count - 1
97
+            每種形體做爽的倒數50名_dgv(0, i).Value = i + 1
80 98
         Next
81 99
     End Sub
82 100
     Private Sub Set_訂單清單3()
83
-        DataGridView4.DataSource = Nothing : ds2.Clear()
84
-        DataGridView4.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
85
-        DataGridView4.ColumnHeadersHeight = RR
86
-        DataGridView4.AllowUserToAddRows = False : DataGridView4.RowTemplate.Height = SS
101
+        每種形體數量大前50名_dgv.DataSource = Nothing : ds2.Clear()
102
+        每種形體數量大前50名_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
103
+        每種形體數量大前50名_dgv.ColumnHeadersHeight = RR
104
+        每種形體數量大前50名_dgv.AllowUserToAddRows = False : 每種形體數量大前50名_dgv.RowTemplate.Height = SS
87 105
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
88 106
         Set_SQL()
89 107
         SQL1 = MYSQL1 & " ORDER BY   訂單數量 DESC"
90
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds2) : DataGridView4.DataSource = ds2.Tables(0) : conn.Close()
108
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds2)
109
+        每種形體數量大前50名_dgv.DataSource = ds2.Tables(0) : conn.Close()
110
+
111
+        每種形體數量大前50名_dgv.Columns(0).FillWeight = 40 : 每種形體數量大前50名_dgv.Columns(1).FillWeight = 170 : 每種形體數量大前50名_dgv.Columns(2).FillWeight = 100
112
+        每種形體數量大前50名_dgv.Columns(4).FillWeight = 100 : 每種形體數量大前50名_dgv.Columns(5).FillWeight = 100 : 每種形體數量大前50名_dgv.Columns(6).FillWeight = 100
113
+        每種形體數量大前50名_dgv.Columns(3).FillWeight = 100
91 114
 
92
-        DataGridView4.Columns(0).FillWeight = 40 : DataGridView4.Columns(1).FillWeight = 170 : DataGridView4.Columns(2).FillWeight = 100 : DataGridView4.Columns(3).FillWeight = 100
93
-        DataGridView4.Columns(4).FillWeight = 100 : DataGridView4.Columns(5).FillWeight = 100 : DataGridView4.Columns(6).FillWeight = 100
115
+        每種形體數量大前50名_dgv.Columns(6).DefaultCellStyle.Format = "#,##0.00" : 每種形體數量大前50名_dgv.Columns(2).DefaultCellStyle.Format = "#,##0"
116
+        每種形體數量大前50名_dgv.Columns(4).DefaultCellStyle.Format = "#,##0" : 每種形體數量大前50名_dgv.Columns(5).DefaultCellStyle.Format = "#,##0"
117
+        每種形體數量大前50名_dgv.Columns(3).DefaultCellStyle.Format = "#,##0"
94 118
 
95
-        DataGridView4.Columns(6).DefaultCellStyle.Format = "#,##0.00" : DataGridView4.Columns(2).DefaultCellStyle.Format = "#,##0" : DataGridView4.Columns(3).DefaultCellStyle.Format = "#,##0"
96
-        DataGridView4.Columns(4).DefaultCellStyle.Format = "#,##0" : DataGridView4.Columns(5).DefaultCellStyle.Format = "#,##0"
97
-        DataGridView4.Columns(6).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView4.Columns(6).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
98
-        DataGridView4.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView4.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
99
-        DataGridView4.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView4.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
100
-        DataGridView4.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView4.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
101
-        DataGridView4.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView4.Columns(5).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
102
-        For i As Integer = 0 To DataGridView4.Rows.Count - 1
103
-            DataGridView4(0, i).Value = i + 1
119
+        每種形體數量大前50名_dgv.Columns(6).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
120
+        每種形體數量大前50名_dgv.Columns(6).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
121
+        每種形體數量大前50名_dgv.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
122
+        每種形體數量大前50名_dgv.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
123
+        每種形體數量大前50名_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
124
+        每種形體數量大前50名_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
125
+        每種形體數量大前50名_dgv.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
126
+        每種形體數量大前50名_dgv.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
127
+        每種形體數量大前50名_dgv.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
128
+        每種形體數量大前50名_dgv.Columns(5).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
129
+        For i As Integer = 0 To 每種形體數量大前50名_dgv.Rows.Count - 1
130
+            每種形體數量大前50名_dgv(0, i).Value = i + 1
104 131
         Next
105 132
     End Sub
106 133
     Private Sub Set_訂單清單4()
107
-        DataGridView3.DataSource = Nothing : ds3.Clear()
108
-        DataGridView3.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
109
-        DataGridView3.ColumnHeadersHeight = RR
110
-        DataGridView3.AllowUserToAddRows = False : DataGridView3.RowTemplate.Height = SS
134
+        每種形體開發來玩的倒數50名_dgv.DataSource = Nothing : ds3.Clear()
135
+        每種形體開發來玩的倒數50名_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
136
+        每種形體開發來玩的倒數50名_dgv.ColumnHeadersHeight = RR
137
+        每種形體開發來玩的倒數50名_dgv.AllowUserToAddRows = False : 每種形體開發來玩的倒數50名_dgv.RowTemplate.Height = SS
111 138
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
112 139
         Set_SQL()
113 140
         SQL1 = MYSQL1 & " ORDER BY   訂單數量"
114
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds3) : DataGridView3.DataSource = ds3.Tables(0) : conn.Close()
141
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds3)
142
+        每種形體開發來玩的倒數50名_dgv.DataSource = ds3.Tables(0) : conn.Close()
115 143
 
116
-        DataGridView3.Columns(0).FillWeight = 40 : DataGridView3.Columns(1).FillWeight = 170 : DataGridView3.Columns(2).FillWeight = 100 : DataGridView3.Columns(3).FillWeight = 100
117
-        DataGridView3.Columns(4).FillWeight = 100 : DataGridView3.Columns(5).FillWeight = 100 : DataGridView3.Columns(6).FillWeight = 100
144
+        每種形體開發來玩的倒數50名_dgv.Columns(0).FillWeight = 40 : 每種形體開發來玩的倒數50名_dgv.Columns(1).FillWeight = 170 : 每種形體開發來玩的倒數50名_dgv.Columns(2).FillWeight = 100
145
+        每種形體開發來玩的倒數50名_dgv.Columns(4).FillWeight = 100 : 每種形體開發來玩的倒數50名_dgv.Columns(5).FillWeight = 100 : 每種形體開發來玩的倒數50名_dgv.Columns(6).FillWeight = 100
146
+        每種形體開發來玩的倒數50名_dgv.Columns(3).FillWeight = 100
118 147
 
119
-        DataGridView3.Columns(6).DefaultCellStyle.Format = "#,##0.00" : DataGridView3.Columns(2).DefaultCellStyle.Format = "#,##0" : DataGridView3.Columns(3).DefaultCellStyle.Format = "#,##0"
120
-        DataGridView3.Columns(4).DefaultCellStyle.Format = "#,##0" : DataGridView3.Columns(5).DefaultCellStyle.Format = "#,##0"
121
-        DataGridView3.Columns(6).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView3.Columns(6).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
122
-        DataGridView3.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView3.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
123
-        DataGridView3.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView3.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
124
-        DataGridView3.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView3.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
125
-        DataGridView3.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView3.Columns(5).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
126
-        For i As Integer = 0 To DataGridView3.Rows.Count - 1
127
-            DataGridView3(0, i).Value = i + 1
148
+        每種形體開發來玩的倒數50名_dgv.Columns(6).DefaultCellStyle.Format = "#,##0.00" : 每種形體開發來玩的倒數50名_dgv.Columns(2).DefaultCellStyle.Format = "#,##0"
149
+        每種形體開發來玩的倒數50名_dgv.Columns(4).DefaultCellStyle.Format = "#,##0" : 每種形體開發來玩的倒數50名_dgv.Columns(5).DefaultCellStyle.Format = "#,##0"
150
+        每種形體開發來玩的倒數50名_dgv.Columns(3).DefaultCellStyle.Format = "#,##0"
151
+
152
+        每種形體開發來玩的倒數50名_dgv.Columns(6).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
153
+        每種形體開發來玩的倒數50名_dgv.Columns(6).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
154
+        每種形體開發來玩的倒數50名_dgv.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
155
+        每種形體開發來玩的倒數50名_dgv.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
156
+        每種形體開發來玩的倒數50名_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
157
+        每種形體開發來玩的倒數50名_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
158
+        每種形體開發來玩的倒數50名_dgv.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
159
+        每種形體開發來玩的倒數50名_dgv.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
160
+        每種形體開發來玩的倒數50名_dgv.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
161
+        每種形體開發來玩的倒數50名_dgv.Columns(5).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
162
+        For i As Integer = 0 To 每種形體開發來玩的倒數50名_dgv.Rows.Count - 1
163
+            每種形體開發來玩的倒數50名_dgv(0, i).Value = i + 1
128 164
         Next
129 165
     End Sub
130 166
     Private Sub Set_訂單清單5()
131
-        DataGridView6.DataSource = Nothing : ds4.Clear()
132
-        DataGridView6.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
133
-        DataGridView6.ColumnHeadersHeight = RR
134
-        DataGridView6.AllowUserToAddRows = False : DataGridView6.RowTemplate.Height = SS
167
+        時間區間內有前途_dgv.DataSource = Nothing : ds4.Clear()
168
+        時間區間內有前途_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
169
+        時間區間內有前途_dgv.ColumnHeadersHeight = RR
170
+        時間區間內有前途_dgv.AllowUserToAddRows = False : 時間區間內有前途_dgv.RowTemplate.Height = SS
135 171
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
136 172
         Set_SQL()
137 173
         SQL1 = MYSQL1 & " ORDER BY   利潤 DESC"
138
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds4) : DataGridView6.DataSource = ds4.Tables(0) : conn.Close()
174
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds4) : 時間區間內有前途_dgv.DataSource = ds4.Tables(0) : conn.Close()
175
+
176
+        時間區間內有前途_dgv.Columns(0).FillWeight = 40 : 時間區間內有前途_dgv.Columns(1).FillWeight = 170 : 時間區間內有前途_dgv.Columns(2).FillWeight = 100
177
+        時間區間內有前途_dgv.Columns(4).FillWeight = 100 : 時間區間內有前途_dgv.Columns(5).FillWeight = 100 : 時間區間內有前途_dgv.Columns(6).FillWeight = 100
178
+        時間區間內有前途_dgv.Columns(3).FillWeight = 100
139 179
 
140
-        DataGridView6.Columns(0).FillWeight = 40 : DataGridView6.Columns(1).FillWeight = 170 : DataGridView6.Columns(2).FillWeight = 100 : DataGridView6.Columns(3).FillWeight = 100
141
-        DataGridView6.Columns(4).FillWeight = 100 : DataGridView6.Columns(5).FillWeight = 100 : DataGridView6.Columns(6).FillWeight = 100
180
+        時間區間內有前途_dgv.Columns(6).DefaultCellStyle.Format = "#,##0.00" : 時間區間內有前途_dgv.Columns(2).DefaultCellStyle.Format = "#,##0"
181
+        時間區間內有前途_dgv.Columns(4).DefaultCellStyle.Format = "#,##0" : 時間區間內有前途_dgv.Columns(5).DefaultCellStyle.Format = "#,##0"
182
+        時間區間內有前途_dgv.Columns(3).DefaultCellStyle.Format = "#,##0"
142 183
 
143
-        DataGridView6.Columns(6).DefaultCellStyle.Format = "#,##0.00" : DataGridView6.Columns(2).DefaultCellStyle.Format = "#,##0" : DataGridView6.Columns(3).DefaultCellStyle.Format = "#,##0"
144
-        DataGridView6.Columns(4).DefaultCellStyle.Format = "#,##0" : DataGridView6.Columns(5).DefaultCellStyle.Format = "#,##0"
145
-        DataGridView6.Columns(6).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView6.Columns(6).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
146
-        DataGridView6.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView6.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
147
-        DataGridView6.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView6.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
148
-        DataGridView6.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView6.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
149
-        DataGridView6.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView6.Columns(5).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
150
-        For i As Integer = 0 To DataGridView6.Rows.Count - 1
151
-            DataGridView6(0, i).Value = i + 1
184
+        時間區間內有前途_dgv.Columns(6).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
185
+        時間區間內有前途_dgv.Columns(6).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
186
+        時間區間內有前途_dgv.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
187
+        時間區間內有前途_dgv.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
188
+        時間區間內有前途_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
189
+        時間區間內有前途_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
190
+        時間區間內有前途_dgv.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
191
+        時間區間內有前途_dgv.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
192
+        時間區間內有前途_dgv.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
193
+        時間區間內有前途_dgv.Columns(5).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
194
+        For i As Integer = 0 To 時間區間內有前途_dgv.Rows.Count - 1
195
+            時間區間內有前途_dgv(0, i).Value = i + 1
152 196
         Next
153 197
     End Sub
154 198
     Private Sub Set_訂單清單6()
155
-        DataGridView5.DataSource = Nothing : ds5.Clear()
156
-        DataGridView5.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
157
-        DataGridView5.ColumnHeadersHeight = RR
158
-        DataGridView5.AllowUserToAddRows = False : DataGridView5.RowTemplate.Height = SS
199
+        時間區間內倒數50名聊尾仔_dgv.DataSource = Nothing : ds5.Clear()
200
+        時間區間內倒數50名聊尾仔_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
201
+        時間區間內倒數50名聊尾仔_dgv.ColumnHeadersHeight = RR
202
+        時間區間內倒數50名聊尾仔_dgv.AllowUserToAddRows = False : 時間區間內倒數50名聊尾仔_dgv.RowTemplate.Height = SS
159 203
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
160 204
         Set_SQL()
161 205
         SQL1 = MYSQL1 & " ORDER BY   利潤"
162
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds5) : DataGridView5.DataSource = ds5.Tables(0) : conn.Close()
206
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds5)
207
+        時間區間內倒數50名聊尾仔_dgv.DataSource = ds5.Tables(0) : conn.Close()
208
+
209
+        時間區間內倒數50名聊尾仔_dgv.Columns(0).FillWeight = 40 : 時間區間內倒數50名聊尾仔_dgv.Columns(1).FillWeight = 170 : 時間區間內倒數50名聊尾仔_dgv.Columns(2).FillWeight = 100
210
+        時間區間內倒數50名聊尾仔_dgv.Columns(4).FillWeight = 100 : 時間區間內倒數50名聊尾仔_dgv.Columns(5).FillWeight = 100 : 時間區間內倒數50名聊尾仔_dgv.Columns(6).FillWeight = 100
211
+        時間區間內倒數50名聊尾仔_dgv.Columns(3).FillWeight = 100
163 212
 
164
-        DataGridView5.Columns(0).FillWeight = 40 : DataGridView5.Columns(1).FillWeight = 170 : DataGridView5.Columns(2).FillWeight = 100 : DataGridView5.Columns(3).FillWeight = 100
165
-        DataGridView5.Columns(4).FillWeight = 100 : DataGridView5.Columns(5).FillWeight = 100 : DataGridView5.Columns(6).FillWeight = 100
213
+        時間區間內倒數50名聊尾仔_dgv.Columns(6).DefaultCellStyle.Format = "#,##0.00" : 時間區間內倒數50名聊尾仔_dgv.Columns(2).DefaultCellStyle.Format = "#,##0"
214
+        時間區間內倒數50名聊尾仔_dgv.Columns(4).DefaultCellStyle.Format = "#,##0" : 時間區間內倒數50名聊尾仔_dgv.Columns(5).DefaultCellStyle.Format = "#,##0"
215
+        時間區間內倒數50名聊尾仔_dgv.Columns(3).DefaultCellStyle.Format = "#,##0"
166 216
 
167
-        DataGridView5.Columns(6).DefaultCellStyle.Format = "#,##0.00" : DataGridView5.Columns(2).DefaultCellStyle.Format = "#,##0" : DataGridView5.Columns(3).DefaultCellStyle.Format = "#,##0"
168
-        DataGridView5.Columns(4).DefaultCellStyle.Format = "#,##0" : DataGridView5.Columns(5).DefaultCellStyle.Format = "#,##0"
169
-        DataGridView5.Columns(6).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView5.Columns(6).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
170
-        DataGridView5.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView5.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
171
-        DataGridView5.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView5.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
172
-        DataGridView5.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView5.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
173
-        DataGridView5.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView5.Columns(5).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
174
-        For i As Integer = 0 To DataGridView5.Rows.Count - 1
175
-            DataGridView5(0, i).Value = i + 1
217
+        時間區間內倒數50名聊尾仔_dgv.Columns(6).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
218
+        時間區間內倒數50名聊尾仔_dgv.Columns(6).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
219
+        時間區間內倒數50名聊尾仔_dgv.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
220
+        時間區間內倒數50名聊尾仔_dgv.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
221
+        時間區間內倒數50名聊尾仔_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
222
+        時間區間內倒數50名聊尾仔_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
223
+        時間區間內倒數50名聊尾仔_dgv.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
224
+        時間區間內倒數50名聊尾仔_dgv.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
225
+        時間區間內倒數50名聊尾仔_dgv.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
226
+        時間區間內倒數50名聊尾仔_dgv.Columns(5).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
227
+        For i As Integer = 0 To 時間區間內倒數50名聊尾仔_dgv.Rows.Count - 1
228
+            時間區間內倒數50名聊尾仔_dgv(0, i).Value = i + 1
176 229
         Next
177 230
     End Sub
178 231
     Private Sub 訂單分析報表七_Load(sender As Object, e As EventArgs) Handles MyBase.Load
179 232
         Me.MdiParent = TENDEN_MES_SYS : Me.WindowState = 2 : Me.AutoScroll = True
180
-        'DataGridView1.Enabled = False : DataGridView2.Enabled = False : DataGridView3.Enabled = False : DataGridView4.Enabled = False : DataGridView5.Enabled = False : DataGridView6.Enabled = False
181 233
         Set_訂單清單1() : Set_訂單清單2() : Set_訂單清單3() : Set_訂單清單4() : Set_訂單清單5() : Set_訂單清單6()
182 234
     End Sub
183
-    Private Sub DateTimePicker1_ValueChanged(sender As Object, e As EventArgs) Handles DateTimePicker1.ValueChanged
235
+    Private Sub DateTimePicker1_ValueChanged(sender As Object, e As EventArgs) Handles 日期_dtp.ValueChanged
184 236
         Set_訂單清單1() : Set_訂單清單2() : Set_訂單清單3() : Set_訂單清單4() : Set_訂單清單5() : Set_訂單清單6()
185 237
     End Sub
186
-    Private Sub DateTimePicker2_ValueChanged(sender As Object, e As EventArgs) Handles DateTimePicker2.ValueChanged
238
+    Private Sub DateTimePicker2_ValueChanged(sender As Object, e As EventArgs) Handles 日期1_dtp.ValueChanged
187 239
         Set_訂單清單1() : Set_訂單清單2() : Set_訂單清單3() : Set_訂單清單4() : Set_訂單清單5() : Set_訂單清單6()
188 240
     End Sub
189
-    Private Sub DataGridView1_Scroll(ByVal sender As Object, ByVal e As ScrollEventArgs) Handles DataGridView1.Scroll
190
-        DataGridView2.FirstDisplayedScrollingRowIndex = DataGridView1.FirstDisplayedScrollingRowIndex : DataGridView3.FirstDisplayedScrollingRowIndex = DataGridView1.FirstDisplayedScrollingRowIndex
191
-        DataGridView4.FirstDisplayedScrollingRowIndex = DataGridView1.FirstDisplayedScrollingRowIndex : DataGridView5.FirstDisplayedScrollingRowIndex = DataGridView1.FirstDisplayedScrollingRowIndex
192
-        DataGridView6.FirstDisplayedScrollingRowIndex = DataGridView1.FirstDisplayedScrollingRowIndex
241
+    Private Sub DataGridView1_Scroll(ByVal sender As Object, ByVal e As ScrollEventArgs) Handles 每種形體有賺頭前50名_dgv.Scroll
242
+        每種形體做爽的倒數50名_dgv.FirstDisplayedScrollingRowIndex = 每種形體有賺頭前50名_dgv.FirstDisplayedScrollingRowIndex
243
+        每種形體開發來玩的倒數50名_dgv.FirstDisplayedScrollingRowIndex = 每種形體有賺頭前50名_dgv.FirstDisplayedScrollingRowIndex
244
+        每種形體數量大前50名_dgv.FirstDisplayedScrollingRowIndex = 每種形體有賺頭前50名_dgv.FirstDisplayedScrollingRowIndex
245
+        時間區間內倒數50名聊尾仔_dgv.FirstDisplayedScrollingRowIndex = 每種形體有賺頭前50名_dgv.FirstDisplayedScrollingRowIndex
246
+        時間區間內有前途_dgv.FirstDisplayedScrollingRowIndex = 每種形體有賺頭前50名_dgv.FirstDisplayedScrollingRowIndex
193 247
     End Sub
194
-    Private Sub DataGridView2_Scroll(ByVal sender As Object, ByVal e As ScrollEventArgs) Handles DataGridView2.Scroll
195
-        DataGridView1.FirstDisplayedScrollingRowIndex = DataGridView2.FirstDisplayedScrollingRowIndex : DataGridView3.FirstDisplayedScrollingRowIndex = DataGridView2.FirstDisplayedScrollingRowIndex
196
-        DataGridView4.FirstDisplayedScrollingRowIndex = DataGridView2.FirstDisplayedScrollingRowIndex : DataGridView5.FirstDisplayedScrollingRowIndex = DataGridView2.FirstDisplayedScrollingRowIndex
197
-        DataGridView6.FirstDisplayedScrollingRowIndex = DataGridView2.FirstDisplayedScrollingRowIndex
248
+    Private Sub DataGridView2_Scroll(ByVal sender As Object, ByVal e As ScrollEventArgs) Handles 每種形體做爽的倒數50名_dgv.Scroll
249
+        每種形體有賺頭前50名_dgv.FirstDisplayedScrollingRowIndex = 每種形體做爽的倒數50名_dgv.FirstDisplayedScrollingRowIndex
250
+        每種形體開發來玩的倒數50名_dgv.FirstDisplayedScrollingRowIndex = 每種形體做爽的倒數50名_dgv.FirstDisplayedScrollingRowIndex
251
+        每種形體數量大前50名_dgv.FirstDisplayedScrollingRowIndex = 每種形體做爽的倒數50名_dgv.FirstDisplayedScrollingRowIndex
252
+        時間區間內倒數50名聊尾仔_dgv.FirstDisplayedScrollingRowIndex = 每種形體做爽的倒數50名_dgv.FirstDisplayedScrollingRowIndex
253
+        時間區間內有前途_dgv.FirstDisplayedScrollingRowIndex = 每種形體做爽的倒數50名_dgv.FirstDisplayedScrollingRowIndex
198 254
     End Sub
199
-    Private Sub DataGridView3_Scroll(ByVal sender As Object, ByVal e As ScrollEventArgs) Handles DataGridView3.Scroll
200
-        DataGridView1.FirstDisplayedScrollingRowIndex = DataGridView3.FirstDisplayedScrollingRowIndex : DataGridView2.FirstDisplayedScrollingRowIndex = DataGridView3.FirstDisplayedScrollingRowIndex
201
-        DataGridView4.FirstDisplayedScrollingRowIndex = DataGridView3.FirstDisplayedScrollingRowIndex : DataGridView5.FirstDisplayedScrollingRowIndex = DataGridView3.FirstDisplayedScrollingRowIndex
202
-        DataGridView6.FirstDisplayedScrollingRowIndex = DataGridView3.FirstDisplayedScrollingRowIndex
255
+    Private Sub DataGridView3_Scroll(ByVal sender As Object, ByVal e As ScrollEventArgs) Handles 每種形體開發來玩的倒數50名_dgv.Scroll
256
+        每種形體有賺頭前50名_dgv.FirstDisplayedScrollingRowIndex = 每種形體開發來玩的倒數50名_dgv.FirstDisplayedScrollingRowIndex
257
+        每種形體做爽的倒數50名_dgv.FirstDisplayedScrollingRowIndex = 每種形體開發來玩的倒數50名_dgv.FirstDisplayedScrollingRowIndex
258
+        每種形體數量大前50名_dgv.FirstDisplayedScrollingRowIndex = 每種形體開發來玩的倒數50名_dgv.FirstDisplayedScrollingRowIndex
259
+        時間區間內倒數50名聊尾仔_dgv.FirstDisplayedScrollingRowIndex = 每種形體開發來玩的倒數50名_dgv.FirstDisplayedScrollingRowIndex
260
+        時間區間內有前途_dgv.FirstDisplayedScrollingRowIndex = 每種形體開發來玩的倒數50名_dgv.FirstDisplayedScrollingRowIndex
203 261
     End Sub
204
-    Private Sub DataGridView4_Scroll(ByVal sender As Object, ByVal e As ScrollEventArgs) Handles DataGridView4.Scroll
205
-        DataGridView1.FirstDisplayedScrollingRowIndex = DataGridView4.FirstDisplayedScrollingRowIndex : DataGridView2.FirstDisplayedScrollingRowIndex = DataGridView4.FirstDisplayedScrollingRowIndex
206
-        DataGridView3.FirstDisplayedScrollingRowIndex = DataGridView4.FirstDisplayedScrollingRowIndex : DataGridView5.FirstDisplayedScrollingRowIndex = DataGridView4.FirstDisplayedScrollingRowIndex
207
-        DataGridView6.FirstDisplayedScrollingRowIndex = DataGridView4.FirstDisplayedScrollingRowIndex
262
+    Private Sub DataGridView4_Scroll(ByVal sender As Object, ByVal e As ScrollEventArgs) Handles 每種形體數量大前50名_dgv.Scroll
263
+        每種形體有賺頭前50名_dgv.FirstDisplayedScrollingRowIndex = 每種形體數量大前50名_dgv.FirstDisplayedScrollingRowIndex
264
+        每種形體做爽的倒數50名_dgv.FirstDisplayedScrollingRowIndex = 每種形體數量大前50名_dgv.FirstDisplayedScrollingRowIndex
265
+        每種形體開發來玩的倒數50名_dgv.FirstDisplayedScrollingRowIndex = 每種形體數量大前50名_dgv.FirstDisplayedScrollingRowIndex
266
+        時間區間內倒數50名聊尾仔_dgv.FirstDisplayedScrollingRowIndex = 每種形體數量大前50名_dgv.FirstDisplayedScrollingRowIndex
267
+        時間區間內有前途_dgv.FirstDisplayedScrollingRowIndex = 每種形體數量大前50名_dgv.FirstDisplayedScrollingRowIndex
208 268
     End Sub
209
-    Private Sub DataGridView5_Scroll(ByVal sender As Object, ByVal e As ScrollEventArgs) Handles DataGridView5.Scroll
210
-        DataGridView1.FirstDisplayedScrollingRowIndex = DataGridView5.FirstDisplayedScrollingRowIndex : DataGridView2.FirstDisplayedScrollingRowIndex = DataGridView5.FirstDisplayedScrollingRowIndex
211
-        DataGridView3.FirstDisplayedScrollingRowIndex = DataGridView5.FirstDisplayedScrollingRowIndex : DataGridView4.FirstDisplayedScrollingRowIndex = DataGridView5.FirstDisplayedScrollingRowIndex
212
-        DataGridView6.FirstDisplayedScrollingRowIndex = DataGridView5.FirstDisplayedScrollingRowIndex
269
+    Private Sub DataGridView5_Scroll(ByVal sender As Object, ByVal e As ScrollEventArgs) Handles 時間區間內倒數50名聊尾仔_dgv.Scroll
270
+        每種形體有賺頭前50名_dgv.FirstDisplayedScrollingRowIndex = 時間區間內倒數50名聊尾仔_dgv.FirstDisplayedScrollingRowIndex
271
+        每種形體做爽的倒數50名_dgv.FirstDisplayedScrollingRowIndex = 時間區間內倒數50名聊尾仔_dgv.FirstDisplayedScrollingRowIndex
272
+        每種形體開發來玩的倒數50名_dgv.FirstDisplayedScrollingRowIndex = 時間區間內倒數50名聊尾仔_dgv.FirstDisplayedScrollingRowIndex
273
+        每種形體數量大前50名_dgv.FirstDisplayedScrollingRowIndex = 時間區間內倒數50名聊尾仔_dgv.FirstDisplayedScrollingRowIndex
274
+        時間區間內有前途_dgv.FirstDisplayedScrollingRowIndex = 時間區間內倒數50名聊尾仔_dgv.FirstDisplayedScrollingRowIndex
213 275
     End Sub
214
-    Private Sub DataGridView6_Scroll(ByVal sender As Object, ByVal e As ScrollEventArgs) Handles DataGridView6.Scroll
215
-        DataGridView1.FirstDisplayedScrollingRowIndex = DataGridView6.FirstDisplayedScrollingRowIndex : DataGridView2.FirstDisplayedScrollingRowIndex = DataGridView6.FirstDisplayedScrollingRowIndex
216
-        DataGridView3.FirstDisplayedScrollingRowIndex = DataGridView6.FirstDisplayedScrollingRowIndex : DataGridView4.FirstDisplayedScrollingRowIndex = DataGridView6.FirstDisplayedScrollingRowIndex
217
-        DataGridView5.FirstDisplayedScrollingRowIndex = DataGridView6.FirstDisplayedScrollingRowIndex
276
+    Private Sub DataGridView6_Scroll(ByVal sender As Object, ByVal e As ScrollEventArgs) Handles 時間區間內有前途_dgv.Scroll
277
+        每種形體有賺頭前50名_dgv.FirstDisplayedScrollingRowIndex = 時間區間內有前途_dgv.FirstDisplayedScrollingRowIndex
278
+        每種形體做爽的倒數50名_dgv.FirstDisplayedScrollingRowIndex = 時間區間內有前途_dgv.FirstDisplayedScrollingRowIndex
279
+        每種形體開發來玩的倒數50名_dgv.FirstDisplayedScrollingRowIndex = 時間區間內有前途_dgv.FirstDisplayedScrollingRowIndex
280
+        每種形體數量大前50名_dgv.FirstDisplayedScrollingRowIndex = 時間區間內有前途_dgv.FirstDisplayedScrollingRowIndex
281
+        時間區間內倒數50名聊尾仔_dgv.FirstDisplayedScrollingRowIndex = 時間區間內有前途_dgv.FirstDisplayedScrollingRowIndex
218 282
     End Sub
219 283
 
220
-    Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
284
+    Private Sub Button3_Click(sender As Object, e As EventArgs) Handles 列印_bt.Click
221 285
         xlApp = CType(CreateObject("Excel.Application"), Application)
222 286
         xlBook = xlApp.Workbooks.Add
223 287
         xlApp.DisplayAlerts = True
@@ -227,25 +291,25 @@ Public Class 訂單分析報表七
227 291
         xlApp.Visible = True
228 292
         xlApp.Application.WindowState = xlMaximized
229 293
 
230
-        xlSheet.Cells(1, 1) = Strings.Left(Strings.Format(DateTimePicker1.Value, "yyyy/MM/dd"), 10) & " 到 " & Strings.Left(Strings.Format(DateTimePicker2.Value, "yyyy/MM/dd"), 10) & " 產品營運排行榜"
294
+        xlSheet.Cells(1, 1) = Strings.Left(Strings.Format(日期_dtp.Value, "yyyy/MM/dd"), 10) & " 到 " & Strings.Left(Strings.Format(日期1_dtp.Value, "yyyy/MM/dd"), 10) & " 產品營運排行榜"
231 295
         xlSheet.Cells(2, 1) = Label1.Text : xlSheet.Cells(2, 5) = Label5.Text : xlSheet.Cells(2, 9) = Label7.Text
232 296
         xlSheet.Cells(3, 1) = "排名" : xlSheet.Cells(3, 5) = "排名" : xlSheet.Cells(3, 9) = "排名"
233 297
         xlSheet.Cells(3, 2) = "形體名稱" : xlSheet.Cells(3, 6) = "形體名稱" : xlSheet.Cells(3, 10) = "形體名稱"
234 298
         xlSheet.Cells(3, 3) = "訂單數量" : xlSheet.Cells(3, 7) = "訂單數量" : xlSheet.Cells(3, 11) = "訂單數量"
235
-        For i As Integer = 0 To DataGridView1.Rows.Count - 1
236
-            xlSheet.Cells(i + 4, 1) = DataGridView1.Rows(i).Cells("排名").Value
237
-            xlSheet.Cells(i + 4, 2) = DataGridView1.Rows(i).Cells("形體號").Value
238
-            xlSheet.Cells(i + 4, 3) = DataGridView1.Rows(i).Cells("訂單數量").Value
299
+        For i As Integer = 0 To 每種形體有賺頭前50名_dgv.Rows.Count - 1
300
+            xlSheet.Cells(i + 4, 1) = 每種形體有賺頭前50名_dgv.Rows(i).Cells("排名").Value
301
+            xlSheet.Cells(i + 4, 2) = 每種形體有賺頭前50名_dgv.Rows(i).Cells("形體號").Value
302
+            xlSheet.Cells(i + 4, 3) = 每種形體有賺頭前50名_dgv.Rows(i).Cells("訂單數量").Value
239 303
         Next
240
-        For i As Integer = 0 To DataGridView4.Rows.Count - 1
241
-            xlSheet.Cells(i + 4, 5) = DataGridView4.Rows(i).Cells("排名").Value
242
-            xlSheet.Cells(i + 4, 6) = DataGridView4.Rows(i).Cells("形體號").Value
243
-            xlSheet.Cells(i + 4, 7) = DataGridView4.Rows(i).Cells("訂單數量").Value
304
+        For i As Integer = 0 To 每種形體數量大前50名_dgv.Rows.Count - 1
305
+            xlSheet.Cells(i + 4, 5) = 每種形體數量大前50名_dgv.Rows(i).Cells("排名").Value
306
+            xlSheet.Cells(i + 4, 6) = 每種形體數量大前50名_dgv.Rows(i).Cells("形體號").Value
307
+            xlSheet.Cells(i + 4, 7) = 每種形體數量大前50名_dgv.Rows(i).Cells("訂單數量").Value
244 308
         Next
245
-        For i As Integer = 0 To DataGridView6.Rows.Count - 1
246
-            xlSheet.Cells(i + 4, 9) = DataGridView6.Rows(i).Cells("排名").Value
247
-            xlSheet.Cells(i + 4, 10) = DataGridView6.Rows(i).Cells("形體號").Value
248
-            xlSheet.Cells(i + 4, 11) = DataGridView6.Rows(i).Cells("訂單數量").Value
309
+        For i As Integer = 0 To 時間區間內有前途_dgv.Rows.Count - 1
310
+            xlSheet.Cells(i + 4, 9) = 時間區間內有前途_dgv.Rows(i).Cells("排名").Value
311
+            xlSheet.Cells(i + 4, 10) = 時間區間內有前途_dgv.Rows(i).Cells("形體號").Value
312
+            xlSheet.Cells(i + 4, 11) = 時間區間內有前途_dgv.Rows(i).Cells("訂單數量").Value
249 313
         Next
250 314
         AA(xlApp, xlSheet)
251 315
 

+ 340
- 340
TENDEN-MES-SYS/彙總報表管理/訂單分析報表三.Designer.vb
文件差異過大導致無法顯示
查看文件


+ 118
- 118
TENDEN-MES-SYS/彙總報表管理/訂單分析報表三.vb 查看文件

@@ -7,216 +7,216 @@ Public Class 訂單分析報表三
7 7
     Dim ds As New DataSet : Dim ds1 As New DataSet : Dim ds2 As New DataSet : Dim ds3 As New DataSet : Dim ds4 As New DataSet : Dim ds5 As New DataSet : Dim ds6 As New DataSet
8 8
     Dim dr As SqlDataReader
9 9
     Private  Sub Set_DGV1載入前設定()
10
-        DataGridView1.DataSource = Nothing : ds.Clear()
11
-        DataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
12
-        DataGridView1.ColumnHeadersHeight = 25
13
-        DataGridView1.AllowUserToAddRows = False
10
+        IN_L_dgv.DataSource = Nothing : ds.Clear()
11
+        IN_L_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
12
+        IN_L_dgv.ColumnHeadersHeight = 25
13
+        IN_L_dgv.AllowUserToAddRows = False
14 14
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
15 15
     End Sub
16 16
     Private  Sub Set_DGV1載入後設定()
17
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds) : DataGridView1.DataSource = ds.Tables(0) : conn.Close()
17
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds) : IN_L_dgv.DataSource = ds.Tables(0) : conn.Close()
18 18
     End Sub
19 19
     Private  Sub Set_分析清單1()
20 20
         Set_DGV1載入前設定()
21 21
         SQL1 = "SELECT LEFT(客戶交期, 7) AS CUST_XF, COUNT(*) AS POS, SUM(訂單數量) AS QTY, SUM(訂單數量) / COUNT(*) AS AVG_QTY " &
22 22
                "FROM (SELECT LEFT(客戶交期, 7) AS 客戶交期, 訂單流水號, SUM(訂單數量) AS 訂單數量 FROM 訂單控制表 " &
23
-               "WHERE (LEFT(客戶交期, 4) = '" & ComboBox1.Text & "') AND (CXL IS NULL) AND (訂單種類 LIKE 'INT-L')  GROUP BY LEFT(客戶交期, 7), 訂單流水號) AS Q " &
23
+               "WHERE (LEFT(客戶交期, 4) = '" & YEAR_cb.Text & "') AND (CXL IS NULL) AND (訂單種類 LIKE 'INT-L')  GROUP BY LEFT(客戶交期, 7), 訂單流水號) AS Q " &
24 24
                "GROUP BY   LEFT(客戶交期, 7) ORDER BY CUST_XF"
25 25
         Set_DGV1載入後設定()
26 26
     End Sub
27 27
     Private  Sub Set_DGV2載入前設定()
28
-        DataGridView2.DataSource = Nothing : ds1.Clear()
29
-        DataGridView2.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
30
-        DataGridView2.ColumnHeadersHeight = 25
31
-        DataGridView2.AllowUserToAddRows = False
28
+        QVC_dgv.DataSource = Nothing : ds1.Clear()
29
+        QVC_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
30
+        QVC_dgv.ColumnHeadersHeight = 25
31
+        QVC_dgv.AllowUserToAddRows = False
32 32
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
33 33
     End Sub
34 34
     Private  Sub Set_DGV2載入後設定()
35
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds1) : DataGridView2.DataSource = ds1.Tables(0) : conn.Close()
35
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds1) : QVC_dgv.DataSource = ds1.Tables(0) : conn.Close()
36 36
     End Sub
37 37
     Private  Sub Set_分析清單2()
38 38
         Set_DGV2載入前設定()
39 39
         SQL1 = "SELECT LEFT(客戶交期, 7) AS CUST_XF, COUNT(*) AS POS, SUM(訂單數量) AS QTY, SUM(訂單數量) / COUNT(*) AS AVG_QTY " &
40 40
                "FROM (SELECT LEFT(客戶交期, 7) AS 客戶交期, 訂單流水號, SUM(訂單數量) AS 訂單數量 FROM 訂單控制表 " &
41
-               "WHERE (LEFT(客戶交期, 4) = '" & ComboBox1.Text & "') AND (CXL IS NULL) AND (訂單種類 LIKE 'QVC')  GROUP BY LEFT(客戶交期, 7), 訂單流水號) AS Q " &
41
+               "WHERE (LEFT(客戶交期, 4) = '" & YEAR_cb.Text & "') AND (CXL IS NULL) AND (訂單種類 LIKE 'QVC')  GROUP BY LEFT(客戶交期, 7), 訂單流水號) AS Q " &
42 42
                "GROUP BY   LEFT(客戶交期, 7) ORDER BY CUST_XF"
43 43
         Set_DGV2載入後設定()
44 44
     End Sub
45 45
     Private  Sub Set_DGV3載入前設定()
46
-        DataGridView3.DataSource = Nothing : ds2.Clear()
47
-        DataGridView3.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
48
-        DataGridView3.ColumnHeadersHeight = 25
49
-        DataGridView3.AllowUserToAddRows = False
46
+        DOMESTIC_dgv.DataSource = Nothing : ds2.Clear()
47
+        DOMESTIC_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
48
+        DOMESTIC_dgv.ColumnHeadersHeight = 25
49
+        DOMESTIC_dgv.AllowUserToAddRows = False
50 50
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
51 51
     End Sub
52 52
     Private  Sub Set_DGV3載入後設定()
53
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds2) : DataGridView3.DataSource = ds2.Tables(0) : conn.Close()
53
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds2) : DOMESTIC_dgv.DataSource = ds2.Tables(0) : conn.Close()
54 54
     End Sub
55 55
     Private  Sub Set_分析清單3()
56 56
         Set_DGV3載入前設定()
57 57
         SQL1 = "SELECT LEFT(客戶交期, 7) AS CUST_XF, COUNT(*) AS POS, SUM(訂單數量) AS QTY, SUM(訂單數量) / COUNT(*) AS AVG_QTY " &
58 58
                "FROM (SELECT LEFT(客戶交期, 7) AS 客戶交期, 訂單流水號, SUM(訂單數量) AS 訂單數量 FROM 訂單控制表 " &
59
-               "WHERE (LEFT(客戶交期, 4) = '" & ComboBox1.Text & "') AND (CXL IS NULL) AND (訂單種類 LIKE 'DOMESTIC')  GROUP BY LEFT(客戶交期, 7), 訂單流水號) AS Q " &
59
+               "WHERE (LEFT(客戶交期, 4) = '" & YEAR_cb.Text & "') AND (CXL IS NULL) AND (訂單種類 LIKE 'DOMESTIC')  GROUP BY LEFT(客戶交期, 7), 訂單流水號) AS Q " &
60 60
                "GROUP BY   LEFT(客戶交期, 7) ORDER BY CUST_XF"
61 61
         Set_DGV3載入後設定()
62 62
     End Sub
63 63
     Private  Sub Set_DGV4載入前設定()
64
-        DataGridView4.DataSource = Nothing : ds3.Clear()
65
-        DataGridView4.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
66
-        DataGridView4.ColumnHeadersHeight = 25
67
-        DataGridView4.AllowUserToAddRows = False
64
+        JH_dgv.DataSource = Nothing : ds3.Clear()
65
+        JH_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
66
+        JH_dgv.ColumnHeadersHeight = 25
67
+        JH_dgv.AllowUserToAddRows = False
68 68
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
69 69
     End Sub
70 70
     Private  Sub Set_DGV4載入後設定()
71
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds3) : DataGridView4.DataSource = ds3.Tables(0) : conn.Close()
71
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds3) : JH_dgv.DataSource = ds3.Tables(0) : conn.Close()
72 72
     End Sub
73 73
     Private  Sub Set_分析清單4()
74 74
         Set_DGV4載入前設定()
75 75
         SQL1 = "SELECT LEFT(工廠回復交期, 7) AS FTY_XF, COUNT(*) AS POS, SUM(訂單數量) AS QTY, SUM(訂單數量) / COUNT(*) AS AVG_QTY " &
76 76
                "FROM (SELECT LEFT(工廠回復交期, 7) AS 工廠回復交期, 訂單流水號, SUM(訂單數量) AS 訂單數量 FROM 訂單控制表 " &
77
-               "WHERE (LEFT(工廠回復交期, 4) = '" & ComboBox1.Text & "') AND (CXL IS NULL) AND (生產工廠 LIKE 'JH') GROUP BY LEFT(工廠回復交期, 7), 訂單流水號) AS Q " &
77
+               "WHERE (LEFT(工廠回復交期, 4) = '" & YEAR_cb.Text & "') AND (CXL IS NULL) AND (生產工廠 LIKE 'JH') GROUP BY LEFT(工廠回復交期, 7), 訂單流水號) AS Q " &
78 78
                "GROUP BY   LEFT(工廠回復交期, 7) ORDER BY   FTY_XF"
79 79
         Set_DGV4載入後設定()
80 80
     End Sub
81 81
     Private  Sub Set_DGV5載入前設定()
82
-        DataGridView5.DataSource = Nothing : ds4.Clear()
83
-        DataGridView5.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
84
-        DataGridView5.ColumnHeadersHeight = 25
85
-        DataGridView5.AllowUserToAddRows = False
82
+        NJ_dgv.DataSource = Nothing : ds4.Clear()
83
+        NJ_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
84
+        NJ_dgv.ColumnHeadersHeight = 25
85
+        NJ_dgv.AllowUserToAddRows = False
86 86
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
87 87
     End Sub
88 88
     Private  Sub Set_DGV5載入後設定()
89
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds4) : DataGridView5.DataSource = ds4.Tables(0) : conn.Close()
89
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds4) : NJ_dgv.DataSource = ds4.Tables(0) : conn.Close()
90 90
     End Sub
91 91
     Private  Sub Set_分析清單5()
92 92
         Set_DGV5載入前設定()
93 93
         SQL1 = "SELECT LEFT(工廠回復交期, 7) AS FTY_XF, COUNT(*) AS POS, SUM(訂單數量) AS QTY, SUM(訂單數量) / COUNT(*) AS AVG_QTY " &
94 94
                "FROM (SELECT LEFT(工廠回復交期, 7) AS 工廠回復交期, 訂單流水號, SUM(訂單數量) AS 訂單數量 FROM 訂單控制表 " &
95
-               "WHERE (LEFT(工廠回復交期, 4) = '" & ComboBox1.Text & "') AND (CXL IS NULL) AND (生產工廠 LIKE 'NJ') GROUP BY LEFT(工廠回復交期, 7), 訂單流水號) AS Q " &
95
+               "WHERE (LEFT(工廠回復交期, 4) = '" & YEAR_cb.Text & "') AND (CXL IS NULL) AND (生產工廠 LIKE 'NJ') GROUP BY LEFT(工廠回復交期, 7), 訂單流水號) AS Q " &
96 96
                "GROUP BY   LEFT(工廠回復交期, 7) ORDER BY   FTY_XF"
97 97
         Set_DGV5載入後設定()
98 98
     End Sub
99 99
     Private  Sub Set_DGV6載入前設定()
100
-        DataGridView6.DataSource = Nothing : ds5.Clear()
101
-        DataGridView6.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
102
-        DataGridView6.ColumnHeadersHeight = 25
103
-        DataGridView6.AllowUserToAddRows = False
100
+        SK_dgv.DataSource = Nothing : ds5.Clear()
101
+        SK_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
102
+        SK_dgv.ColumnHeadersHeight = 25
103
+        SK_dgv.AllowUserToAddRows = False
104 104
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
105 105
     End Sub
106 106
     Private  Sub Set_DGV6載入後設定()
107
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds5) : DataGridView6.DataSource = ds5.Tables(0) : conn.Close()
107
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds5) : SK_dgv.DataSource = ds5.Tables(0) : conn.Close()
108 108
     End Sub
109 109
     Private  Sub Set_分析清單6()
110 110
         Set_DGV6載入前設定()
111 111
         SQL1 = "SELECT LEFT(工廠回復交期, 7) AS FTY_XF, COUNT(*) AS POS, SUM(訂單數量) AS QTY, SUM(訂單數量) / COUNT(*) AS AVG_QTY " &
112 112
                "FROM (SELECT LEFT(工廠回復交期, 7) AS 工廠回復交期, 訂單流水號, SUM(訂單數量) AS 訂單數量 FROM 訂單控制表 " &
113
-               "WHERE (LEFT(工廠回復交期, 4) = '" & ComboBox1.Text & "') AND (CXL IS NULL) AND (生產工廠 LIKE 'SK') GROUP BY LEFT(工廠回復交期, 7), 訂單流水號) AS Q " &
113
+               "WHERE (LEFT(工廠回復交期, 4) = '" & YEAR_cb.Text & "') AND (CXL IS NULL) AND (生產工廠 LIKE 'SK') GROUP BY LEFT(工廠回復交期, 7), 訂單流水號) AS Q " &
114 114
                "GROUP BY   LEFT(工廠回復交期, 7) ORDER BY   FTY_XF"
115 115
         Set_DGV6載入後設定()
116 116
     End Sub
117 117
     Private  Sub Set_grid()
118
-        DataGridView1.Columns(0).Width = 85 : DataGridView1.Columns(1).Width = 85 : DataGridView1.Columns(2).Width = 85 : DataGridView1.Columns(3).Width = 85
119
-        DataGridView1.Columns(1).DefaultCellStyle.Format = "#,##0" : DataGridView1.Columns(2).DefaultCellStyle.Format = "#,##0" : DataGridView1.Columns(3).DefaultCellStyle.Format = "#,##0"
120
-        DataGridView1.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
121
-        DataGridView1.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView1.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
122
-        DataGridView1.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
123
-        DataGridView1.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView1.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
118
+        IN_L_dgv.Columns(0).Width = 85 : IN_L_dgv.Columns(1).Width = 85 : IN_L_dgv.Columns(2).Width = 85 : IN_L_dgv.Columns(3).Width = 85
119
+        IN_L_dgv.Columns(1).DefaultCellStyle.Format = "#,##0" : IN_L_dgv.Columns(2).DefaultCellStyle.Format = "#,##0" : IN_L_dgv.Columns(3).DefaultCellStyle.Format = "#,##0"
120
+        IN_L_dgv.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
121
+        IN_L_dgv.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : IN_L_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
122
+        IN_L_dgv.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
123
+        IN_L_dgv.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : IN_L_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
124 124
 
125
-        DataGridView2.Columns(0).Width = 85 : DataGridView2.Columns(1).Width = 85 : DataGridView2.Columns(2).Width = 85 : DataGridView2.Columns(3).Width = 85
126
-        DataGridView2.Columns(1).DefaultCellStyle.Format = "#,##0" : DataGridView2.Columns(2).DefaultCellStyle.Format = "#,##0" : DataGridView2.Columns(3).DefaultCellStyle.Format = "#,##0"
127
-        DataGridView2.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
128
-        DataGridView2.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView2.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
129
-        DataGridView2.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
130
-        DataGridView2.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView2.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
125
+        QVC_dgv.Columns(0).Width = 85 : QVC_dgv.Columns(1).Width = 85 : QVC_dgv.Columns(2).Width = 85 : QVC_dgv.Columns(3).Width = 85
126
+        QVC_dgv.Columns(1).DefaultCellStyle.Format = "#,##0" : QVC_dgv.Columns(2).DefaultCellStyle.Format = "#,##0" : QVC_dgv.Columns(3).DefaultCellStyle.Format = "#,##0"
127
+        QVC_dgv.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
128
+        QVC_dgv.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : QVC_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
129
+        QVC_dgv.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
130
+        QVC_dgv.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : QVC_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
131 131
 
132
-        DataGridView3.Columns(0).Width = 85 : DataGridView3.Columns(1).Width = 85 : DataGridView3.Columns(2).Width = 85 : DataGridView3.Columns(3).Width = 85
133
-        DataGridView3.Columns(1).DefaultCellStyle.Format = "#,##0" : DataGridView3.Columns(2).DefaultCellStyle.Format = "#,##0" : DataGridView3.Columns(3).DefaultCellStyle.Format = "#,##0"
134
-        DataGridView3.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
135
-        DataGridView3.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView3.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
136
-        DataGridView3.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
137
-        DataGridView3.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView3.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
132
+        DOMESTIC_dgv.Columns(0).Width = 85 : DOMESTIC_dgv.Columns(1).Width = 85 : DOMESTIC_dgv.Columns(2).Width = 85 : DOMESTIC_dgv.Columns(3).Width = 85
133
+        DOMESTIC_dgv.Columns(1).DefaultCellStyle.Format = "#,##0" : DOMESTIC_dgv.Columns(2).DefaultCellStyle.Format = "#,##0" : DOMESTIC_dgv.Columns(3).DefaultCellStyle.Format = "#,##0"
134
+        DOMESTIC_dgv.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
135
+        DOMESTIC_dgv.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DOMESTIC_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
136
+        DOMESTIC_dgv.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
137
+        DOMESTIC_dgv.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : DOMESTIC_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
138 138
 
139
-        DataGridView4.Columns(0).Width = 85 : DataGridView4.Columns(1).Width = 85 : DataGridView4.Columns(2).Width = 85 : DataGridView4.Columns(3).Width = 85
140
-        DataGridView4.Columns(1).DefaultCellStyle.Format = "#,##0" : DataGridView4.Columns(2).DefaultCellStyle.Format = "#,##0" : DataGridView4.Columns(3).DefaultCellStyle.Format = "#,##0"
141
-        DataGridView4.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
142
-        DataGridView4.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView4.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
143
-        DataGridView4.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
144
-        DataGridView4.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView4.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
139
+        JH_dgv.Columns(0).Width = 85 : JH_dgv.Columns(1).Width = 85 : JH_dgv.Columns(2).Width = 85 : JH_dgv.Columns(3).Width = 85
140
+        JH_dgv.Columns(1).DefaultCellStyle.Format = "#,##0" : JH_dgv.Columns(2).DefaultCellStyle.Format = "#,##0" : JH_dgv.Columns(3).DefaultCellStyle.Format = "#,##0"
141
+        JH_dgv.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
142
+        JH_dgv.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : JH_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
143
+        JH_dgv.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
144
+        JH_dgv.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : JH_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
145 145
 
146
-        DataGridView5.Columns(0).Width = 85 : DataGridView5.Columns(1).Width = 85 : DataGridView5.Columns(2).Width = 85 : DataGridView5.Columns(3).Width = 85
147
-        DataGridView5.Columns(1).DefaultCellStyle.Format = "#,##0" : DataGridView5.Columns(2).DefaultCellStyle.Format = "#,##0" : DataGridView5.Columns(3).DefaultCellStyle.Format = "#,##0"
148
-        DataGridView5.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
149
-        DataGridView5.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView5.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
150
-        DataGridView5.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
151
-        DataGridView5.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView5.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
146
+        NJ_dgv.Columns(0).Width = 85 : NJ_dgv.Columns(1).Width = 85 : NJ_dgv.Columns(2).Width = 85 : NJ_dgv.Columns(3).Width = 85
147
+        NJ_dgv.Columns(1).DefaultCellStyle.Format = "#,##0" : NJ_dgv.Columns(2).DefaultCellStyle.Format = "#,##0" : NJ_dgv.Columns(3).DefaultCellStyle.Format = "#,##0"
148
+        NJ_dgv.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
149
+        NJ_dgv.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : NJ_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
150
+        NJ_dgv.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
151
+        NJ_dgv.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : NJ_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
152 152
 
153
-        DataGridView6.Columns(0).Width = 85 : DataGridView6.Columns(1).Width = 85 : DataGridView6.Columns(2).Width = 85 : DataGridView6.Columns(3).Width = 85
154
-        DataGridView6.Columns(1).DefaultCellStyle.Format = "#,##0" : DataGridView6.Columns(2).DefaultCellStyle.Format = "#,##0" : DataGridView6.Columns(3).DefaultCellStyle.Format = "#,##0"
155
-        DataGridView6.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
156
-        DataGridView6.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView6.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
157
-        DataGridView6.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
158
-        DataGridView6.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView6.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
153
+        SK_dgv.Columns(0).Width = 85 : SK_dgv.Columns(1).Width = 85 : SK_dgv.Columns(2).Width = 85 : SK_dgv.Columns(3).Width = 85
154
+        SK_dgv.Columns(1).DefaultCellStyle.Format = "#,##0" : SK_dgv.Columns(2).DefaultCellStyle.Format = "#,##0" : SK_dgv.Columns(3).DefaultCellStyle.Format = "#,##0"
155
+        SK_dgv.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
156
+        SK_dgv.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : SK_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
157
+        SK_dgv.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
158
+        SK_dgv.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : SK_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
159 159
     End Sub
160 160
     Private  Sub Set_自動彙總1()
161 161
         Dim 金額加總(11) As Double
162
-        For i As Integer = 0 To DataGridView1.Rows.Count - 1
163
-            If DataGridView1.RowCount = 0 Then : 金額加總(0) += 0 : Else : 金額加總(0) += DataGridView1.Rows(i).Cells("POS").Value : End If
164
-            If DataGridView1.RowCount = 0 Then : 金額加總(1) += 0 : Else : 金額加總(1) += DataGridView1.Rows(i).Cells("QTY").Value : End If
162
+        For i As Integer = 0 To IN_L_dgv.Rows.Count - 1
163
+            If IN_L_dgv.RowCount = 0 Then : 金額加總(0) += 0 : Else : 金額加總(0) += IN_L_dgv.Rows(i).Cells("POS").Value : End If
164
+            If IN_L_dgv.RowCount = 0 Then : 金額加總(1) += 0 : Else : 金額加總(1) += IN_L_dgv.Rows(i).Cells("QTY").Value : End If
165 165
         Next i
166
-        For i As Integer = 0 To DataGridView2.Rows.Count - 1
167
-            If DataGridView2.RowCount = 0 Then : 金額加總(2) += 0 : Else : 金額加總(2) += DataGridView2.Rows(i).Cells("POS").Value : End If
168
-            If DataGridView2.RowCount = 0 Then : 金額加總(3) += 0 : Else : 金額加總(3) += DataGridView2.Rows(i).Cells("QTY").Value : End If
166
+        For i As Integer = 0 To QVC_dgv.Rows.Count - 1
167
+            If QVC_dgv.RowCount = 0 Then : 金額加總(2) += 0 : Else : 金額加總(2) += QVC_dgv.Rows(i).Cells("POS").Value : End If
168
+            If QVC_dgv.RowCount = 0 Then : 金額加總(3) += 0 : Else : 金額加總(3) += QVC_dgv.Rows(i).Cells("QTY").Value : End If
169 169
         Next i
170
-        For i As Integer = 0 To DataGridView3.Rows.Count - 1
171
-            If DataGridView3.RowCount = 0 Then : 金額加總(4) += 0 : Else : 金額加總(4) += DataGridView3.Rows(i).Cells("POS").Value : End If
172
-            If DataGridView3.RowCount = 0 Then : 金額加總(5) += 0 : Else : 金額加總(5) += DataGridView3.Rows(i).Cells("QTY").Value : End If
170
+        For i As Integer = 0 To DOMESTIC_dgv.Rows.Count - 1
171
+            If DOMESTIC_dgv.RowCount = 0 Then : 金額加總(4) += 0 : Else : 金額加總(4) += DOMESTIC_dgv.Rows(i).Cells("POS").Value : End If
172
+            If DOMESTIC_dgv.RowCount = 0 Then : 金額加總(5) += 0 : Else : 金額加總(5) += DOMESTIC_dgv.Rows(i).Cells("QTY").Value : End If
173 173
         Next i
174
-        For i As Integer = 0 To DataGridView4.Rows.Count - 1
175
-            If DataGridView4.RowCount = 0 Then : 金額加總(6) += 0 : Else : 金額加總(6) += DataGridView4.Rows(i).Cells("POS").Value : End If
176
-            If DataGridView4.RowCount = 0 Then : 金額加總(7) += 0 : Else : 金額加總(7) += DataGridView4.Rows(i).Cells("QTY").Value : End If
174
+        For i As Integer = 0 To JH_dgv.Rows.Count - 1
175
+            If JH_dgv.RowCount = 0 Then : 金額加總(6) += 0 : Else : 金額加總(6) += JH_dgv.Rows(i).Cells("POS").Value : End If
176
+            If JH_dgv.RowCount = 0 Then : 金額加總(7) += 0 : Else : 金額加總(7) += JH_dgv.Rows(i).Cells("QTY").Value : End If
177 177
         Next i
178
-        For i As Integer = 0 To DataGridView5.Rows.Count - 1
179
-            If DataGridView5.RowCount = 0 Then : 金額加總(8) += 0 : Else : 金額加總(8) += DataGridView5.Rows(i).Cells("POS").Value : End If
180
-            If DataGridView5.RowCount = 0 Then : 金額加總(9) += 0 : Else : 金額加總(9) += DataGridView5.Rows(i).Cells("QTY").Value : End If
178
+        For i As Integer = 0 To NJ_dgv.Rows.Count - 1
179
+            If NJ_dgv.RowCount = 0 Then : 金額加總(8) += 0 : Else : 金額加總(8) += NJ_dgv.Rows(i).Cells("POS").Value : End If
180
+            If NJ_dgv.RowCount = 0 Then : 金額加總(9) += 0 : Else : 金額加總(9) += NJ_dgv.Rows(i).Cells("QTY").Value : End If
181 181
         Next i
182
-        For i As Integer = 0 To DataGridView6.Rows.Count - 1
183
-            If DataGridView6.RowCount = 0 Then : 金額加總(10) += 0 : Else : 金額加總(10) += DataGridView6.Rows(i).Cells("POS").Value : End If
184
-            If DataGridView6.RowCount = 0 Then : 金額加總(11) += 0 : Else : 金額加總(11) += DataGridView6.Rows(i).Cells("QTY").Value : End If
182
+        For i As Integer = 0 To SK_dgv.Rows.Count - 1
183
+            If SK_dgv.RowCount = 0 Then : 金額加總(10) += 0 : Else : 金額加總(10) += SK_dgv.Rows(i).Cells("POS").Value : End If
184
+            If SK_dgv.RowCount = 0 Then : 金額加總(11) += 0 : Else : 金額加總(11) += SK_dgv.Rows(i).Cells("QTY").Value : End If
185 185
         Next i
186
-        TextBox1.Text = Format(Val(金額加總(0)), "#,##0")
187
-        TextBox2.Text = Format(Val(金額加總(1)), "#,##0")
188
-        TextBox4.Text = Format(Val(金額加總(2)), "#,##0")
189
-        TextBox5.Text = Format(Val(金額加總(3)), "#,##0")
190
-        TextBox7.Text = Format(Val(金額加總(4)), "#,##0")
191
-        TextBox8.Text = Format(Val(金額加總(5)), "#,##0")
192
-        TextBox10.Text = Format(Val(金額加總(0) + 金額加總(2) + 金額加總(4)), "#,##0")
193
-        TextBox11.Text = Format(Val(金額加總(1) + 金額加總(3) + 金額加總(5)), "#,##0")
194
-        TextBox24.Text = Format(Val(金額加總(6)), "#,##0")
195
-        TextBox23.Text = Format(Val(金額加總(7)), "#,##0")
196
-        TextBox21.Text = Format(Val(金額加總(8)), "#,##0")
197
-        TextBox20.Text = Format(Val(金額加總(9)), "#,##0")
198
-        TextBox18.Text = Format(Val(金額加總(10)), "#,##0")
199
-        TextBox17.Text = Format(Val(金額加總(11)), "#,##0")
200
-        TextBox15.Text = Format(Val(金額加總(6) + 金額加總(8) + 金額加總(10)), "#,##0")
201
-        TextBox14.Text = Format(Val(金額加總(7) + 金額加總(9) + 金額加總(11)), "#,##0")
202
-        If 金額加總(0) = 0 Then : TextBox3.Text = "0" : Else : TextBox3.Text = Format(Val(金額加總(1) / 金額加總(0)), "#,##0") : End If
203
-        If 金額加總(2) = 0 Then : TextBox6.Text = "0" : Else : TextBox6.Text = Format(Val(金額加總(3) / 金額加總(2)), "#,##0") : End If
204
-        If 金額加總(4) = 0 Then : TextBox9.Text = "0" : Else : TextBox9.Text = Format(Val(金額加總(5) / 金額加總(4)), "#,##0") : End If
205
-        If 金額加總(6) = 0 Then : TextBox22.Text = "0" : Else : TextBox22.Text = Format(Val(金額加總(7) / 金額加總(6)), "#,##0") : End If
206
-        If 金額加總(8) = 0 Then : TextBox19.Text = "0" : Else : TextBox19.Text = Format(Val(金額加總(9) / 金額加總(8)), "#,##0") : End If
207
-        If 金額加總(10) = 0 Then : TextBox16.Text = "0" : Else : TextBox16.Text = Format(Val(金額加總(11) / 金額加總(10)), "#,##0") : End If
208
-        If 金額加總(0) + 金額加總(2) + 金額加總(4) = 0 Then : TextBox12.Text = "0"
209
-        Else : TextBox12.Text = Format(Val((金額加總(1) + 金額加總(3) + 金額加總(5)) / (金額加總(0) + 金額加總(2) + 金額加總(4))), "#,##0") : End If
210
-        If 金額加總(6) + 金額加總(8) + 金額加總(10) = 0 Then : TextBox13.Text = "0"
211
-        Else : TextBox13.Text = Format(Val((金額加總(7) + 金額加總(9) + 金額加總(11)) / (金額加總(6) + 金額加總(8) + 金額加總(10))), "#,##0") : End If
186
+        INT_LTotalPOS_tb.Text = Format(Val(金額加總(0)), "#,##0")
187
+        INT_LTotalQTY_tb.Text = Format(Val(金額加總(1)), "#,##0")
188
+        QVCTotalPOS_tb.Text = Format(Val(金額加總(2)), "#,##0")
189
+        QVCTotalQTY_tb.Text = Format(Val(金額加總(3)), "#,##0")
190
+        DOMESTICTotalPOS_tb.Text = Format(Val(金額加總(4)), "#,##0")
191
+        DOMESTICTotalQTY_tb.Text = Format(Val(金額加總(5)), "#,##0")
192
+        ALLTotalPOS_tb.Text = Format(Val(金額加總(0) + 金額加總(2) + 金額加總(4)), "#,##0")
193
+        ALLTotalQTY_tb.Text = Format(Val(金額加總(1) + 金額加總(3) + 金額加總(5)), "#,##0")
194
+        JHTotalPOS_tb.Text = Format(Val(金額加總(6)), "#,##0")
195
+        JHTotalQTY_tb.Text = Format(Val(金額加總(7)), "#,##0")
196
+        NJTotalPOS_tb.Text = Format(Val(金額加總(8)), "#,##0")
197
+        NJTotalQTY_tb.Text = Format(Val(金額加總(9)), "#,##0")
198
+        SKTotalPOS_tb.Text = Format(Val(金額加總(10)), "#,##0")
199
+        SKTotalQTY_tb.Text = Format(Val(金額加總(11)), "#,##0")
200
+        ALLTotalPOS1_tb.Text = Format(Val(金額加總(6) + 金額加總(8) + 金額加總(10)), "#,##0")
201
+        ALLTotalQTY2_tb.Text = Format(Val(金額加總(7) + 金額加總(9) + 金額加總(11)), "#,##0")
202
+        If 金額加總(0) = 0 Then : INT_LTotalAvgQTY_tb.Text = "0" : Else : INT_LTotalAvgQTY_tb.Text = Format(Val(金額加總(1) / 金額加總(0)), "#,##0") : End If
203
+        If 金額加總(2) = 0 Then : QVCTotalAvgQTY_tb.Text = "0" : Else : QVCTotalAvgQTY_tb.Text = Format(Val(金額加總(3) / 金額加總(2)), "#,##0") : End If
204
+        If 金額加總(4) = 0 Then : DOMESTICTotalAvgQTY_tb.Text = "0" : Else : DOMESTICTotalAvgQTY_tb.Text = Format(Val(金額加總(5) / 金額加總(4)), "#,##0") : End If
205
+        If 金額加總(6) = 0 Then : JHTotalAvgQTY_tb.Text = "0" : Else : JHTotalAvgQTY_tb.Text = Format(Val(金額加總(7) / 金額加總(6)), "#,##0") : End If
206
+        If 金額加總(8) = 0 Then : NJTotalAvgQTY_tb.Text = "0" : Else : NJTotalAvgQTY_tb.Text = Format(Val(金額加總(9) / 金額加總(8)), "#,##0") : End If
207
+        If 金額加總(10) = 0 Then : SKTotalAvgQTY_tb.Text = "0" : Else : SKTotalAvgQTY_tb.Text = Format(Val(金額加總(11) / 金額加總(10)), "#,##0") : End If
208
+        If 金額加總(0) + 金額加總(2) + 金額加總(4) = 0 Then : ALLTotalAvgQTY_tb.Text = "0"
209
+        Else : ALLTotalAvgQTY_tb.Text = Format(Val((金額加總(1) + 金額加總(3) + 金額加總(5)) / (金額加總(0) + 金額加總(2) + 金額加總(4))), "#,##0") : End If
210
+        If 金額加總(6) + 金額加總(8) + 金額加總(10) = 0 Then : ALLTotalAvgQTY1_tb.Text = "0"
211
+        Else : ALLTotalAvgQTY1_tb.Text = Format(Val((金額加總(7) + 金額加總(9) + 金額加總(11)) / (金額加總(6) + 金額加總(8) + 金額加總(10))), "#,##0") : End If
212 212
     End Sub
213 213
     Private  Sub 訂單分析報表三_Load(sender As Object, e As EventArgs) Handles MyBase.Load
214 214
         Me.MdiParent = TENDEN_MES_SYS : Me.WindowState = 2 : Me.AutoScroll = True
215
-        ComboBox1.Text = Year(Today)
215
+        YEAR_cb.Text = Year(Today)
216 216
         Set_分析清單1() : Set_分析清單2() : Set_分析清單3() : Set_分析清單4() : Set_分析清單5() : Set_分析清單6()
217 217
         Set_grid() : Set_自動彙總1()
218 218
     End Sub
219
-    Private  Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
219
+    Private  Sub Button1_Click(sender As Object, e As EventArgs) Handles Search_bt.Click
220 220
         Set_分析清單1() : Set_分析清單2() : Set_分析清單3() : Set_分析清單4() : Set_分析清單5() : Set_分析清單6()
221 221
         Set_grid() : Set_自動彙總1()
222 222
     End Sub

+ 189
- 189
TENDEN-MES-SYS/彙總報表管理/訂單分析報表二.Designer.vb 查看文件

@@ -29,41 +29,41 @@ Partial Class 訂單分析報表二
29 29
         Dim DataGridViewCellStyle5 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
30 30
         Dim DataGridViewCellStyle6 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
31 31
         Dim DataGridViewCellStyle7 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
32
-        Me.ComboBox1 = New System.Windows.Forms.ComboBox()
32
+        Me.YEAR_cb = New System.Windows.Forms.ComboBox()
33 33
         Me.Label2 = New System.Windows.Forms.Label()
34
-        Me.Button1 = New System.Windows.Forms.Button()
35
-        Me.DataGridView1 = New System.Windows.Forms.DataGridView()
36
-        Me.DataGridView2 = New System.Windows.Forms.DataGridView()
37
-        Me.DataGridView3 = New System.Windows.Forms.DataGridView()
34
+        Me.Query_bt = New System.Windows.Forms.Button()
35
+        Me.分析清單1_dgv = New System.Windows.Forms.DataGridView()
36
+        Me.分析清單2_dgv = New System.Windows.Forms.DataGridView()
37
+        Me.分析清單3_dgv = New System.Windows.Forms.DataGridView()
38 38
         Me.Label1 = New System.Windows.Forms.Label()
39
-        Me.ComboBox2 = New System.Windows.Forms.ComboBox()
40
-        Me.DataGridView4 = New System.Windows.Forms.DataGridView()
41
-        Me.DataGridView5 = New System.Windows.Forms.DataGridView()
42
-        Me.DataGridView6 = New System.Windows.Forms.DataGridView()
39
+        Me.YEAR1_cb = New System.Windows.Forms.ComboBox()
40
+        Me.分析清單4_dgv = New System.Windows.Forms.DataGridView()
41
+        Me.分析清單5_dgv = New System.Windows.Forms.DataGridView()
42
+        Me.分析清單6_dgv = New System.Windows.Forms.DataGridView()
43 43
         Me.Label3 = New System.Windows.Forms.Label()
44
-        Me.ComboBox3 = New System.Windows.Forms.ComboBox()
45
-        Me.DataGridView7 = New System.Windows.Forms.DataGridView()
46
-        Me.Button2 = New System.Windows.Forms.Button()
47
-        Me.Button3 = New System.Windows.Forms.Button()
48
-        Me.Button4 = New System.Windows.Forms.Button()
49
-        Me.Button5 = New System.Windows.Forms.Button()
50
-        CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).BeginInit()
51
-        CType(Me.DataGridView2, System.ComponentModel.ISupportInitialize).BeginInit()
52
-        CType(Me.DataGridView3, System.ComponentModel.ISupportInitialize).BeginInit()
53
-        CType(Me.DataGridView4, System.ComponentModel.ISupportInitialize).BeginInit()
54
-        CType(Me.DataGridView5, System.ComponentModel.ISupportInitialize).BeginInit()
55
-        CType(Me.DataGridView6, System.ComponentModel.ISupportInitialize).BeginInit()
56
-        CType(Me.DataGridView7, System.ComponentModel.ISupportInitialize).BeginInit()
44
+        Me.YEAR2_cb = New System.Windows.Forms.ComboBox()
45
+        Me.分析清單7_dgv = New System.Windows.Forms.DataGridView()
46
+        Me.ADD_bt = New System.Windows.Forms.Button()
47
+        Me.MODIFY_bt = New System.Windows.Forms.Button()
48
+        Me.DELETE_bt = New System.Windows.Forms.Button()
49
+        Me.PRINT_bt = New System.Windows.Forms.Button()
50
+        CType(Me.分析清單1_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
51
+        CType(Me.分析清單2_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
52
+        CType(Me.分析清單3_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
53
+        CType(Me.分析清單4_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
54
+        CType(Me.分析清單5_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
55
+        CType(Me.分析清單6_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
56
+        CType(Me.分析清單7_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
57 57
         Me.SuspendLayout()
58 58
         '
59
-        'ComboBox1
59
+        'YEAR_cb
60 60
         '
61
-        Me.ComboBox1.FormattingEnabled = True
62
-        Me.ComboBox1.Items.AddRange(New Object() {"2022", "2021", "2020", "2019", "2018", "2017", "2016", "2015", "2014", "2013", "2012", "2011", "2010", "2009", "2008"})
63
-        Me.ComboBox1.Location = New System.Drawing.Point(45, 6)
64
-        Me.ComboBox1.Name = "ComboBox1"
65
-        Me.ComboBox1.Size = New System.Drawing.Size(104, 24)
66
-        Me.ComboBox1.TabIndex = 64
61
+        Me.YEAR_cb.FormattingEnabled = True
62
+        Me.YEAR_cb.Items.AddRange(New Object() {"2022", "2021", "2020", "2019", "2018", "2017", "2016", "2015", "2014", "2013", "2012", "2011", "2010", "2009", "2008"})
63
+        Me.YEAR_cb.Location = New System.Drawing.Point(45, 6)
64
+        Me.YEAR_cb.Name = "YEAR_cb"
65
+        Me.YEAR_cb.Size = New System.Drawing.Size(104, 24)
66
+        Me.YEAR_cb.TabIndex = 64
67 67
         '
68 68
         'Label2
69 69
         '
@@ -74,50 +74,50 @@ Partial Class 訂單分析報表二
74 74
         Me.Label2.TabIndex = 65
75 75
         Me.Label2.Text = "YEAR"
76 76
         '
77
-        'Button1
77
+        'Query_bt
78 78
         '
79
-        Me.Button1.Location = New System.Drawing.Point(1375, 7)
80
-        Me.Button1.Name = "Button1"
81
-        Me.Button1.Size = New System.Drawing.Size(114, 24)
82
-        Me.Button1.TabIndex = 66
83
-        Me.Button1.Text = "Query"
84
-        Me.Button1.UseVisualStyleBackColor = True
79
+        Me.Query_bt.Location = New System.Drawing.Point(1375, 7)
80
+        Me.Query_bt.Name = "Query_bt"
81
+        Me.Query_bt.Size = New System.Drawing.Size(114, 24)
82
+        Me.Query_bt.TabIndex = 66
83
+        Me.Query_bt.Text = "Query"
84
+        Me.Query_bt.UseVisualStyleBackColor = True
85 85
         '
86
-        'DataGridView1
86
+        '分析清單1_dgv
87 87
         '
88 88
         DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
89
-        Me.DataGridView1.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
90
-        Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
91
-        Me.DataGridView1.Location = New System.Drawing.Point(7, 36)
92
-        Me.DataGridView1.Name = "DataGridView1"
93
-        Me.DataGridView1.RowHeadersWidth = 5
94
-        Me.DataGridView1.RowTemplate.Height = 24
95
-        Me.DataGridView1.Size = New System.Drawing.Size(530, 329)
96
-        Me.DataGridView1.TabIndex = 67
89
+        Me.分析清單1_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
90
+        Me.分析清單1_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
91
+        Me.分析清單1_dgv.Location = New System.Drawing.Point(7, 36)
92
+        Me.分析清單1_dgv.Name = "分析清單1_dgv"
93
+        Me.分析清單1_dgv.RowHeadersWidth = 5
94
+        Me.分析清單1_dgv.RowTemplate.Height = 24
95
+        Me.分析清單1_dgv.Size = New System.Drawing.Size(530, 329)
96
+        Me.分析清單1_dgv.TabIndex = 67
97 97
         '
98
-        'DataGridView2
98
+        '分析清單2_dgv
99 99
         '
100 100
         DataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
101
-        Me.DataGridView2.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2
102
-        Me.DataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
103
-        Me.DataGridView2.Location = New System.Drawing.Point(7, 371)
104
-        Me.DataGridView2.Name = "DataGridView2"
105
-        Me.DataGridView2.RowHeadersWidth = 5
106
-        Me.DataGridView2.RowTemplate.Height = 24
107
-        Me.DataGridView2.Size = New System.Drawing.Size(530, 608)
108
-        Me.DataGridView2.TabIndex = 68
101
+        Me.分析清單2_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2
102
+        Me.分析清單2_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
103
+        Me.分析清單2_dgv.Location = New System.Drawing.Point(7, 371)
104
+        Me.分析清單2_dgv.Name = "分析清單2_dgv"
105
+        Me.分析清單2_dgv.RowHeadersWidth = 5
106
+        Me.分析清單2_dgv.RowTemplate.Height = 24
107
+        Me.分析清單2_dgv.Size = New System.Drawing.Size(530, 608)
108
+        Me.分析清單2_dgv.TabIndex = 68
109 109
         '
110
-        'DataGridView3
110
+        '分析清單3_dgv
111 111
         '
112 112
         DataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
113
-        Me.DataGridView3.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
114
-        Me.DataGridView3.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
115
-        Me.DataGridView3.Location = New System.Drawing.Point(543, 36)
116
-        Me.DataGridView3.Name = "DataGridView3"
117
-        Me.DataGridView3.RowHeadersWidth = 5
118
-        Me.DataGridView3.RowTemplate.Height = 24
119
-        Me.DataGridView3.Size = New System.Drawing.Size(530, 329)
120
-        Me.DataGridView3.TabIndex = 69
113
+        Me.分析清單3_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
114
+        Me.分析清單3_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
115
+        Me.分析清單3_dgv.Location = New System.Drawing.Point(543, 36)
116
+        Me.分析清單3_dgv.Name = "分析清單3_dgv"
117
+        Me.分析清單3_dgv.RowHeadersWidth = 5
118
+        Me.分析清單3_dgv.RowTemplate.Height = 24
119
+        Me.分析清單3_dgv.Size = New System.Drawing.Size(530, 329)
120
+        Me.分析清單3_dgv.TabIndex = 69
121 121
         '
122 122
         'Label1
123 123
         '
@@ -128,50 +128,50 @@ Partial Class 訂單分析報表二
128 128
         Me.Label1.TabIndex = 71
129 129
         Me.Label1.Text = "YEAR"
130 130
         '
131
-        'ComboBox2
131
+        'YEAR1_cb
132 132
         '
133
-        Me.ComboBox2.FormattingEnabled = True
134
-        Me.ComboBox2.Items.AddRange(New Object() {"2022", "2021", "2020", "2019", "2018", "2017", "2016", "2015", "2014", "2013", "2012", "2011", "2010", "2009", "2008"})
135
-        Me.ComboBox2.Location = New System.Drawing.Point(578, 7)
136
-        Me.ComboBox2.Name = "ComboBox2"
137
-        Me.ComboBox2.Size = New System.Drawing.Size(104, 24)
138
-        Me.ComboBox2.TabIndex = 70
133
+        Me.YEAR1_cb.FormattingEnabled = True
134
+        Me.YEAR1_cb.Items.AddRange(New Object() {"2022", "2021", "2020", "2019", "2018", "2017", "2016", "2015", "2014", "2013", "2012", "2011", "2010", "2009", "2008"})
135
+        Me.YEAR1_cb.Location = New System.Drawing.Point(578, 7)
136
+        Me.YEAR1_cb.Name = "YEAR1_cb"
137
+        Me.YEAR1_cb.Size = New System.Drawing.Size(104, 24)
138
+        Me.YEAR1_cb.TabIndex = 70
139 139
         '
140
-        'DataGridView4
140
+        '分析清單4_dgv
141 141
         '
142 142
         DataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
143
-        Me.DataGridView4.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle4
144
-        Me.DataGridView4.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
145
-        Me.DataGridView4.Location = New System.Drawing.Point(543, 371)
146
-        Me.DataGridView4.Name = "DataGridView4"
147
-        Me.DataGridView4.RowHeadersWidth = 5
148
-        Me.DataGridView4.RowTemplate.Height = 24
149
-        Me.DataGridView4.Size = New System.Drawing.Size(530, 608)
150
-        Me.DataGridView4.TabIndex = 72
143
+        Me.分析清單4_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle4
144
+        Me.分析清單4_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
145
+        Me.分析清單4_dgv.Location = New System.Drawing.Point(543, 371)
146
+        Me.分析清單4_dgv.Name = "分析清單4_dgv"
147
+        Me.分析清單4_dgv.RowHeadersWidth = 5
148
+        Me.分析清單4_dgv.RowTemplate.Height = 24
149
+        Me.分析清單4_dgv.Size = New System.Drawing.Size(530, 608)
150
+        Me.分析清單4_dgv.TabIndex = 72
151 151
         '
152
-        'DataGridView5
152
+        '分析清單5_dgv
153 153
         '
154 154
         DataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
155
-        Me.DataGridView5.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle5
156
-        Me.DataGridView5.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
157
-        Me.DataGridView5.Location = New System.Drawing.Point(1079, 36)
158
-        Me.DataGridView5.Name = "DataGridView5"
159
-        Me.DataGridView5.RowHeadersWidth = 5
160
-        Me.DataGridView5.RowTemplate.Height = 24
161
-        Me.DataGridView5.Size = New System.Drawing.Size(530, 329)
162
-        Me.DataGridView5.TabIndex = 73
155
+        Me.分析清單5_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle5
156
+        Me.分析清單5_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
157
+        Me.分析清單5_dgv.Location = New System.Drawing.Point(1079, 36)
158
+        Me.分析清單5_dgv.Name = "分析清單5_dgv"
159
+        Me.分析清單5_dgv.RowHeadersWidth = 5
160
+        Me.分析清單5_dgv.RowTemplate.Height = 24
161
+        Me.分析清單5_dgv.Size = New System.Drawing.Size(530, 329)
162
+        Me.分析清單5_dgv.TabIndex = 73
163 163
         '
164
-        'DataGridView6
164
+        '分析清單6_dgv
165 165
         '
166 166
         DataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
167
-        Me.DataGridView6.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle6
168
-        Me.DataGridView6.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
169
-        Me.DataGridView6.Location = New System.Drawing.Point(1079, 371)
170
-        Me.DataGridView6.Name = "DataGridView6"
171
-        Me.DataGridView6.RowHeadersWidth = 5
172
-        Me.DataGridView6.RowTemplate.Height = 24
173
-        Me.DataGridView6.Size = New System.Drawing.Size(530, 608)
174
-        Me.DataGridView6.TabIndex = 74
167
+        Me.分析清單6_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle6
168
+        Me.分析清單6_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
169
+        Me.分析清單6_dgv.Location = New System.Drawing.Point(1079, 371)
170
+        Me.分析清單6_dgv.Name = "分析清單6_dgv"
171
+        Me.分析清單6_dgv.RowHeadersWidth = 5
172
+        Me.分析清單6_dgv.RowTemplate.Height = 24
173
+        Me.分析清單6_dgv.Size = New System.Drawing.Size(530, 608)
174
+        Me.分析清單6_dgv.TabIndex = 74
175 175
         '
176 176
         'Label3
177 177
         '
@@ -182,122 +182,122 @@ Partial Class 訂單分析報表二
182 182
         Me.Label3.TabIndex = 76
183 183
         Me.Label3.Text = "YEAR"
184 184
         '
185
-        'ComboBox3
185
+        'YEAR2_cb
186 186
         '
187
-        Me.ComboBox3.FormattingEnabled = True
188
-        Me.ComboBox3.Items.AddRange(New Object() {"2022", "2021", "2020", "2019", "2018", "2017", "2016", "2015", "2014", "2013", "2012", "2011", "2010", "2009", "2008"})
189
-        Me.ComboBox3.Location = New System.Drawing.Point(1123, 7)
190
-        Me.ComboBox3.Name = "ComboBox3"
191
-        Me.ComboBox3.Size = New System.Drawing.Size(104, 24)
192
-        Me.ComboBox3.TabIndex = 75
187
+        Me.YEAR2_cb.FormattingEnabled = True
188
+        Me.YEAR2_cb.Items.AddRange(New Object() {"2022", "2021", "2020", "2019", "2018", "2017", "2016", "2015", "2014", "2013", "2012", "2011", "2010", "2009", "2008"})
189
+        Me.YEAR2_cb.Location = New System.Drawing.Point(1123, 7)
190
+        Me.YEAR2_cb.Name = "YEAR2_cb"
191
+        Me.YEAR2_cb.Size = New System.Drawing.Size(104, 24)
192
+        Me.YEAR2_cb.TabIndex = 75
193 193
         '
194
-        'DataGridView7
194
+        '分析清單7_dgv
195 195
         '
196 196
         DataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
197
-        Me.DataGridView7.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle7
198
-        Me.DataGridView7.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
199
-        Me.DataGridView7.Location = New System.Drawing.Point(1615, 36)
200
-        Me.DataGridView7.Name = "DataGridView7"
201
-        Me.DataGridView7.RowHeadersWidth = 5
202
-        Me.DataGridView7.RowTemplate.Height = 24
203
-        Me.DataGridView7.Size = New System.Drawing.Size(293, 943)
204
-        Me.DataGridView7.TabIndex = 77
205
-        '
206
-        'Button2
207
-        '
208
-        Me.Button2.ForeColor = System.Drawing.Color.Blue
209
-        Me.Button2.Location = New System.Drawing.Point(1615, 7)
210
-        Me.Button2.Name = "Button2"
211
-        Me.Button2.Size = New System.Drawing.Size(82, 24)
212
-        Me.Button2.TabIndex = 78
213
-        Me.Button2.Text = "ADD"
214
-        Me.Button2.UseVisualStyleBackColor = True
215
-        '
216
-        'Button3
217
-        '
218
-        Me.Button3.ForeColor = System.Drawing.Color.Green
219
-        Me.Button3.Location = New System.Drawing.Point(1703, 7)
220
-        Me.Button3.Name = "Button3"
221
-        Me.Button3.Size = New System.Drawing.Size(82, 24)
222
-        Me.Button3.TabIndex = 79
223
-        Me.Button3.Text = "MODIFY"
224
-        Me.Button3.UseVisualStyleBackColor = True
225
-        '
226
-        'Button4
227
-        '
228
-        Me.Button4.ForeColor = System.Drawing.Color.Red
229
-        Me.Button4.Location = New System.Drawing.Point(1791, 7)
230
-        Me.Button4.Name = "Button4"
231
-        Me.Button4.Size = New System.Drawing.Size(82, 24)
232
-        Me.Button4.TabIndex = 80
233
-        Me.Button4.Text = "DELETE"
234
-        Me.Button4.UseVisualStyleBackColor = True
235
-        '
236
-        'Button5
237
-        '
238
-        Me.Button5.Location = New System.Drawing.Point(1495, 7)
239
-        Me.Button5.Name = "Button5"
240
-        Me.Button5.Size = New System.Drawing.Size(114, 24)
241
-        Me.Button5.TabIndex = 81
242
-        Me.Button5.Text = "PRINT"
243
-        Me.Button5.UseVisualStyleBackColor = True
197
+        Me.分析清單7_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle7
198
+        Me.分析清單7_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
199
+        Me.分析清單7_dgv.Location = New System.Drawing.Point(1615, 36)
200
+        Me.分析清單7_dgv.Name = "分析清單7_dgv"
201
+        Me.分析清單7_dgv.RowHeadersWidth = 5
202
+        Me.分析清單7_dgv.RowTemplate.Height = 24
203
+        Me.分析清單7_dgv.Size = New System.Drawing.Size(293, 943)
204
+        Me.分析清單7_dgv.TabIndex = 77
205
+        '
206
+        'ADD_bt
207
+        '
208
+        Me.ADD_bt.ForeColor = System.Drawing.Color.Blue
209
+        Me.ADD_bt.Location = New System.Drawing.Point(1615, 7)
210
+        Me.ADD_bt.Name = "ADD_bt"
211
+        Me.ADD_bt.Size = New System.Drawing.Size(82, 24)
212
+        Me.ADD_bt.TabIndex = 78
213
+        Me.ADD_bt.Text = "ADD"
214
+        Me.ADD_bt.UseVisualStyleBackColor = True
215
+        '
216
+        'MODIFY_bt
217
+        '
218
+        Me.MODIFY_bt.ForeColor = System.Drawing.Color.Green
219
+        Me.MODIFY_bt.Location = New System.Drawing.Point(1703, 7)
220
+        Me.MODIFY_bt.Name = "MODIFY_bt"
221
+        Me.MODIFY_bt.Size = New System.Drawing.Size(82, 24)
222
+        Me.MODIFY_bt.TabIndex = 79
223
+        Me.MODIFY_bt.Text = "MODIFY"
224
+        Me.MODIFY_bt.UseVisualStyleBackColor = True
225
+        '
226
+        'DELETE_bt
227
+        '
228
+        Me.DELETE_bt.ForeColor = System.Drawing.Color.Red
229
+        Me.DELETE_bt.Location = New System.Drawing.Point(1791, 7)
230
+        Me.DELETE_bt.Name = "DELETE_bt"
231
+        Me.DELETE_bt.Size = New System.Drawing.Size(82, 24)
232
+        Me.DELETE_bt.TabIndex = 80
233
+        Me.DELETE_bt.Text = "DELETE"
234
+        Me.DELETE_bt.UseVisualStyleBackColor = True
235
+        '
236
+        'PRINT_bt
237
+        '
238
+        Me.PRINT_bt.Location = New System.Drawing.Point(1495, 7)
239
+        Me.PRINT_bt.Name = "PRINT_bt"
240
+        Me.PRINT_bt.Size = New System.Drawing.Size(114, 24)
241
+        Me.PRINT_bt.TabIndex = 81
242
+        Me.PRINT_bt.Text = "PRINT"
243
+        Me.PRINT_bt.UseVisualStyleBackColor = True
244 244
         '
245 245
         '訂單分析報表二
246 246
         '
247 247
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
248 248
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
249 249
         Me.ClientSize = New System.Drawing.Size(1914, 991)
250
-        Me.Controls.Add(Me.Button5)
251
-        Me.Controls.Add(Me.Button4)
252
-        Me.Controls.Add(Me.Button3)
253
-        Me.Controls.Add(Me.Button2)
254
-        Me.Controls.Add(Me.DataGridView7)
250
+        Me.Controls.Add(Me.PRINT_bt)
251
+        Me.Controls.Add(Me.DELETE_bt)
252
+        Me.Controls.Add(Me.MODIFY_bt)
253
+        Me.Controls.Add(Me.ADD_bt)
254
+        Me.Controls.Add(Me.分析清單7_dgv)
255 255
         Me.Controls.Add(Me.Label3)
256
-        Me.Controls.Add(Me.ComboBox3)
257
-        Me.Controls.Add(Me.DataGridView6)
258
-        Me.Controls.Add(Me.DataGridView5)
259
-        Me.Controls.Add(Me.DataGridView4)
256
+        Me.Controls.Add(Me.YEAR2_cb)
257
+        Me.Controls.Add(Me.分析清單6_dgv)
258
+        Me.Controls.Add(Me.分析清單5_dgv)
259
+        Me.Controls.Add(Me.分析清單4_dgv)
260 260
         Me.Controls.Add(Me.Label1)
261
-        Me.Controls.Add(Me.ComboBox2)
262
-        Me.Controls.Add(Me.DataGridView3)
263
-        Me.Controls.Add(Me.DataGridView2)
264
-        Me.Controls.Add(Me.DataGridView1)
265
-        Me.Controls.Add(Me.Button1)
261
+        Me.Controls.Add(Me.YEAR1_cb)
262
+        Me.Controls.Add(Me.分析清單3_dgv)
263
+        Me.Controls.Add(Me.分析清單2_dgv)
264
+        Me.Controls.Add(Me.分析清單1_dgv)
265
+        Me.Controls.Add(Me.Query_bt)
266 266
         Me.Controls.Add(Me.Label2)
267
-        Me.Controls.Add(Me.ComboBox1)
267
+        Me.Controls.Add(Me.YEAR_cb)
268 268
         Me.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
269 269
         Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
270 270
         Me.Name = "訂單分析報表二"
271 271
         Me.Text = "Old Unit Comparison"
272
-        CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).EndInit()
273
-        CType(Me.DataGridView2, System.ComponentModel.ISupportInitialize).EndInit()
274
-        CType(Me.DataGridView3, System.ComponentModel.ISupportInitialize).EndInit()
275
-        CType(Me.DataGridView4, System.ComponentModel.ISupportInitialize).EndInit()
276
-        CType(Me.DataGridView5, System.ComponentModel.ISupportInitialize).EndInit()
277
-        CType(Me.DataGridView6, System.ComponentModel.ISupportInitialize).EndInit()
278
-        CType(Me.DataGridView7, System.ComponentModel.ISupportInitialize).EndInit()
272
+        CType(Me.分析清單1_dgv, System.ComponentModel.ISupportInitialize).EndInit()
273
+        CType(Me.分析清單2_dgv, System.ComponentModel.ISupportInitialize).EndInit()
274
+        CType(Me.分析清單3_dgv, System.ComponentModel.ISupportInitialize).EndInit()
275
+        CType(Me.分析清單4_dgv, System.ComponentModel.ISupportInitialize).EndInit()
276
+        CType(Me.分析清單5_dgv, System.ComponentModel.ISupportInitialize).EndInit()
277
+        CType(Me.分析清單6_dgv, System.ComponentModel.ISupportInitialize).EndInit()
278
+        CType(Me.分析清單7_dgv, System.ComponentModel.ISupportInitialize).EndInit()
279 279
         Me.ResumeLayout(False)
280 280
         Me.PerformLayout()
281 281
 
282 282
     End Sub
283 283
 
284
-    Friend WithEvents ComboBox1 As ComboBox
284
+    Friend WithEvents YEAR_cb As ComboBox
285 285
     Friend WithEvents Label2 As Label
286
-    Friend WithEvents Button1 As Button
287
-    Friend WithEvents DataGridView1 As DataGridView
288
-    Friend WithEvents DataGridView2 As DataGridView
289
-    Friend WithEvents DataGridView3 As DataGridView
286
+    Friend WithEvents Query_bt As Button
287
+    Friend WithEvents 分析清單1_dgv As DataGridView
288
+    Friend WithEvents 分析清單2_dgv As DataGridView
289
+    Friend WithEvents 分析清單3_dgv As DataGridView
290 290
     Friend WithEvents Label1 As Label
291
-    Friend WithEvents ComboBox2 As ComboBox
292
-    Friend WithEvents DataGridView4 As DataGridView
293
-    Friend WithEvents DataGridView5 As DataGridView
294
-    Friend WithEvents DataGridView6 As DataGridView
291
+    Friend WithEvents YEAR1_cb As ComboBox
292
+    Friend WithEvents 分析清單4_dgv As DataGridView
293
+    Friend WithEvents 分析清單5_dgv As DataGridView
294
+    Friend WithEvents 分析清單6_dgv As DataGridView
295 295
     Friend WithEvents Label3 As Label
296
-    Friend WithEvents ComboBox3 As ComboBox
297
-    Friend WithEvents DataGridView7 As DataGridView
298
-    Friend WithEvents Button2 As Button
299
-    Friend WithEvents Button3 As Button
300
-    Friend WithEvents Button4 As Button
301
-    Friend WithEvents Button5 As Button
296
+    Friend WithEvents YEAR2_cb As ComboBox
297
+    Friend WithEvents 分析清單7_dgv As DataGridView
298
+    Friend WithEvents ADD_bt As Button
299
+    Friend WithEvents MODIFY_bt As Button
300
+    Friend WithEvents DELETE_bt As Button
301
+    Friend WithEvents PRINT_bt As Button
302 302
 End Class
303 303
 

+ 124
- 124
TENDEN-MES-SYS/彙總報表管理/訂單分析報表二.vb 查看文件

@@ -7,217 +7,217 @@ Public Class 訂單分析報表二
7 7
     Dim ds As New DataSet : Dim ds1 As New DataSet : Dim ds2 As New DataSet : Dim ds3 As New DataSet : Dim ds4 As New DataSet : Dim ds5 As New DataSet : Dim ds6 As New DataSet
8 8
     Dim dr As SqlDataReader
9 9
     Private  Sub Set_DGV1載入前設定()
10
-        DataGridView1.DataSource = Nothing : ds.Clear()
11
-        DataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
12
-        DataGridView1.ColumnHeadersHeight = 25
13
-        DataGridView1.AllowUserToAddRows = False
10
+        分析清單1_dgv.DataSource = Nothing : ds.Clear()
11
+        分析清單1_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
12
+        分析清單1_dgv.ColumnHeadersHeight = 25
13
+        分析清單1_dgv.AllowUserToAddRows = False
14 14
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
15 15
     End Sub
16
-    Private  Sub Set_DGV1載入後設定()
17
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds) : DataGridView1.DataSource = ds.Tables(0) : conn.Close()
16
+    Private Sub Set_DGV1載入後設定()
17
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds) : 分析清單1_dgv.DataSource = ds.Tables(0) : conn.Close()
18 18
     End Sub
19
-    Private  Sub Set_分析清單1()
19
+    Private Sub Set_分析清單1()
20 20
         Set_DGV1載入前設定()
21 21
         SQL1 = "SELECT LEFT(客戶交期, 7) AS Year_Month , SUM(訂單數量) AS Order_Quantity, SUM(總金額) AS Total_Sum, SUM(總金額) / SUM(訂單數量) AS Average FROM 訂單控制表 " &
22
-               "WHERE (LEFT(客戶交期, 4) LIKE '" & ComboBox1.Text & "') AND (CXL IS NULL OR CXL = 0) GROUP BY   LEFT(客戶交期, 7) ORDER BY   Year_Month"
22
+               "WHERE (LEFT(客戶交期, 4) LIKE '" & YEAR_cb.Text & "') AND (CXL IS NULL OR CXL = 0) GROUP BY   LEFT(客戶交期, 7) ORDER BY   Year_Month"
23 23
         Set_DGV1載入後設定()
24 24
     End Sub
25
-    Private  Sub Set_DGV2載入前設定()
26
-        DataGridView2.DataSource = Nothing : ds1.Clear()
27
-        DataGridView2.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
28
-        DataGridView2.ColumnHeadersHeight = 25
29
-        DataGridView2.AllowUserToAddRows = False
25
+    Private Sub Set_DGV2載入前設定()
26
+        分析清單2_dgv.DataSource = Nothing : ds1.Clear()
27
+        分析清單2_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
28
+        分析清單2_dgv.ColumnHeadersHeight = 25
29
+        分析清單2_dgv.AllowUserToAddRows = False
30 30
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
31 31
     End Sub
32
-    Private  Sub Set_DGV2載入後設定()
33
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds1) : DataGridView2.DataSource = ds1.Tables(0) : conn.Close()
32
+    Private Sub Set_DGV2載入後設定()
33
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds1) : 分析清單2_dgv.DataSource = ds1.Tables(0) : conn.Close()
34 34
     End Sub
35
-    Private  Sub Set_分析清單2()
35
+    Private Sub Set_分析清單2()
36 36
         Set_DGV2載入前設定()
37 37
         SQL1 = "SELECT LEFT(客戶交期, 7) AS Year_Month, 訂單種類 AS Order_Type, SUM(訂單數量) AS Order_Quantity, SUM(總金額) AS Total_Sum, SUM(總金額) / SUM(訂單數量) AS Average FROM 訂單控制表 " &
38
-               "WHERE (LEFT(客戶交期, 4) LIKE '" & ComboBox1.Text & "') AND (CXL IS NULL OR CXL = 0) GROUP BY   LEFT(客戶交期, 7), 訂單種類 ORDER BY   Year_Month"
38
+               "WHERE (LEFT(客戶交期, 4) LIKE '" & YEAR_cb.Text & "') AND (CXL IS NULL OR CXL = 0) GROUP BY   LEFT(客戶交期, 7), 訂單種類 ORDER BY   Year_Month"
39 39
         Set_DGV2載入後設定()
40 40
     End Sub
41
-    Private  Sub Set_DGV3載入前設定()
42
-        DataGridView3.DataSource = Nothing : ds2.Clear()
43
-        DataGridView3.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
44
-        DataGridView3.ColumnHeadersHeight = 25
45
-        DataGridView3.AllowUserToAddRows = False
41
+    Private Sub Set_DGV3載入前設定()
42
+        分析清單3_dgv.DataSource = Nothing : ds2.Clear()
43
+        分析清單3_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
44
+        分析清單3_dgv.ColumnHeadersHeight = 25
45
+        分析清單3_dgv.AllowUserToAddRows = False
46 46
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
47 47
     End Sub
48
-    Private  Sub Set_DGV3載入後設定()
49
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds2) : DataGridView3.DataSource = ds2.Tables(0) : conn.Close()
48
+    Private Sub Set_DGV3載入後設定()
49
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds2) : 分析清單3_dgv.DataSource = ds2.Tables(0) : conn.Close()
50 50
     End Sub
51
-    Private  Sub Set_分析清單3()
51
+    Private Sub Set_分析清單3()
52 52
         Set_DGV3載入前設定()
53 53
         SQL1 = "SELECT LEFT(客戶交期, 7) AS Year_Month, SUM(訂單數量) AS Order_Quantity, SUM(總金額) AS Total_Sum, SUM(總金額) / SUM(訂單數量) AS Average FROM 訂單控制表 " &
54
-               "WHERE (LEFT(客戶交期, 4) LIKE '" & ComboBox2.Text & "') AND (CXL IS NULL OR CXL = 0) GROUP BY   LEFT(客戶交期, 7) ORDER BY   Year_Month"
54
+               "WHERE (LEFT(客戶交期, 4) LIKE '" & YEAR1_cb.Text & "') AND (CXL IS NULL OR CXL = 0) GROUP BY   LEFT(客戶交期, 7) ORDER BY   Year_Month"
55 55
         Set_DGV3載入後設定()
56 56
     End Sub
57
-    Private  Sub Set_DGV4載入前設定()
58
-        DataGridView4.DataSource = Nothing : ds3.Clear()
59
-        DataGridView4.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
60
-        DataGridView4.ColumnHeadersHeight = 25
61
-        DataGridView4.AllowUserToAddRows = False
57
+    Private Sub Set_DGV4載入前設定()
58
+        分析清單4_dgv.DataSource = Nothing : ds3.Clear()
59
+        分析清單4_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
60
+        分析清單4_dgv.ColumnHeadersHeight = 25
61
+        分析清單4_dgv.AllowUserToAddRows = False
62 62
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
63 63
     End Sub
64
-    Private  Sub Set_DGV4載入後設定()
65
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds3) : DataGridView4.DataSource = ds3.Tables(0) : conn.Close()
64
+    Private Sub Set_DGV4載入後設定()
65
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds3) : 分析清單4_dgv.DataSource = ds3.Tables(0) : conn.Close()
66 66
     End Sub
67
-    Private  Sub Set_分析清單4()
67
+    Private Sub Set_分析清單4()
68 68
         Set_DGV4載入前設定()
69 69
         SQL1 = "SELECT LEFT(客戶交期, 7) AS Year_Month, 訂單種類 AS Order_Type, SUM(訂單數量) AS Order_Quantity, SUM(總金額) AS Total_Sum, SUM(總金額) / SUM(訂單數量) AS Average FROM 訂單控制表 " &
70
-               "WHERE (LEFT(客戶交期, 4) LIKE '" & ComboBox2.Text & "') AND (CXL IS NULL OR CXL = 0) GROUP BY   LEFT(客戶交期, 7), 訂單種類 ORDER BY   Year_Month"
70
+               "WHERE (LEFT(客戶交期, 4) LIKE '" & YEAR1_cb.Text & "') AND (CXL IS NULL OR CXL = 0) GROUP BY   LEFT(客戶交期, 7), 訂單種類 ORDER BY   Year_Month"
71 71
         Set_DGV4載入後設定()
72 72
     End Sub
73
-    Private  Sub Set_DGV5載入前設定()
74
-        DataGridView5.DataSource = Nothing : ds4.Clear()
75
-        DataGridView5.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
76
-        DataGridView5.ColumnHeadersHeight = 25
77
-        DataGridView5.AllowUserToAddRows = False
73
+    Private Sub Set_DGV5載入前設定()
74
+        分析清單5_dgv.DataSource = Nothing : ds4.Clear()
75
+        分析清單5_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
76
+        分析清單5_dgv.ColumnHeadersHeight = 25
77
+        分析清單5_dgv.AllowUserToAddRows = False
78 78
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
79 79
     End Sub
80
-    Private  Sub Set_DGV5載入後設定()
81
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds4) : DataGridView5.DataSource = ds4.Tables(0) : conn.Close()
80
+    Private Sub Set_DGV5載入後設定()
81
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds4) : 分析清單5_dgv.DataSource = ds4.Tables(0) : conn.Close()
82 82
     End Sub
83
-    Private  Sub Set_分析清單5()
83
+    Private Sub Set_分析清單5()
84 84
         Set_DGV5載入前設定()
85 85
         SQL1 = "SELECT LEFT(客戶交期, 7) AS Year_Month, SUM(訂單數量) AS Order_Quantity, SUM(總金額) AS Total_Sum, SUM(總金額) / SUM(訂單數量) AS Average FROM 訂單控制表 " &
86
-               "WHERE (LEFT(客戶交期, 4) LIKE '" & ComboBox3.Text & "') AND (CXL IS NULL OR CXL = 0) GROUP BY   LEFT(客戶交期, 7) ORDER BY   Year_Month"
86
+               "WHERE (LEFT(客戶交期, 4) LIKE '" & YEAR2_cb.Text & "') AND (CXL IS NULL OR CXL = 0) GROUP BY   LEFT(客戶交期, 7) ORDER BY   Year_Month"
87 87
         Set_DGV5載入後設定()
88 88
     End Sub
89
-    Private  Sub Set_DGV6載入前設定()
90
-        DataGridView6.DataSource = Nothing : ds5.Clear()
91
-        DataGridView6.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
92
-        DataGridView6.ColumnHeadersHeight = 25
93
-        DataGridView6.AllowUserToAddRows = False
89
+    Private Sub Set_DGV6載入前設定()
90
+        分析清單6_dgv.DataSource = Nothing : ds5.Clear()
91
+        分析清單6_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
92
+        分析清單6_dgv.ColumnHeadersHeight = 25
93
+        分析清單6_dgv.AllowUserToAddRows = False
94 94
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
95 95
     End Sub
96
-    Private  Sub Set_DGV6載入後設定()
97
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds5) : DataGridView6.DataSource = ds5.Tables(0) : conn.Close()
96
+    Private Sub Set_DGV6載入後設定()
97
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds5) : 分析清單6_dgv.DataSource = ds5.Tables(0) : conn.Close()
98 98
     End Sub
99
-    Private  Sub Set_分析清單6()
99
+    Private Sub Set_分析清單6()
100 100
         Set_DGV6載入前設定()
101 101
         SQL1 = "SELECT LEFT(客戶交期, 7) AS Year_Month, 訂單種類 AS Order_Type, SUM(訂單數量) AS Order_Quantity, SUM(總金額) AS Total_Sum, SUM(總金額) / SUM(訂單數量) AS Average FROM 訂單控制表 " &
102
-               "WHERE (LEFT(客戶交期, 4) LIKE '" & ComboBox3.Text & "') AND (CXL IS NULL OR CXL = 0) GROUP BY   LEFT(客戶交期, 7), 訂單種類 ORDER BY   Year_Month"
102
+               "WHERE (LEFT(客戶交期, 4) LIKE '" & YEAR2_cb.Text & "') AND (CXL IS NULL OR CXL = 0) GROUP BY   LEFT(客戶交期, 7), 訂單種類 ORDER BY   Year_Month"
103 103
         Set_DGV6載入後設定()
104 104
     End Sub
105
-    Private  Sub Set_DGV7載入前設定()
106
-        DataGridView7.DataSource = Nothing : ds6.Clear()
107
-        DataGridView7.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
108
-        DataGridView7.ColumnHeadersHeight = 25
109
-        DataGridView7.AllowUserToAddRows = False
105
+    Private Sub Set_DGV7載入前設定()
106
+        分析清單7_dgv.DataSource = Nothing : ds6.Clear()
107
+        分析清單7_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
108
+        分析清單7_dgv.ColumnHeadersHeight = 25
109
+        分析清單7_dgv.AllowUserToAddRows = False
110 110
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
111 111
     End Sub
112
-    Private  Sub Set_DGV7載入後設定()
113
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds6) : DataGridView7.DataSource = ds6.Tables(0) : conn.Close()
112
+    Private Sub Set_DGV7載入後設定()
113
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds6) : 分析清單7_dgv.DataSource = ds6.Tables(0) : conn.Close()
114 114
     End Sub
115
-    Private  Sub Set_分析清單7()
115
+    Private Sub Set_分析清單7()
116 116
         Set_DGV7載入前設定()
117 117
         SQL1 = "SELECT 年月份 AS Year_Month, 預估數量 AS Assess_QTY, 預估單價 AS Assess_Price FROM 訂單預估資料表 ORDER BY 年月份 DESC"
118 118
         Set_DGV7載入後設定()
119 119
     End Sub
120
-    Private  Sub Set_grid()
121
-        DataGridView1.Columns(1).DefaultCellStyle.Format = "#,##0" : DataGridView1.Columns(2).DefaultCellStyle.Format = "#,##0.00" : DataGridView1.Columns(3).DefaultCellStyle.Format = "#,##0.00"
122
-        DataGridView1.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
123
-        DataGridView1.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView1.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
124
-        DataGridView1.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
125
-        DataGridView1.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView1.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
120
+    Private Sub Set_grid()
121
+        分析清單1_dgv.Columns(1).DefaultCellStyle.Format = "#,##0" : 分析清單1_dgv.Columns(2).DefaultCellStyle.Format = "#,##0.00" : 分析清單1_dgv.Columns(3).DefaultCellStyle.Format = "#,##0.00"
122
+        分析清單1_dgv.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
123
+        分析清單1_dgv.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單1_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
124
+        分析清單1_dgv.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
125
+        分析清單1_dgv.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單1_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
126 126
 
127
-        DataGridView2.Columns(2).DefaultCellStyle.Format = "#,##0" : DataGridView2.Columns(3).DefaultCellStyle.Format = "#,##0.00" : DataGridView2.Columns(4).DefaultCellStyle.Format = "#,##0.00"
128
-        DataGridView2.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
129
-        DataGridView2.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView2.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
130
-        DataGridView2.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
131
-        DataGridView2.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView2.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
127
+        分析清單2_dgv.Columns(2).DefaultCellStyle.Format = "#,##0" : 分析清單2_dgv.Columns(3).DefaultCellStyle.Format = "#,##0.00" : 分析清單2_dgv.Columns(4).DefaultCellStyle.Format = "#,##0.00"
128
+        分析清單2_dgv.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
129
+        分析清單2_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單2_dgv.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
130
+        分析清單2_dgv.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
131
+        分析清單2_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單2_dgv.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
132 132
 
133
-        DataGridView3.Columns(1).DefaultCellStyle.Format = "#,##0" : DataGridView3.Columns(2).DefaultCellStyle.Format = "#,##0.00" : DataGridView3.Columns(3).DefaultCellStyle.Format = "#,##0.00"
134
-        DataGridView3.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
135
-        DataGridView3.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView3.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
136
-        DataGridView3.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
137
-        DataGridView3.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView3.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
133
+        分析清單3_dgv.Columns(1).DefaultCellStyle.Format = "#,##0" : 分析清單3_dgv.Columns(2).DefaultCellStyle.Format = "#,##0.00" : 分析清單3_dgv.Columns(3).DefaultCellStyle.Format = "#,##0.00"
134
+        分析清單3_dgv.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
135
+        分析清單3_dgv.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單3_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
136
+        分析清單3_dgv.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
137
+        分析清單3_dgv.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單3_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
138 138
 
139
-        DataGridView4.Columns(2).DefaultCellStyle.Format = "#,##0" : DataGridView4.Columns(3).DefaultCellStyle.Format = "#,##0.00" : DataGridView4.Columns(4).DefaultCellStyle.Format = "#,##0.00"
140
-        DataGridView4.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
141
-        DataGridView4.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView4.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
142
-        DataGridView4.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
143
-        DataGridView4.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView4.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
139
+        分析清單4_dgv.Columns(2).DefaultCellStyle.Format = "#,##0" : 分析清單4_dgv.Columns(3).DefaultCellStyle.Format = "#,##0.00" : 分析清單4_dgv.Columns(4).DefaultCellStyle.Format = "#,##0.00"
140
+        分析清單4_dgv.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
141
+        分析清單4_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單4_dgv.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
142
+        分析清單4_dgv.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
143
+        分析清單4_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單4_dgv.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
144 144
 
145
-        DataGridView5.Columns(1).DefaultCellStyle.Format = "#,##0" : DataGridView5.Columns(2).DefaultCellStyle.Format = "#,##0.00" : DataGridView5.Columns(3).DefaultCellStyle.Format = "#,##0.00"
146
-        DataGridView5.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
147
-        DataGridView5.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView5.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
148
-        DataGridView5.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
149
-        DataGridView5.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView5.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
145
+        分析清單5_dgv.Columns(1).DefaultCellStyle.Format = "#,##0" : 分析清單5_dgv.Columns(2).DefaultCellStyle.Format = "#,##0.00" : 分析清單5_dgv.Columns(3).DefaultCellStyle.Format = "#,##0.00"
146
+        分析清單5_dgv.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
147
+        分析清單5_dgv.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單5_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
148
+        分析清單5_dgv.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
149
+        分析清單5_dgv.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單5_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
150 150
 
151
-        DataGridView6.Columns(2).DefaultCellStyle.Format = "#,##0" : DataGridView6.Columns(3).DefaultCellStyle.Format = "#,##0.00" : DataGridView6.Columns(4).DefaultCellStyle.Format = "#,##0.00"
152
-        DataGridView6.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
153
-        DataGridView6.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView6.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
154
-        DataGridView6.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
155
-        DataGridView6.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView6.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
151
+        分析清單6_dgv.Columns(2).DefaultCellStyle.Format = "#,##0" : 分析清單6_dgv.Columns(3).DefaultCellStyle.Format = "#,##0.00" : 分析清單6_dgv.Columns(4).DefaultCellStyle.Format = "#,##0.00"
152
+        分析清單6_dgv.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
153
+        分析清單6_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單6_dgv.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
154
+        分析清單6_dgv.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
155
+        分析清單6_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單6_dgv.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
156 156
 
157
-        DataGridView7.Columns(0).Width = 85 : DataGridView7.Columns(1).Width = 85 : DataGridView7.Columns(2).Width = 85
158
-        DataGridView7.Columns(1).DefaultCellStyle.Format = "#,##0" : DataGridView7.Columns(2).DefaultCellStyle.Format = "#,##0.00"
159
-        DataGridView7.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView7.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
160
-        DataGridView7.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView7.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
161
-        DataGridView7.EditMode = DataGridViewEditMode.EditOnEnter
157
+        分析清單7_dgv.Columns(0).Width = 85 : 分析清單7_dgv.Columns(1).Width = 85 : 分析清單7_dgv.Columns(2).Width = 85
158
+        分析清單7_dgv.Columns(1).DefaultCellStyle.Format = "#,##0" : 分析清單7_dgv.Columns(2).DefaultCellStyle.Format = "#,##0.00"
159
+        分析清單7_dgv.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單7_dgv.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
160
+        分析清單7_dgv.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單7_dgv.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
161
+        分析清單7_dgv.EditMode = DataGridViewEditMode.EditOnEnter
162 162
     End Sub
163
-    Private  Sub 訂單分析報表二_Load(sender As Object, e As EventArgs) Handles MyBase.Load
163
+    Private Sub 訂單分析報表二_Load(sender As Object, e As EventArgs) Handles MyBase.Load
164 164
         Me.MdiParent = TENDEN_MES_SYS : Me.WindowState = 2 : Me.AutoScroll = True
165
-        ComboBox1.Text = Year(Now)
166
-        ComboBox2.Text = Year(Now) - 1
167
-        ComboBox3.Text = Year(Now) - 2
165
+        YEAR_cb.Text = Year(Now)
166
+        YEAR1_cb.Text = Year(Now) - 1
167
+        YEAR2_cb.Text = Year(Now) - 2
168 168
         Set_分析清單7()
169 169
         Set_分析清單1() : Set_分析清單2() : Set_分析清單3() : Set_分析清單4() : Set_分析清單5() : Set_分析清單6()
170 170
         Set_grid()
171 171
     End Sub
172
-    Private  Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
172
+    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Query_bt.Click
173 173
         Set_分析清單1() : Set_分析清單2() : Set_分析清單3() : Set_分析清單4() : Set_分析清單5() : Set_分析清單6() : Set_grid()
174 174
     End Sub
175
-    Private  Sub DataGridView2_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles DataGridView2.RowPostPaint
175
+    Private Sub DataGridView2_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles 分析清單2_dgv.RowPostPaint
176 176
         Dim linePen As New Pen(Color.Blue, 2)
177
-        If e.RowIndex = DataGridView2.Rows.Count - 1 Then
177
+        If e.RowIndex = 分析清單2_dgv.Rows.Count - 1 Then
178 178
             Exit Sub
179 179
         Else
180
-            If DataGridView2(0, e.RowIndex).Value.ToString <> DataGridView2(0, e.RowIndex + 1).Value.ToString Then
181
-                Dim startX As Integer = IIf(DataGridView2.RowHeadersVisible, DataGridView2.RowHeadersWidth, 0)
180
+            If 分析清單2_dgv(0, e.RowIndex).Value.ToString <> 分析清單2_dgv(0, e.RowIndex + 1).Value.ToString Then
181
+                Dim startX As Integer = IIf(分析清單2_dgv.RowHeadersVisible, 分析清單2_dgv.RowHeadersWidth, 0)
182 182
                 Dim startY As Integer = e.RowBounds.Top + e.RowBounds.Height - 1
183
-                Dim endX As Integer = startX + DataGridView2.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - DataGridView2.HorizontalScrollingOffset
183
+                Dim endX As Integer = startX + 分析清單2_dgv.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - 分析清單2_dgv.HorizontalScrollingOffset
184 184
                 e.Graphics.DrawLine(linePen, startX, startY, endX, startY)
185 185
                 Exit Sub
186 186
             End If
187 187
         End If
188 188
     End Sub
189
-    Private  Sub DataGridView4_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles DataGridView4.RowPostPaint
189
+    Private Sub DataGridView4_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles 分析清單4_dgv.RowPostPaint
190 190
         Dim linePen As New Pen(Color.Blue, 2)
191
-        If e.RowIndex = DataGridView4.Rows.Count - 1 Then
191
+        If e.RowIndex = 分析清單4_dgv.Rows.Count - 1 Then
192 192
             Exit Sub
193 193
         Else
194
-            If DataGridView4(0, e.RowIndex).Value.ToString <> DataGridView4(0, e.RowIndex + 1).Value.ToString Then
195
-                Dim startX As Integer = IIf(DataGridView4.RowHeadersVisible, DataGridView4.RowHeadersWidth, 0)
194
+            If 分析清單4_dgv(0, e.RowIndex).Value.ToString <> 分析清單4_dgv(0, e.RowIndex + 1).Value.ToString Then
195
+                Dim startX As Integer = IIf(分析清單4_dgv.RowHeadersVisible, 分析清單4_dgv.RowHeadersWidth, 0)
196 196
                 Dim startY As Integer = e.RowBounds.Top + e.RowBounds.Height - 1
197
-                Dim endX As Integer = startX + DataGridView4.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - DataGridView4.HorizontalScrollingOffset
197
+                Dim endX As Integer = startX + 分析清單4_dgv.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - 分析清單4_dgv.HorizontalScrollingOffset
198 198
                 e.Graphics.DrawLine(linePen, startX, startY, endX, startY)
199 199
                 Exit Sub
200 200
             End If
201 201
         End If
202 202
     End Sub
203
-    Private  Sub DataGridView6_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles DataGridView6.RowPostPaint
203
+    Private Sub DataGridView6_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles 分析清單6_dgv.RowPostPaint
204 204
         Dim linePen As New Pen(Color.Blue, 2)
205
-        If e.RowIndex = DataGridView6.Rows.Count - 1 Then
205
+        If e.RowIndex = 分析清單6_dgv.Rows.Count - 1 Then
206 206
             Exit Sub
207 207
         Else
208
-            If DataGridView6(0, e.RowIndex).Value.ToString <> DataGridView6(0, e.RowIndex + 1).Value.ToString Then
209
-                Dim startX As Integer = IIf(DataGridView6.RowHeadersVisible, DataGridView6.RowHeadersWidth, 0)
208
+            If 分析清單6_dgv(0, e.RowIndex).Value.ToString <> 分析清單6_dgv(0, e.RowIndex + 1).Value.ToString Then
209
+                Dim startX As Integer = IIf(分析清單6_dgv.RowHeadersVisible, 分析清單6_dgv.RowHeadersWidth, 0)
210 210
                 Dim startY As Integer = e.RowBounds.Top + e.RowBounds.Height - 1
211
-                Dim endX As Integer = startX + DataGridView6.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - DataGridView6.HorizontalScrollingOffset
211
+                Dim endX As Integer = startX + 分析清單6_dgv.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - 分析清單6_dgv.HorizontalScrollingOffset
212 212
                 e.Graphics.DrawLine(linePen, startX, startY, endX, startY)
213 213
                 Exit Sub
214 214
             End If
215 215
         End If
216 216
     End Sub
217
-    Private  Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
217
+    Private Sub Button5_Click(sender As Object, e As EventArgs) Handles PRINT_bt.Click
218 218
         列印_訂單分析二.Show()
219 219
     End Sub
220
-    Private  Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
220
+    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles ADD_bt.Click
221 221
         Dim PA1 As String : Dim PA2 As String : Dim PA3 As String
222 222
         PA1 = InputBox("請輸入要欲新增之年月份")
223 223
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
@@ -238,17 +238,17 @@ Public Class 訂單分析報表二
238 238
         End If
239 239
         Set_分析清單7() : Set_grid()
240 240
     End Sub
241
-    Private  Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
242
-        For i As Integer = 0 To DataGridView7.Rows.Count - 1
241
+    Private Sub Button3_Click(sender As Object, e As EventArgs) Handles MODIFY_bt.Click
242
+        For i As Integer = 0 To 分析清單7_dgv.Rows.Count - 1
243 243
             If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
244
-            SQL1 = "UPDATE 訂單預估資料表 SET  預估數量 = '" & DataGridView7.Rows(i).Cells("Assess_QTY").Value & "', 預估單價 = '" & DataGridView7.Rows(i).Cells("Assess_Price").Value & "' " &
245
-                   "WHERE (年月份 LIKE '" & DataGridView7.Rows(i).Cells("Year_Month").Value & "')"
244
+            SQL1 = "UPDATE 訂單預估資料表 SET  預估數量 = '" & 分析清單7_dgv.Rows(i).Cells("Assess_QTY").Value & "', 預估單價 = '" & 分析清單7_dgv.Rows(i).Cells("Assess_Price").Value & "' " &
245
+                   "WHERE (年月份 LIKE '" & 分析清單7_dgv.Rows(i).Cells("Year_Month").Value & "')"
246 246
             cmd.Connection = conn : cmd.CommandText = SQL1 : cmd.ExecuteNonQuery() : conn.Close()
247 247
         Next i
248 248
         Set_分析清單7() : Set_grid()
249 249
         MsgBox("修改完成")
250 250
     End Sub
251
-    Private  Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
251
+    Private  Sub Button4_Click(sender As Object, e As EventArgs) Handles DELETE_bt.Click
252 252
 
253 253
     End Sub
254 254
 End Class

+ 686
- 686
TENDEN-MES-SYS/彙總報表管理/訂單分析報表五.Designer.vb
文件差異過大導致無法顯示
查看文件


+ 235
- 230
TENDEN-MES-SYS/彙總報表管理/訂單分析報表五.vb 查看文件

@@ -9,315 +9,317 @@ Public Class 訂單分析報表五
9 9
     Dim ds14 As New DataSet
10 10
     Dim dr As SqlDataReader
11 11
     Private  Sub Set_DGV1載入前設定()
12
-        DataGridView1.DataSource = Nothing : ds.Clear()
13
-        DataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
14
-        DataGridView1.ColumnHeadersHeight = 25
15
-        DataGridView1.AllowUserToAddRows = False
12
+        訂單控制表_dgv.DataSource = Nothing : ds.Clear()
13
+        訂單控制表_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
14
+        訂單控制表_dgv.ColumnHeadersHeight = 25
15
+        訂單控制表_dgv.AllowUserToAddRows = False
16 16
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
17 17
     End Sub
18
-    Private  Sub Set_DGV1載入後設定()
19
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds) : DataGridView1.DataSource = ds.Tables(0) : conn.Close()
18
+    Private Sub Set_DGV1載入後設定()
19
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds) : 訂單控制表_dgv.DataSource = ds.Tables(0) : conn.Close()
20 20
     End Sub
21
-    Private  Sub Set_分析清單1()
21
+    Private Sub Set_分析清單1()
22 22
         Set_DGV1載入前設定()
23
-        SQL1 = "SELECT 年度 AS YEAR, P, 開始日期 AS Start_date, 結束日期 AS Closing_date FROM NEW_U_C_時間間格 WHERE (年度 LIKE '" & ComboBox1.Text & "') ORDER BY 開始日期"
23
+        SQL1 = "SELECT 年度 AS YEAR, P, 開始日期 AS Start_date, 結束日期 AS Closing_date FROM NEW_U_C_時間間格 WHERE (年度 LIKE '" & 年度_cb.Text & "') ORDER BY 開始日期"
24 24
         Set_DGV1載入後設定()
25 25
     End Sub
26
-    Private  Sub Set_DGV2載入前設定()
27
-        DataGridView2.DataSource = Nothing : ds1.Clear()
28
-        DataGridView2.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
29
-        DataGridView2.ColumnHeadersHeight = 25
30
-        DataGridView2.AllowUserToAddRows = False
26
+    Private Sub Set_DGV2載入前設定()
27
+        分析清單_dgv.DataSource = Nothing : ds1.Clear()
28
+        分析清單_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
29
+        分析清單_dgv.ColumnHeadersHeight = 25
30
+        分析清單_dgv.AllowUserToAddRows = False
31 31
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
32 32
     End Sub
33
-    Private  Sub Set_DGV2載入後設定()
34
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds1) : DataGridView2.DataSource = ds1.Tables(0) : conn.Close()
33
+    Private Sub Set_DGV2載入後設定()
34
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds1) : 分析清單_dgv.DataSource = ds1.Tables(0) : conn.Close()
35 35
     End Sub
36
-    Private  Sub Set_DGV3載入前設定()
37
-        DataGridView3.DataSource = Nothing : ds2.Clear()
38
-        DataGridView3.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
39
-        DataGridView3.ColumnHeadersHeight = 25
40
-        DataGridView3.AllowUserToAddRows = False
36
+    Private Sub Set_DGV3載入前設定()
37
+        分析清單1_dgv.DataSource = Nothing : ds2.Clear()
38
+        分析清單1_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
39
+        分析清單1_dgv.ColumnHeadersHeight = 25
40
+        分析清單1_dgv.AllowUserToAddRows = False
41 41
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
42 42
     End Sub
43
-    Private  Sub Set_DGV3載入後設定()
44
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds2) : DataGridView3.DataSource = ds2.Tables(0) : conn.Close()
43
+    Private Sub Set_DGV3載入後設定()
44
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds2) : 分析清單1_dgv.DataSource = ds2.Tables(0) : conn.Close()
45 45
     End Sub
46
-    Private  Sub Set_DGV4載入前設定()
47
-        DataGridView4.DataSource = Nothing : ds3.Clear()
48
-        DataGridView4.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
49
-        DataGridView4.ColumnHeadersHeight = 25
50
-        DataGridView4.AllowUserToAddRows = False
46
+    Private Sub Set_DGV4載入前設定()
47
+        分析清單2_dgv.DataSource = Nothing : ds3.Clear()
48
+        分析清單2_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
49
+        分析清單2_dgv.ColumnHeadersHeight = 25
50
+        分析清單2_dgv.AllowUserToAddRows = False
51 51
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
52 52
     End Sub
53
-    Private  Sub Set_DGV4載入後設定()
54
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds3) : DataGridView4.DataSource = ds3.Tables(0) : conn.Close()
53
+    Private Sub Set_DGV4載入後設定()
54
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds3) : 分析清單2_dgv.DataSource = ds3.Tables(0) : conn.Close()
55 55
     End Sub
56
-    Private  Sub Set_DGV5載入前設定()
57
-        DataGridView5.DataSource = Nothing : ds4.Clear()
58
-        DataGridView5.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
59
-        DataGridView5.ColumnHeadersHeight = 25
60
-        DataGridView5.AllowUserToAddRows = False
56
+    Private Sub Set_DGV5載入前設定()
57
+        分析清單3_dgv.DataSource = Nothing : ds4.Clear()
58
+        分析清單3_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
59
+        分析清單3_dgv.ColumnHeadersHeight = 25
60
+        分析清單3_dgv.AllowUserToAddRows = False
61 61
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
62 62
     End Sub
63
-    Private  Sub Set_DGV5載入後設定()
64
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds4) : DataGridView5.DataSource = ds4.Tables(0) : conn.Close()
63
+    Private Sub Set_DGV5載入後設定()
64
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds4) : 分析清單3_dgv.DataSource = ds4.Tables(0) : conn.Close()
65 65
     End Sub
66
-    Private  Sub Set_DGV6載入前設定()
67
-        DataGridView6.DataSource = Nothing : ds5.Clear()
68
-        DataGridView6.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
69
-        DataGridView6.ColumnHeadersHeight = 25
70
-        DataGridView6.AllowUserToAddRows = False
66
+    Private Sub Set_DGV6載入前設定()
67
+        分析清單4_dgv.DataSource = Nothing : ds5.Clear()
68
+        分析清單4_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
69
+        分析清單4_dgv.ColumnHeadersHeight = 25
70
+        分析清單4_dgv.AllowUserToAddRows = False
71 71
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
72 72
     End Sub
73
-    Private  Sub Set_DGV6載入後設定()
74
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds5) : DataGridView6.DataSource = ds5.Tables(0) : conn.Close()
73
+    Private Sub Set_DGV6載入後設定()
74
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds5) : 分析清單4_dgv.DataSource = ds5.Tables(0) : conn.Close()
75 75
     End Sub
76
-    Private  Sub Set_DGV7載入前設定()
77
-        DataGridView7.DataSource = Nothing : ds6.Clear()
78
-        DataGridView7.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
79
-        DataGridView7.ColumnHeadersHeight = 25
80
-        DataGridView7.AllowUserToAddRows = False
76
+    Private Sub Set_DGV7載入前設定()
77
+        分析清單5_dgv.DataSource = Nothing : ds6.Clear()
78
+        分析清單5_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
79
+        分析清單5_dgv.ColumnHeadersHeight = 25
80
+        分析清單5_dgv.AllowUserToAddRows = False
81 81
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
82 82
     End Sub
83
-    Private  Sub Set_DGV7載入後設定()
84
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds6) : DataGridView7.DataSource = ds6.Tables(0) : conn.Close()
83
+    Private Sub Set_DGV7載入後設定()
84
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds6) : 分析清單5_dgv.DataSource = ds6.Tables(0) : conn.Close()
85 85
     End Sub
86
-    Private  Sub Set_DGV8載入前設定()
87
-        DataGridView8.DataSource = Nothing : ds7.Clear()
88
-        DataGridView8.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
89
-        DataGridView8.ColumnHeadersHeight = 25
90
-        DataGridView8.AllowUserToAddRows = False
86
+    Private Sub Set_DGV8載入前設定()
87
+        分析清單6_dgv.DataSource = Nothing : ds7.Clear()
88
+        分析清單6_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
89
+        分析清單6_dgv.ColumnHeadersHeight = 25
90
+        分析清單6_dgv.AllowUserToAddRows = False
91 91
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
92 92
     End Sub
93
-    Private  Sub Set_DGV8載入後設定()
94
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds7) : DataGridView8.DataSource = ds7.Tables(0) : conn.Close()
93
+    Private Sub Set_DGV8載入後設定()
94
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds7) : 分析清單6_dgv.DataSource = ds7.Tables(0) : conn.Close()
95 95
     End Sub
96
-    Private  Sub Set_DGV9載入前設定()
97
-        DataGridView9.DataSource = Nothing : ds8.Clear()
98
-        DataGridView9.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
99
-        DataGridView9.ColumnHeadersHeight = 25
100
-        DataGridView9.AllowUserToAddRows = False
96
+    Private Sub Set_DGV9載入前設定()
97
+        分析清單7_dgv.DataSource = Nothing : ds8.Clear()
98
+        分析清單7_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
99
+        分析清單7_dgv.ColumnHeadersHeight = 25
100
+        分析清單7_dgv.AllowUserToAddRows = False
101 101
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
102 102
     End Sub
103
-    Private  Sub Set_DGV9載入後設定()
104
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds8) : DataGridView9.DataSource = ds8.Tables(0) : conn.Close()
103
+    Private Sub Set_DGV9載入後設定()
104
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds8) : 分析清單7_dgv.DataSource = ds8.Tables(0) : conn.Close()
105 105
     End Sub
106
-    Private  Sub Set_DGV10載入前設定()
107
-        DataGridView10.DataSource = Nothing : ds9.Clear()
108
-        DataGridView10.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
109
-        DataGridView10.ColumnHeadersHeight = 25
110
-        DataGridView10.AllowUserToAddRows = False
106
+    Private Sub Set_DGV10載入前設定()
107
+        分析清單8_dgv.DataSource = Nothing : ds9.Clear()
108
+        分析清單8_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
109
+        分析清單8_dgv.ColumnHeadersHeight = 25
110
+        分析清單8_dgv.AllowUserToAddRows = False
111 111
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
112 112
     End Sub
113
-    Private  Sub Set_DGV10載入後設定()
114
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds9) : DataGridView10.DataSource = ds9.Tables(0) : conn.Close()
113
+    Private Sub Set_DGV10載入後設定()
114
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds9) : 分析清單8_dgv.DataSource = ds9.Tables(0) : conn.Close()
115 115
     End Sub
116
-    Private  Sub Set_DGV11載入前設定()
117
-        DataGridView11.DataSource = Nothing : ds10.Clear()
118
-        DataGridView11.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
119
-        DataGridView11.ColumnHeadersHeight = 25
120
-        DataGridView11.AllowUserToAddRows = False
116
+    Private Sub Set_DGV11載入前設定()
117
+        分析清單9_dgv.DataSource = Nothing : ds10.Clear()
118
+        分析清單9_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
119
+        分析清單9_dgv.ColumnHeadersHeight = 25
120
+        分析清單9_dgv.AllowUserToAddRows = False
121 121
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
122 122
     End Sub
123
-    Private  Sub Set_DGV11載入後設定()
124
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds10) : DataGridView11.DataSource = ds10.Tables(0) : conn.Close()
123
+    Private Sub Set_DGV11載入後設定()
124
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds10) : 分析清單9_dgv.DataSource = ds10.Tables(0) : conn.Close()
125 125
     End Sub
126
-    Private  Sub Set_DGV12載入前設定()
127
-        DataGridView12.DataSource = Nothing : ds11.Clear()
128
-        DataGridView12.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
129
-        DataGridView12.ColumnHeadersHeight = 25
130
-        DataGridView12.AllowUserToAddRows = False
126
+    Private Sub Set_DGV12載入前設定()
127
+        分析清單10_dgv.DataSource = Nothing : ds11.Clear()
128
+        分析清單10_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
129
+        分析清單10_dgv.ColumnHeadersHeight = 25
130
+        分析清單10_dgv.AllowUserToAddRows = False
131 131
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
132 132
     End Sub
133
-    Private  Sub Set_DGV12載入後設定()
134
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds11) : DataGridView12.DataSource = ds11.Tables(0) : conn.Close()
133
+    Private Sub Set_DGV12載入後設定()
134
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds11) : 分析清單10_dgv.DataSource = ds11.Tables(0) : conn.Close()
135 135
     End Sub
136
-    Private  Sub Set_DGV13載入前設定()
137
-        DataGridView13.DataSource = Nothing : ds12.Clear()
138
-        DataGridView13.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
139
-        DataGridView13.ColumnHeadersHeight = 25
140
-        DataGridView13.AllowUserToAddRows = False
136
+    Private Sub Set_DGV13載入前設定()
137
+        分析清單11_dgv.DataSource = Nothing : ds12.Clear()
138
+        分析清單11_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
139
+        分析清單11_dgv.ColumnHeadersHeight = 25
140
+        分析清單11_dgv.AllowUserToAddRows = False
141 141
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
142 142
     End Sub
143
-    Private  Sub Set_DGV13載入後設定()
144
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds12) : DataGridView13.DataSource = ds12.Tables(0) : conn.Close()
143
+    Private Sub Set_DGV13載入後設定()
144
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds12) : 分析清單11_dgv.DataSource = ds12.Tables(0) : conn.Close()
145 145
     End Sub
146
-    Private  Sub Set_DGV14載入前設定()
147
-        DataGridView14.DataSource = Nothing : ds13.Clear()
148
-        DataGridView14.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
149
-        DataGridView14.ColumnHeadersHeight = 25
150
-        DataGridView14.AllowUserToAddRows = False
146
+    Private Sub Set_DGV14載入前設定()
147
+        分析清單12_dgv.DataSource = Nothing : ds13.Clear()
148
+        分析清單12_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
149
+        分析清單12_dgv.ColumnHeadersHeight = 25
150
+        分析清單12_dgv.AllowUserToAddRows = False
151 151
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
152 152
     End Sub
153
-    Private  Sub Set_DGV14載入後設定()
154
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds13) : DataGridView14.DataSource = ds13.Tables(0) : conn.Close()
153
+    Private Sub Set_DGV14載入後設定()
154
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds13) : 分析清單12_dgv.DataSource = ds13.Tables(0) : conn.Close()
155 155
     End Sub
156
-    Private  Sub Set_DGV15載入前設定()
157
-        DataGridView15.DataSource = Nothing : ds14.Clear()
158
-        DataGridView15.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
159
-        DataGridView15.ColumnHeadersHeight = 25
160
-        DataGridView15.AllowUserToAddRows = False
156
+    Private Sub Set_DGV15載入前設定()
157
+        訂單預估資料表2_dgv.DataSource = Nothing : ds14.Clear()
158
+        訂單預估資料表2_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
159
+        訂單預估資料表2_dgv.ColumnHeadersHeight = 25
160
+        訂單預估資料表2_dgv.AllowUserToAddRows = False
161 161
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
162 162
     End Sub
163
-    Private  Sub Set_DGV15載入後設定()
164
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds14) : DataGridView15.DataSource = ds14.Tables(0) : conn.Close()
163
+    Private Sub Set_DGV15載入後設定()
164
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds14) : 訂單預估資料表2_dgv.DataSource = ds14.Tables(0) : conn.Close()
165 165
     End Sub
166
-    Private  Sub Set_分析清單7()
166
+    Private Sub Set_分析清單7()
167 167
         Set_DGV15載入前設定()
168 168
         SQL1 = "SELECT YEAR_P, 預估數量 AS Assess_QTY, 預估單價 AS Assess_Price FROM 訂單預估資料表2 WHERE YEAR_P NOT LIKE '%2017%' AND YEAR_P NOT LIKE '%2018%' ORDER BY YEAR_P DESC"
169 169
         Set_DGV15載入後設定()
170 170
     End Sub
171
-    Private  Sub Set_grid()
172
-        DataGridView2.Columns(1).DefaultCellStyle.Format = "#,##0" : DataGridView2.Columns(2).DefaultCellStyle.Format = "#,##0.00" : DataGridView2.Columns(3).DefaultCellStyle.Format = "#,##0.00"
173
-        DataGridView2.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
174
-        DataGridView2.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView2.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
175
-        DataGridView2.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
176
-        DataGridView2.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView2.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
171
+    Private Sub Set_grid()
172
+        分析清單_dgv.Columns(1).DefaultCellStyle.Format = "#,##0" : 分析清單_dgv.Columns(2).DefaultCellStyle.Format = "#,##0.00" : 分析清單_dgv.Columns(3).DefaultCellStyle.Format = "#,##0.00"
173
+        分析清單_dgv.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
174
+        分析清單_dgv.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
175
+        分析清單_dgv.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
176
+        分析清單_dgv.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
177 177
 
178
-        DataGridView3.Columns(1).DefaultCellStyle.Format = "#,##0" : DataGridView3.Columns(2).DefaultCellStyle.Format = "#,##0.00" : DataGridView3.Columns(3).DefaultCellStyle.Format = "#,##0.00"
179
-        DataGridView3.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
180
-        DataGridView3.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView3.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
181
-        DataGridView3.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
182
-        DataGridView3.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView3.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
178
+        分析清單1_dgv.Columns(1).DefaultCellStyle.Format = "#,##0" : 分析清單1_dgv.Columns(2).DefaultCellStyle.Format = "#,##0.00" : 分析清單1_dgv.Columns(3).DefaultCellStyle.Format = "#,##0.00"
179
+        分析清單1_dgv.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
180
+        分析清單1_dgv.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單1_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
181
+        分析清單1_dgv.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
182
+        分析清單1_dgv.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單1_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
183 183
 
184
-        DataGridView4.Columns(1).DefaultCellStyle.Format = "#,##0" : DataGridView4.Columns(2).DefaultCellStyle.Format = "#,##0.00" : DataGridView4.Columns(3).DefaultCellStyle.Format = "#,##0.00"
185
-        DataGridView4.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
186
-        DataGridView4.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView4.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
187
-        DataGridView4.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
188
-        DataGridView4.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView4.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
184
+        分析清單2_dgv.Columns(1).DefaultCellStyle.Format = "#,##0" : 分析清單2_dgv.Columns(2).DefaultCellStyle.Format = "#,##0.00" : 分析清單2_dgv.Columns(3).DefaultCellStyle.Format = "#,##0.00"
185
+        分析清單2_dgv.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
186
+        分析清單2_dgv.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單2_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
187
+        分析清單2_dgv.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
188
+        分析清單2_dgv.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單2_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
189 189
 
190
-        DataGridView5.Columns(1).DefaultCellStyle.Format = "#,##0" : DataGridView5.Columns(2).DefaultCellStyle.Format = "#,##0.00" : DataGridView5.Columns(3).DefaultCellStyle.Format = "#,##0.00"
191
-        DataGridView5.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
192
-        DataGridView5.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView5.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
193
-        DataGridView5.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
194
-        DataGridView5.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView5.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
190
+        分析清單3_dgv.Columns(1).DefaultCellStyle.Format = "#,##0" : 分析清單3_dgv.Columns(2).DefaultCellStyle.Format = "#,##0.00" : 分析清單3_dgv.Columns(3).DefaultCellStyle.Format = "#,##0.00"
191
+        分析清單3_dgv.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
192
+        分析清單3_dgv.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單3_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
193
+        分析清單3_dgv.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
194
+        分析清單3_dgv.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單3_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
195 195
 
196
-        DataGridView6.Columns(1).DefaultCellStyle.Format = "#,##0" : DataGridView6.Columns(2).DefaultCellStyle.Format = "#,##0.00" : DataGridView6.Columns(3).DefaultCellStyle.Format = "#,##0.00"
197
-        DataGridView6.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
198
-        DataGridView6.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView6.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
199
-        DataGridView6.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
200
-        DataGridView6.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView6.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
196
+        分析清單4_dgv.Columns(1).DefaultCellStyle.Format = "#,##0" : 分析清單4_dgv.Columns(2).DefaultCellStyle.Format = "#,##0.00" : 分析清單4_dgv.Columns(3).DefaultCellStyle.Format = "#,##0.00"
197
+        分析清單4_dgv.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
198
+        分析清單4_dgv.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單4_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
199
+        分析清單4_dgv.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
200
+        分析清單4_dgv.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單4_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
201 201
 
202
-        DataGridView7.Columns(1).DefaultCellStyle.Format = "#,##0" : DataGridView7.Columns(2).DefaultCellStyle.Format = "#,##0.00" : DataGridView7.Columns(3).DefaultCellStyle.Format = "#,##0.00"
203
-        DataGridView7.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
204
-        DataGridView7.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView7.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
205
-        DataGridView7.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
206
-        DataGridView7.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView7.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
202
+        分析清單5_dgv.Columns(1).DefaultCellStyle.Format = "#,##0" : 分析清單5_dgv.Columns(2).DefaultCellStyle.Format = "#,##0.00" : 分析清單5_dgv.Columns(3).DefaultCellStyle.Format = "#,##0.00"
203
+        分析清單5_dgv.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
204
+        分析清單5_dgv.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單5_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
205
+        分析清單5_dgv.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
206
+        分析清單5_dgv.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單5_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
207 207
 
208
-        DataGridView8.Columns(1).DefaultCellStyle.Format = "#,##0" : DataGridView8.Columns(2).DefaultCellStyle.Format = "#,##0.00" : DataGridView8.Columns(3).DefaultCellStyle.Format = "#,##0.00"
209
-        DataGridView8.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
210
-        DataGridView8.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView8.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
211
-        DataGridView8.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
212
-        DataGridView8.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView8.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
208
+        分析清單6_dgv.Columns(1).DefaultCellStyle.Format = "#,##0" : 分析清單6_dgv.Columns(2).DefaultCellStyle.Format = "#,##0.00" : 分析清單6_dgv.Columns(3).DefaultCellStyle.Format = "#,##0.00"
209
+        分析清單6_dgv.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
210
+        分析清單6_dgv.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單6_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
211
+        分析清單6_dgv.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
212
+        分析清單6_dgv.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單6_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
213 213
 
214
-        DataGridView9.Columns(1).DefaultCellStyle.Format = "#,##0" : DataGridView9.Columns(2).DefaultCellStyle.Format = "#,##0.00" : DataGridView9.Columns(3).DefaultCellStyle.Format = "#,##0.00"
215
-        DataGridView9.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
216
-        DataGridView9.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView9.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
217
-        DataGridView9.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
218
-        DataGridView9.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView9.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
214
+        分析清單7_dgv.Columns(1).DefaultCellStyle.Format = "#,##0" : 分析清單7_dgv.Columns(2).DefaultCellStyle.Format = "#,##0.00" : 分析清單7_dgv.Columns(3).DefaultCellStyle.Format = "#,##0.00"
215
+        分析清單7_dgv.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
216
+        分析清單7_dgv.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單7_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
217
+        分析清單7_dgv.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
218
+        分析清單7_dgv.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單7_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
219 219
 
220
-        DataGridView10.Columns(1).DefaultCellStyle.Format = "#,##0" : DataGridView10.Columns(2).DefaultCellStyle.Format = "#,##0.00" : DataGridView10.Columns(3).DefaultCellStyle.Format = "#,##0.00"
221
-        DataGridView10.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
222
-        DataGridView10.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView10.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
223
-        DataGridView10.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
224
-        DataGridView10.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView10.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
220
+        分析清單8_dgv.Columns(1).DefaultCellStyle.Format = "#,##0" : 分析清單8_dgv.Columns(2).DefaultCellStyle.Format = "#,##0.00" : 分析清單8_dgv.Columns(3).DefaultCellStyle.Format = "#,##0.00"
221
+        分析清單8_dgv.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
222
+        分析清單8_dgv.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單8_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
223
+        分析清單8_dgv.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
224
+        分析清單8_dgv.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單8_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
225 225
 
226
-        DataGridView11.Columns(1).DefaultCellStyle.Format = "#,##0" : DataGridView11.Columns(2).DefaultCellStyle.Format = "#,##0.00" : DataGridView11.Columns(3).DefaultCellStyle.Format = "#,##0.00"
227
-        DataGridView11.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
228
-        DataGridView11.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView11.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
229
-        DataGridView11.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
230
-        DataGridView11.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView11.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
226
+        分析清單9_dgv.Columns(1).DefaultCellStyle.Format = "#,##0" : 分析清單9_dgv.Columns(2).DefaultCellStyle.Format = "#,##0.00" : 分析清單9_dgv.Columns(3).DefaultCellStyle.Format = "#,##0.00"
227
+        分析清單9_dgv.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
228
+        分析清單9_dgv.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單9_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
229
+        分析清單9_dgv.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
230
+        分析清單9_dgv.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單9_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
231 231
 
232
-        DataGridView12.Columns(1).DefaultCellStyle.Format = "#,##0" : DataGridView12.Columns(2).DefaultCellStyle.Format = "#,##0.00" : DataGridView12.Columns(3).DefaultCellStyle.Format = "#,##0.00"
233
-        DataGridView12.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
234
-        DataGridView12.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView12.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
235
-        DataGridView12.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
236
-        DataGridView12.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView12.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
232
+        分析清單10_dgv.Columns(1).DefaultCellStyle.Format = "#,##0" : 分析清單10_dgv.Columns(2).DefaultCellStyle.Format = "#,##0.00" : 分析清單10_dgv.Columns(3).DefaultCellStyle.Format = "#,##0.00"
233
+        分析清單10_dgv.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
234
+        分析清單10_dgv.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單10_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
235
+        分析清單10_dgv.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
236
+        分析清單10_dgv.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單10_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
237 237
 
238
-        DataGridView13.Columns(1).DefaultCellStyle.Format = "#,##0" : DataGridView13.Columns(2).DefaultCellStyle.Format = "#,##0.00" : DataGridView13.Columns(3).DefaultCellStyle.Format = "#,##0.00"
239
-        DataGridView13.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
240
-        DataGridView13.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView13.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
241
-        DataGridView13.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
242
-        DataGridView13.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView13.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
238
+        分析清單11_dgv.Columns(1).DefaultCellStyle.Format = "#,##0" : 分析清單11_dgv.Columns(2).DefaultCellStyle.Format = "#,##0.00" : 分析清單11_dgv.Columns(3).DefaultCellStyle.Format = "#,##0.00"
239
+        分析清單11_dgv.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
240
+        分析清單11_dgv.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單11_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
241
+        分析清單11_dgv.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
242
+        分析清單11_dgv.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單11_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
243 243
 
244
-        DataGridView14.Columns(0).Width = 95 : DataGridView14.Columns(1).Width = 100 : DataGridView14.Columns(2).Width = 100 : DataGridView14.Columns(3).Width = 85
245
-        DataGridView14.Columns(1).DefaultCellStyle.Format = "#,##0" : DataGridView14.Columns(2).DefaultCellStyle.Format = "#,##0.00" : DataGridView14.Columns(3).DefaultCellStyle.Format = "#,##0.00"
246
-        DataGridView14.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
247
-        DataGridView14.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView14.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
248
-        DataGridView14.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
249
-        DataGridView14.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView14.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
244
+        分析清單12_dgv.Columns(0).Width = 95 : 分析清單12_dgv.Columns(1).Width = 100 : 分析清單12_dgv.Columns(2).Width = 100 : 分析清單12_dgv.Columns(3).Width = 85
245
+        分析清單12_dgv.Columns(1).DefaultCellStyle.Format = "#,##0" : 分析清單12_dgv.Columns(2).DefaultCellStyle.Format = "#,##0.00" : 分析清單12_dgv.Columns(3).DefaultCellStyle.Format = "#,##0.00"
246
+        分析清單12_dgv.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
247
+        分析清單12_dgv.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單12_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
248
+        分析清單12_dgv.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
249
+        分析清單12_dgv.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : 分析清單12_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
250 250
 
251
-        DataGridView15.Columns(0).Width = 125 : DataGridView15.Columns(1).Width = 130 : DataGridView15.Columns(2).Width = 130
252
-        DataGridView15.Columns(1).DefaultCellStyle.Format = "#,##0" : DataGridView15.Columns(2).DefaultCellStyle.Format = "#,##0.00"
253
-        DataGridView15.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView15.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
254
-        DataGridView15.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView15.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
255
-        DataGridView15.EditMode = DataGridViewEditMode.EditOnEnter
256
-    End Sub
257
-    Private  Sub 訂單分析報表五_Load(sender As Object, e As EventArgs) Handles MyBase.Load
251
+        訂單預估資料表2_dgv.Columns(0).Width = 125 : 訂單預估資料表2_dgv.Columns(1).Width = 130 : 訂單預估資料表2_dgv.Columns(2).Width = 130
252
+        訂單預估資料表2_dgv.Columns(1).DefaultCellStyle.Format = "#,##0" : 訂單預估資料表2_dgv.Columns(2).DefaultCellStyle.Format = "#,##0.00"
253
+        訂單預估資料表2_dgv.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
254
+        訂單預估資料表2_dgv.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
255
+        訂單預估資料表2_dgv.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
256
+        訂單預估資料表2_dgv.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
257
+        訂單預估資料表2_dgv.EditMode = DataGridViewEditMode.EditOnEnter
258
+    End Sub
259
+    Private Sub 訂單分析報表五_Load(sender As Object, e As EventArgs) Handles MyBase.Load
258 260
         Me.MdiParent = TENDEN_MES_SYS : Me.WindowState = 2 : Me.AutoScroll = True
259
-        TextBox37.Visible = False : TextBox38.Visible = False : TextBox39.Visible = False
261
+        客戶交期_tb.Visible = False : 訂單數量_tb.Visible = False : 總金額_tb.Visible = False
260 262
         Set_分析清單7()
261
-        ComboBox1.Text = Year(Now)
263
+        年度_cb.Text = Year(Now)
262 264
     End Sub
263
-    Private  Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged
265
+    Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 年度_cb.SelectedIndexChanged
264 266
         Set_分析清單1()
265
-        TextBox40.Text = "0" : TextBox41.Text = "0" : TextBox42.Text = "0"
266
-        For i As Integer = 0 To DataGridView1.Rows.Count - 1
267
+        Summary_Order_Quantity_tb.Text = "0" : Summary_Total_Sum_tb.Text = "0" : Summary_Average_tb.Text = "0"
268
+        For i As Integer = 0 To 訂單控制表_dgv.Rows.Count - 1
267 269
             If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
268 270
             SQL1 = "SELECT SUM(訂單數量) AS Order_Quantity, SUM(總金額) AS Total_Sum, SUM(總金額) / SUM(訂單數量) AS Average FROM 訂單控制表 WHERE (CXL IS NULL OR
269
-                            CXL = 0) AND (客戶交期 BETWEEN '" & DataGridView1.Rows(i).Cells("Start_date").Value & "' AND '" & DataGridView1.Rows(i).Cells("Closing_date").Value & "')"
271
+                            CXL = 0) AND (客戶交期 BETWEEN '" & 訂單控制表_dgv.Rows(i).Cells("Start_date").Value & "' AND '" & 訂單控制表_dgv.Rows(i).Cells("Closing_date").Value & "')"
270 272
             cmd.Connection = conn : cmd.CommandText = SQL1 : dr = cmd.ExecuteReader
271 273
             If dr.Read() Then
272
-                TextBox37.Text = dr("Order_Quantity").ToString
273
-                TextBox38.Text = dr("Total_Sum").ToString
274
-                TextBox39.Text = dr("Average").ToString
274
+                客戶交期_tb.Text = dr("Order_Quantity").ToString
275
+                訂單數量_tb.Text = dr("Total_Sum").ToString
276
+                總金額_tb.Text = dr("Average").ToString
275 277
             End If : conn.Close()
276 278
 
277
-            If TextBox37.Text = "" Then : TextBox37.Text = "0" : End If
278
-            If TextBox38.Text = "" Then : TextBox38.Text = "0" : End If
279
-            If TextBox39.Text = "" Then : TextBox39.Text = "0" : End If
279
+            If 客戶交期_tb.Text = "" Then : 客戶交期_tb.Text = "0" : End If
280
+            If 訂單數量_tb.Text = "" Then : 訂單數量_tb.Text = "0" : End If
281
+            If 總金額_tb.Text = "" Then : 總金額_tb.Text = "0" : End If
280 282
 
281
-            TextBox40.Text = Format(Val(CStr(Math.Round((Double.Parse(TextBox40.Text)) + (Double.Parse(TextBox37.Text))))), "#,##0")
282
-            TextBox41.Text = Format(Val(CStr(Double.Parse(TextBox41.Text) + Double.Parse(TextBox38.Text))), "#,##0.00")
283
-            TextBox42.Text = Format(Val(CStr(Double.Parse(TextBox41.Text) / Double.Parse(TextBox40.Text))), "#,##0.00")
283
+            Summary_Order_Quantity_tb.Text = Format(Val(CStr(Math.Round((Double.Parse(Summary_Order_Quantity_tb.Text)) + (Double.Parse(客戶交期_tb.Text))))), "#,##0")
284
+            Summary_Total_Sum_tb.Text = Format(Val(CStr(Double.Parse(Summary_Total_Sum_tb.Text) + Double.Parse(訂單數量_tb.Text))), "#,##0.00")
285
+            Summary_Average_tb.Text = Format(Val(CStr(Double.Parse(Summary_Total_Sum_tb.Text) / Double.Parse(Summary_Order_Quantity_tb.Text))), "#,##0.00")
284 286
 
285 287
             If i = 0 Then
286
-                TextBox1.Text = Format(Val(CStr(Math.Round((Double.Parse(TextBox37.Text))))), "#,##0") : TextBox2.Text = Format(Val(CStr(Double.Parse(TextBox38.Text))), "#,##0.00")
287
-                TextBox3.Text = Format(Val(CStr(Double.Parse(TextBox39.Text))), "#,##0.00")
288
+                Order_Quantity_tb.Text = Format(Val(CStr(Math.Round((Double.Parse(客戶交期_tb.Text))))), "#,##0") : Total_Sum_tb.Text = Format(Val(CStr(Double.Parse(訂單數量_tb.Text))), "#,##0.00")
289
+                Average_tb.Text = Format(Val(CStr(Double.Parse(總金額_tb.Text))), "#,##0.00")
288 290
             ElseIf i = 1 Then
289
-                TextBox4.Text = Format(Val(CStr(Math.Round((Double.Parse(TextBox37.Text))))), "#,##0") : TextBox5.Text = Format(Val(CStr(Double.Parse(TextBox38.Text))), "#,##0.00")
290
-                TextBox6.Text = Format(Val(CStr(Double.Parse(TextBox39.Text))), "#,##0.00")
291
+                Order_Quantity1_tb.Text = Format(Val(CStr(Math.Round((Double.Parse(客戶交期_tb.Text))))), "#,##0") : Total_Sum1_tb.Text = Format(Val(CStr(Double.Parse(訂單數量_tb.Text))), "#,##0.00")
292
+                Average1_tb.Text = Format(Val(CStr(Double.Parse(總金額_tb.Text))), "#,##0.00")
291 293
             ElseIf i = 2 Then
292
-                TextBox7.Text = Format(Val(CStr(Math.Round((Double.Parse(TextBox37.Text))))), "#,##0") : TextBox8.Text = Format(Val(CStr(Double.Parse(TextBox38.Text))), "#,##0.00")
293
-                TextBox9.Text = Format(Val(CStr(Double.Parse(TextBox39.Text))), "#,##0.00")
294
+                Order_Quantity2_tb.Text = Format(Val(CStr(Math.Round((Double.Parse(客戶交期_tb.Text))))), "#,##0") : Total_Sum2_tb.Text = Format(Val(CStr(Double.Parse(訂單數量_tb.Text))), "#,##0.00")
295
+                Average2_tb.Text = Format(Val(CStr(Double.Parse(總金額_tb.Text))), "#,##0.00")
294 296
             ElseIf i = 3 Then
295
-                TextBox10.Text = Format(Val(CStr(Math.Round((Double.Parse(TextBox37.Text))))), "#,##0") : TextBox11.Text = Format(Val(CStr(Double.Parse(TextBox38.Text))), "#,##0.00")
296
-                TextBox12.Text = Format(Val(CStr(Double.Parse(TextBox39.Text))), "#,##0.00")
297
+                Order_Quantity3_tb.Text = Format(Val(CStr(Math.Round((Double.Parse(客戶交期_tb.Text))))), "#,##0") : Total_Sum3_tb.Text = Format(Val(CStr(Double.Parse(訂單數量_tb.Text))), "#,##0.00")
298
+                Average3_tb.Text = Format(Val(CStr(Double.Parse(總金額_tb.Text))), "#,##0.00")
297 299
             ElseIf i = 4 Then
298
-                TextBox13.Text = Format(Val(CStr(Math.Round((Double.Parse(TextBox37.Text))))), "#,##0") : TextBox14.Text = Format(Val(CStr(Double.Parse(TextBox38.Text))), "#,##0.00")
299
-                TextBox15.Text = Format(Val(CStr(Double.Parse(TextBox39.Text))), "#,##0.00")
300
+                Order_Quantity4_tb.Text = Format(Val(CStr(Math.Round((Double.Parse(客戶交期_tb.Text))))), "#,##0") : Total_Sum4_tb.Text = Format(Val(CStr(Double.Parse(訂單數量_tb.Text))), "#,##0.00")
301
+                Average4_tb.Text = Format(Val(CStr(Double.Parse(總金額_tb.Text))), "#,##0.00")
300 302
             ElseIf i = 5 Then
301
-                TextBox16.Text = Format(Val(CStr(Math.Round((Double.Parse(TextBox37.Text))))), "#,##0") : TextBox17.Text = Format(Val(CStr(Double.Parse(TextBox38.Text))), "#,##0.00")
302
-                TextBox18.Text = Format(Val(CStr(Double.Parse(TextBox39.Text))), "#,##0.00")
303
+                Order_Quantity5_tb.Text = Format(Val(CStr(Math.Round((Double.Parse(客戶交期_tb.Text))))), "#,##0") : Total_Sum5_tb.Text = Format(Val(CStr(Double.Parse(訂單數量_tb.Text))), "#,##0.00")
304
+                Average5_tb.Text = Format(Val(CStr(Double.Parse(總金額_tb.Text))), "#,##0.00")
303 305
             ElseIf i = 6 Then
304
-                TextBox19.Text = Format(Val(CStr(Math.Round((Double.Parse(TextBox37.Text))))), "#,##0") : TextBox20.Text = Format(Val(CStr(Double.Parse(TextBox38.Text))), "#,##0.00")
305
-                TextBox21.Text = Format(Val(CStr((Double.Parse(TextBox39.Text)))), "#,##0.00")
306
+                Order_Quantity6_tb.Text = Format(Val(CStr(Math.Round((Double.Parse(客戶交期_tb.Text))))), "#,##0") : Total_Sum6_tb.Text = Format(Val(CStr(Double.Parse(訂單數量_tb.Text))), "#,##0.00")
307
+                Average6_tb.Text = Format(Val(CStr((Double.Parse(總金額_tb.Text)))), "#,##0.00")
306 308
             ElseIf i = 7 Then
307
-                TextBox22.Text = Format(Val(CStr(Math.Round((Double.Parse(TextBox37.Text))))), "#,##0") : TextBox23.Text = Format(Val(CStr(Double.Parse(TextBox38.Text))), "#,##0.00")
308
-                TextBox24.Text = Format(Val(CStr(Double.Parse(TextBox39.Text))), "#,##0.00")
309
+                Order_Quantity7_tb.Text = Format(Val(CStr(Math.Round((Double.Parse(客戶交期_tb.Text))))), "#,##0") : Total_Sum7_tb.Text = Format(Val(CStr(Double.Parse(訂單數量_tb.Text))), "#,##0.00")
310
+                Average7_tb.Text = Format(Val(CStr(Double.Parse(總金額_tb.Text))), "#,##0.00")
309 311
             ElseIf i = 8 Then
310
-                TextBox25.Text = Format(Val(CStr(Math.Round((Double.Parse(TextBox37.Text))))), "#,##0") : TextBox26.Text = Format(Val(CStr(Double.Parse(TextBox38.Text))), "#,##0.00")
311
-                TextBox27.Text = Format(Val(CStr(Double.Parse(TextBox39.Text))), "#,##0.00")
312
+                Order_Quantity8_tb.Text = Format(Val(CStr(Math.Round((Double.Parse(客戶交期_tb.Text))))), "#,##0") : Total_Sum8_tb.Text = Format(Val(CStr(Double.Parse(訂單數量_tb.Text))), "#,##0.00")
313
+                Average8_tb.Text = Format(Val(CStr(Double.Parse(總金額_tb.Text))), "#,##0.00")
312 314
             ElseIf i = 9 Then
313
-                TextBox28.Text = Format(Val(CStr(Math.Round((Double.Parse(TextBox37.Text))))), "#,##0") : TextBox29.Text = Format(Val(CStr(Double.Parse(TextBox38.Text))), "#,##0.00")
314
-                TextBox30.Text = Format(Val(CStr(Double.Parse(TextBox39.Text))), "#,##0.00")
315
+                Order_Quantity9_tb.Text = Format(Val(CStr(Math.Round((Double.Parse(客戶交期_tb.Text))))), "#,##0") : Total_Sum9_tb.Text = Format(Val(CStr(Double.Parse(訂單數量_tb.Text))), "#,##0.00")
316
+                Average9_tb.Text = Format(Val(CStr(Double.Parse(總金額_tb.Text))), "#,##0.00")
315 317
             ElseIf i = 10 Then
316
-                TextBox31.Text = Format(Val(CStr(Math.Round((Double.Parse(TextBox37.Text))))), "#,##0") : TextBox32.Text = Format(Val(CStr(Double.Parse(TextBox38.Text))), "#,##0.00")
317
-                TextBox33.Text = Format(Val(CStr(Double.Parse(TextBox39.Text))), "#,##0.00")
318
+                Order_Quantity10_tb.Text = Format(Val(CStr(Math.Round((Double.Parse(客戶交期_tb.Text))))), "#,##0") : Total_Sum10_tb.Text = Format(Val(CStr(Double.Parse(訂單數量_tb.Text))), "#,##0.00")
319
+                Average10_tb.Text = Format(Val(CStr(Double.Parse(總金額_tb.Text))), "#,##0.00")
318 320
             ElseIf i = 11 Then
319
-                TextBox34.Text = Format(Val(CStr(Math.Round((Double.Parse(TextBox37.Text))))), "#,##0") : TextBox35.Text = Format(Val(CStr(Double.Parse(TextBox38.Text))), "#,##0.00")
320
-                TextBox36.Text = Format(Val(CStr(Double.Parse(TextBox39.Text))), "#,##0.00")
321
+                Order_Quantity11_tb.Text = Format(Val(CStr(Math.Round((Double.Parse(客戶交期_tb.Text))))), "#,##0") : Total_Sum11_tb.Text = Format(Val(CStr(Double.Parse(訂單數量_tb.Text))), "#,##0.00")
322
+                Average11_tb.Text = Format(Val(CStr(Double.Parse(總金額_tb.Text))), "#,##0.00")
321 323
             End If
322 324
 
323 325
             If i = 0 Then : Set_DGV2載入前設定() : ElseIf i = 1 Then : Set_DGV3載入前設定() : ElseIf i = 2 Then : Set_DGV4載入前設定() : ElseIf i = 3 Then : Set_DGV5載入前設定()
@@ -325,7 +327,8 @@ Public Class 訂單分析報表五
325 327
             ElseIf i = 8 Then : Set_DGV10載入前設定() : ElseIf i = 9 Then : Set_DGV11載入前設定() : ElseIf i = 10 Then : Set_DGV12載入前設定() : ElseIf i = 11 Then : Set_DGV13載入前設定()
326 328
             End If
327 329
             SQL1 = "SELECT 訂單種類 AS Order_Type, SUM(訂單數量) AS Order_Quantity, SUM(總金額) AS Total_Sum, SUM(總金額) / SUM(訂單數量) AS Average FROM 訂單控制表 WHERE (CXL IS NULL OR CXL = 0) " &
328
-                   "AND (客戶交期 BETWEEN '" & DataGridView1.Rows(i).Cells("Start_date").Value & "' AND '" & DataGridView1.Rows(i).Cells("Closing_date").Value & "') GROUP BY   訂單種類 ORDER BY   Order_Type"
330
+                   "AND (客戶交期 BETWEEN '" & 訂單控制表_dgv.Rows(i).Cells("Start_date").Value & "' AND '" & 訂單控制表_dgv.Rows(i).Cells("Closing_date").Value & "') 
331
+                   GROUP BY   訂單種類 ORDER BY   Order_Type"
329 332
             If i = 0 Then : Set_DGV2載入後設定() : ElseIf i = 1 Then : Set_DGV3載入後設定() : ElseIf i = 2 Then : Set_DGV4載入後設定() : ElseIf i = 3 Then : Set_DGV5載入後設定()
330 333
             ElseIf i = 4 Then : Set_DGV6載入後設定() : ElseIf i = 5 Then : Set_DGV7載入後設定() : ElseIf i = 6 Then : Set_DGV8載入後設定() : ElseIf i = 7 Then : Set_DGV9載入後設定()
331 334
             ElseIf i = 8 Then : Set_DGV10載入後設定() : ElseIf i = 9 Then : Set_DGV11載入後設定() : ElseIf i = 10 Then : Set_DGV12載入後設定() : ElseIf i = 11 Then : Set_DGV13載入後設定()
@@ -333,12 +336,13 @@ Public Class 訂單分析報表五
333 336
 
334 337
             Set_DGV14載入前設定()
335 338
             SQL1 = "SELECT 訂單種類 AS Order_Type, SUM(訂單數量) AS Order_Quantity, SUM(總金額) AS Total_Sum, SUM(總金額) / SUM(訂單數量) AS Average FROM 訂單控制表 WHERE (CXL IS NULL OR CXL = 0) " &
336
-                   "AND (客戶交期 BETWEEN '" & DataGridView1.Rows(0).Cells("Start_date").Value & "' AND '" & DataGridView1.Rows(11).Cells("Closing_date").Value & "') GROUP BY   訂單種類 ORDER BY   Order_Type"
339
+                   "AND (客戶交期 BETWEEN '" & 訂單控制表_dgv.Rows(0).Cells("Start_date").Value & "' AND '" & 訂單控制表_dgv.Rows(11).Cells("Closing_date").Value & "') 
340
+                   GROUP BY   訂單種類 ORDER BY   Order_Type"
337 341
             Set_DGV14載入後設定()
338 342
         Next
339 343
         Set_grid()
340 344
     End Sub
341
-    Private  Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
345
+    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles ADD_bt.Click
342 346
         Dim PA1 As String : Dim PA2 As String : Dim PA3 As String
343 347
         PA1 = InputBox("請輸入要欲新增之年月份,請注意格式為   xxxx_Pxx  ,例如 : 2019_P01。")
344 348
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
@@ -359,21 +363,22 @@ Public Class 訂單分析報表五
359 363
         End If
360 364
         Set_分析清單7() : Set_grid()
361 365
     End Sub
362
-    Private  Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
363
-        For i As Integer = 0 To DataGridView15.Rows.Count - 1
366
+    Private Sub Button3_Click(sender As Object, e As EventArgs) Handles MODIFY_bt.Click
367
+        For i As Integer = 0 To 訂單預估資料表2_dgv.Rows.Count - 1
364 368
             If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
365
-            SQL1 = "UPDATE 訂單預估資料表2 SET  預估數量 = '" & DataGridView15.Rows(i).Cells("Assess_QTY").Value & "', 預估單價 = '" & DataGridView15.Rows(i).Cells("Assess_Price").Value & "' " &
366
-                   "WHERE (YEAR_P LIKE '" & DataGridView15.Rows(i).Cells("YEAR_P").Value & "')"
369
+            SQL1 = "UPDATE 訂單預估資料表2 SET  預估數量 = '" & 訂單預估資料表2_dgv.Rows(i).Cells("Assess_QTY").Value & "', 
370
+                                                預估單價 = '" & 訂單預估資料表2_dgv.Rows(i).Cells("Assess_Price").Value & "' " &
371
+                   "WHERE (YEAR_P LIKE '" & 訂單預估資料表2_dgv.Rows(i).Cells("YEAR_P").Value & "')"
367 372
             cmd.Connection = conn : cmd.CommandText = SQL1 : cmd.ExecuteNonQuery() : conn.Close()
368 373
         Next i
369 374
         Set_分析清單7() : Set_grid()
370 375
         MsgBox("修改完成")
371 376
     End Sub
372
-    Private  Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
377
+    Private Sub Button4_Click(sender As Object, e As EventArgs) Handles DELETE_bt.Click
373 378
 
374 379
     End Sub
375
-    Private  Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
376
-        列印用SQL = ComboBox1.Text
380
+    Private Sub Button5_Click(sender As Object, e As EventArgs) Handles PRINT_bt.Click
381
+        列印用SQL = 年度_cb.Text
377 382
         列印_訂單分析五.Show()
378 383
     End Sub
379 384
 End Class

+ 66
- 66
TENDEN-MES-SYS/彙總報表管理/訂單分析報表四.Designer.vb 查看文件

@@ -22,42 +22,42 @@ Partial Class 訂單分析報表四
22 22
     '請勿使用程式碼編輯器進行修改。
23 23
     <System.Diagnostics.DebuggerStepThrough()>
24 24
     Private  Sub InitializeComponent()
25
-        Me.DataGridView1 = New System.Windows.Forms.DataGridView()
26
-        Me.DataGridView2 = New System.Windows.Forms.DataGridView()
25
+        Me.未完善訂單_dgv = New System.Windows.Forms.DataGridView()
26
+        Me.已完善訂單_dgv = New System.Windows.Forms.DataGridView()
27 27
         Me.Label1 = New System.Windows.Forms.Label()
28 28
         Me.Label2 = New System.Windows.Forms.Label()
29
-        Me.TextBox26 = New System.Windows.Forms.TextBox()
29
+        Me.資料筆數_tb = New System.Windows.Forms.TextBox()
30 30
         Me.Label42 = New System.Windows.Forms.Label()
31
-        Me.TextBox1 = New System.Windows.Forms.TextBox()
31
+        Me.訂單總數_tb = New System.Windows.Forms.TextBox()
32 32
         Me.Label3 = New System.Windows.Forms.Label()
33
-        Me.TextBox2 = New System.Windows.Forms.TextBox()
33
+        Me.資料筆數1_tb = New System.Windows.Forms.TextBox()
34 34
         Me.Label4 = New System.Windows.Forms.Label()
35
-        Me.TextBox3 = New System.Windows.Forms.TextBox()
35
+        Me.訂單總數1_tb = New System.Windows.Forms.TextBox()
36 36
         Me.Label5 = New System.Windows.Forms.Label()
37 37
         Me.Button1 = New System.Windows.Forms.Button()
38
-        CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).BeginInit()
39
-        CType(Me.DataGridView2, System.ComponentModel.ISupportInitialize).BeginInit()
38
+        CType(Me.未完善訂單_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
39
+        CType(Me.已完善訂單_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
40 40
         Me.SuspendLayout()
41 41
         '
42
-        'DataGridView1
42
+        '未完善訂單_dgv
43 43
         '
44
-        Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
45
-        Me.DataGridView1.Location = New System.Drawing.Point(6, 32)
46
-        Me.DataGridView1.Name = "DataGridView1"
47
-        Me.DataGridView1.RowHeadersWidth = 5
48
-        Me.DataGridView1.RowTemplate.Height = 24
49
-        Me.DataGridView1.Size = New System.Drawing.Size(1336, 295)
50
-        Me.DataGridView1.TabIndex = 78
44
+        Me.未完善訂單_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
45
+        Me.未完善訂單_dgv.Location = New System.Drawing.Point(6, 32)
46
+        Me.未完善訂單_dgv.Name = "未完善訂單_dgv"
47
+        Me.未完善訂單_dgv.RowHeadersWidth = 5
48
+        Me.未完善訂單_dgv.RowTemplate.Height = 24
49
+        Me.未完善訂單_dgv.Size = New System.Drawing.Size(1336, 295)
50
+        Me.未完善訂單_dgv.TabIndex = 78
51 51
         '
52
-        'DataGridView2
52
+        '已完善訂單_dgv
53 53
         '
54
-        Me.DataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
55
-        Me.DataGridView2.Location = New System.Drawing.Point(6, 356)
56
-        Me.DataGridView2.Name = "DataGridView2"
57
-        Me.DataGridView2.RowHeadersWidth = 5
58
-        Me.DataGridView2.RowTemplate.Height = 24
59
-        Me.DataGridView2.Size = New System.Drawing.Size(1336, 295)
60
-        Me.DataGridView2.TabIndex = 79
54
+        Me.已完善訂單_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
55
+        Me.已完善訂單_dgv.Location = New System.Drawing.Point(6, 356)
56
+        Me.已完善訂單_dgv.Name = "已完善訂單_dgv"
57
+        Me.已完善訂單_dgv.RowHeadersWidth = 5
58
+        Me.已完善訂單_dgv.RowTemplate.Height = 24
59
+        Me.已完善訂單_dgv.Size = New System.Drawing.Size(1336, 295)
60
+        Me.已完善訂單_dgv.TabIndex = 79
61 61
         '
62 62
         'Label1
63 63
         '
@@ -77,14 +77,14 @@ Partial Class 訂單分析報表四
77 77
         Me.Label2.TabIndex = 81
78 78
         Me.Label2.Text = "工廠交期即將到期且成型已完善訂單"
79 79
         '
80
-        'TextBox26
80
+        '資料筆數_tb
81 81
         '
82
-        Me.TextBox26.ForeColor = System.Drawing.Color.Black
83
-        Me.TextBox26.Location = New System.Drawing.Point(370, 330)
84
-        Me.TextBox26.Name = "TextBox26"
85
-        Me.TextBox26.Size = New System.Drawing.Size(90, 23)
86
-        Me.TextBox26.TabIndex = 122
87
-        Me.TextBox26.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
82
+        Me.資料筆數_tb.ForeColor = System.Drawing.Color.Black
83
+        Me.資料筆數_tb.Location = New System.Drawing.Point(370, 330)
84
+        Me.資料筆數_tb.Name = "資料筆數_tb"
85
+        Me.資料筆數_tb.Size = New System.Drawing.Size(90, 23)
86
+        Me.資料筆數_tb.TabIndex = 122
87
+        Me.資料筆數_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
88 88
         '
89 89
         'Label42
90 90
         '
@@ -95,14 +95,14 @@ Partial Class 訂單分析報表四
95 95
         Me.Label42.TabIndex = 121
96 96
         Me.Label42.Text = "資料筆數"
97 97
         '
98
-        'TextBox1
98
+        '訂單總數_tb
99 99
         '
100
-        Me.TextBox1.ForeColor = System.Drawing.Color.Black
101
-        Me.TextBox1.Location = New System.Drawing.Point(533, 330)
102
-        Me.TextBox1.Name = "TextBox1"
103
-        Me.TextBox1.Size = New System.Drawing.Size(90, 23)
104
-        Me.TextBox1.TabIndex = 124
105
-        Me.TextBox1.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
100
+        Me.訂單總數_tb.ForeColor = System.Drawing.Color.Black
101
+        Me.訂單總數_tb.Location = New System.Drawing.Point(533, 330)
102
+        Me.訂單總數_tb.Name = "訂單總數_tb"
103
+        Me.訂單總數_tb.Size = New System.Drawing.Size(90, 23)
104
+        Me.訂單總數_tb.TabIndex = 124
105
+        Me.訂單總數_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
106 106
         '
107 107
         'Label3
108 108
         '
@@ -113,14 +113,14 @@ Partial Class 訂單分析報表四
113 113
         Me.Label3.TabIndex = 123
114 114
         Me.Label3.Text = "訂單總數"
115 115
         '
116
-        'TextBox2
116
+        '資料筆數1_tb
117 117
         '
118
-        Me.TextBox2.ForeColor = System.Drawing.Color.Black
119
-        Me.TextBox2.Location = New System.Drawing.Point(370, 654)
120
-        Me.TextBox2.Name = "TextBox2"
121
-        Me.TextBox2.Size = New System.Drawing.Size(90, 23)
122
-        Me.TextBox2.TabIndex = 126
123
-        Me.TextBox2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
118
+        Me.資料筆數1_tb.ForeColor = System.Drawing.Color.Black
119
+        Me.資料筆數1_tb.Location = New System.Drawing.Point(370, 654)
120
+        Me.資料筆數1_tb.Name = "資料筆數1_tb"
121
+        Me.資料筆數1_tb.Size = New System.Drawing.Size(90, 23)
122
+        Me.資料筆數1_tb.TabIndex = 126
123
+        Me.資料筆數1_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
124 124
         '
125 125
         'Label4
126 126
         '
@@ -131,14 +131,14 @@ Partial Class 訂單分析報表四
131 131
         Me.Label4.TabIndex = 125
132 132
         Me.Label4.Text = "資料筆數"
133 133
         '
134
-        'TextBox3
134
+        '訂單總數1_tb
135 135
         '
136
-        Me.TextBox3.ForeColor = System.Drawing.Color.Black
137
-        Me.TextBox3.Location = New System.Drawing.Point(533, 654)
138
-        Me.TextBox3.Name = "TextBox3"
139
-        Me.TextBox3.Size = New System.Drawing.Size(90, 23)
140
-        Me.TextBox3.TabIndex = 128
141
-        Me.TextBox3.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
136
+        Me.訂單總數1_tb.ForeColor = System.Drawing.Color.Black
137
+        Me.訂單總數1_tb.Location = New System.Drawing.Point(533, 654)
138
+        Me.訂單總數1_tb.Name = "訂單總數1_tb"
139
+        Me.訂單總數1_tb.Size = New System.Drawing.Size(90, 23)
140
+        Me.訂單總數1_tb.TabIndex = 128
141
+        Me.訂單總數1_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
142 142
         '
143 143
         'Label5
144 144
         '
@@ -164,40 +164,40 @@ Partial Class 訂單分析報表四
164 164
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
165 165
         Me.ClientSize = New System.Drawing.Size(1354, 681)
166 166
         Me.Controls.Add(Me.Button1)
167
-        Me.Controls.Add(Me.TextBox3)
167
+        Me.Controls.Add(Me.訂單總數1_tb)
168 168
         Me.Controls.Add(Me.Label5)
169
-        Me.Controls.Add(Me.TextBox2)
169
+        Me.Controls.Add(Me.資料筆數1_tb)
170 170
         Me.Controls.Add(Me.Label4)
171
-        Me.Controls.Add(Me.TextBox1)
171
+        Me.Controls.Add(Me.訂單總數_tb)
172 172
         Me.Controls.Add(Me.Label3)
173
-        Me.Controls.Add(Me.TextBox26)
173
+        Me.Controls.Add(Me.資料筆數_tb)
174 174
         Me.Controls.Add(Me.Label42)
175 175
         Me.Controls.Add(Me.Label2)
176 176
         Me.Controls.Add(Me.Label1)
177
-        Me.Controls.Add(Me.DataGridView2)
178
-        Me.Controls.Add(Me.DataGridView1)
177
+        Me.Controls.Add(Me.已完善訂單_dgv)
178
+        Me.Controls.Add(Me.未完善訂單_dgv)
179 179
         Me.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
180 180
         Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
181 181
         Me.Name = "訂單分析報表四"
182 182
         Me.Text = "Deadline Report"
183
-        CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).EndInit()
184
-        CType(Me.DataGridView2, System.ComponentModel.ISupportInitialize).EndInit()
183
+        CType(Me.未完善訂單_dgv, System.ComponentModel.ISupportInitialize).EndInit()
184
+        CType(Me.已完善訂單_dgv, System.ComponentModel.ISupportInitialize).EndInit()
185 185
         Me.ResumeLayout(False)
186 186
         Me.PerformLayout()
187 187
 
188 188
     End Sub
189 189
 
190
-    Friend WithEvents DataGridView1 As DataGridView
191
-    Friend WithEvents DataGridView2 As DataGridView
190
+    Friend WithEvents 未完善訂單_dgv As DataGridView
191
+    Friend WithEvents 已完善訂單_dgv As DataGridView
192 192
     Friend WithEvents Label1 As Label
193 193
     Friend WithEvents Label2 As Label
194
-    Friend WithEvents TextBox26 As TextBox
194
+    Friend WithEvents 資料筆數_tb As TextBox
195 195
     Friend WithEvents Label42 As Label
196
-    Friend WithEvents TextBox1 As TextBox
196
+    Friend WithEvents 訂單總數_tb As TextBox
197 197
     Friend WithEvents Label3 As Label
198
-    Friend WithEvents TextBox2 As TextBox
198
+    Friend WithEvents 資料筆數1_tb As TextBox
199 199
     Friend WithEvents Label4 As Label
200
-    Friend WithEvents TextBox3 As TextBox
200
+    Friend WithEvents 訂單總數1_tb As TextBox
201 201
     Friend WithEvents Label5 As Label
202 202
     Friend WithEvents Button1 As Button
203 203
 End Class

+ 51
- 51
TENDEN-MES-SYS/彙總報表管理/訂單分析報表四.vb 查看文件

@@ -7,14 +7,14 @@ Public Class 訂單分析報表四
7 7
     Dim ds As New DataSet : Dim ds1 As New DataSet
8 8
     Dim dr As SqlDataReader
9 9
     Private  Sub Set_DGV1載入前設定()
10
-        DataGridView1.DataSource = Nothing : ds.Clear()
11
-        DataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
12
-        DataGridView1.ColumnHeadersHeight = 25
13
-        DataGridView1.AllowUserToAddRows = False
10
+        未完善訂單_dgv.DataSource = Nothing : ds.Clear()
11
+        未完善訂單_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
12
+        未完善訂單_dgv.ColumnHeadersHeight = 25
13
+        未完善訂單_dgv.AllowUserToAddRows = False
14 14
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
15 15
     End Sub
16 16
     Private  Sub Set_DGV1載入後設定()
17
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds) : DataGridView1.DataSource = ds.Tables(0) : conn.Close()
17
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds) : 未完善訂單_dgv.DataSource = ds.Tables(0) : conn.Close()
18 18
     End Sub
19 19
     Private  Sub Set_分析清單1()
20 20
         Set_DGV1載入前設定()
@@ -27,14 +27,14 @@ Public Class 訂單分析報表四
27 27
         Set_DGV1載入後設定()
28 28
     End Sub
29 29
     Private  Sub Set_DGV2載入前設定()
30
-        DataGridView2.DataSource = Nothing : ds1.Clear()
31
-        DataGridView2.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
32
-        DataGridView2.ColumnHeadersHeight = 25
33
-        DataGridView2.AllowUserToAddRows = False
30
+        已完善訂單_dgv.DataSource = Nothing : ds1.Clear()
31
+        已完善訂單_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
32
+        已完善訂單_dgv.ColumnHeadersHeight = 25
33
+        已完善訂單_dgv.AllowUserToAddRows = False
34 34
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
35 35
     End Sub
36 36
     Private  Sub Set_DGV2載入後設定()
37
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds1) : DataGridView2.DataSource = ds1.Tables(0) : conn.Close()
37
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds1) : 已完善訂單_dgv.DataSource = ds1.Tables(0) : conn.Close()
38 38
     End Sub
39 39
     Private  Sub Set_分析清單2()
40 40
         Set_DGV2載入前設定()
@@ -46,78 +46,78 @@ Public Class 訂單分析報表四
46 46
         Set_DGV2載入後設定()
47 47
     End Sub
48 48
     Private  Sub Set_grid()
49
-        DataGridView1.Columns(0).Width = 90 : DataGridView1.Columns(1).Width = 50 : DataGridView1.Columns(2).Width = 110 : DataGridView1.Columns(3).Width = 170 : DataGridView1.Columns(4).Width = 70
50
-        DataGridView1.Columns(5).Width = 50 : DataGridView1.Columns(6).Width = 70 : DataGridView1.Columns(7).Width = 50 : DataGridView1.Columns(8).Width = 85 : DataGridView1.Columns(9).Width = 85
51
-        DataGridView1.Columns(10).Width = 85 : DataGridView1.Columns(11).Width = 85
49
+        未完善訂單_dgv.Columns(0).Width = 90 : 未完善訂單_dgv.Columns(1).Width = 50 : 未完善訂單_dgv.Columns(2).Width = 110 : 未完善訂單_dgv.Columns(3).Width = 170 : 未完善訂單_dgv.Columns(4).Width = 70
50
+        未完善訂單_dgv.Columns(5).Width = 50 : 未完善訂單_dgv.Columns(6).Width = 70 : 未完善訂單_dgv.Columns(7).Width = 50 : 未完善訂單_dgv.Columns(8).Width = 85 : 未完善訂單_dgv.Columns(9).Width = 85
51
+        未完善訂單_dgv.Columns(10).Width = 85 : 未完善訂單_dgv.Columns(11).Width = 85
52 52
         If CC(62) = True Then
53
-            DataGridView1.Columns(12).Width = 85 : DataGridView1.Columns(13).Width = 70
54
-            DataGridView1.Columns(14).Width = 85 : DataGridView1.Columns(15).Width = 70
53
+            未完善訂單_dgv.Columns(12).Width = 85 : 未完善訂單_dgv.Columns(13).Width = 70
54
+            未完善訂單_dgv.Columns(14).Width = 85 : 未完善訂單_dgv.Columns(15).Width = 70
55 55
         Else
56
-            DataGridView1.Columns(12).Visible = False : DataGridView1.Columns(13).Visible = False
57
-            DataGridView1.Columns(14).Width = 170 : DataGridView1.Columns(15).Width = 140
56
+            未完善訂單_dgv.Columns(12).Visible = False : 未完善訂單_dgv.Columns(13).Visible = False
57
+            未完善訂單_dgv.Columns(14).Width = 170 : 未完善訂單_dgv.Columns(15).Width = 140
58 58
         End If
59
-        DataGridView1.Columns(16).Visible = False
59
+        未完善訂單_dgv.Columns(16).Visible = False
60 60
 
61
-        DataGridView2.Columns(0).Width = 90 : DataGridView2.Columns(1).Width = 50 : DataGridView2.Columns(2).Width = 110 : DataGridView2.Columns(3).Width = 170 : DataGridView2.Columns(4).Width = 70
62
-        DataGridView2.Columns(5).Width = 50 : DataGridView2.Columns(6).Width = 70 : DataGridView2.Columns(7).Width = 50 : DataGridView2.Columns(8).Width = 85 : DataGridView2.Columns(9).Width = 85
63
-        DataGridView2.Columns(10).Width = 85 : DataGridView2.Columns(11).Width = 85
61
+        已完善訂單_dgv.Columns(0).Width = 90 : 已完善訂單_dgv.Columns(1).Width = 50 : 已完善訂單_dgv.Columns(2).Width = 110 : 已完善訂單_dgv.Columns(3).Width = 170 : 已完善訂單_dgv.Columns(4).Width = 70
62
+        已完善訂單_dgv.Columns(5).Width = 50 : 已完善訂單_dgv.Columns(6).Width = 70 : 已完善訂單_dgv.Columns(7).Width = 50 : 已完善訂單_dgv.Columns(8).Width = 85 : 已完善訂單_dgv.Columns(9).Width = 85
63
+        已完善訂單_dgv.Columns(10).Width = 85 : 已完善訂單_dgv.Columns(11).Width = 85
64 64
         If CC(62) = True Then
65
-            DataGridView2.Columns(12).Width = 85 : DataGridView2.Columns(13).Width = 70
66
-            DataGridView2.Columns(14).Width = 85 : DataGridView2.Columns(15).Width = 70
65
+            已完善訂單_dgv.Columns(12).Width = 85 : 已完善訂單_dgv.Columns(13).Width = 70
66
+            已完善訂單_dgv.Columns(14).Width = 85 : 已完善訂單_dgv.Columns(15).Width = 70
67 67
         Else
68
-            DataGridView2.Columns(12).Visible = False : DataGridView2.Columns(13).Visible = False
69
-            DataGridView2.Columns(14).Width = 170 : DataGridView2.Columns(15).Width = 140
68
+            已完善訂單_dgv.Columns(12).Visible = False : 已完善訂單_dgv.Columns(13).Visible = False
69
+            已完善訂單_dgv.Columns(14).Width = 170 : 已完善訂單_dgv.Columns(15).Width = 140
70 70
         End If
71
-        DataGridView2.Columns(16).Visible = False
71
+        已完善訂單_dgv.Columns(16).Visible = False
72 72
 
73
-        DataGridView1.Columns(6).DefaultCellStyle.Format = "#,##0"
74
-        DataGridView1.Columns(6).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView1.Columns(6).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
75
-        DataGridView1.Columns(13).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView1.Columns(13).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
76
-        DataGridView1.Columns(15).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView1.Columns(15).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
77
-        DataGridView2.Columns(6).DefaultCellStyle.Format = "#,##0"
78
-        DataGridView2.Columns(6).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView2.Columns(6).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
79
-        DataGridView2.Columns(13).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView2.Columns(13).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
80
-        DataGridView2.Columns(15).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView2.Columns(15).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
73
+        未完善訂單_dgv.Columns(6).DefaultCellStyle.Format = "#,##0"
74
+        未完善訂單_dgv.Columns(6).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 未完善訂單_dgv.Columns(6).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
75
+        未完善訂單_dgv.Columns(13).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 未完善訂單_dgv.Columns(13).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
76
+        未完善訂單_dgv.Columns(15).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 未完善訂單_dgv.Columns(15).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
77
+        已完善訂單_dgv.Columns(6).DefaultCellStyle.Format = "#,##0"
78
+        已完善訂單_dgv.Columns(6).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 已完善訂單_dgv.Columns(6).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
79
+        已完善訂單_dgv.Columns(13).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 已完善訂單_dgv.Columns(13).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
80
+        已完善訂單_dgv.Columns(15).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 已完善訂單_dgv.Columns(15).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
81 81
     End Sub
82 82
     Private  Sub Set_自動加總()
83 83
         Dim 加總(1) As Double
84
-        For i As Integer = 0 To DataGridView1.Rows.Count - 1
85
-            If DataGridView1.RowCount = 0 Then : 加總(0) += 0 : Else : 加總(0) += DataGridView1.Rows(i).Cells("訂單數量").Value : End If
84
+        For i As Integer = 0 To 未完善訂單_dgv.Rows.Count - 1
85
+            If 未完善訂單_dgv.RowCount = 0 Then : 加總(0) += 0 : Else : 加總(0) += 未完善訂單_dgv.Rows(i).Cells("訂單數量").Value : End If
86 86
         Next i
87
-        For i As Integer = 0 To DataGridView2.Rows.Count - 1
88
-            If DataGridView2.RowCount = 0 Then : 加總(1) += 0 : Else : 加總(1) += DataGridView2.Rows(i).Cells("訂單數量").Value : End If
87
+        For i As Integer = 0 To 已完善訂單_dgv.Rows.Count - 1
88
+            If 已完善訂單_dgv.RowCount = 0 Then : 加總(1) += 0 : Else : 加總(1) += 已完善訂單_dgv.Rows(i).Cells("訂單數量").Value : End If
89 89
         Next i
90
-        TextBox1.Text = Format(Val(加總(0)), "#,##0") : TextBox3.Text = Format(Val(加總(1)), "#,##0")
91
-        TextBox26.Text = DataGridView1.Rows.Count
92
-        TextBox2.Text = DataGridView2.Rows.Count
90
+        訂單總數_tb.Text = Format(Val(加總(0)), "#,##0") : 訂單總數1_tb.Text = Format(Val(加總(1)), "#,##0")
91
+        資料筆數_tb.Text = 未完善訂單_dgv.Rows.Count
92
+        資料筆數1_tb.Text = 已完善訂單_dgv.Rows.Count
93 93
     End Sub
94 94
     Private  Sub 訂單分析報表四_Load(sender As Object, e As EventArgs) Handles MyBase.Load
95 95
         Me.MdiParent = TENDEN_MES_SYS : Me.WindowState = 2 : Me.AutoScroll = True
96 96
         Set_分析清單1() : Set_分析清單2() : Set_grid() : Set_自動加總()
97 97
     End Sub
98
-    Private  Sub DataGridView1_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles DataGridView1.RowPostPaint
98
+    Private  Sub DataGridView1_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles 未完善訂單_dgv.RowPostPaint
99 99
         Dim linePen As New Pen(Color.Blue, 2)
100
-        If e.RowIndex = DataGridView1.Rows.Count - 1 Then
100
+        If e.RowIndex = 未完善訂單_dgv.Rows.Count - 1 Then
101 101
             Exit Sub
102 102
         Else
103
-            If DataGridView1(0, e.RowIndex).Value.ToString <> DataGridView1(0, e.RowIndex + 1).Value.ToString Then
104
-                Dim startX As Integer = IIf(DataGridView1.RowHeadersVisible, DataGridView1.RowHeadersWidth, 0)
103
+            If 未完善訂單_dgv(0, e.RowIndex).Value.ToString <> 未完善訂單_dgv(0, e.RowIndex + 1).Value.ToString Then
104
+                Dim startX As Integer = IIf(未完善訂單_dgv.RowHeadersVisible, 未完善訂單_dgv.RowHeadersWidth, 0)
105 105
                 Dim startY As Integer = e.RowBounds.Top + e.RowBounds.Height - 1
106
-                Dim endX As Integer = startX + DataGridView1.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - DataGridView1.HorizontalScrollingOffset
106
+                Dim endX As Integer = startX + 未完善訂單_dgv.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - 未完善訂單_dgv.HorizontalScrollingOffset
107 107
                 e.Graphics.DrawLine(linePen, startX, startY, endX, startY)
108 108
                 Exit Sub
109 109
             End If
110 110
         End If
111 111
     End Sub
112
-    Private  Sub DataGridView2_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles DataGridView2.RowPostPaint
112
+    Private  Sub DataGridView2_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles 已完善訂單_dgv.RowPostPaint
113 113
         Dim linePen As New Pen(Color.Blue, 2)
114
-        If e.RowIndex = DataGridView2.Rows.Count - 1 Then
114
+        If e.RowIndex = 已完善訂單_dgv.Rows.Count - 1 Then
115 115
             Exit Sub
116 116
         Else
117
-            If DataGridView2(0, e.RowIndex).Value.ToString <> DataGridView2(0, e.RowIndex + 1).Value.ToString Then
118
-                Dim startX As Integer = IIf(DataGridView2.RowHeadersVisible, DataGridView2.RowHeadersWidth, 0)
117
+            If 已完善訂單_dgv(0, e.RowIndex).Value.ToString <> 已完善訂單_dgv(0, e.RowIndex + 1).Value.ToString Then
118
+                Dim startX As Integer = IIf(已完善訂單_dgv.RowHeadersVisible, 已完善訂單_dgv.RowHeadersWidth, 0)
119 119
                 Dim startY As Integer = e.RowBounds.Top + e.RowBounds.Height - 1
120
-                Dim endX As Integer = startX + DataGridView2.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - DataGridView2.HorizontalScrollingOffset
120
+                Dim endX As Integer = startX + 已完善訂單_dgv.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - 已完善訂單_dgv.HorizontalScrollingOffset
121 121
                 e.Graphics.DrawLine(linePen, startX, startY, endX, startY)
122 122
                 Exit Sub
123 123
             End If

+ 1
- 1
TENDEN-MES-SYS/樣品訂單管理/中文樣品單.Designer.vb 查看文件

@@ -1421,7 +1421,7 @@ Partial Class 中文樣品單
1421 1421
         '
1422 1422
         Me.ComboBox9.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
1423 1423
         Me.ComboBox9.FormattingEnabled = True
1424
-        Me.ComboBox9.Items.AddRange(New Object() {"", "ILR", "FLR", "SS"})
1424
+        Me.ComboBox9.Items.AddRange(New Object() {"", "ILR", "FLR", "SS", "Proto"})
1425 1425
         Me.ComboBox9.Location = New System.Drawing.Point(59, 112)
1426 1426
         Me.ComboBox9.Name = "ComboBox9"
1427 1427
         Me.ComboBox9.Size = New System.Drawing.Size(155, 24)

+ 15
- 5
TENDEN-MES-SYS/樣品訂單管理/中文樣品單.vb 查看文件

@@ -364,10 +364,12 @@ Public Class 中文樣品單
364 364
     Private  Sub ComboBox8下拉表單資料載入()
365 365
         ComboBox8.Items.Clear()
366 366
         If 開發部門 = False And 確認部門 = True Then
367
+            ComboBox16.Items.Clear() : ComboBox8.Items.Clear()
367 368
             ComboBox8.Items.Add("CFM") : ComboBox16.Items.Add("CFM")
368 369
         ElseIf 開發部門 = True And 確認部門 = False Then
369
-            ComboBox8.Items.Add("ILR") : ComboBox8.Items.Add("FLR") : ComboBox8.Items.Add("SMS") : ComboBox8.Items.Add("SMU")
370
-            ComboBox16.Items.Add("ILR") : ComboBox16.Items.Add("FLR") : ComboBox16.Items.Add("SMS") : ComboBox16.Items.Add("SMU")
370
+            ComboBox16.Items.Clear() : ComboBox8.Items.Clear()
371
+            ComboBox8.Items.Add("ILR") : ComboBox8.Items.Add("FLR") : ComboBox8.Items.Add("SMS") : ComboBox8.Items.Add("SMU") : ComboBox8.Items.Add("Proto")
372
+            ComboBox16.Items.Add("ILR") : ComboBox16.Items.Add("FLR") : ComboBox16.Items.Add("SMS") : ComboBox16.Items.Add("SMU") : ComboBox16.Items.Add("Proto")
371 373
         End If
372 374
     End Sub
373 375
     Private  Sub Set_格式設定()
@@ -714,7 +716,7 @@ Public Class 中文樣品單
714 716
                             Button35.Enabled = False : Button34.Enabled = False : Button38.Enabled = False : Button45.Enabled = False
715 717
                         End If
716 718
                     ElseIf 開發部門 = True And 確認部門 = False Then
717
-                        If QA = "ILR" Or QA = "FLR" Or QA = "SMS" Or QA = "SMU" Then
719
+                        If QA = "ILR" Or QA = "FLR" Or QA = "SMS" Or QA = "SMU" Or QA = "Proto" Then
718 720
                             Button35.Enabled = True : Button34.Enabled = True : Button38.Enabled = True : Button45.Enabled = True
719 721
                         Else
720 722
                             Button35.Enabled = False : Button34.Enabled = False : Button38.Enabled = False : Button45.Enabled = False
@@ -741,11 +743,13 @@ Public Class 中文樣品單
741 743
             ElseIf ComboBox8.Text = "FLR" Then : ComboBox9.Text = "FLR"
742 744
             ElseIf ComboBox8.Text = "SMS" Then : ComboBox9.Text = "SS"
743 745
             ElseIf ComboBox8.Text = "SMU" Or ComboBox8.Text = "SMU" Then : ComboBox9.Text = ""
746
+            ElseIf ComboBox8.Text = "Proto" Then : ComboBox9.Text = "Proto"
744 747
             End If
745 748
             If ComboBox8.Text = "ILR" Or ComboBox8.Text = "FLR" Then : CheckBox8.Checked = True : CheckBox7.Checked = False : CheckBox6.Checked = False
746 749
             ElseIf ComboBox8.Text = "CFM" Then : CheckBox8.Checked = False : CheckBox7.Checked = True : CheckBox6.Checked = False
747 750
             ElseIf ComboBox8.Text = "SMS" Then : CheckBox8.Checked = False : CheckBox7.Checked = False : CheckBox6.Checked = True
748 751
             ElseIf ComboBox8.Text = "SMU" Then : CheckBox8.Checked = False : CheckBox7.Checked = False : CheckBox6.Checked = False
752
+            ElseIf ComboBox8.Text = "Proto" Then : CheckBox8.Checked = False : CheckBox7.Checked = False : CheckBox6.Checked = False
749 753
             End If
750 754
         End If
751 755
     End Sub
@@ -787,11 +791,13 @@ Public Class 中文樣品單
787 791
             ElseIf ComboBox8.Text = "FLR" Then : ComboBox9.Text = "FLR"
788 792
             ElseIf ComboBox8.Text = "SMS" Then : ComboBox9.Text = "SS"
789 793
             ElseIf ComboBox8.Text = "SMU" Or ComboBox8.Text = "SMU" Then : ComboBox9.Text = ""
794
+            ElseIf ComboBox8.Text = "Proto" Then : ComboBox9.Text = "Proto"
790 795
             End If
791 796
             If ComboBox8.Text = "ILR" Or ComboBox8.Text = "FLR" Then : CheckBox8.Checked = True : CheckBox7.Checked = False : CheckBox6.Checked = False
792 797
             ElseIf ComboBox8.Text = "CFM" Then : CheckBox8.Checked = False : CheckBox7.Checked = True : CheckBox6.Checked = False
793 798
             ElseIf ComboBox8.Text = "SMS" Then : CheckBox8.Checked = False : CheckBox7.Checked = False : CheckBox6.Checked = True
794 799
             ElseIf ComboBox8.Text = "SMU" Then : CheckBox8.Checked = False : CheckBox7.Checked = False : CheckBox6.Checked = False
800
+            ElseIf ComboBox8.Text = "Proto" Then : CheckBox8.Checked = False : CheckBox7.Checked = False : CheckBox6.Checked = False
795 801
             End If
796 802
         End If
797 803
     End Sub
@@ -2273,7 +2279,7 @@ Public Class 中文樣品單
2273 2279
                 MsgBox("確認部門不能修改開發部門資料")
2274 2280
             End If
2275 2281
         ElseIf 開發部門 = True And 確認部門 = False Then
2276
-            If QA = "ILR" Or QA = "FLR" Or QA = "SMS" Or QA = "SMU" Then
2282
+            If QA = "ILR" Or QA = "FLR" Or QA = "SMS" Or QA = "SMU" Or QA = "Proto" Then
2277 2283
                 If 暫存模式 = False Then
2278 2284
                     Button24.Enabled = False : Button29.Enabled = False : Button35.Enabled = False : Button54.Enabled = False
2279 2285
                     Button20.Enabled = True : Button21.Enabled = True : Button22.Enabled = True : Button25.Enabled = True : Button37.Enabled = True
@@ -2307,11 +2313,13 @@ Public Class 中文樣品單
2307 2313
         ElseIf ComboBox8.Text = "FLR" Then : ComboBox9.Text = "FLR"
2308 2314
         ElseIf ComboBox8.Text = "SMS" Then : ComboBox9.Text = "SS"
2309 2315
         ElseIf ComboBox8.Text = "SMU" Or ComboBox8.Text = "SMU" Then : ComboBox9.Text = ""
2316
+        ElseIf ComboBox8.Text = "Proto" Then : ComboBox9.Text = "Proto"
2310 2317
         End If
2311 2318
         If ComboBox8.Text = "ILR" Or ComboBox8.Text = "FLR" Then : CheckBox8.Checked = True : CheckBox7.Checked = False : CheckBox6.Checked = False
2312 2319
         ElseIf ComboBox8.Text = "CFM" Then : CheckBox8.Checked = False : CheckBox7.Checked = True : CheckBox6.Checked = False
2313 2320
         ElseIf ComboBox8.Text = "SMS" Then : CheckBox8.Checked = False : CheckBox7.Checked = False : CheckBox6.Checked = True
2314 2321
         ElseIf ComboBox8.Text = "SMU" Then : CheckBox8.Checked = False : CheckBox7.Checked = False : CheckBox6.Checked = False
2322
+        ElseIf ComboBox8.Text = "Proto" Then : CheckBox8.Checked = False : CheckBox7.Checked = False : CheckBox6.Checked = False
2315 2323
         End If
2316 2324
         TextBox2.Focus()
2317 2325
     End Sub
@@ -2404,9 +2412,11 @@ Public Class 中文樣品單
2404 2412
 
2405 2413
         ComboBox16.Items.Clear()
2406 2414
         If 開發部門 = False And 確認部門 = True Then
2415
+            ComboBox16.Items.Clear()
2407 2416
             ComboBox16.Items.Add("CFM")
2408 2417
         ElseIf 開發部門 = True And 確認部門 = False Then
2409
-            ComboBox16.Items.Add("ILR") : ComboBox16.Items.Add("FLR") : ComboBox16.Items.Add("SMS") : ComboBox16.Items.Add("SMU")
2418
+            ComboBox16.Items.Clear()
2419
+            ComboBox16.Items.Add("ILR") : ComboBox16.Items.Add("FLR") : ComboBox16.Items.Add("SMS") : ComboBox16.Items.Add("SMU") : ComboBox16.Items.Add("Proto")
2410 2420
         End If
2411 2421
     End Sub
2412 2422
     Private  Sub Button60_Click(sender As Object, e As EventArgs) Handles Button60.Click

+ 1
- 1
TENDEN-MES-SYS/樣品訂單管理/中文樣品單清單.Designer.vb 查看文件

@@ -132,7 +132,7 @@ Partial Class 中文樣品單清單
132 132
         '
133 133
         Me.ComboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
134 134
         Me.ComboBox1.FormattingEnabled = True
135
-        Me.ComboBox1.Items.AddRange(New Object() {"ILR", "FLR", "SMS", "SMU", "CFM"})
135
+        Me.ComboBox1.Items.AddRange(New Object() {"ILR", "FLR", "SMS", "SMU", "CFM", "Proto"})
136 136
         Me.ComboBox1.Location = New System.Drawing.Point(449, 6)
137 137
         Me.ComboBox1.Name = "ComboBox1"
138 138
         Me.ComboBox1.Size = New System.Drawing.Size(68, 24)

+ 15
- 2
TENDEN-MES-SYS/樣品訂單管理/中文樣品單階段.Designer.vb 查看文件

@@ -27,6 +27,7 @@ Partial Class 中文樣品單階段
27 27
         Me.CheckBox3 = New System.Windows.Forms.CheckBox()
28 28
         Me.CheckBox4 = New System.Windows.Forms.CheckBox()
29 29
         Me.Button11 = New System.Windows.Forms.Button()
30
+        Me.CheckBox5 = New System.Windows.Forms.CheckBox()
30 31
         Me.SuspendLayout()
31 32
         '
32 33
         'CheckBox1
@@ -75,16 +76,27 @@ Partial Class 中文樣品單階段
75 76
         Me.Button11.ForeColor = System.Drawing.Color.Blue
76 77
         Me.Button11.Location = New System.Drawing.Point(12, 38)
77 78
         Me.Button11.Name = "Button11"
78
-        Me.Button11.Size = New System.Drawing.Size(217, 28)
79
+        Me.Button11.Size = New System.Drawing.Size(274, 28)
79 80
         Me.Button11.TabIndex = 388
80 81
         Me.Button11.Text = "確定新增"
81 82
         Me.Button11.UseVisualStyleBackColor = True
82 83
         '
84
+        'CheckBox5
85
+        '
86
+        Me.CheckBox5.AutoSize = True
87
+        Me.CheckBox5.Location = New System.Drawing.Point(235, 12)
88
+        Me.CheckBox5.Name = "CheckBox5"
89
+        Me.CheckBox5.Size = New System.Drawing.Size(58, 20)
90
+        Me.CheckBox5.TabIndex = 389
91
+        Me.CheckBox5.Text = "Proto"
92
+        Me.CheckBox5.UseVisualStyleBackColor = True
93
+        '
83 94
         '中文樣品單階段
84 95
         '
85 96
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
86 97
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
87
-        Me.ClientSize = New System.Drawing.Size(243, 77)
98
+        Me.ClientSize = New System.Drawing.Size(298, 77)
99
+        Me.Controls.Add(Me.CheckBox5)
88 100
         Me.Controls.Add(Me.Button11)
89 101
         Me.Controls.Add(Me.CheckBox4)
90 102
         Me.Controls.Add(Me.CheckBox3)
@@ -105,5 +117,6 @@ Partial Class 中文樣品單階段
105 117
     Friend WithEvents CheckBox3 As CheckBox
106 118
     Friend WithEvents CheckBox4 As CheckBox
107 119
     Friend WithEvents Button11 As Button
120
+    Friend WithEvents CheckBox5 As CheckBox
108 121
 End Class
109 122
 

+ 14
- 6
TENDEN-MES-SYS/樣品訂單管理/中文樣品單階段.vb 查看文件

@@ -4,12 +4,12 @@
4 4
         Button11.Enabled = False
5 5
     End Sub
6 6
     Private  Sub Button11_Click(sender As Object, e As EventArgs) Handles Button11.Click
7
-        CheckBox1.Checked = False : CheckBox2.Checked = False : CheckBox3.Checked = False : CheckBox4.Checked = False
7
+        CheckBox1.Checked = False : CheckBox2.Checked = False : CheckBox3.Checked = False : CheckBox4.Checked = False : CheckBox5.Checked = False
8 8
         Me.Close()
9 9
     End Sub
10 10
     Private  Sub CheckBox1_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox1.Click
11 11
         If CheckBox1.Checked = True Then
12
-            CheckBox1.Checked = True : CheckBox2.Checked = False : CheckBox3.Checked = False : CheckBox4.Checked = False : Button11.Enabled = True
12
+            CheckBox1.Checked = True : CheckBox2.Checked = False : CheckBox3.Checked = False : CheckBox4.Checked = False : CheckBox5.Checked = False : Button11.Enabled = True
13 13
             QA = "ILR"
14 14
         Else
15 15
             CheckBox1.Checked = False : Button11.Enabled = False
@@ -17,7 +17,7 @@
17 17
     End Sub
18 18
     Private  Sub CheckBox2_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox2.Click
19 19
         If CheckBox2.Checked = True Then
20
-            CheckBox1.Checked = False : CheckBox2.Checked = True : CheckBox3.Checked = False : CheckBox4.Checked = False : Button11.Enabled = True
20
+            CheckBox1.Checked = False : CheckBox2.Checked = True : CheckBox3.Checked = False : CheckBox4.Checked = False : CheckBox5.Checked = False : Button11.Enabled = True
21 21
             QA = "FLR"
22 22
         Else
23 23
             CheckBox2.Checked = False : Button11.Enabled = False
@@ -25,18 +25,26 @@
25 25
     End Sub
26 26
     Private  Sub CheckBox3_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox3.Click
27 27
         If CheckBox3.Checked = True Then
28
-            CheckBox1.Checked = False : CheckBox2.Checked = False : CheckBox3.Checked = True : CheckBox4.Checked = False : Button11.Enabled = True
28
+            CheckBox1.Checked = False : CheckBox2.Checked = False : CheckBox3.Checked = True : CheckBox4.Checked = False : CheckBox5.Checked = False : Button11.Enabled = True
29 29
             QA = "SMS"
30 30
         Else
31 31
             CheckBox3.Checked = False : Button11.Enabled = False
32 32
         End If
33 33
     End Sub
34
-    Private  Sub CheckBox4_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox4.Click
34
+    Private Sub CheckBox4_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox4.Click
35 35
         If CheckBox4.Checked = True Then
36
-            CheckBox1.Checked = False : CheckBox2.Checked = False : CheckBox3.Checked = False : CheckBox4.Checked = True : Button11.Enabled = True
36
+            CheckBox1.Checked = False : CheckBox2.Checked = False : CheckBox3.Checked = False : CheckBox4.Checked = True : CheckBox5.Checked = False : Button11.Enabled = True
37 37
             QA = "SMU"
38 38
         Else
39 39
             CheckBox4.Checked = False : Button11.Enabled = False
40 40
         End If
41 41
     End Sub
42
+    Private Sub CheckBox5_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox5.Click
43
+        If CheckBox4.Checked = True Then
44
+            CheckBox1.Checked = False : CheckBox2.Checked = False : CheckBox3.Checked = False : CheckBox4.Checked = False : CheckBox5.Checked = True : Button11.Enabled = True
45
+            QA = "Proto"
46
+        Else
47
+            CheckBox4.Checked = False : Button11.Enabled = False
48
+        End If
49
+    End Sub
42 50
 End Class

+ 15
- 2
TENDEN-MES-SYS/樣品訂單管理/列印_中文樣品單.Designer.vb 查看文件

@@ -39,6 +39,7 @@ Partial Class 列印_中文樣品單
39 39
         Me.PictureBox5 = New System.Windows.Forms.PictureBox()
40 40
         Me.CheckBox2 = New System.Windows.Forms.CheckBox()
41 41
         Me.CheckBox1 = New System.Windows.Forms.CheckBox()
42
+        Me.CheckBox3 = New System.Windows.Forms.CheckBox()
42 43
         CType(Me.PictureBox3, System.ComponentModel.ISupportInitialize).BeginInit()
43 44
         CType(Me.DataGridView3, System.ComponentModel.ISupportInitialize).BeginInit()
44 45
         CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -182,7 +183,7 @@ Partial Class 列印_中文樣品單
182 183
         'CheckBox2
183 184
         '
184 185
         Me.CheckBox2.AutoSize = True
185
-        Me.CheckBox2.Location = New System.Drawing.Point(95, 8)
186
+        Me.CheckBox2.Location = New System.Drawing.Point(87, 8)
186 187
         Me.CheckBox2.Name = "CheckBox2"
187 188
         Me.CheckBox2.Size = New System.Drawing.Size(75, 20)
188 189
         Me.CheckBox2.TabIndex = 393
@@ -192,18 +193,29 @@ Partial Class 列印_中文樣品單
192 193
         'CheckBox1
193 194
         '
194 195
         Me.CheckBox1.AutoSize = True
195
-        Me.CheckBox1.Location = New System.Drawing.Point(14, 8)
196
+        Me.CheckBox1.Location = New System.Drawing.Point(10, 8)
196 197
         Me.CheckBox1.Name = "CheckBox1"
197 198
         Me.CheckBox1.Size = New System.Drawing.Size(75, 20)
198 199
         Me.CheckBox1.TabIndex = 392
199 200
         Me.CheckBox1.Text = "內裏印刷"
200 201
         Me.CheckBox1.UseVisualStyleBackColor = True
201 202
         '
203
+        'CheckBox3
204
+        '
205
+        Me.CheckBox3.AutoSize = True
206
+        Me.CheckBox3.Location = New System.Drawing.Point(166, 8)
207
+        Me.CheckBox3.Name = "CheckBox3"
208
+        Me.CheckBox3.Size = New System.Drawing.Size(87, 20)
209
+        Me.CheckBox3.TabIndex = 394
210
+        Me.CheckBox3.Text = "后套里印刷"
211
+        Me.CheckBox3.UseVisualStyleBackColor = True
212
+        '
202 213
         '列印_中文樣品單
203 214
         '
204 215
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
205 216
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
206 217
         Me.ClientSize = New System.Drawing.Size(252, 100)
218
+        Me.Controls.Add(Me.CheckBox3)
207 219
         Me.Controls.Add(Me.CheckBox2)
208 220
         Me.Controls.Add(Me.CheckBox1)
209 221
         Me.Controls.Add(Me.PictureBox5)
@@ -249,4 +261,5 @@ Partial Class 列印_中文樣品單
249 261
     Friend WithEvents PictureBox5 As PictureBox
250 262
     Friend WithEvents CheckBox2 As CheckBox
251 263
     Friend WithEvents CheckBox1 As CheckBox
264
+    Friend WithEvents CheckBox3 As CheckBox
252 265
 End Class

+ 5
- 2
TENDEN-MES-SYS/樣品訂單管理/列印_中文樣品單.vb 查看文件

@@ -207,8 +207,8 @@ Public Class 列印_中文樣品單
207 207
         xlSheet.Cells(位置8 + 2, 1) = "FINISH : "
208 208
     End Sub
209 209
     Private Sub Button11_Click(sender As Object, e As EventArgs) Handles Button11.Click
210
-        If CheckBox1.Checked = False And CheckBox2.Checked = False Then
211
-            MsgBox("請選擇內印刷或是大底印刷最少要選擇一個")
210
+        If CheckBox1.Checked = False And CheckBox2.Checked = False And CheckBox3.Checked = False Then
211
+            MsgBox("請選擇上面的選項,最少要選擇一個!!")
212 212
         Else
213 213
             If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
214 214
             If CheckBox1.Checked = True Then
@@ -217,6 +217,9 @@ Public Class 列印_中文樣品單
217 217
             ElseIf CheckBox2.Checked = True Then
218 218
                 SQL1 = "UPDATE 確認樣品單抬頭 SET 貼標印刷分類 = N'大底貼標:' " &
219 219
                        "WHERE (樣品流水號 = '" & DataGridView1.Rows(0).Cells("樣品流水號").Value & "')"
220
+            ElseIf CheckBox3.Checked = True Then
221
+                SQL1 = "UPDATE 確認樣品單抬頭 SET 貼標印刷分類 = N'后套里印刷:' " &
222
+                       "WHERE (樣品流水號 = '" & DataGridView1.Rows(0).Cells("樣品流水號").Value & "')"
220 223
             End If
221 224
             cmd.CommandText = SQL1 : cmd.ExecuteNonQuery() : conn.Close()
222 225
             Set_訂單清單1()

+ 78
- 78
TENDEN-MES-SYS/資料庫系統管理/FTP資料夾管理.Designer.vb 查看文件

@@ -23,77 +23,77 @@ Partial Class FTP資料夾管理
23 23
     <System.Diagnostics.DebuggerStepThrough()>
24 24
     Private  Sub InitializeComponent()
25 25
         Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
26
-        Me.Button3 = New System.Windows.Forms.Button()
27
-        Me.Button2 = New System.Windows.Forms.Button()
28
-        Me.Button1 = New System.Windows.Forms.Button()
29
-        Me.TextBox3 = New System.Windows.Forms.TextBox()
30
-        Me.TextBox2 = New System.Windows.Forms.TextBox()
31
-        Me.TextBox1 = New System.Windows.Forms.TextBox()
32
-        Me.DataGridView1 = New System.Windows.Forms.DataGridView()
26
+        Me.刪除_bt = New System.Windows.Forms.Button()
27
+        Me.修改_bt = New System.Windows.Forms.Button()
28
+        Me.新增_bt = New System.Windows.Forms.Button()
29
+        Me.備註_tb = New System.Windows.Forms.TextBox()
30
+        Me.指定頁面_tb = New System.Windows.Forms.TextBox()
31
+        Me.資料夾名稱_tb = New System.Windows.Forms.TextBox()
32
+        Me.使用者清單_dgv = New System.Windows.Forms.DataGridView()
33 33
         Me.Label12 = New System.Windows.Forms.Label()
34
-        Me.WebBrowser1 = New System.Windows.Forms.WebBrowser()
35
-        CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).BeginInit()
34
+        Me.伺服器FTP文件夾_wb = New System.Windows.Forms.WebBrowser()
35
+        CType(Me.使用者清單_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
36 36
         Me.SuspendLayout()
37 37
         '
38
-        'Button3
38
+        '刪除_bt
39 39
         '
40
-        Me.Button3.Location = New System.Drawing.Point(678, 8)
41
-        Me.Button3.Name = "Button3"
42
-        Me.Button3.Size = New System.Drawing.Size(75, 23)
43
-        Me.Button3.TabIndex = 603
44
-        Me.Button3.Text = "刪除"
45
-        Me.Button3.UseVisualStyleBackColor = True
40
+        Me.刪除_bt.Location = New System.Drawing.Point(678, 8)
41
+        Me.刪除_bt.Name = "刪除_bt"
42
+        Me.刪除_bt.Size = New System.Drawing.Size(75, 23)
43
+        Me.刪除_bt.TabIndex = 603
44
+        Me.刪除_bt.Text = "刪除"
45
+        Me.刪除_bt.UseVisualStyleBackColor = True
46 46
         '
47
-        'Button2
47
+        '修改_bt
48 48
         '
49
-        Me.Button2.Location = New System.Drawing.Point(597, 8)
50
-        Me.Button2.Name = "Button2"
51
-        Me.Button2.Size = New System.Drawing.Size(75, 23)
52
-        Me.Button2.TabIndex = 602
53
-        Me.Button2.Text = "修改"
54
-        Me.Button2.UseVisualStyleBackColor = True
49
+        Me.修改_bt.Location = New System.Drawing.Point(597, 8)
50
+        Me.修改_bt.Name = "修改_bt"
51
+        Me.修改_bt.Size = New System.Drawing.Size(75, 23)
52
+        Me.修改_bt.TabIndex = 602
53
+        Me.修改_bt.Text = "修改"
54
+        Me.修改_bt.UseVisualStyleBackColor = True
55 55
         '
56
-        'Button1
56
+        '新增_bt
57 57
         '
58
-        Me.Button1.Location = New System.Drawing.Point(516, 8)
59
-        Me.Button1.Name = "Button1"
60
-        Me.Button1.Size = New System.Drawing.Size(75, 23)
61
-        Me.Button1.TabIndex = 601
62
-        Me.Button1.Text = "新增"
63
-        Me.Button1.UseVisualStyleBackColor = True
58
+        Me.新增_bt.Location = New System.Drawing.Point(516, 8)
59
+        Me.新增_bt.Name = "新增_bt"
60
+        Me.新增_bt.Size = New System.Drawing.Size(75, 23)
61
+        Me.新增_bt.TabIndex = 601
62
+        Me.新增_bt.Text = "新增"
63
+        Me.新增_bt.UseVisualStyleBackColor = True
64 64
         '
65
-        'TextBox3
65
+        '備註_tb
66 66
         '
67
-        Me.TextBox3.Location = New System.Drawing.Point(307, 8)
68
-        Me.TextBox3.Name = "TextBox3"
69
-        Me.TextBox3.Size = New System.Drawing.Size(200, 23)
70
-        Me.TextBox3.TabIndex = 600
67
+        Me.備註_tb.Location = New System.Drawing.Point(307, 8)
68
+        Me.備註_tb.Name = "備註_tb"
69
+        Me.備註_tb.Size = New System.Drawing.Size(200, 23)
70
+        Me.備註_tb.TabIndex = 600
71 71
         '
72
-        'TextBox2
72
+        '指定頁面_tb
73 73
         '
74
-        Me.TextBox2.Location = New System.Drawing.Point(101, 8)
75
-        Me.TextBox2.Name = "TextBox2"
76
-        Me.TextBox2.Size = New System.Drawing.Size(200, 23)
77
-        Me.TextBox2.TabIndex = 599
74
+        Me.指定頁面_tb.Location = New System.Drawing.Point(101, 8)
75
+        Me.指定頁面_tb.Name = "指定頁面_tb"
76
+        Me.指定頁面_tb.Size = New System.Drawing.Size(200, 23)
77
+        Me.指定頁面_tb.TabIndex = 599
78 78
         '
79
-        'TextBox1
79
+        '資料夾名稱_tb
80 80
         '
81
-        Me.TextBox1.Location = New System.Drawing.Point(25, 8)
82
-        Me.TextBox1.Name = "TextBox1"
83
-        Me.TextBox1.Size = New System.Drawing.Size(70, 23)
84
-        Me.TextBox1.TabIndex = 598
81
+        Me.資料夾名稱_tb.Location = New System.Drawing.Point(25, 8)
82
+        Me.資料夾名稱_tb.Name = "資料夾名稱_tb"
83
+        Me.資料夾名稱_tb.Size = New System.Drawing.Size(70, 23)
84
+        Me.資料夾名稱_tb.TabIndex = 598
85 85
         '
86
-        'DataGridView1
86
+        '使用者清單_dgv
87 87
         '
88 88
         DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
89
-        Me.DataGridView1.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
90
-        Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
91
-        Me.DataGridView1.Location = New System.Drawing.Point(12, 37)
92
-        Me.DataGridView1.Name = "DataGridView1"
93
-        Me.DataGridView1.RowHeadersWidth = 5
94
-        Me.DataGridView1.RowTemplate.Height = 24
95
-        Me.DataGridView1.Size = New System.Drawing.Size(495, 945)
96
-        Me.DataGridView1.TabIndex = 597
89
+        Me.使用者清單_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
90
+        Me.使用者清單_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
91
+        Me.使用者清單_dgv.Location = New System.Drawing.Point(12, 37)
92
+        Me.使用者清單_dgv.Name = "使用者清單_dgv"
93
+        Me.使用者清單_dgv.RowHeadersWidth = 5
94
+        Me.使用者清單_dgv.RowTemplate.Height = 24
95
+        Me.使用者清單_dgv.Size = New System.Drawing.Size(495, 945)
96
+        Me.使用者清單_dgv.TabIndex = 597
97 97
         '
98 98
         'Label12
99 99
         '
@@ -105,47 +105,47 @@ Partial Class FTP資料夾管理
105 105
         Me.Label12.TabIndex = 596
106 106
         Me.Label12.Text = "伺服器FTP文件夾"
107 107
         '
108
-        'WebBrowser1
108
+        '伺服器FTP文件夾_wb
109 109
         '
110
-        Me.WebBrowser1.Location = New System.Drawing.Point(517, 37)
111
-        Me.WebBrowser1.MinimumSize = New System.Drawing.Size(20, 20)
112
-        Me.WebBrowser1.Name = "WebBrowser1"
113
-        Me.WebBrowser1.Size = New System.Drawing.Size(1386, 945)
114
-        Me.WebBrowser1.TabIndex = 595
115
-        Me.WebBrowser1.Url = New System.Uri("", System.UriKind.Relative)
110
+        Me.伺服器FTP文件夾_wb.Location = New System.Drawing.Point(517, 37)
111
+        Me.伺服器FTP文件夾_wb.MinimumSize = New System.Drawing.Size(20, 20)
112
+        Me.伺服器FTP文件夾_wb.Name = "伺服器FTP文件夾_wb"
113
+        Me.伺服器FTP文件夾_wb.Size = New System.Drawing.Size(1386, 945)
114
+        Me.伺服器FTP文件夾_wb.TabIndex = 595
115
+        Me.伺服器FTP文件夾_wb.Url = New System.Uri("", System.UriKind.Relative)
116 116
         '
117 117
         'FTP資料夾管理
118 118
         '
119 119
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
120 120
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
121 121
         Me.ClientSize = New System.Drawing.Size(1914, 991)
122
-        Me.Controls.Add(Me.Button3)
123
-        Me.Controls.Add(Me.Button2)
124
-        Me.Controls.Add(Me.Button1)
125
-        Me.Controls.Add(Me.TextBox3)
126
-        Me.Controls.Add(Me.TextBox2)
127
-        Me.Controls.Add(Me.TextBox1)
128
-        Me.Controls.Add(Me.DataGridView1)
122
+        Me.Controls.Add(Me.刪除_bt)
123
+        Me.Controls.Add(Me.修改_bt)
124
+        Me.Controls.Add(Me.新增_bt)
125
+        Me.Controls.Add(Me.備註_tb)
126
+        Me.Controls.Add(Me.指定頁面_tb)
127
+        Me.Controls.Add(Me.資料夾名稱_tb)
128
+        Me.Controls.Add(Me.使用者清單_dgv)
129 129
         Me.Controls.Add(Me.Label12)
130
-        Me.Controls.Add(Me.WebBrowser1)
130
+        Me.Controls.Add(Me.伺服器FTP文件夾_wb)
131 131
         Me.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
132 132
         Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
133 133
         Me.Name = "FTP資料夾管理"
134 134
         Me.Text = "FTP資料夾管理"
135
-        CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).EndInit()
135
+        CType(Me.使用者清單_dgv, System.ComponentModel.ISupportInitialize).EndInit()
136 136
         Me.ResumeLayout(False)
137 137
         Me.PerformLayout()
138 138
 
139 139
     End Sub
140 140
 
141
-    Friend WithEvents Button3 As Button
142
-    Friend WithEvents Button2 As Button
143
-    Friend WithEvents Button1 As Button
144
-    Friend WithEvents TextBox3 As TextBox
145
-    Friend WithEvents TextBox2 As TextBox
146
-    Friend WithEvents TextBox1 As TextBox
147
-    Friend WithEvents DataGridView1 As DataGridView
141
+    Friend WithEvents 刪除_bt As Button
142
+    Friend WithEvents 修改_bt As Button
143
+    Friend WithEvents 新增_bt As Button
144
+    Friend WithEvents 備註_tb As TextBox
145
+    Friend WithEvents 指定頁面_tb As TextBox
146
+    Friend WithEvents 資料夾名稱_tb As TextBox
147
+    Friend WithEvents 使用者清單_dgv As DataGridView
148 148
     Friend WithEvents Label12 As Label
149
-    Friend WithEvents WebBrowser1 As WebBrowser
149
+    Friend WithEvents 伺服器FTP文件夾_wb As WebBrowser
150 150
 End Class
151 151
 

+ 20
- 19
TENDEN-MES-SYS/資料庫系統管理/FTP資料夾管理.vb 查看文件

@@ -6,44 +6,46 @@ Public Class FTP資料夾管理
6 6
     Dim cmd As New SqlCommand
7 7
     Dim ds As New DataSet
8 8
     Dim dr As SqlDataReader
9
-    Private  Sub Set_使用者清單()
10
-        DataGridView1.DataSource = Nothing : ds.Clear()
11
-        DataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
12
-        DataGridView1.ColumnHeadersHeight = 25
13
-        DataGridView1.AllowUserToAddRows = False
9
+    Private Sub Set_使用者清單()
10
+        使用者清單_dgv.DataSource = Nothing : ds.Clear()
11
+        使用者清單_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
12
+        使用者清單_dgv.ColumnHeadersHeight = 25
13
+        使用者清單_dgv.AllowUserToAddRows = False
14 14
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
15 15
         SQL1 = "SELECT 資料夾名稱, 指定頁面, 備註 FROM FTP資料夾管理"
16
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds) : DataGridView1.DataSource = ds.Tables(0) : conn.Close() : Set_grid()
16
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds)
17
+        使用者清單_dgv.DataSource = ds.Tables(0) : conn.Close() : Set_grid()
17 18
     End Sub
18
-    Private  Sub Set_grid()
19
-        DataGridView1.Columns(0).Width = 70 : DataGridView1.Columns(1).Width = 200 : DataGridView1.Columns(2).Width = 200
19
+    Private Sub Set_grid()
20
+        使用者清單_dgv.Columns(0).Width = 70 : 使用者清單_dgv.Columns(1).Width = 200 : 使用者清單_dgv.Columns(2).Width = 200
20 21
     End Sub
21
-    Private  Sub FTP資料夾管理_Load(sender As Object, e As EventArgs) Handles MyBase.Load
22
+    Private Sub FTP資料夾管理_Load(sender As Object, e As EventArgs) Handles MyBase.Load
22 23
         Me.MdiParent = TENDEN_MES_SYS : Me.WindowState = 2 : Me.AutoScroll = True
23 24
         Target1 = Target
24
-        WebBrowser1.Url = New Uri(Target1)
25
+        伺服器FTP文件夾_wb.Url = New Uri(Target1)
25 26
         Set_使用者清單()
26 27
     End Sub
27
-    Private  Sub DataGridView1_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles DataGridView1.CellClick
28
-        TextBox1.Text = DataGridView1(0, e.RowIndex).Value.ToString : TextBox2.Text = DataGridView1(1, e.RowIndex).Value.ToString : TextBox3.Text = DataGridView1(2, e.RowIndex).Value.ToString
28
+    Private Sub DataGridView1_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 使用者清單_dgv.CellClick
29
+        資料夾名稱_tb.Text = 使用者清單_dgv(0, e.RowIndex).Value.ToString : 指定頁面_tb.Text = 使用者清單_dgv(1, e.RowIndex).Value.ToString
30
+        備註_tb.Text = 使用者清單_dgv(2, e.RowIndex).Value.ToString
29 31
     End Sub
30
-    Private  Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
32
+    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles 新增_bt.Click
31 33
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
32 34
         SQL1 = "INSERT INTO FTP資料夾管理 (資料夾名稱, 指定頁面, 備註) " &
33
-               "VALUES (N'" & TextBox1.Text & "',N'" & TextBox2.Text & "',N'" & TextBox3.Text & "')"
35
+               "VALUES (N'" & 資料夾名稱_tb.Text & "',N'" & 指定頁面_tb.Text & "',N'" & 備註_tb.Text & "')"
34 36
         cmd.Connection = conn : cmd.CommandText = SQL1 : cmd.ExecuteNonQuery()
35 37
         conn.Close()
36 38
         Set_使用者清單()
37 39
     End Sub
38
-    Private  Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
40
+    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles 修改_bt.Click
39 41
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
40
-        SQL1 = "UPDATE FTP資料夾管理 SET 指定頁面 = N'" & TextBox2.Text & "', 備註 = N'" & TextBox3.Text & "' WHERE (資料夾名稱 = N'" & TextBox1.Text & "')"
42
+        SQL1 = "UPDATE FTP資料夾管理 SET 指定頁面 = N'" & 指定頁面_tb.Text & "', 備註 = N'" & 備註_tb.Text & "' WHERE (資料夾名稱 = N'" & 資料夾名稱_tb.Text & "')"
41 43
         cmd.Connection = conn : cmd.CommandText = SQL1 : cmd.ExecuteNonQuery()
42 44
         conn.Close()
43 45
         Set_使用者清單()
44 46
     End Sub
45
-    Private  Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
46
-        SQL1 = "DELETE FROM FTP資料夾管理 WHERE (資料夾名稱 = N'" & TextBox1.Text & "')"
47
+    Private Sub Button3_Click(sender As Object, e As EventArgs) Handles 刪除_bt.Click
48
+        SQL1 = "DELETE FROM FTP資料夾管理 WHERE (資料夾名稱 = N'" & 資料夾名稱_tb.Text & "')"
47 49
         cmd.CommandText = SQL1 : cmd.Connection = conn
48 50
         If conn.State = ConnectionState.Closed Then : conn.Open() : End If
49 51
         Dim aa As MsgBoxResult
@@ -52,5 +54,4 @@ Public Class FTP資料夾管理
52 54
         conn.Close()
53 55
         Set_使用者清單()
54 56
     End Sub
55
-
56 57
 End Class

+ 52
- 52
TENDEN-MES-SYS/資料庫系統管理/人員ID卡系統配置設定.Designer.vb 查看文件

@@ -22,36 +22,36 @@ Partial Class 人員ID卡系統配置設定
22 22
     '請勿使用程式碼編輯器進行修改。
23 23
     <System.Diagnostics.DebuggerStepThrough()> _
24 24
     Private  Sub InitializeComponent()
25
-        Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
26
-        Me.Button1 = New System.Windows.Forms.Button()
27
-        Me.TextBox3 = New System.Windows.Forms.TextBox()
25
+        Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
26
+        Me.卡片配對_bt = New System.Windows.Forms.Button()
27
+        Me.ID卡號_tb = New System.Windows.Forms.TextBox()
28 28
         Me.Label4 = New System.Windows.Forms.Label()
29
-        Me.TextBox2 = New System.Windows.Forms.TextBox()
29
+        Me.帳號_tb = New System.Windows.Forms.TextBox()
30 30
         Me.Label1 = New System.Windows.Forms.Label()
31
-        Me.TextBox1 = New System.Windows.Forms.TextBox()
31
+        Me.姓名_tb = New System.Windows.Forms.TextBox()
32 32
         Me.Label3 = New System.Windows.Forms.Label()
33 33
         Me.Label2 = New System.Windows.Forms.Label()
34
-        Me.DataGridView2 = New System.Windows.Forms.DataGridView()
35
-        CType(Me.DataGridView2, System.ComponentModel.ISupportInitialize).BeginInit()
34
+        Me.人事資料表清單_dgv = New System.Windows.Forms.DataGridView()
35
+        CType(Me.人事資料表清單_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
36 36
         Me.SuspendLayout()
37 37
         '
38
-        'Button1
38
+        '卡片配對_bt
39 39
         '
40
-        Me.Button1.Font = New System.Drawing.Font("微軟正黑體", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
41
-        Me.Button1.Location = New System.Drawing.Point(501, 126)
42
-        Me.Button1.Name = "Button1"
43
-        Me.Button1.Size = New System.Drawing.Size(233, 128)
44
-        Me.Button1.TabIndex = 726
45
-        Me.Button1.Text = "卡片配對"
46
-        Me.Button1.UseVisualStyleBackColor = True
40
+        Me.卡片配對_bt.Font = New System.Drawing.Font("微軟正黑體", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
41
+        Me.卡片配對_bt.Location = New System.Drawing.Point(501, 126)
42
+        Me.卡片配對_bt.Name = "卡片配對_bt"
43
+        Me.卡片配對_bt.Size = New System.Drawing.Size(233, 128)
44
+        Me.卡片配對_bt.TabIndex = 726
45
+        Me.卡片配對_bt.Text = "卡片配對"
46
+        Me.卡片配對_bt.UseVisualStyleBackColor = True
47 47
         '
48
-        'TextBox3
48
+        'ID卡號_tb
49 49
         '
50
-        Me.TextBox3.ImeMode = System.Windows.Forms.ImeMode.Disable
51
-        Me.TextBox3.Location = New System.Drawing.Point(548, 97)
52
-        Me.TextBox3.Name = "TextBox3"
53
-        Me.TextBox3.Size = New System.Drawing.Size(186, 23)
54
-        Me.TextBox3.TabIndex = 725
50
+        Me.ID卡號_tb.ImeMode = System.Windows.Forms.ImeMode.Disable
51
+        Me.ID卡號_tb.Location = New System.Drawing.Point(548, 97)
52
+        Me.ID卡號_tb.Name = "ID卡號_tb"
53
+        Me.ID卡號_tb.Size = New System.Drawing.Size(186, 23)
54
+        Me.ID卡號_tb.TabIndex = 725
55 55
         '
56 56
         'Label4
57 57
         '
@@ -62,12 +62,12 @@ Partial Class 人員ID卡系統配置設定
62 62
         Me.Label4.TabIndex = 724
63 63
         Me.Label4.Text = "ID卡號"
64 64
         '
65
-        'TextBox2
65
+        '帳號_tb
66 66
         '
67
-        Me.TextBox2.Location = New System.Drawing.Point(548, 68)
68
-        Me.TextBox2.Name = "TextBox2"
69
-        Me.TextBox2.Size = New System.Drawing.Size(186, 23)
70
-        Me.TextBox2.TabIndex = 723
67
+        Me.帳號_tb.Location = New System.Drawing.Point(548, 68)
68
+        Me.帳號_tb.Name = "帳號_tb"
69
+        Me.帳號_tb.Size = New System.Drawing.Size(186, 23)
70
+        Me.帳號_tb.TabIndex = 723
71 71
         '
72 72
         'Label1
73 73
         '
@@ -78,12 +78,12 @@ Partial Class 人員ID卡系統配置設定
78 78
         Me.Label1.TabIndex = 722
79 79
         Me.Label1.Text = "帳號"
80 80
         '
81
-        'TextBox1
81
+        '姓名_tb
82 82
         '
83
-        Me.TextBox1.Location = New System.Drawing.Point(548, 39)
84
-        Me.TextBox1.Name = "TextBox1"
85
-        Me.TextBox1.Size = New System.Drawing.Size(186, 23)
86
-        Me.TextBox1.TabIndex = 721
83
+        Me.姓名_tb.Location = New System.Drawing.Point(548, 39)
84
+        Me.姓名_tb.Name = "姓名_tb"
85
+        Me.姓名_tb.Size = New System.Drawing.Size(186, 23)
86
+        Me.姓名_tb.TabIndex = 721
87 87
         '
88 88
         'Label3
89 89
         '
@@ -104,49 +104,49 @@ Partial Class 人員ID卡系統配置設定
104 104
         Me.Label2.TabIndex = 719
105 105
         Me.Label2.Text = "人事資料表清單"
106 106
         '
107
-        'DataGridView2
107
+        '人事資料表清單_dgv
108 108
         '
109
-        DataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
110
-        Me.DataGridView2.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2
111
-        Me.DataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
112
-        Me.DataGridView2.Location = New System.Drawing.Point(17, 42)
113
-        Me.DataGridView2.Name = "DataGridView2"
114
-        Me.DataGridView2.RowHeadersWidth = 5
115
-        Me.DataGridView2.RowTemplate.Height = 24
116
-        Me.DataGridView2.Size = New System.Drawing.Size(475, 934)
117
-        Me.DataGridView2.TabIndex = 718
109
+        DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
110
+        Me.人事資料表清單_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
111
+        Me.人事資料表清單_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
112
+        Me.人事資料表清單_dgv.Location = New System.Drawing.Point(17, 42)
113
+        Me.人事資料表清單_dgv.Name = "人事資料表清單_dgv"
114
+        Me.人事資料表清單_dgv.RowHeadersWidth = 5
115
+        Me.人事資料表清單_dgv.RowTemplate.Height = 24
116
+        Me.人事資料表清單_dgv.Size = New System.Drawing.Size(475, 934)
117
+        Me.人事資料表清單_dgv.TabIndex = 718
118 118
         '
119 119
         '人員ID卡系統配置設定
120 120
         '
121 121
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
122 122
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
123 123
         Me.ClientSize = New System.Drawing.Size(1914, 991)
124
-        Me.Controls.Add(Me.Button1)
125
-        Me.Controls.Add(Me.TextBox3)
124
+        Me.Controls.Add(Me.卡片配對_bt)
125
+        Me.Controls.Add(Me.ID卡號_tb)
126 126
         Me.Controls.Add(Me.Label4)
127
-        Me.Controls.Add(Me.TextBox2)
127
+        Me.Controls.Add(Me.帳號_tb)
128 128
         Me.Controls.Add(Me.Label1)
129
-        Me.Controls.Add(Me.TextBox1)
129
+        Me.Controls.Add(Me.姓名_tb)
130 130
         Me.Controls.Add(Me.Label3)
131 131
         Me.Controls.Add(Me.Label2)
132
-        Me.Controls.Add(Me.DataGridView2)
132
+        Me.Controls.Add(Me.人事資料表清單_dgv)
133 133
         Me.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
134 134
         Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
135 135
         Me.Name = "人員ID卡系統配置設定"
136 136
         Me.Text = "人員ID卡系統配置設定"
137
-        CType(Me.DataGridView2, System.ComponentModel.ISupportInitialize).EndInit()
137
+        CType(Me.人事資料表清單_dgv, System.ComponentModel.ISupportInitialize).EndInit()
138 138
         Me.ResumeLayout(False)
139 139
         Me.PerformLayout()
140 140
 
141 141
     End Sub
142 142
 
143
-    Friend WithEvents Button1 As Button
144
-    Friend WithEvents TextBox3 As TextBox
143
+    Friend WithEvents 卡片配對_bt As Button
144
+    Friend WithEvents ID卡號_tb As TextBox
145 145
     Friend WithEvents Label4 As Label
146
-    Friend WithEvents TextBox2 As TextBox
146
+    Friend WithEvents 帳號_tb As TextBox
147 147
     Friend WithEvents Label1 As Label
148
-    Friend WithEvents TextBox1 As TextBox
148
+    Friend WithEvents 姓名_tb As TextBox
149 149
     Friend WithEvents Label3 As Label
150 150
     Friend WithEvents Label2 As Label
151
-    Friend WithEvents DataGridView2 As DataGridView
151
+    Friend WithEvents 人事資料表清單_dgv As DataGridView
152 152
 End Class

+ 16
- 16
TENDEN-MES-SYS/資料庫系統管理/人員ID卡系統配置設定.vb 查看文件

@@ -8,37 +8,37 @@ Public Class 人員ID卡系統配置設定
8 8
     Dim dr As SqlDataReader
9 9
     Dim 編號 As String
10 10
     Private  Sub Set_人員清單()
11
-        DataGridView2.DataSource = Nothing : ds1.Clear()
12
-        DataGridView2.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
13
-        DataGridView2.ColumnHeadersHeight = 25
14
-        DataGridView2.AllowUserToAddRows = False
11
+        人事資料表清單_dgv.DataSource = Nothing : ds1.Clear()
12
+        人事資料表清單_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
13
+        人事資料表清單_dgv.ColumnHeadersHeight = 25
14
+        人事資料表清單_dgv.AllowUserToAddRows = False
15 15
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
16 16
         SQL1 = "SELECT 姓名, 帳號, ID卡號 FROM 使用者 ORDER BY 姓名"
17
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds1) : DataGridView2.DataSource = ds1.Tables(0) : conn.Close() : Set_grid1()
17
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds1) : 人事資料表清單_dgv.DataSource = ds1.Tables(0) : conn.Close() : Set_grid1()
18 18
     End Sub
19 19
     Private  Sub Set_grid1()
20
-        DataGridView2.Columns(0).Width = 150 : DataGridView2.Columns(1).Width = 150 : DataGridView2.Columns(2).Width = 150
20
+        人事資料表清單_dgv.Columns(0).Width = 150 : 人事資料表清單_dgv.Columns(1).Width = 150 : 人事資料表清單_dgv.Columns(2).Width = 150
21 21
     End Sub
22 22
     Private  Sub 人員ID卡系統配置設定_Load(sender As Object, e As EventArgs) Handles MyBase.Load
23 23
         Me.MdiParent = TENDEN_MES_SYS : Me.WindowState = 2 : Me.AutoScroll = True
24
-        Set_人員清單() : TextBox1.Enabled = False : TextBox2.Enabled = False
25
-        TextBox3.Focus()
24
+        Set_人員清單() : 姓名_tb.Enabled = False : 帳號_tb.Enabled = False
25
+        ID卡號_tb.Focus()
26 26
     End Sub
27
-    Private  Sub DataGridView2_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles DataGridView2.CellClick
27
+    Private  Sub DataGridView2_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles 人事資料表清單_dgv.CellClick
28 28
         If e.RowIndex = -1 Then : Else
29
-            TextBox1.Text = DataGridView2(0, e.RowIndex).Value.ToString : TextBox2.Text = DataGridView2(1, e.RowIndex).Value.ToString
30
-            TextBox3.Focus()
29
+            姓名_tb.Text = 人事資料表清單_dgv(0, e.RowIndex).Value.ToString : 帳號_tb.Text = 人事資料表清單_dgv(1, e.RowIndex).Value.ToString
30
+            ID卡號_tb.Focus()
31 31
         End If
32 32
     End Sub
33
-    Private  Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
34
-        If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox3.Text = "" Then
33
+    Private  Sub Button1_Click(sender As Object, e As EventArgs) Handles 卡片配對_bt.Click
34
+        If 姓名_tb.Text = "" Or 帳號_tb.Text = "" Or ID卡號_tb.Text = "" Then
35 35
             MsgBox("輸入資料有誤")
36 36
         Else
37 37
             If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
38
-            SQL1 = "UPDATE 使用者 SET ID卡號 = N'" & TextBox3.Text & "' WHERE (帳號 = N'" & TextBox2.Text & "') AND (姓名 = N'" & TextBox1.Text & "')"
38
+            SQL1 = "UPDATE 使用者 SET ID卡號 = N'" & ID卡號_tb.Text & "' WHERE (帳號 = N'" & 帳號_tb.Text & "') AND (姓名 = N'" & 姓名_tb.Text & "')"
39 39
             cmd.CommandText = SQL1 : cmd.ExecuteNonQuery() : conn.Close() : conn.Close()
40
-            MsgBox("卡片與系統帳號配對完成") : TextBox3.Text = ""
40
+            MsgBox("卡片與系統帳號配對完成") : ID卡號_tb.Text = ""
41 41
         End If
42
-        Set_人員清單() : TextBox3.Focus()
42
+        Set_人員清單() : ID卡號_tb.Focus()
43 43
     End Sub
44 44
 End Class

+ 477
- 95
TENDEN-MES-SYS/量產訂單管理/訂單列印選擇.Designer.vb
文件差異過大導致無法顯示
查看文件


+ 3
- 0
TENDEN-MES-SYS/量產訂單管理/訂單列印選擇.resx 查看文件

@@ -117,4 +117,7 @@
117 117
   <resheader name="writer">
118 118
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119 119
   </resheader>
120
+  <metadata name="SaveFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
121
+    <value>17, 17</value>
122
+  </metadata>
120 123
 </root>

+ 526
- 150
TENDEN-MES-SYS/量產訂單管理/訂單列印選擇.vb 查看文件

@@ -9,34 +9,36 @@ Imports Microsoft.Office.Interop.Excel.XlThemeFont
9 9
 Imports Microsoft.Office.Interop.Excel.XlThemeColor
10 10
 Imports Microsoft.Office.Interop.Excel.XlWindowState
11 11
 Public Class 訂單列印選擇
12
-    Dim conn As New SqlConnection
13
-    Dim da As New SqlDataAdapter
14
-    Dim cmd As New SqlCommand
15
-    Dim ds As New DataSet
16
-    Dim dr As SqlDataReader
17
-    Dim OPEXC(2) As Boolean
12
+    ReadOnly conn As New SqlConnection
13
+    ReadOnly da As New SqlDataAdapter
14
+    ReadOnly cmd As New SqlCommand
15
+    ReadOnly ds As New DataSet
16
+    ReadOnly dr As SqlDataReader
17
+    ReadOnly OPEXC(2) As Boolean
18
+    Dim selectdate As Date : Dim DTP As Date
18 19
     Dim P As Integer = 0 : Dim R As Integer = 0 : Dim A As Integer = 0 : Dim Q As Integer = 0
20
+    Dim Index_PRS As Integer = 0 : Dim Index_FTY_XF As Integer = 0 : Dim Index_月_total As Integer = 0
19 21
     Dim 位置1 As String : Dim 位置2 As String : Dim 位置3 As String : Dim 位置4 As String
20 22
     Dim xlApp As Microsoft.Office.Interop.Excel.Application
21 23
     Dim xlBook As Microsoft.Office.Interop.Excel.Workbook
22 24
     Dim xlSheet As Microsoft.Office.Interop.Excel.Worksheet
23
-    Dim SQL字串1 As String = "SELECT 訂單流水號, 年份季度, 客戶訂單號, 形體號, 顏色, 楦型, 訂單數量, 客戶交期, 單價, 總金額, 備註, 生產工廠, 訂單種類, 工廠回復交期, CFMSPEC, CFMSAMPLE, TRIAL1, TRIAL2, " &
25
+    ReadOnly SQL字串1 As String = "SELECT 訂單流水號, 年份季度, 客戶訂單號, 形體號, 顏色, 楦型, 訂單數量, 客戶交期, 單價, 總金額, 備註, 生產工廠, 訂單種類, 工廠回復交期, CFMSPEC, CFMSAMPLE, TRIAL1, TRIAL2, " &
24 26
                    "TRIAL3, TRIAL4, 包裝確認時間, 貼標時間, 裁斷時間, 針車時間, 成型時間, 驗貨時間, 實際離廠日, 資料流水號, 明細建檔, GOODBOX, LEATHER, LEA_Note, 出貨數量, PO_S_Date AS 接單日, " &
25 27
                    "Requested_XF AS 需求日期, Confirm_XF AS 確認日期, Revised_XF AS 修訂日期, 工廠回復交期 AS 工廠交期, Special_Packaging, Remarks, 出貨地, TVW, 楦頭號, 材質, 七號模具, TRIAL1 AS T1, " &
26 28
                    "TRIAL2 AS T2, 長期試穿 AS WEAR_TEST, CFMSAMPLE AS CFM, TRIAL3 AS T3, TRIAL4 AS T4, CFMSPEC AS TEST, 面料, 副料, 中底, 鞋墊, 大底, 跟, 包裝確認時間 AS 包裝, 裁斷時間 AS 裁斷, " &
27 29
                    "針車時間 AS 針車, 成型時間 AS 成型, 驗貨時間 AS 驗貨, 工廠進度表備註1, 工廠進度表備註2, 客戶包裝確認, 東莞業務備註, 工廠確認, 利威確認, 結關日 FROM 訂單控制表"
28
-    Dim SQL字串2 As String = " ORDER BY SUBSTRING(訂單流水號, 4, 6) DESC"
29
-    Private  Sub Set_DGV1載入前設定()
30
+    ReadOnly SQL字串2 As String = " ORDER BY SUBSTRING(訂單流水號, 4, 6) DESC"
31
+    Private Sub Set_DGV1載入前設定()
30 32
         DataGridView1.DataSource = Nothing : ds.Clear()
31 33
         DataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
32 34
         DataGridView1.ColumnHeadersHeight = 25
33 35
         DataGridView1.AllowUserToAddRows = False
34 36
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
35 37
     End Sub
36
-    Private  Sub Set_DGV1載入後設定()
38
+    Private Sub Set_DGV1載入後設定()
37 39
         cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds) : DataGridView1.DataSource = ds.Tables(0) : conn.Close()
38 40
     End Sub
39
-    Private  Sub Set_訂單清單()
41
+    Private Sub Set_訂單清單()
40 42
         Set_DGV1載入前設定()
41 43
         If OPEXC(0) = True Then
42 44
             SQL1 = SQL字串1 & 列印用SQL & "AND (生產工廠 LIKE 'JH')" & SQL字串2
@@ -47,132 +49,272 @@ Public Class 訂單列印選擇
47 49
         End If
48 50
         Set_DGV1載入後設定()
49 51
     End Sub
50
-    Private  Sub Set_格式設定()
51
-        DataGridView1.Visible = False
52
+    Private Sub Set_格式設定()
53
+        DataGridView1.Visible = True
52 54
         If CC(7) = False Then
53 55
             CheckBox9.Visible = False : Label9.Visible = False : CheckBox10.Visible = False : Label10.Visible = False
54 56
         End If
55 57
     End Sub
56
-    Private  Sub Set_循環列印()
58
+    Private Sub Set_循環列印()
57 59
         Dim W As Integer = 2
58
-        If CheckBox1.Checked = True Then : xlSheet.Cells(3, W) = "TENDENZA PO#" : Q = W : W = W + 1 : End If
59
-        If CheckBox2.Checked = True Then : xlSheet.Cells(3, W) = "SEASON" : Q = W : W = W + 1 : End If
60
-        If CheckBox3.Checked = True Then : xlSheet.Cells(3, W) = "VIONIC PO#" : Q = W : W = W + 1 : End If
61
-        If CheckBox4.Checked = True Then : xlSheet.Cells(3, W) = "STYLE" : Q = W : W = W + 1 : End If
62
-        If CheckBox5.Checked = True Then : xlSheet.Cells(3, W) = "COLOR" : Q = W : W = W + 1 : End If
63
-        If CheckBox6.Checked = True Then : xlSheet.Cells(3, W) = "DM" : Q = W : W = W + 1 : End If
64
-        If CheckBox7.Checked = True Then : xlSheet.Cells(3, W) = "PRS" : Q = W : W = W + 1 : End If
65
-        If CheckBox8.Checked = True Then : xlSheet.Cells(3, W) = "CUST X/F" : Q = W : W = W + 1 : End If
66
-        If CheckBox9.Checked = True Then : xlSheet.Cells(3, W) = "PRICE" : Q = W : W = W + 1 : End If
67
-        If CheckBox10.Checked = True Then : xlSheet.Cells(3, W) = "AMOUNT" : Q = W : W = W + 1 : End If
68
-        If CheckBox11.Checked = True Then : xlSheet.Cells(3, W) = "REMARK" : Q = W : W = W + 1 : End If
69
-        If CheckBox12.Checked = True Then : xlSheet.Cells(3, W) = "FTY" : Q = W : W = W + 1 : End If
70
-        If CheckBox13.Checked = True Then : xlSheet.Cells(3, W) = "DIV" : Q = W : W = W + 1 : End If
71
-        If CheckBox14.Checked = True Then : xlSheet.Cells(3, W) = "GOODBOX" : Q = W : W = W + 1 : End If
72
-        If CheckBox15.Checked = True Then : xlSheet.Cells(3, W) = "LEATHER" : Q = W : W = W + 1 : End If
73
-        If CheckBox16.Checked = True Then : xlSheet.Cells(3, W) = "LEA_Note" : Q = W : W = W + 1 : End If
74
-        If CheckBox17.Checked = True Then : xlSheet.Cells(3, W) = "PO_S_Date" : Q = W : W = W + 1 : End If
75
-        If CheckBox18.Checked = True Then : xlSheet.Cells(3, W) = "Requested_XF" : Q = W : W = W + 1 : End If
76
-        If CheckBox19.Checked = True Then : xlSheet.Cells(3, W) = "Confirm_XF" : Q = W : W = W + 1 : End If
77
-        If CheckBox20.Checked = True Then : xlSheet.Cells(3, W) = "Revised_XF" : Q = W : W = W + 1 : End If
78
-        If CheckBox21.Checked = True Then : xlSheet.Cells(3, W) = "FTY X/F" : Q = W : W = W + 1 : End If
79
-        If CheckBox22.Checked = True Then : xlSheet.Cells(3, W) = "Special_Packaging" : Q = W : W = W + 1 : End If
80
-        If CheckBox23.Checked = True Then : xlSheet.Cells(3, W) = "Remarks" : Q = W : W = W + 1 : End If
81
-        If CheckBox24.Checked = True Then : xlSheet.Cells(3, W) = "TVW" : Q = W : W = W + 1 : End If
82
-        If CheckBox25.Checked = True Then : xlSheet.Cells(3, W) = "楦頭號" : Q = W : W = W + 1 : End If
83
-        If CheckBox26.Checked = True Then : xlSheet.Cells(3, W) = "材質" : Q = W : W = W + 1 : End If
84
-        If CheckBox27.Checked = True Then : xlSheet.Cells(3, W) = "七號模具" : Q = W : W = W + 1 : End If
85
-        If CheckBox28.Checked = True Then : xlSheet.Cells(3, W) = "T1" : Q = W : W = W + 1 : End If
86
-        If CheckBox29.Checked = True Then : xlSheet.Cells(3, W) = "T2" : Q = W : W = W + 1 : End If
87
-        If CheckBox30.Checked = True Then : xlSheet.Cells(3, W) = "WEAR_TEST" : Q = W : W = W + 1 : End If
88
-        If CheckBox31.Checked = True Then : xlSheet.Cells(3, W) = "CFM" : Q = W : W = W + 1 : End If
89
-        If CheckBox32.Checked = True Then : xlSheet.Cells(3, W) = "T3" : Q = W : W = W + 1 : End If
90
-        If CheckBox33.Checked = True Then : xlSheet.Cells(3, W) = "T4" : Q = W : W = W + 1 : End If
91
-        If CheckBox34.Checked = True Then : xlSheet.Cells(3, W) = "TEST" : Q = W : W = W + 1 : End If
92
-        If CheckBox35.Checked = True Then : xlSheet.Cells(3, W) = "面料" : Q = W : W = W + 1 : End If
93
-        If CheckBox36.Checked = True Then : xlSheet.Cells(3, W) = "副料" : Q = W : W = W + 1 : End If
94
-        If CheckBox37.Checked = True Then : xlSheet.Cells(3, W) = "中底" : Q = W : W = W + 1 : End If
95
-        If CheckBox38.Checked = True Then : xlSheet.Cells(3, W) = "鞋墊" : Q = W : W = W + 1 : End If
96
-        If CheckBox39.Checked = True Then : xlSheet.Cells(3, W) = "大底" : Q = W : W = W + 1 : End If
97
-        If CheckBox40.Checked = True Then : xlSheet.Cells(3, W) = "跟" : Q = W : W = W + 1 : End If
98
-        If CheckBox41.Checked = True Then : xlSheet.Cells(3, W) = "包裝" : Q = W : W = W + 1 : End If
99
-        If CheckBox42.Checked = True Then : xlSheet.Cells(3, W) = "裁斷" : Q = W : W = W + 1 : End If
100
-        If CheckBox43.Checked = True Then : xlSheet.Cells(3, W) = "針車" : Q = W : W = W + 1 : End If
101
-        If CheckBox44.Checked = True Then : xlSheet.Cells(3, W) = "成型" : Q = W : W = W + 1 : End If
102
-        If CheckBox45.Checked = True Then : xlSheet.Cells(3, W) = "驗貨" : Q = W : W = W + 1 : End If
103
-        If CheckBox46.Checked = True Then : xlSheet.Cells(3, W) = "工廠進度表備註1" : Q = W : W = W + 1 : End If
104
-        If CheckBox47.Checked = True Then : xlSheet.Cells(3, W) = "工廠進度表備註2" : Q = W : W = W + 1 : End If
105
-        If CheckBox48.Checked = True Then : xlSheet.Cells(3, W) = "客戶包裝確認" : Q = W : W = W + 1 : End If
106
-        If CheckBox50.Checked = True Then : xlSheet.Cells(3, W) = "工廠包裝確認" : Q = W : W = W + 1 : End If
107
-        If CheckBox51.Checked = True Then : xlSheet.Cells(3, W) = "利威驗貨確認" : Q = W : W = W + 1 : End If
108
-        If CheckBox52.Checked = True Then : xlSheet.Cells(3, W) = "結關日" : Q = W : W = W + 1 : End If
109
-        If CheckBox49.Checked = True Then : xlSheet.Cells(3, W) = "東莞業務備註" : Q = W : W = W + 1 : End If
60
+        If CheckBox1.Checked = True Then : xlSheet.Cells(3, W) = "TENDENZA PO#" : Q = W : W += 1 : End If
61
+        If CheckBox2.Checked = True Then : xlSheet.Cells(3, W) = "SEASON" : Q = W : W += 1 : End If
62
+        If CheckBox3.Checked = True Then : xlSheet.Cells(3, W) = "VIONIC PO#" : Q = W : W += 1 : End If
63
+        If CheckBox4.Checked = True Then : xlSheet.Cells(3, W) = "STYLE" : Q = W : W += 1 : End If
64
+        If CheckBox5.Checked = True Then : xlSheet.Cells(3, W) = "COLOR" : Q = W : W += 1 : End If
65
+        If CheckBox6.Checked = True Then : xlSheet.Cells(3, W) = "DM" : Q = W : W += 1 : End If
66
+        If CheckBox7.Checked = True Then : xlSheet.Cells(3, W) = "PRS" : Q = W : W += 1 : Index_PRS = Q : End If
67
+        If CheckBox8.Checked = True Then : xlSheet.Cells(3, W) = "CUST X/F" : Q = W : W += 1 : End If
68
+        If CheckBox9.Checked = True Then : xlSheet.Cells(3, W) = "PRICE" : Q = W : W += 1 : End If
69
+        If CheckBox10.Checked = True Then : xlSheet.Cells(3, W) = "AMOUNT" : Q = W : W += 1 : End If
70
+        If CheckBox11.Checked = True Then : xlSheet.Cells(3, W) = "REMARK" : Q = W : W += 1 : End If
71
+        If CheckBox12.Checked = True Then : xlSheet.Cells(3, W) = "FTY" : Q = W : W += 1 : End If
72
+        If CheckBox13.Checked = True Then : xlSheet.Cells(3, W) = "DIV" : Q = W : W += 1 : End If
73
+        If CheckBox14.Checked = True Then : xlSheet.Cells(3, W) = "GOODBOX" : Q = W : W += 1 : End If
74
+        If CheckBox15.Checked = True Then : xlSheet.Cells(3, W) = "LEATHER" : Q = W : W += 1 : End If
75
+        If CheckBox16.Checked = True Then : xlSheet.Cells(3, W) = "LEA_Note" : Q = W : W += 1 : End If
76
+        If CheckBox17.Checked = True Then : xlSheet.Cells(3, W) = "PO_S_Date" : Q = W : W += 1 : End If
77
+        If CheckBox18.Checked = True Then : xlSheet.Cells(3, W) = "Requested_XF" : Q = W : W += 1 : End If
78
+        If CheckBox19.Checked = True Then : xlSheet.Cells(3, W) = "Confirm_XF" : Q = W : W += 1 : End If
79
+        If CheckBox20.Checked = True Then : xlSheet.Cells(3, W) = "Revised_XF" : Q = W : W += 1 : End If
80
+        If CheckBox21.Checked = True Then : xlSheet.Cells(3, W) = "FTY X/F" : Q = W : W += 1 : Index_FTY_XF = Q : End If
81
+        If CheckBox22.Checked = True Then : xlSheet.Cells(3, W) = "Special_Packaging" : Q = W : W += 1 : End If
82
+        If CheckBox23.Checked = True Then : xlSheet.Cells(3, W) = "Remarks" : Q = W : W += 1 : End If
83
+        If CheckBox24.Checked = True Then : xlSheet.Cells(3, W) = "TVW" : Q = W : W += 1 : End If
84
+        If CheckBox25.Checked = True Then : xlSheet.Cells(3, W) = "楦頭號" : Q = W : W += 1 : End If
85
+        If CheckBox26.Checked = True Then : xlSheet.Cells(3, W) = "材質" : Q = W : W += 1 : End If
86
+        If CheckBox27.Checked = True Then : xlSheet.Cells(3, W) = "七號模具" : Q = W : W += 1 : End If
87
+        If CheckBox28.Checked = True Then : xlSheet.Cells(3, W) = "T1" : Q = W : W += 1 : End If
88
+        If CheckBox29.Checked = True Then : xlSheet.Cells(3, W) = "T2" : Q = W : W += 1 : End If
89
+        If CheckBox30.Checked = True Then : xlSheet.Cells(3, W) = "WEAR_TEST" : Q = W : W += 1 : End If
90
+        If CheckBox31.Checked = True Then : xlSheet.Cells(3, W) = "CFM" : Q = W : W += 1 : End If
91
+        If CheckBox32.Checked = True Then : xlSheet.Cells(3, W) = "T3" : Q = W : W += 1 : End If
92
+        If CheckBox33.Checked = True Then : xlSheet.Cells(3, W) = "T4" : Q = W : W += 1 : End If
93
+        If CheckBox34.Checked = True Then : xlSheet.Cells(3, W) = "TEST" : Q = W : W += 1 : End If
94
+        If CheckBox35.Checked = True Then : xlSheet.Cells(3, W) = "面料" : Q = W : W += 1 : End If
95
+        If CheckBox36.Checked = True Then : xlSheet.Cells(3, W) = "副料" : Q = W : W += 1 : End If
96
+        If CheckBox37.Checked = True Then : xlSheet.Cells(3, W) = "中底" : Q = W : W += 1 : End If
97
+        If CheckBox38.Checked = True Then : xlSheet.Cells(3, W) = "鞋墊" : Q = W : W += 1 : End If
98
+        If CheckBox39.Checked = True Then : xlSheet.Cells(3, W) = "大底" : Q = W : W += 1 : End If
99
+        If CheckBox40.Checked = True Then : xlSheet.Cells(3, W) = "跟" : Q = W : W += 1 : End If
100
+        If CheckBox41.Checked = True Then : xlSheet.Cells(3, W) = "包裝" : Q = W : W += 1 : End If
101
+        If CheckBox42.Checked = True Then : xlSheet.Cells(3, W) = "裁斷" : Q = W : W += 1 : End If
102
+        If CheckBox43.Checked = True Then : xlSheet.Cells(3, W) = "針車" : Q = W : W += 1 : End If
103
+        If CheckBox44.Checked = True Then : xlSheet.Cells(3, W) = "成型" : Q = W : W += 1 : End If
104
+        If CheckBox45.Checked = True Then : xlSheet.Cells(3, W) = "驗貨" : Q = W : W += 1 : End If
105
+        If CheckBox46.Checked = True Then : xlSheet.Cells(3, W) = "工廠進度表備註1" : Q = W : W += 1 : End If
106
+        If CheckBox47.Checked = True Then : xlSheet.Cells(3, W) = "工廠進度表備註2" : Q = W : W += 1 : End If
107
+        If CheckBox48.Checked = True Then : xlSheet.Cells(3, W) = "客戶包裝確認" : Q = W : W += 1 : End If
108
+        If CheckBox50.Checked = True Then : xlSheet.Cells(3, W) = "工廠包裝確認" : Q = W : W += 1 : End If
109
+        If CheckBox51.Checked = True Then : xlSheet.Cells(3, W) = "利威驗貨確認" : Q = W : W += 1 : End If
110
+        If CheckBox52.Checked = True Then : xlSheet.Cells(3, W) = "結關日" : Q = W : W += 1 : End If
111
+        If CheckBox49.Checked = True Then : xlSheet.Cells(3, W) = "東莞業務備註" : Q = W : W += 1 : End If
110 112
         Set_訂單清單()
111 113
         For i As Integer = 0 To DataGridView1.Rows.Count - 1
112 114
             W = 2
113
-            If CheckBox1.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("訂單流水號").Value : W = W + 1 : End If
114
-            If CheckBox2.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("年份季度").Value : W = W + 1 : End If
115
-            If CheckBox3.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("客戶訂單號").Value : W = W + 1 : End If
116
-            If CheckBox4.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("形體號").Value : W = W + 1 : End If
117
-            If CheckBox5.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("顏色").Value : W = W + 1 : End If
118
-            If CheckBox6.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("楦型").Value : W = W + 1 : End If
119
-            If CheckBox7.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("訂單數量").Value : P = W : W = W + 1 : End If
120
-            If CheckBox8.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("客戶交期").Value : W = W + 1 : End If
121
-            If CheckBox9.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("單價").Value : R = W : W = W + 1 : End If
122
-            If CheckBox10.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("總金額").Value : A = W : W = W + 1 : End If
123
-            If CheckBox11.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("備註").Value : W = W + 1 : End If
124
-            If CheckBox12.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("生產工廠").Value : W = W + 1 : End If
125
-            If CheckBox13.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("訂單種類").Value : W = W + 1 : End If
126
-            If CheckBox14.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("GOODBOX").Value : W = W + 1 : End If
127
-            If CheckBox15.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("LEATHER").Value : W = W + 1 : End If
128
-            If CheckBox16.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("LEA_Note").Value : W = W + 1 : End If
129
-            If CheckBox17.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("接單日").Value : W = W + 1 : End If
130
-            If CheckBox18.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("需求日期").Value : W = W + 1 : End If
131
-            If CheckBox19.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("確認日期").Value : W = W + 1 : End If
132
-            If CheckBox20.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("修訂日期").Value : W = W + 1 : End If
133
-            If CheckBox21.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("工廠交期").Value : W = W + 1 : End If
134
-            If CheckBox22.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("Special_Packaging").Value : W = W + 1 : End If
135
-            If CheckBox23.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("Remarks").Value : W = W + 1 : End If
136
-            If CheckBox24.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("TVW").Value : W = W + 1 : End If
137
-            If CheckBox25.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("楦頭號").Value : W = W + 1 : End If
138
-            If CheckBox26.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("材質").Value : W = W + 1 : End If
139
-            If CheckBox27.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("七號模具").Value : W = W + 1 : End If
140
-            If CheckBox28.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("T1").Value : W = W + 1 : End If
141
-            If CheckBox29.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("T2").Value : W = W + 1 : End If
142
-            If CheckBox30.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("WEAR_TEST").Value : W = W + 1 : End If
143
-            If CheckBox31.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("CFM").Value : W = W + 1 : End If
144
-            If CheckBox32.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("T3").Value : W = W + 1 : End If
145
-            If CheckBox33.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("T4").Value : W = W + 1 : End If
146
-            If CheckBox34.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("TEST").Value : W = W + 1 : End If
147
-            If CheckBox35.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("面料").Value : W = W + 1 : End If
148
-            If CheckBox36.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("副料").Value : W = W + 1 : End If
149
-            If CheckBox37.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("中底").Value : W = W + 1 : End If
150
-            If CheckBox38.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("鞋墊").Value : W = W + 1 : End If
151
-            If CheckBox39.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("大底").Value : W = W + 1 : End If
152
-            If CheckBox40.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("跟").Value : W = W + 1 : End If
153
-            If CheckBox41.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("包裝").Value : W = W + 1 : End If
154
-            If CheckBox42.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("裁斷").Value : W = W + 1 : End If
155
-            If CheckBox43.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("針車").Value : W = W + 1 : End If
156
-            If CheckBox44.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("成型").Value : W = W + 1 : End If
157
-            If CheckBox45.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("驗貨").Value : W = W + 1 : End If
158
-            If CheckBox46.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("工廠進度表備註1").Value : W = W + 1 : End If
159
-            If CheckBox47.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("工廠進度表備註2").Value : W = W + 1 : End If
160
-            If CheckBox48.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("客戶包裝確認").Value : W = W + 1 : End If
161
-            If CheckBox50.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("工廠確認").Value : W = W + 1 : End If
162
-            If CheckBox51.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("利威確認").Value : W = W + 1 : End If
163
-            If CheckBox52.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("結關日").Value : W = W + 1 : End If
164
-            If CheckBox49.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("東莞業務備註").Value : W = W + 1 : End If
115
+            If CheckBox1.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("訂單流水號").Value : W += 1 : End If
116
+            If CheckBox2.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("年份季度").Value : W += 1 : End If
117
+            If CheckBox3.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("客戶訂單號").Value : W += 1 : End If
118
+            If CheckBox4.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("形體號").Value : W += 1 : End If
119
+            If CheckBox5.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("顏色").Value : W += 1 : End If
120
+            If CheckBox6.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("楦型").Value : W += 1 : End If
121
+            If CheckBox7.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("訂單數量").Value : P = W : W += 1 : End If
122
+            If CheckBox8.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("客戶交期").Value : W += 1 : End If
123
+            If CheckBox9.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("單價").Value : R = W : W += 1 : End If
124
+            If CheckBox10.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("總金額").Value : A = W : W += 1 : End If
125
+            If CheckBox11.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("備註").Value : W += 1 : End If
126
+            If CheckBox12.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("生產工廠").Value : W += 1 : End If
127
+            If CheckBox13.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("訂單種類").Value : W += 1 : End If
128
+            If CheckBox14.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("GOODBOX").Value : W += 1 : End If
129
+            If CheckBox15.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("LEATHER").Value : W += 1 : End If
130
+            If CheckBox16.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("LEA_Note").Value : W += 1 : End If
131
+            If CheckBox17.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("接單日").Value : W += 1 : End If
132
+            If CheckBox18.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("需求日期").Value : W += 1 : End If
133
+            If CheckBox19.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("確認日期").Value : W += 1 : End If
134
+            If CheckBox20.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("修訂日期").Value : W += 1 : End If
135
+            If CheckBox21.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("工廠交期").Value : W += 1 : End If
136
+            If CheckBox22.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("Special_Packaging").Value : W += 1 : End If
137
+            If CheckBox23.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("Remarks").Value : W += 1 : End If
138
+            If CheckBox24.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("TVW").Value : W += 1 : End If
139
+            If CheckBox25.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("楦頭號").Value : W += 1 : End If
140
+            If CheckBox26.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("材質").Value : W += 1 : End If
141
+            If CheckBox27.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("七號模具").Value : W += 1 : End If
142
+            If CheckBox28.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("T1").Value : W += 1 : End If
143
+            If CheckBox29.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("T2").Value : W += 1 : End If
144
+            If CheckBox30.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("WEAR_TEST").Value : W += 1 : End If
145
+            If CheckBox31.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("CFM").Value : W += 1 : End If
146
+            If CheckBox32.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("T3").Value : W += 1 : End If
147
+            If CheckBox33.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("T4").Value : W += 1 : End If
148
+            If CheckBox34.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("TEST").Value : W += 1 : End If
149
+            If CheckBox35.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("面料").Value : W += 1 : End If
150
+            If CheckBox36.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("副料").Value : W += 1 : End If
151
+            If CheckBox37.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("中底").Value : W += 1 : End If
152
+            If CheckBox38.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("鞋墊").Value : W += 1 : End If
153
+            If CheckBox39.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("大底").Value : W += 1 : End If
154
+            If CheckBox40.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("跟").Value : W += 1 : End If
155
+            If CheckBox41.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("包裝").Value : W += 1 : End If
156
+            If CheckBox42.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("裁斷").Value : W += 1 : End If
157
+            If CheckBox43.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("針車").Value : W += 1 : End If
158
+            If CheckBox44.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("成型").Value : W += 1 : End If
159
+            If CheckBox45.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("驗貨").Value : W += 1 : End If
160
+            If CheckBox46.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("工廠進度表備註1").Value : W += 1 : End If
161
+            If CheckBox47.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("工廠進度表備註2").Value : W += 1 : End If
162
+            If CheckBox48.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("客戶包裝確認").Value : W += 1 : End If
163
+            If CheckBox50.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("工廠確認").Value : W += 1 : End If
164
+            If CheckBox51.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("利威確認").Value : W += 1 : End If
165
+            If CheckBox52.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("結關日").Value : W += 1 : End If
166
+            If CheckBox49.Checked = True Then : xlSheet.Cells(i + 4, W) = DataGridView1.Rows(i).Cells("東莞業務備註").Value : W += 1 : End If
165 167
             With xlApp.Selection
166 168
                 .Font.Bold = True
167 169
             End With
168 170
         Next i
169 171
         BB(xlApp, xlSheet)
170 172
     End Sub
171
-    Private  Sub 列印選擇_Load(sender As Object, e As EventArgs) Handles MyBase.Load
173
+    Private Sub 列印選擇_Load(sender As Object, e As EventArgs) Handles MyBase.Load
172 174
         FormBorderStyle = FormBorderStyle.SizableToolWindow
175
+        月選_起始_dtp.Value = Today() : 月選_結束_dtp.Value = Today()
176
+        週選_日期_CB.Text = DateAndTime.Day(Today)
177
+        週選_月份_CB.Text = DateAndTime.Month(Today)
178
+        週選_年份_CB.Text = DateAndTime.Year(Today)
179
+        週選_週數_cb.Text = "7"
180
+        月選_起始月_cb.Text = DateAndTime.Month(Today)
181
+        月選_結束月_cb.Text = DateAndTime.Month(Today)
182
+        月選_年_cb.Text = DateAndTime.Year(Today)
183
+        月選_結束年_cb.Text = DateAndTime.Year(Today)
173 184
         Set_格式設定()
174 185
     End Sub
175
-    Private  Sub Button11_Click(sender As Object, e As EventArgs) Handles Button11.Click
186
+    Private Sub 週選_年份_CB_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 週選_年份_CB.SelectedIndexChanged
187
+        selectdate = CDate((週選_月份_CB.Text) & "/" & (週選_日期_CB.Text) & "/" & (週選_年份_CB.Text))
188
+        週選_DTP.Value = selectdate
189
+        週選_起日_tb.Text = Strings.Left(Strings.Format(週選_DTP.Value, "yyyy/MM/dd"), 10)
190
+    End Sub
191
+    Private Sub 週選_月份_CB_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 週選_月份_CB.SelectedIndexChanged
192
+        If 週選_年份_CB.Text = "" Then
193
+            Exit Sub
194
+        Else
195
+            selectdate = CDate((週選_月份_CB.Text) & "/" & (週選_日期_CB.Text) & "/" & (週選_年份_CB.Text))
196
+            週選_DTP.Value = selectdate
197
+            週選_起日_tb.Text = Strings.Left(Strings.Format(週選_DTP.Value, "yyyy/MM/dd"), 10)
198
+        End If
199
+    End Sub
200
+    Private Sub 週選_日期_CB_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 週選_日期_CB.SelectedIndexChanged
201
+        If 週選_年份_CB.Text = "" Then
202
+            Exit Sub
203
+        ElseIf 週選_月份_CB.Text = "" Then
204
+            Exit Sub
205
+        Else
206
+            selectdate = CDate((週選_月份_CB.Text) & "/" & (週選_日期_CB.Text) & "/" & (週選_年份_CB.Text))
207
+            週選_DTP.Value = selectdate
208
+            週選_起日_tb.Text = Strings.Left(Strings.Format(週選_DTP.Value, "yyyy/MM/dd"), 10)
209
+        End If
210
+    End Sub
211
+    Private Sub 月選_年_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 月選_年_cb.SelectedIndexChanged
212
+        DTP = (月選_年_cb.Text) & "/" & (月選_起始月_cb.Text) & "/01"
213
+        月選_起始_dtp.Value = DTP
214
+        月選_起始_tb.Text = Strings.Left(Strings.Format(月選_起始_dtp.Value, "yyyy/MM/dd"), 10)
215
+        判斷月差()
216
+    End Sub
217
+    Private Sub 月選_起始月_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 月選_起始月_cb.SelectedIndexChanged
218
+        If 月選_年_cb.Text = "" Then
219
+            Exit Sub
220
+        Else
221
+            DTP = (月選_年_cb.Text) & "/" & (月選_起始月_cb.Text) & "/01"
222
+            月選_起始_dtp.Value = DTP
223
+            月選_起始_tb.Text = Strings.Left(Strings.Format(月選_起始_dtp.Value, "yyyy/MM/dd"), 10)
224
+        End If
225
+        判斷月差()
226
+    End Sub
227
+    Private Sub 月選_結束年_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 月選_結束年_cb.SelectedIndexChanged
228
+        DTP = (月選_結束年_cb.Text) & "/" & (月選_結束月_cb.Text) & "/01"
229
+        月選_結束_dtp.Value = DTP
230
+        月選_結束_dtp.Value = 月選_結束_dtp.Value.AddMonths(1)
231
+        月選_結束_dtp.Value = 月選_結束_dtp.Value.AddDays(-1)
232
+        月選_結束_tb.Text = Strings.Left(Strings.Format(月選_結束_dtp.Value, "yyyy/MM/dd"), 10)
233
+    End Sub
234
+    Private Sub 月選_結束月_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 月選_結束月_cb.SelectedIndexChanged
235
+        If 月選_年_cb.Text = "" Then
236
+            Exit Sub
237
+        Else
238
+            DTP = (月選_結束年_cb.Text) & "/" & (月選_結束月_cb.Text) & "/01"
239
+            月選_結束_dtp.Value = DTP
240
+            月選_結束_dtp.Value = 月選_結束_dtp.Value.AddMonths(1)
241
+            月選_結束_dtp.Value = 月選_結束_dtp.Value.AddDays(-1)
242
+            月選_結束_tb.Text = Strings.Left(Strings.Format(月選_結束_dtp.Value, "yyyy/MM/dd"), 10)
243
+        End If
244
+    End Sub
245
+    Private Sub 減一個月_bt_Click(sender As Object, e As EventArgs) Handles 減一個月_bt.Click
246
+        If 月選_結束月_cb.Text <> "1" Then
247
+            月選_結束月_cb.Text = Val(月選_結束月_cb.Text) - 1
248
+        ElseIf 月選_結束月_cb.Text = "1" Then
249
+            月選_結束月_cb.Text = 12
250
+            月選_結束年_cb.Text = Val(月選_結束年_cb.Text) - 1
251
+        End If
252
+        判斷月差()
253
+    End Sub
254
+    Private Sub 加一個月_bt_Click(sender As Object, e As EventArgs) Handles 加一個月_bt.Click
255
+        If 月選_結束月_cb.Text <> "12" Then
256
+            月選_結束月_cb.Text = Val(月選_結束月_cb.Text) + 1
257
+        ElseIf 月選_結束月_cb.Text = "12" Then
258
+            月選_結束月_cb.Text = 1
259
+            月選_結束年_cb.Text = Val(月選_結束年_cb.Text) + 1
260
+        End If
261
+        判斷月差()
262
+    End Sub
263
+    Private Sub 判斷月差()
264
+        If DateDiff(DateInterval.Month, 月選_起始_dtp.Value, 月選_結束_dtp.Value) > 11 Then
265
+            月選_起始月_cb.Text = DateAndTime.Month(Today)
266
+            月選_結束月_cb.Text = DateAndTime.Month(Today)
267
+            月選_年_cb.Text = DateAndTime.Year(Today)
268
+            月選_結束年_cb.Text = DateAndTime.Year(Today)
269
+            MsgBox("選擇範圍超過1年", MsgBoxStyle.Information, "提示")
270
+        ElseIf DateDiff(DateInterval.Month, 月選_起始_dtp.Value, 月選_結束_dtp.Value) < 0 Then
271
+            月選_起始月_cb.Text = DateAndTime.Month(Today)
272
+            月選_結束月_cb.Text = DateAndTime.Month(Today)
273
+            月選_年_cb.Text = DateAndTime.Year(Today)
274
+            月選_結束年_cb.Text = DateAndTime.Year(Today)
275
+            MsgBox("選擇範圍年分順序顛倒", MsgBoxStyle.Information, "提示")
276
+        End If
277
+    End Sub
278
+    Private Sub 彙總表_cb_CheckedChanged(sender As Object, e As EventArgs) Handles 彙總表_cb.CheckedChanged
279
+        If 彙總表_cb.Checked = True Then
280
+            If CheckBox21.Checked = False Then
281
+                MsgBox("列印彙總表需要工廠交期,請勾選 FTY X/F", MsgBoxStyle.Information, "提示")
282
+                彙總表_cb.Checked = False
283
+            ElseIf CheckBox7.Checked = False Then
284
+                MsgBox("列印彙總表需要PRS,請勾選 PRS", MsgBoxStyle.Information, "提示")
285
+                彙總表_cb.Checked = False
286
+            Else
287
+                彙總表_cb.Checked = True : 月份選擇_gb.Enabled = True : 週數選擇_gb.Enabled = True
288
+            End If
289
+        Else
290
+            月份選擇_gb.Enabled = False : 週數選擇_gb.Enabled = False
291
+            Exit Sub
292
+        End If
293
+    End Sub
294
+    Private Function 行指標轉換(ByVal index01 As Integer) As String
295
+        Dim index_return As String = ""
296
+        Select Case index01
297
+            Case 1 : index_return = "A" : Case 2 : index_return = "B" : Case 3 : index_return = "C" : Case 4 : index_return = "D"
298
+            Case 5 : index_return = "E" : Case 6 : index_return = "F" : Case 7 : index_return = "G" : Case 8 : index_return = "H"
299
+            Case 9 : index_return = "I" : Case 10 : index_return = "J" : Case 11 : index_return = "K" : Case 12 : index_return = "L"
300
+            Case 13 : index_return = "M" : Case 14 : index_return = "N" : Case 15 : index_return = "O" : Case 16 : index_return = "P"
301
+            Case 17 : index_return = "Q" : Case 18 : index_return = "R" : Case 19 : index_return = "S" : Case 20 : index_return = "T"
302
+            Case 21 : index_return = "U" : Case 22 : index_return = "V" : Case 23 : index_return = "W" : Case 24 : index_return = "X"
303
+            Case 25 : index_return = "Y" : Case 26 : index_return = "Z" : Case 27 : index_return = "AA" : Case 28 : index_return = "AB"
304
+            Case 29 : index_return = "AC" : Case 30 : index_return = "AD" : Case 31 : index_return = "AE" : Case 32 : index_return = "AF"
305
+            Case 33 : index_return = "AG" : Case 34 : index_return = "AH" : Case 35 : index_return = "AI" : Case 36 : index_return = "AJ"
306
+            Case 37 : index_return = "AK" : Case 38 : index_return = "AL" : Case 39 : index_return = "AM" : Case 40 : index_return = "AN"
307
+        End Select
308
+        Return index_return
309
+    End Function
310
+    Private Sub 週選_週數_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 週選_週數_cb.SelectedIndexChanged
311
+        週選_週數_tb.Text = 週選_週數_cb.Text
312
+    End Sub
313
+    Private Sub Button11_Click(sender As Object, e As EventArgs) Handles Button11.Click
314
+        Dim j As Integer = 1 ' j 用來計算有幾個 EXCEL 工作表
315
+        'SaveFileDialog1.Filter = "All Files (*.*)|*.*|Excel files (*.xlsx)|*.xlsx|CSV Files (*.csv)|*.csv|XLS Files (*.xls)|*xls"
316
+        'SaveFileDialog1.FilterIndex = 2
317
+        'If SaveFileDialog1.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
176 318
         xlApp = CType(CreateObject("Excel.Application"), Microsoft.Office.Interop.Excel.Application)
177 319
         xlApp.Visible = True
178 320
         xlApp.DisplayAlerts = True
@@ -180,65 +322,144 @@ Public Class 訂單列印選擇
180 322
         xlBook = xlApp.Workbooks.Add
181 323
         '----------------------------------------------------------------------------------------------------------------------
182 324
         xlSheet = NewMethod(xlBook)
183
-        If xlApp.Sheets(1).Name = "工作表2" Then
184
-            xlApp.Sheets("工作表2").Select
185
-            xlApp.Sheets("工作表2").Name = "JH"
186
-        Else
187
-            xlApp.Sheets("sheet2").Select
188
-            xlApp.Sheets("sheet2").Name = "JH"
189
-        End If
325
+        xlApp.Sheets(1).Name = "JH"
326
+        xlApp.Sheets("JH").Select
190 327
         xlBook.Activate()
191 328
         xlSheet.Activate()
192 329
         OPEXC(0) = True : OPEXC(1) = False : OPEXC(2) = False
193 330
         xlSheet.Range("A1").Select()
194 331
         xlSheet.Cells(2, 2) = "天盾國際有限公司-訂單控制表(玖宏)"
195 332
         Set_循環列印()
196
-        '----------------------------------------------------------------------------------------------------------------------
333
+        j += 1
334
+        '----------------------------------------------------------------------------------------------------------------------           
197 335
         xlSheet = NewMethod(xlBook)
198
-        If xlApp.Sheets(1).Name = "工作表3" Then
199
-            xlApp.Sheets("工作表3").Select
200
-            xlApp.Sheets("工作表3").Name = "SK"
201
-        Else
202
-            xlApp.Sheets("sheet3").Select
203
-            xlApp.Sheets("sheet3").Name = "SK"
204
-        End If
336
+        xlApp.Sheets(1).Name = "SK"
337
+        xlApp.Sheets("SK").Select
205 338
         xlBook.Activate()
206 339
         xlSheet.Activate()
207 340
         OPEXC(0) = False : OPEXC(1) = True : OPEXC(2) = False
208 341
         xlSheet.Range("A1").Select()
209 342
         xlSheet.Cells(2, 2) = "天盾國際有限公司-訂單控制表(森康)"
210 343
         Set_循環列印()
344
+        j += 1
211 345
         '----------------------------------------------------------------------------------------------------------------------
212 346
         xlSheet = NewMethod(xlBook)
213
-        If xlApp.Sheets(1).Name = "工作表4" Then
214
-            xlApp.Sheets("工作表4").Select
215
-            xlApp.Sheets("工作表4").Name = "NJ"
216
-        Else
217
-            xlApp.Sheets("sheet4").Select
218
-            xlApp.Sheets("sheet4").Name = "NJ"
219
-        End If
347
+        xlApp.Sheets(1).Name = "NJ"
348
+        xlApp.Sheets("NJ").Select
220 349
         xlBook.Activate()
221 350
         xlSheet.Activate()
222 351
         OPEXC(0) = False : OPEXC(1) = False : OPEXC(2) = True
223 352
         xlSheet.Range("A1").Select()
224 353
         xlSheet.Cells(2, 2) = "天盾國際有限公司-訂單控制表(楠晉)"
225 354
         Set_循環列印()
226
-        '----------------------------------------------------------------------------------------------------------------------
227
-        If xlApp.Sheets(4).Name = "工作表1" Then
228
-            xlApp.Sheets("工作表1").Delete
229
-        Else
230
-            xlApp.Sheets("sheet1").Delete
355
+        j += 1
356
+        '---------------------------------------------------cover--------------------------------------------------------------
357
+        If 彙總表_cb.Checked = True Then
358
+            xlSheet = NewMethod(xlBook)
359
+            xlApp.Sheets(1).Name = "cover"
360
+            xlApp.Sheets("cover").Select
361
+            xlBook.Activate()
362
+            xlSheet.Activate()
363
+            xlSheet.Range("A1").Select()
364
+            Dim Str_FTY_XF As String = 行指標轉換(Index_FTY_XF)
365
+            Dim Str_PRS As String = 行指標轉換(Index_PRS)
366
+            'xlSheet.Cells(2, 2) = "天盾國際有限公司-訂單彙總表"
367
+            xlSheet.Cells(3, 2) = "Year " & 月選_年_cb.Text : xlSheet.Cells(3, 9) = "Year " & 週選_年份_CB.Text
368
+            xlSheet.Cells(3, 4) = "NJ" : xlSheet.Cells(3, 5) = "SK" : xlSheet.Cells(3, 6) = "JH" : xlSheet.Cells(3, 7) = "total"
369
+            xlSheet.Cells(3, 11) = "NJ" : xlSheet.Cells(3, 12) = "SK" : xlSheet.Cells(3, 13) = "JH" : xlSheet.Cells(3, 14) = "total"
370
+            xlSheet.Cells(4, 2) = 月選_起始_tb.Text
371
+            xlSheet.Cells(4, 3) = "unship" : xlSheet.Cells(4, 9) = "unship"
372
+            ' --------- 月次選表 ---------
373
+            xlSheet.Cells(4, 4) = "=SUMIF(NJ!$" & Str_FTY_XF & "$4:$" & Str_FTY_XF & "$9999," & """" & "<" & """" & "&$B$4,NJ!$" & Str_PRS & "$4:$" & Str_PRS & "$9999)"
374
+            xlSheet.Cells(4, 5) = "=SUMIF(SK!$" & Str_FTY_XF & "$4:$" & Str_FTY_XF & "$9999," & """" & "<" & """" & "&$B$4,SK!$" & Str_PRS & "$4:$" & Str_PRS & "$9999)"
375
+            xlSheet.Cells(4, 6) = "=SUMIF(JH!$" & Str_FTY_XF & "$4:$" & Str_FTY_XF & "$9999," & """" & "<" & """" & "&$B$4,JH!$" & Str_PRS & "$4:$" & Str_PRS & "$9999)"
376
+            xlSheet.Cells(4, 7) = "=SUM(D4:F4)"
377
+            Dim count_month, count_year, Br As Integer
378
+            Dim DTP2, DTP3 As Date
379
+            DTP2 = 月選_起始_dtp.Value
380
+            DTP3 = 月選_結束_dtp.Value
381
+            Br = DateDiff(DateInterval.Month, DTP2, DTP3)
382
+            count_month = 月選_起始_dtp.Value.Month
383
+            count_year = 月選_起始_dtp.Value.Year
384
+            For k = 1 To (Br + 1)
385
+                xlSheet.Cells(k + 4, 3) = count_month
386
+                xlSheet.Cells(k + 4, 2) = count_year
387
+                xlSheet.Cells(k + 4, 4) = "=SUMPRODUCT((YEAR(NJ!$" & Str_FTY_XF & "$4:$" & Str_FTY_XF & "$9999)=$B" & k + 4 & ")*(MONTH(NJ!$" & Str_FTY_XF & "$4:$" & Str_FTY_XF & "$9999)=$C" & k + 4 & ")*NJ!$" & Str_PRS & "$4:$" & Str_PRS & "$9999)"
388
+                xlSheet.Cells(k + 4, 5) = "=SUMPRODUCT((YEAR(SK!$" & Str_FTY_XF & "$4:$" & Str_FTY_XF & "$9999)=$B" & k + 4 & ")*(MONTH(SK!$" & Str_FTY_XF & "$4:$" & Str_FTY_XF & "$9999)=$C" & k + 4 & ")*SK!$" & Str_PRS & "$4:$" & Str_PRS & "$9999)"
389
+                xlSheet.Cells(k + 4, 6) = "=SUMPRODUCT((YEAR(JH!$" & Str_FTY_XF & "$4:$" & Str_FTY_XF & "$9999)=$B" & k + 4 & ")*(MONTH(JH!$" & Str_FTY_XF & "$4:$" & Str_FTY_XF & "$9999)=$C" & k + 4 & ")*JH!$" & Str_PRS & "$4:$" & Str_PRS & "$9999)"
390
+                xlSheet.Cells(k + 4, 7) = "=SUM(D" & k + 4 & ":F" & k + 4 & ")"
391
+                DTP2 = DTP2.AddMonths(1)
392
+                count_month = DTP2.Month
393
+                count_year = DTP2.Year
394
+                If k = (Br + 1) Then
395
+                    xlSheet.Cells(k + 5, 2) = Strings.Left(Strings.Format(DTP3, "yyyy/MM/dd"), 10)
396
+                    xlSheet.Cells(k + 5, 3) = "later"
397
+                    xlSheet.Cells(k + 5, 4) = "=SUMIF(NJ!$" & Str_FTY_XF & "$4:$" & Str_FTY_XF & "$9999," & """" & ">" & """" & "&$B$" & k + 5 & ",NJ!$" & Str_PRS & "$4:$" & Str_PRS & "$9999)"
398
+                    xlSheet.Cells(k + 5, 5) = "=SUMIF(SK!$" & Str_FTY_XF & "$4:$" & Str_FTY_XF & "$9999," & """" & ">" & """" & "&$B$" & k + 5 & ",SK!$" & Str_PRS & "$4:$" & Str_PRS & "$9999)"
399
+                    xlSheet.Cells(k + 5, 6) = "=SUMIF(JH!$" & Str_FTY_XF & "$4:$" & Str_FTY_XF & "$9999," & """" & ">" & """" & "&$B$" & k + 5 & ",JH!$" & Str_PRS & "$4:$" & Str_PRS & "$9999)"
400
+                    xlSheet.Cells(k + 5, 7) = "=SUM(D" & k + 5 & ":F" & k + 5 & ")"
401
+                    xlSheet.Cells(k + 6, 2) = "total"
402
+                    xlSheet.Cells(k + 6, 4) = "=SUM(D4:D" & k + 5 & ")"
403
+                    xlSheet.Cells(k + 6, 5) = "=SUM(E4:E" & k + 5 & ")"
404
+                    xlSheet.Cells(k + 6, 6) = "=SUM(F4:F" & k + 5 & ")"
405
+                    xlSheet.Cells(k + 6, 7) = "=SUM(D" & k + 6 & ":F" & k + 6 & ")"
406
+                End If
407
+                Index_月_total = k + 6
408
+            Next
409
+
410
+            ' --------- 週次選表 ---------
411
+            xlSheet.Cells(4, 11) = "=SUMIF(NJ!$" & Str_FTY_XF & "$4:$" & Str_FTY_XF & "$9999," & """" & "<" & """" & "&$I$5,NJ!$" & Str_PRS & "$4:$" & Str_PRS & "$9999)"
412
+            xlSheet.Cells(4, 12) = "=SUMIF(SK!$" & Str_FTY_XF & "$4:$" & Str_FTY_XF & "$9999," & """" & "<" & """" & "&$I$5,SK!$" & Str_PRS & "$4:$" & Str_PRS & "$9999)"
413
+            xlSheet.Cells(4, 13) = "=SUMIF(JH!$" & Str_FTY_XF & "$4:$" & Str_FTY_XF & "$9999," & """" & "<" & """" & "&$I$5,JH!$" & Str_PRS & "$4:$" & Str_PRS & "$9999)"
414
+            xlSheet.Cells(4, 14) = "=SUM(K4:M4)"
415
+            xlSheet.Cells(5, 9) = 週選_起日_tb.Text
416
+            For kk = 1 To CInt(週選_週數_tb.Text)
417
+                xlSheet.Cells(kk + 4, 10) = "=I" & (kk + 4) & "+6"
418
+                xlSheet.Cells(kk + 4, 11) = "=SUMPRODUCT(((NJ!$" & Str_FTY_XF & "$4:$" & Str_FTY_XF & "$9999)>=$I" & kk + 4 & ")*((NJ!$" & Str_FTY_XF & "$4:$" & Str_FTY_XF & "$9999)<=$J" & kk + 4 & ")*NJ!$" & Str_PRS & "$4:$" & Str_PRS & "$9999)"
419
+                xlSheet.Cells(kk + 4, 12) = "=SUMPRODUCT(((SK!$" & Str_FTY_XF & "$4:$" & Str_FTY_XF & "$9999)>=$I" & kk + 4 & ")*((SK!$" & Str_FTY_XF & "$4:$" & Str_FTY_XF & "$9999)<=$J" & kk + 4 & ")*SK!$" & Str_PRS & "$4:$" & Str_PRS & "$9999)"
420
+                xlSheet.Cells(kk + 4, 13) = "=SUMPRODUCT(((JH!$" & Str_FTY_XF & "$4:$" & Str_FTY_XF & "$9999)>=$I" & kk + 4 & ")*((JH!$" & Str_FTY_XF & "$4:$" & Str_FTY_XF & "$9999)<=$J" & kk + 4 & ")*JH!$" & Str_PRS & "$4:$" & Str_PRS & "$9999)"
421
+                xlSheet.Cells(kk + 4, 14) = "=SUM(K" & kk + 4 & ":M" & kk + 4 & ")"
422
+                If kk > 1 Then
423
+                    xlSheet.Cells(kk + 4, 9) = "=J" & (kk + 3) & "+1"
424
+                End If
425
+                If kk = CInt(週選_週數_tb.Text) Then
426
+                    xlSheet.Cells(kk + 5, 9) = "later"
427
+                    xlSheet.Cells(kk + 5, 11) = "=SUMIF(NJ!$" & Str_FTY_XF & "$4:$" & Str_FTY_XF & "$9999," & """" & ">" & """" & "&$J$" & kk + 4 & ",NJ!$" & Str_PRS & "$4:$" & Str_PRS & "$9999)"
428
+                    xlSheet.Cells(kk + 5, 12) = "=SUMIF(SK!$" & Str_FTY_XF & "$4:$" & Str_FTY_XF & "$9999," & """" & ">" & """" & "&$J$" & kk + 4 & ",SK!$" & Str_PRS & "$4:$" & Str_PRS & "$9999)"
429
+                    xlSheet.Cells(kk + 5, 13) = "=SUMIF(JH!$" & Str_FTY_XF & "$4:$" & Str_FTY_XF & "$9999," & """" & ">" & """" & "&$J$" & kk + 4 & ",JH!$" & Str_PRS & "$4:$" & Str_PRS & "$9999)"
430
+                    xlSheet.Cells(kk + 5, 14) = "=SUM(K" & kk + 5 & ":M" & kk + 5 & ")"
431
+                    xlSheet.Cells(kk + 6, 9) = "total"
432
+                    xlSheet.Cells(kk + 6, 11) = "=SUM(K4:K" & kk + 5 & ")"
433
+                    xlSheet.Cells(kk + 6, 12) = "=SUM(L4:L" & kk + 5 & ")"
434
+                    xlSheet.Cells(kk + 6, 13) = "=SUM(M4:M" & kk + 5 & ")"
435
+                    xlSheet.Cells(kk + 6, 14) = "=SUM(K" & kk + 6 & ":M" & kk + 6 & ")"
436
+                End If
437
+            Next
438
+            Excel巨集_C(xlApp, xlSheet)
439
+            j += 1
231 440
         End If
441
+        '----------------------------------------------------------------------------------------------------------------------
442
+        xlApp.Sheets(j).Delete
232 443
         xlSheet.PageSetup.PrintArea = ""
233 444
         xlApp.Cells.Select()
234 445
         xlApp.Application.WindowState = xlMinimized
235 446
         MsgBox("列印完成")
236 447
         Me.Close()
448
+
449
+        'xlSheet.PageSetup.PrintArea = ""
450
+        'xlApp.Cells.Select()
451
+        'xlApp.Application.WindowState = xlMinimized
452
+        'xlSheet.SaveAs(SaveFileDialog1.FileName)
453
+        'xlBook.Close()
454
+        'xlApp.Quit()
455
+        'MsgBox("列印完成")
456
+        'End If
457
+        'Me.Close()
237 458
     End Sub
238
-    Private  Shared Function NewMethod(xlBook As Microsoft.Office.Interop.Excel.Workbook) As Microsoft.Office.Interop.Excel.Worksheet
459
+    Private Shared Function NewMethod(xlBook As Microsoft.Office.Interop.Excel.Workbook) As Microsoft.Office.Interop.Excel.Worksheet
239 460
         Return CType(xlBook.Worksheets.Add, Microsoft.Office.Interop.Excel.Worksheet)
240 461
     End Function
241
-    Private  Sub BB(ByVal myExcel As Microsoft.Office.Interop.Excel.Application, ByVal xlSheet As Microsoft.Office.Interop.Excel.Worksheet)
462
+    Private Sub BB(ByVal myExcel As Microsoft.Office.Interop.Excel.Application, ByVal xlSheet As Microsoft.Office.Interop.Excel.Worksheet)
242 463
         Dim 位置41 As String
243 464
         If CheckBox7.Checked = True Then
244 465
             If P = 0 Then
@@ -377,7 +598,7 @@ Public Class 訂單列印選擇
377 598
         End If
378 599
         Dim M As Integer = 4
379 600
         For M = 4 To DataGridView1.Rows.Count + 2
380
-            M = M + 1
601
+            M += 1
381 602
         Next M
382 603
         If 位置4 = "A" Or 位置4 = "B" Or 位置4 = "C" Or 位置4 = "D" Or 位置4 = "E" Or 位置4 = "F" Or 位置4 = "G" Or 位置4 = "H" Or 位置4 = "I" Or 位置4 = "J" Then
383 604
             位置4 = "J"
@@ -412,4 +633,159 @@ Public Class 訂單列印選擇
412 633
         myExcel.ActiveWindow.ScrollColumn = 4 : myExcel.ActiveWindow.ScrollColumn = 3 : myExcel.ActiveWindow.ScrollColumn = 2 : myExcel.ActiveWindow.ScrollColumn = 1
413 634
         myExcel.ActiveWindow.DisplayGridlines = False
414 635
     End Sub
636
+    Private Sub Excel巨集_C(ByVal myExcel As Microsoft.Office.Interop.Excel.Application, ByVal xlSheet As Microsoft.Office.Interop.Excel.Worksheet)
637
+        '全選改變字體
638
+        xlSheet.Cells.Select()
639
+        With myExcel.Selection.Font : .Name = "微軟正黑體" : .Size = 12 : .Strikethrough = False : .Superscript = False : .Subscript = False : .OutlineFont = False : .Shadow = False
640
+            .Underline = xlUnderlineStyleNone : .ThemeColor = xlThemeColorLight1 : .TintAndShade = 0 : .ThemeFont = xlThemeFontNone
641
+        End With
642
+
643
+        ' 改變行寬 Columns("A") & Columns("H")
644
+        xlSheet.Columns("A:A").Select : myExcel.Selection.ColumnWidth = 1
645
+        xlSheet.Columns("H:H").Select : myExcel.Selection.ColumnWidth = 1
646
+
647
+        ' 改變行寬
648
+        xlSheet.Columns("B:C").Select : myExcel.Selection.ColumnWidth = 10
649
+        xlSheet.Columns("I:J").Select : myExcel.Selection.ColumnWidth = 10
650
+        xlSheet.Columns("D:G").Select : myExcel.Selection.ColumnWidth = 15
651
+        xlSheet.Columns("K:N").Select : myExcel.Selection.ColumnWidth = 15
652
+
653
+        '全選改變列高
654
+        xlSheet.Cells.Select()  '全選
655
+        myExcel.Selection.RowHeight = 25  '改變列高
656
+        xlSheet.Range("A1").Select()
657
+
658
+        ' 改變列高Rows("1")
659
+        xlSheet.Rows("1:1").Select : myExcel.Selection.RowHeight = 5
660
+        ' 改變列高Rows("2")
661
+        xlSheet.Rows("2:2").Select : myExcel.Selection.RowHeight = 35
662
+
663
+        ' ("B2到N2")跨欄至中
664
+        xlSheet.Range("B2:N2").Select()
665
+        With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
666
+            .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False
667
+        End With : myExcel.Selection.Merge
668
+
669
+        ' ("B3到C3")跨欄至中
670
+        xlSheet.Range("B3:C3").Select()
671
+        With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
672
+            .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False
673
+        End With : myExcel.Selection.Merge
674
+
675
+        ' ("I3到J3")跨欄至中
676
+        xlSheet.Range("I3:J3").Select()
677
+        With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
678
+            .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False
679
+        End With : myExcel.Selection.Merge
680
+
681
+        ' ("I4到J4")跨欄至中
682
+        xlSheet.Range("I4:J4").Select()
683
+        With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
684
+            .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False
685
+        End With : myExcel.Selection.Merge
686
+        myExcel.Selection.Merge
687
+
688
+        '月total 跨欄至中 
689
+        xlSheet.Range("B" & Index_月_total.ToString & ":C" & Index_月_total.ToString).Select()
690
+        With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
691
+            .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False
692
+        End With : myExcel.Selection.Merge
693
+
694
+        '跨欄至中 週 later
695
+        xlSheet.Range("I" & (CInt(週選_週數_tb.Text) + 5).ToString & ":J" & (CInt(週選_週數_tb.Text) + 5).ToString).Select()
696
+        With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
697
+            .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False
698
+        End With : myExcel.Selection.Merge
699
+
700
+        '跨欄至中 週 total
701
+        xlSheet.Range("I" & (CInt(週選_週數_tb.Text) + 6).ToString & ":J" & (CInt(週選_週數_tb.Text) + 6).ToString).Select()
702
+        With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
703
+            .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False
704
+        End With : myExcel.Selection.Merge
705
+
706
+        ' 儲存格設置格式 週日期格式
707
+        xlSheet.Range("I5:J" & (CInt(週選_週數_tb.Text) + 4).ToString).Select()
708
+        myExcel.Selection.NumberFormatLocal = "mm/dd/yy;@" '設置格式
709
+        xlSheet.Range("B4").Select()
710
+        myExcel.Selection.NumberFormatLocal = "mm/dd/yy;@"
711
+        xlSheet.Range("B" & (Index_月_total - 1).ToString).Select()
712
+        myExcel.Selection.NumberFormatLocal = "mm/dd/yy;@"
713
+
714
+        ' 改變字體大小
715
+        xlSheet.Range("B2:N2").Select()
716
+        myExcel.Selection.Font.Size = 14
717
+
718
+        ' 儲存格設置格式 (數值 千分位符號)
719
+        xlSheet.Range("D4:G1000").Select() : myExcel.Selection.NumberFormatLocal = "#,##0_ "
720
+        xlSheet.Range("K4:N1000").Select() : myExcel.Selection.NumberFormatLocal = "#,##0_ "
721
+
722
+        ' 儲存格顏色設定
723
+        xlSheet.Range("B3:G3").Select()
724
+        With myExcel.Selection.Interior : .Pattern = xlSolid : .PatternColorIndex = xlAutomatic : .Color = 16247773 : .TintAndShade = 0 : .PatternTintAndShade = 0 : End With
725
+
726
+        ' 儲存格顏色設定
727
+        xlSheet.Range("I3:N3").Select()
728
+        With myExcel.Selection.Interior : .Pattern = xlSolid : .PatternColorIndex = xlAutomatic : .Color = 16247773 : .TintAndShade = 0 : .PatternTintAndShade = 0 : End With
729
+
730
+        ' 儲存格顏色設定
731
+        'xlSheet.Range("B2:N2").Select()
732
+        'With myExcel.Selection.Interior : .Pattern = xlSolid : .PatternColorIndex = xlAutomatic : .ThemeColor = xlThemeColorAccent1 : .TintAndShade = 0.399975585192419 : .PatternTintAndShade = 0 : End With
733
+
734
+        ' 儲存格顏色設定 月total
735
+        xlSheet.Range("G4:G" & Index_月_total.ToString).Select()
736
+        With myExcel.Selection.Interior : .Pattern = xlSolid : .PatternColorIndex = xlAutomatic : .ThemeColor = xlThemeColorAccent2 : .TintAndShade = 0.799981688894314 : .PatternTintAndShade = 0 : End With
737
+
738
+        ' 儲存格顏色設定 月total
739
+        xlSheet.Range("B" & Index_月_total.ToString & ":G" & Index_月_total.ToString).Select()
740
+        With myExcel.Selection.Interior : .Pattern = xlSolid : .PatternColorIndex = xlAutomatic : .ThemeColor = xlThemeColorAccent2 : .TintAndShade = 0.799981688894314 : .PatternTintAndShade = 0 : End With
741
+
742
+        ' 儲存格顏色設定 週total
743
+        xlSheet.Range("N4:N" & (CInt(週選_週數_tb.Text) + 6).ToString).Select()
744
+        With myExcel.Selection.Interior : .Pattern = xlSolid : .PatternColorIndex = xlAutomatic : .ThemeColor = xlThemeColorAccent2 : .TintAndShade = 0.799981688894314 : .PatternTintAndShade = 0 : End With
745
+
746
+        ' 儲存格顏色設定 週total
747
+        xlSheet.Range("I" & (CInt(週選_週數_tb.Text) + 6).ToString & ":N" & (CInt(週選_週數_tb.Text) + 6).ToString).Select()
748
+        With myExcel.Selection.Interior : .Pattern = xlSolid : .PatternColorIndex = xlAutomatic : .ThemeColor = xlThemeColorAccent2 : .TintAndShade = 0.799981688894314 : .PatternTintAndShade = 0 : End With
749
+
750
+
751
+        ' 儲存格 格線設定 月
752
+        xlSheet.Range("B3:G" & Index_月_total.ToString).Select()
753
+        myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
754
+        With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
755
+        With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
756
+        With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
757
+        With myExcel.Selection.Borders(xlEdgeRight) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
758
+        With myExcel.Selection.Borders(xlInsideVertical) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
759
+        With myExcel.Selection.Borders(xlInsideHorizontal) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
760
+
761
+        ' 儲存格 格線設定 週
762
+        xlSheet.Range("I3:N" & (CInt(週選_週數_tb.Text) + 6).ToString).Select()
763
+        myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
764
+        With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
765
+        With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
766
+        With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
767
+        With myExcel.Selection.Borders(xlEdgeRight) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
768
+        With myExcel.Selection.Borders(xlInsideVertical) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
769
+        With myExcel.Selection.Borders(xlInsideHorizontal) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
770
+
771
+        ' 儲存格 格線設定 標頭
772
+        'xlSheet.Range("B2:N2").Select()
773
+        'myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone
774
+        'myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
775
+        'With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
776
+        'With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
777
+        'With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
778
+        'With myExcel.Selection.Borders(xlEdgeRight) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
779
+        'With myExcel.Selection.Borders(xlInsideVertical) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
780
+        'With myExcel.Selection.Borders(xlInsideHorizontal) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
781
+
782
+        '全選後資料至中
783
+        xlSheet.Cells.Select()
784
+        With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
785
+            .ShrinkToFit = False : .ReadingOrder = xlContext
786
+        End With
787
+
788
+        ' 隱藏格線
789
+        myExcel.ActiveWindow.DisplayGridlines = False
790
+    End Sub
415 791
 End Class

+ 515
- 515
TENDEN-MES-SYS/量產訂單管理/鞋盒資料控制表.Designer.vb
文件差異過大導致無法顯示
查看文件


+ 271
- 271
TENDEN-MES-SYS/量產訂單管理/鞋盒資料控制表.vb 查看文件

@@ -14,38 +14,38 @@ Public Class 鞋盒資料控制表
14 14
     Dim aa As MsgBoxResult
15 15
     Private  Sub Set_DGV1載入前設定()
16 16
         conn.Close()
17
-        DataGridView1.DataSource = Nothing : ds.Clear()
18
-        DataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
19
-        DataGridView1.ColumnHeadersHeight = 25
20
-        DataGridView1.AllowUserToAddRows = False
17
+        清單1_dgv.DataSource = Nothing : ds.Clear()
18
+        清單1_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
19
+        清單1_dgv.ColumnHeadersHeight = 25
20
+        清單1_dgv.AllowUserToAddRows = False
21 21
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
22 22
     End Sub
23
-    Private  Sub Set_DGV1載入後設定()
24
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds) : DataGridView1.DataSource = ds.Tables(0) : conn.Close()
23
+    Private Sub Set_DGV1載入後設定()
24
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds) : 清單1_dgv.DataSource = ds.Tables(0) : conn.Close()
25 25
     End Sub
26
-    Private  Sub Set_清單1()
26
+    Private Sub Set_清單1()
27 27
         Set_DGV1載入前設定()
28 28
         SQL1 = "SELECT SEASON, CONSTRUCTION, FTY, STYLE, TVW, S_B_S, M_B_S, L_B_S, E_B_S, S_GW, M_GW, L_GW, E_GW, Dimensions_S, Dimensions_M, Dimensions_L, " &
29 29
                "Dimensions_E, PRS_CRT, QUK, 鞋盒流水號 FROM 鞋盒資料控制表 ORDER BY STYLE"
30 30
         Set_DGV1載入後設定()
31 31
     End Sub
32
-    Private  Sub Set_grid1()
33
-        DataGridView1.Columns(0).Width = 70 : DataGridView1.Columns(1).Width = 120 : DataGridView1.Columns(2).Width = 40 : DataGridView1.Columns(3).Width = 155
34
-        DataGridView1.Columns(4).Width = 80 : DataGridView1.Columns(5).Width = 150 : DataGridView1.Columns(6).Width = 150 : DataGridView1.Columns(7).Width = 150
35
-        DataGridView1.Columns(8).Width = 150 : DataGridView1.Columns(9).Width = 50 : DataGridView1.Columns(10).Width = 50 : DataGridView1.Columns(11).Width = 50
36
-        DataGridView1.Columns(12).Width = 50 : DataGridView1.Columns(13).Width = 150 : DataGridView1.Columns(14).Width = 150 : DataGridView1.Columns(15).Width = 150
37
-        DataGridView1.Columns(16).Width = 150 : DataGridView1.Columns(17).Width = 65 : DataGridView1.Columns(18).Width = 135 : DataGridView1.Columns(19).Width = 50
38
-        DataGridView1.Columns(9).DefaultCellStyle.Format = "#,##0.00" : DataGridView1.Columns(10).DefaultCellStyle.Format = "#,##0.00"
39
-        DataGridView1.Columns(11).DefaultCellStyle.Format = "#,##0.00" : DataGridView1.Columns(12).DefaultCellStyle.Format = "#,##0.00"
32
+    Private Sub Set_grid1()
33
+        清單1_dgv.Columns(0).Width = 70 : 清單1_dgv.Columns(1).Width = 120 : 清單1_dgv.Columns(2).Width = 40 : 清單1_dgv.Columns(3).Width = 155
34
+        清單1_dgv.Columns(4).Width = 80 : 清單1_dgv.Columns(5).Width = 150 : 清單1_dgv.Columns(6).Width = 150 : 清單1_dgv.Columns(7).Width = 150
35
+        清單1_dgv.Columns(8).Width = 150 : 清單1_dgv.Columns(9).Width = 50 : 清單1_dgv.Columns(10).Width = 50 : 清單1_dgv.Columns(11).Width = 50
36
+        清單1_dgv.Columns(12).Width = 50 : 清單1_dgv.Columns(13).Width = 150 : 清單1_dgv.Columns(14).Width = 150 : 清單1_dgv.Columns(15).Width = 150
37
+        清單1_dgv.Columns(16).Width = 150 : 清單1_dgv.Columns(17).Width = 65 : 清單1_dgv.Columns(18).Width = 135 : 清單1_dgv.Columns(19).Width = 50
38
+        清單1_dgv.Columns(9).DefaultCellStyle.Format = "#,##0.00" : 清單1_dgv.Columns(10).DefaultCellStyle.Format = "#,##0.00"
39
+        清單1_dgv.Columns(11).DefaultCellStyle.Format = "#,##0.00" : 清單1_dgv.Columns(12).DefaultCellStyle.Format = "#,##0.00"
40 40
         If BB(0) = False And BB(1) = True Then
41
-            DataGridView1.Columns(9).Visible = True : DataGridView1.Columns(10).Visible = True : DataGridView1.Columns(11).Visible = True : DataGridView1.Columns(12).Visible = True
42
-            DataGridView1.Columns(17).Visible = False : DataGridView1.Columns(18).Visible = False : DataGridView1.Columns(19).Visible = False
41
+            清單1_dgv.Columns(9).Visible = True : 清單1_dgv.Columns(10).Visible = True : 清單1_dgv.Columns(11).Visible = True : 清單1_dgv.Columns(12).Visible = True
42
+            清單1_dgv.Columns(17).Visible = False : 清單1_dgv.Columns(18).Visible = False : 清單1_dgv.Columns(19).Visible = False
43 43
         ElseIf BB(0) = True And BB(1) = False Then
44
-            DataGridView1.Columns(9).Visible = False : DataGridView1.Columns(10).Visible = False : DataGridView1.Columns(11).Visible = False : DataGridView1.Columns(12).Visible = False
45
-            DataGridView1.Columns(17).Visible = True : DataGridView1.Columns(18).Visible = True : DataGridView1.Columns(19).Visible = False
44
+            清單1_dgv.Columns(9).Visible = False : 清單1_dgv.Columns(10).Visible = False : 清單1_dgv.Columns(11).Visible = False : 清單1_dgv.Columns(12).Visible = False
45
+            清單1_dgv.Columns(17).Visible = True : 清單1_dgv.Columns(18).Visible = True : 清單1_dgv.Columns(19).Visible = False
46 46
         End If
47 47
     End Sub
48
-    Private  Sub Set_DGV2載入前設定()
48
+    Private Sub Set_DGV2載入前設定()
49 49
         conn.Close()
50 50
         鞋盒資料未建檔清單_dgv.DataSource = Nothing : ds1.Clear()
51 51
         鞋盒資料未建檔清單_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
@@ -69,22 +69,22 @@ Public Class 鞋盒資料控制表
69 69
     End Sub
70 70
     Private Sub Set_DGV3載入前設定()
71 71
         conn.Close()
72
-        DataGridView3.DataSource = Nothing : ds2.Clear()
73
-        DataGridView3.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
74
-        DataGridView3.ColumnHeadersHeight = 25
75
-        DataGridView3.AllowUserToAddRows = False
72
+        清單2_dgv.DataSource = Nothing : ds2.Clear()
73
+        清單2_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
74
+        清單2_dgv.ColumnHeadersHeight = 25
75
+        清單2_dgv.AllowUserToAddRows = False
76 76
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
77 77
     End Sub
78 78
     Private Sub Set_DGV3載入後設定()
79
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds2) : DataGridView3.DataSource = ds2.Tables(0) : conn.Close()
79
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds2) : 清單2_dgv.DataSource = ds2.Tables(0) : conn.Close()
80 80
     End Sub
81 81
     Private Sub Set_grid3()
82
-        DataGridView3.Columns(0).Width = 95 : DataGridView3.Columns(1).Width = 70 : DataGridView3.Columns(2).Width = 130 : DataGridView3.Columns(3).Width = 65
83
-        DataGridView3.Columns(4).Width = 100 : DataGridView3.Columns(5).Width = 100 : DataGridView3.Columns(6).Width = 100 : DataGridView3.Columns(7).Width = 220
84
-        DataGridView3.Columns(8).Width = 120 : DataGridView3.Columns(9).Width = 70 : DataGridView3.Columns(10).Width = 90 : DataGridView3.Columns(11).Width = 168
85
-        DataGridView3.Columns(12).Width = 100 : DataGridView3.Columns(13).Width = 100 : DataGridView3.Columns(14).Width = 168 : DataGridView3.Columns(15).Width = 168
86
-        DataGridView3.Columns(10).DefaultCellStyle.Format = "#,##0"
87
-        DataGridView3.Columns(10).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView3.Columns(10).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
82
+        清單2_dgv.Columns(0).Width = 95 : 清單2_dgv.Columns(1).Width = 70 : 清單2_dgv.Columns(2).Width = 130 : 清單2_dgv.Columns(3).Width = 65
83
+        清單2_dgv.Columns(4).Width = 100 : 清單2_dgv.Columns(5).Width = 100 : 清單2_dgv.Columns(6).Width = 100 : 清單2_dgv.Columns(7).Width = 220
84
+        清單2_dgv.Columns(8).Width = 120 : 清單2_dgv.Columns(9).Width = 70 : 清單2_dgv.Columns(10).Width = 90 : 清單2_dgv.Columns(11).Width = 168
85
+        清單2_dgv.Columns(12).Width = 100 : 清單2_dgv.Columns(13).Width = 100 : 清單2_dgv.Columns(14).Width = 168 : 清單2_dgv.Columns(15).Width = 168
86
+        清單2_dgv.Columns(10).DefaultCellStyle.Format = "#,##0"
87
+        清單2_dgv.Columns(10).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 清單2_dgv.Columns(10).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
88 88
     End Sub
89 89
     Private Sub ComboBox1下拉表單資料載入()
90 90
         conn.Close()
@@ -152,44 +152,44 @@ Public Class 鞋盒資料控制表
152 152
     Private Sub 鞋盒資料控制表_Load(sender As Object, e As EventArgs) Handles MyBase.Load
153 153
         Me.MdiParent = TENDEN_MES_SYS : Me.WindowState = 2 : Me.AutoScroll = True
154 154
         第一頁_bt.Enabled = False : 確認新增_bt.Enabled = False : 確認複製_bt.Enabled = False
155
-        TextBox15.Visible = False : TextBox16.Visible = False : TextBox17.Visible = False
156
-        TextBox1.Enabled = False : TextBox2.Enabled = False : TextBox3.Enabled = False : TextBox4.Enabled = False
157
-        TextBox9.Enabled = False : TextBox10.Enabled = False : TextBox11.Enabled = False : TextBox12.Enabled = False
158
-        ComboBox6.Enabled = False : ComboBox7.Enabled = False
155
+        流水號_tb.Visible = False : 流水號2_tb.Visible = False : 流水號1_tb.Visible = False
156
+        SMALLBOX_tb.Enabled = False : MEDIUMBOX_tb.Enabled = False : LARGERBOX_tb.Enabled = False : EXTRABOX_tb.Enabled = False
157
+        DimensionsS_tb.Enabled = False : DimensionsM_tb.Enabled = False : DimensionsL_tb.Enabled = False : DimensionsE_tb.Enabled = False
158
+        寫入後初始化_cb.Enabled = False : 寫入後初始化1_cb.Enabled = False
159 159
         BB(0) = False : BB(1) = True
160 160
         Set_清單1() : Set_grid1() : Set_清單2() : Set_grid2()
161 161
         ComboBox1下拉表單資料載入() : ComboBox2下拉表單資料載入() : ComboBox3下拉表單資料載入() : ComboBox4下拉表單資料載入() : ComboBox5下拉表單資料載入()
162 162
     End Sub
163
-    Private Sub DataGridView3_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles DataGridView3.RowPostPaint
163
+    Private Sub DataGridView3_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles 清單2_dgv.RowPostPaint
164 164
         Dim linePen As New Pen(Color.Blue, 2)
165
-        If e.RowIndex = DataGridView3.Rows.Count - 1 Then
165
+        If e.RowIndex = 清單2_dgv.Rows.Count - 1 Then
166 166
             Exit Sub
167 167
         Else
168
-            If DataGridView3(2, e.RowIndex).Value.ToString <> DataGridView3(2, e.RowIndex + 1).Value.ToString Then
169
-                Dim startX As Integer = IIf(DataGridView3.RowHeadersVisible, DataGridView3.RowHeadersWidth, 0)
168
+            If 清單2_dgv(2, e.RowIndex).Value.ToString <> 清單2_dgv(2, e.RowIndex + 1).Value.ToString Then
169
+                Dim startX As Integer = IIf(清單2_dgv.RowHeadersVisible, 清單2_dgv.RowHeadersWidth, 0)
170 170
                 Dim startY As Integer = e.RowBounds.Top + e.RowBounds.Height - 1
171
-                Dim endX As Integer = startX + DataGridView3.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - DataGridView3.HorizontalScrollingOffset
171
+                Dim endX As Integer = startX + 清單2_dgv.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - 清單2_dgv.HorizontalScrollingOffset
172 172
                 e.Graphics.DrawLine(linePen, startX, startY, endX, startY)
173 173
                 Exit Sub
174 174
             End If
175 175
         End If
176 176
     End Sub
177
-    Private Sub DataGridView1_CellClick(ByVal sender As Object, ByVal e As DataGridViewCellEventArgs) Handles DataGridView1.CellClick
177
+    Private Sub DataGridView1_CellClick(ByVal sender As Object, ByVal e As DataGridViewCellEventArgs) Handles 清單1_dgv.CellClick
178 178
         If e.RowIndex = -1 Then : Else
179 179
             ComboBox1下拉表單資料載入() : ComboBox2下拉表單資料載入() : ComboBox3下拉表單資料載入() : ComboBox4下拉表單資料載入() : ComboBox5下拉表單資料載入()
180
-            季節_cb.Text = DataGridView1(0, e.RowIndex).Value.ToString : 構造名稱_cb.Text = DataGridView1(1, e.RowIndex).Value.ToString
181
-            FTY_cb.Text = DataGridView1(2, e.RowIndex).Value.ToString : 風格_cb.Text = DataGridView1(3, e.RowIndex).Value.ToString
182
-            TVW_cb.Text = DataGridView1(4, e.RowIndex).Value.ToString : TextBox1.Text = DataGridView1(5, e.RowIndex).Value.ToString
183
-            TextBox2.Text = DataGridView1(6, e.RowIndex).Value.ToString : TextBox3.Text = DataGridView1(7, e.RowIndex).Value.ToString
184
-            TextBox4.Text = DataGridView1(8, e.RowIndex).Value.ToString : TextBox5.Text = DataGridView1(9, e.RowIndex).Value.ToString
185
-            TextBox6.Text = DataGridView1(10, e.RowIndex).Value.ToString : TextBox7.Text = DataGridView1(11, e.RowIndex).Value.ToString
186
-            TextBox8.Text = DataGridView1(12, e.RowIndex).Value.ToString : TextBox9.Text = DataGridView1(13, e.RowIndex).Value.ToString
187
-            TextBox10.Text = DataGridView1(14, e.RowIndex).Value.ToString : TextBox11.Text = DataGridView1(15, e.RowIndex).Value.ToString
188
-            TextBox12.Text = DataGridView1(16, e.RowIndex).Value.ToString : PRSCRT_tb.Text = DataGridView1(17, e.RowIndex).Value.ToString
189
-            QUK_tb.Text = DataGridView1(18, e.RowIndex).Value.ToString : TextBox15.Text = DataGridView1(19, e.RowIndex).Value.ToString
180
+            季節_cb.Text = 清單1_dgv(0, e.RowIndex).Value.ToString : 構造名稱_cb.Text = 清單1_dgv(1, e.RowIndex).Value.ToString
181
+            FTY_cb.Text = 清單1_dgv(2, e.RowIndex).Value.ToString : 風格_cb.Text = 清單1_dgv(3, e.RowIndex).Value.ToString
182
+            TVW_cb.Text = 清單1_dgv(4, e.RowIndex).Value.ToString : SMALLBOX_tb.Text = 清單1_dgv(5, e.RowIndex).Value.ToString
183
+            MEDIUMBOX_tb.Text = 清單1_dgv(6, e.RowIndex).Value.ToString : LARGERBOX_tb.Text = 清單1_dgv(7, e.RowIndex).Value.ToString
184
+            EXTRABOX_tb.Text = 清單1_dgv(8, e.RowIndex).Value.ToString : SMALL_tb.Text = 清單1_dgv(9, e.RowIndex).Value.ToString
185
+            MEDIUM_tb.Text = 清單1_dgv(10, e.RowIndex).Value.ToString : LARGE_tb.Text = 清單1_dgv(11, e.RowIndex).Value.ToString
186
+            EXTRA_tb.Text = 清單1_dgv(12, e.RowIndex).Value.ToString : DimensionsS_tb.Text = 清單1_dgv(13, e.RowIndex).Value.ToString
187
+            DimensionsM_tb.Text = 清單1_dgv(14, e.RowIndex).Value.ToString : DimensionsL_tb.Text = 清單1_dgv(15, e.RowIndex).Value.ToString
188
+            DimensionsE_tb.Text = 清單1_dgv(16, e.RowIndex).Value.ToString : PRSCRT_tb.Text = 清單1_dgv(17, e.RowIndex).Value.ToString
189
+            QUK_tb.Text = 清單1_dgv(18, e.RowIndex).Value.ToString : 流水號_tb.Text = 清單1_dgv(19, e.RowIndex).Value.ToString
190 190
             Set_DGV3載入前設定()
191 191
             SQL1 = "SELECT 訂單流水號 AS VT#, 年份季度 AS 季度, 客戶訂單號, 生產工廠 AS 工廠, 訂單種類, 客戶交期 AS 訂單日期, TVW AS 型體號, 形體號 AS ProductName, 顏色, 楦型, 訂單數量, 備註, " &
192
-                   "工廠回復交期, 包裝確認時間, 客戶包裝確認, 東莞業務備註 FROM 訂單控制表 WHERE (形體號 LIKE '" & DataGridView1.Rows(e.RowIndex).Cells("STYLE").Value & "') ORDER BY 訂單日期, VT#"
192
+                   "工廠回復交期, 包裝確認時間, 客戶包裝確認, 東莞業務備註 FROM 訂單控制表 WHERE (形體號 LIKE '" & 清單1_dgv.Rows(e.RowIndex).Cells("STYLE").Value & "') ORDER BY 訂單日期, VT#"
193 193
             Set_DGV3載入後設定() : Set_grid3()
194 194
         End If
195 195
     End Sub
@@ -222,116 +222,116 @@ Public Class 鞋盒資料控制表
222 222
         If (TVW_cb.Items.Count = 0) Then : Else : TVW_cb.SelectedIndex = 0 : End If : conn.Close()
223 223
         PP = ""
224 224
     End Sub
225
-    Private Sub RadioButton1_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton1.Click
226
-        RadioButton1.Checked = True : RadioButton2.Checked = False : RadioButton3.Checked = False : RadioButton4.Checked = False
227
-        RadioButton5.Checked = False : RadioButton6.Checked = False : RadioButton7.Checked = False : RadioButton8.Checked = False
228
-        ComboBox6.Enabled = True : ComboBox7.Enabled = False : ComboBox7.Text = " "
229
-    End Sub
230
-    Private Sub RadioButton2_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton2.Click
231
-        RadioButton1.Checked = False : RadioButton2.Checked = True : RadioButton3.Checked = False : RadioButton4.Checked = False
232
-        RadioButton5.Checked = False : RadioButton6.Checked = False : RadioButton7.Checked = False : RadioButton8.Checked = False
233
-        ComboBox6.Enabled = True : ComboBox7.Enabled = False : ComboBox7.Text = " "
234
-    End Sub
235
-    Private Sub RadioButton3_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton3.Click
236
-        RadioButton1.Checked = False : RadioButton2.Checked = False : RadioButton3.Checked = True : RadioButton4.Checked = False
237
-        RadioButton5.Checked = False : RadioButton6.Checked = False : RadioButton7.Checked = False : RadioButton8.Checked = False
238
-        ComboBox6.Enabled = True : ComboBox7.Enabled = False : ComboBox7.Text = " "
239
-    End Sub
240
-    Private Sub RadioButton4_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton4.Click
241
-        RadioButton1.Checked = False : RadioButton2.Checked = False : RadioButton3.Checked = False : RadioButton4.Checked = True
242
-        RadioButton5.Checked = False : RadioButton6.Checked = False : RadioButton7.Checked = False : RadioButton8.Checked = False
243
-        ComboBox6.Enabled = True : ComboBox7.Enabled = False : ComboBox7.Text = " "
244
-    End Sub
245
-    Private Sub RadioButton5_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton5.Click
246
-        RadioButton1.Checked = False : RadioButton2.Checked = False : RadioButton3.Checked = False : RadioButton4.Checked = False
247
-        RadioButton5.Checked = True : RadioButton6.Checked = False : RadioButton7.Checked = False : RadioButton8.Checked = False
248
-        ComboBox6.Enabled = False : ComboBox7.Enabled = True : ComboBox6.Text = " "
249
-    End Sub
250
-    Private Sub RadioButton6_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton6.Click
251
-        RadioButton1.Checked = False : RadioButton2.Checked = False : RadioButton3.Checked = False : RadioButton4.Checked = False
252
-        RadioButton5.Checked = False : RadioButton6.Checked = True : RadioButton7.Checked = False : RadioButton8.Checked = False
253
-        ComboBox6.Enabled = False : ComboBox7.Enabled = True : ComboBox6.Text = " "
254
-    End Sub
255
-    Private Sub RadioButton7_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton7.Click
256
-        RadioButton1.Checked = False : RadioButton2.Checked = False : RadioButton3.Checked = False : RadioButton4.Checked = False
257
-        RadioButton5.Checked = False : RadioButton6.Checked = False : RadioButton7.Checked = True : RadioButton8.Checked = False
258
-        ComboBox6.Enabled = False : ComboBox7.Enabled = True : ComboBox6.Text = " "
259
-    End Sub
260
-    Private Sub RadioButton8_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton8.Click
261
-        RadioButton1.Checked = False : RadioButton2.Checked = False : RadioButton3.Checked = False : RadioButton4.Checked = False
262
-        RadioButton5.Checked = False : RadioButton6.Checked = False : RadioButton7.Checked = False : RadioButton8.Checked = True
263
-        ComboBox6.Enabled = False : ComboBox7.Enabled = True : ComboBox6.Text = " "
264
-    End Sub
265
-    Private Sub CheckBox1_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox1.Click
266
-        If CheckBox1.Checked = True Then
267
-            If KL1 = False And KL2 = False Then : KL1 = True : CheckBox1.Checked = True : ElseIf KL1 = False And KL2 = True Then : KL1 = True : CheckBox1.Checked = True
268
-            ElseIf KL1 = True And KL2 = False Then : KL2 = True : CheckBox1.Checked = True : ElseIf KL1 = True And KL2 = True Then : CheckBox1.Checked = False : End If
269
-        ElseIf CheckBox1.Checked = False Then
270
-            If KL1 = True And KL2 = True Then : KL1 = False : CheckBox1.Checked = False : ElseIf KL1 = True And KL2 = False Then : KL1 = False : CheckBox1.Checked = False
271
-            ElseIf KL1 = False And KL2 = True Then : KL2 = False : CheckBox1.Checked = False : ElseIf KL1 = False And KL2 = False Then : CheckBox1.Checked = False : End If
225
+    Private Sub RadioButton1_CheckedChanged(sender As Object, e As EventArgs) Handles S_B_S_rbt.Click
226
+        S_B_S_rbt.Checked = True : M_B_S_rbt.Checked = False : L_B_S_rbt.Checked = False : E_B_S_rbt.Checked = False
227
+        D_S_rbt.Checked = False : D_M_rbt.Checked = False : D_L_rbt.Checked = False : D_E_rbt.Checked = False
228
+        寫入後初始化_cb.Enabled = True : 寫入後初始化1_cb.Enabled = False : 寫入後初始化1_cb.Text = " "
229
+    End Sub
230
+    Private Sub RadioButton2_CheckedChanged(sender As Object, e As EventArgs) Handles M_B_S_rbt.Click
231
+        S_B_S_rbt.Checked = False : M_B_S_rbt.Checked = True : L_B_S_rbt.Checked = False : E_B_S_rbt.Checked = False
232
+        D_S_rbt.Checked = False : D_M_rbt.Checked = False : D_L_rbt.Checked = False : D_E_rbt.Checked = False
233
+        寫入後初始化_cb.Enabled = True : 寫入後初始化1_cb.Enabled = False : 寫入後初始化1_cb.Text = " "
234
+    End Sub
235
+    Private Sub RadioButton3_CheckedChanged(sender As Object, e As EventArgs) Handles L_B_S_rbt.Click
236
+        S_B_S_rbt.Checked = False : M_B_S_rbt.Checked = False : L_B_S_rbt.Checked = True : E_B_S_rbt.Checked = False
237
+        D_S_rbt.Checked = False : D_M_rbt.Checked = False : D_L_rbt.Checked = False : D_E_rbt.Checked = False
238
+        寫入後初始化_cb.Enabled = True : 寫入後初始化1_cb.Enabled = False : 寫入後初始化1_cb.Text = " "
239
+    End Sub
240
+    Private Sub RadioButton4_CheckedChanged(sender As Object, e As EventArgs) Handles E_B_S_rbt.Click
241
+        S_B_S_rbt.Checked = False : M_B_S_rbt.Checked = False : L_B_S_rbt.Checked = False : E_B_S_rbt.Checked = True
242
+        D_S_rbt.Checked = False : D_M_rbt.Checked = False : D_L_rbt.Checked = False : D_E_rbt.Checked = False
243
+        寫入後初始化_cb.Enabled = True : 寫入後初始化1_cb.Enabled = False : 寫入後初始化1_cb.Text = " "
244
+    End Sub
245
+    Private Sub RadioButton5_CheckedChanged(sender As Object, e As EventArgs) Handles D_S_rbt.Click
246
+        S_B_S_rbt.Checked = False : M_B_S_rbt.Checked = False : L_B_S_rbt.Checked = False : E_B_S_rbt.Checked = False
247
+        D_S_rbt.Checked = True : D_M_rbt.Checked = False : D_L_rbt.Checked = False : D_E_rbt.Checked = False
248
+        寫入後初始化_cb.Enabled = False : 寫入後初始化1_cb.Enabled = True : 寫入後初始化_cb.Text = " "
249
+    End Sub
250
+    Private Sub RadioButton6_CheckedChanged(sender As Object, e As EventArgs) Handles D_M_rbt.Click
251
+        S_B_S_rbt.Checked = False : M_B_S_rbt.Checked = False : L_B_S_rbt.Checked = False : E_B_S_rbt.Checked = False
252
+        D_S_rbt.Checked = False : D_M_rbt.Checked = True : D_L_rbt.Checked = False : D_E_rbt.Checked = False
253
+        寫入後初始化_cb.Enabled = False : 寫入後初始化1_cb.Enabled = True : 寫入後初始化_cb.Text = " "
254
+    End Sub
255
+    Private Sub RadioButton7_CheckedChanged(sender As Object, e As EventArgs) Handles D_L_rbt.Click
256
+        S_B_S_rbt.Checked = False : M_B_S_rbt.Checked = False : L_B_S_rbt.Checked = False : E_B_S_rbt.Checked = False
257
+        D_S_rbt.Checked = False : D_M_rbt.Checked = False : D_L_rbt.Checked = True : D_E_rbt.Checked = False
258
+        寫入後初始化_cb.Enabled = False : 寫入後初始化1_cb.Enabled = True : 寫入後初始化_cb.Text = " "
259
+    End Sub
260
+    Private Sub RadioButton8_CheckedChanged(sender As Object, e As EventArgs) Handles D_E_rbt.Click
261
+        S_B_S_rbt.Checked = False : M_B_S_rbt.Checked = False : L_B_S_rbt.Checked = False : E_B_S_rbt.Checked = False
262
+        D_S_rbt.Checked = False : D_M_rbt.Checked = False : D_L_rbt.Checked = False : D_E_rbt.Checked = True
263
+        寫入後初始化_cb.Enabled = False : 寫入後初始化1_cb.Enabled = True : 寫入後初始化_cb.Text = " "
264
+    End Sub
265
+    Private Sub CheckBox1_CheckedChanged(sender As Object, e As EventArgs) Handles 数值5_cb.Click
266
+        If 数值5_cb.Checked = True Then
267
+            If KL1 = False And KL2 = False Then : KL1 = True : 数值5_cb.Checked = True : ElseIf KL1 = False And KL2 = True Then : KL1 = True : 数值5_cb.Checked = True
268
+            ElseIf KL1 = True And KL2 = False Then : KL2 = True : 数值5_cb.Checked = True : ElseIf KL1 = True And KL2 = True Then : 数值5_cb.Checked = False : End If
269
+        ElseIf 数值5_cb.Checked = False Then
270
+            If KL1 = True And KL2 = True Then : KL1 = False : 数值5_cb.Checked = False : ElseIf KL1 = True And KL2 = False Then : KL1 = False : 数值5_cb.Checked = False
271
+            ElseIf KL1 = False And KL2 = True Then : KL2 = False : 数值5_cb.Checked = False : ElseIf KL1 = False And KL2 = False Then : 数值5_cb.Checked = False : End If
272 272
         End If
273 273
     End Sub
274
-    Private Sub CheckBox2_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox2.Click
275
-        If CheckBox2.Checked = True Then
276
-            If KL1 = False And KL2 = False Then : KL1 = True : CheckBox2.Checked = True : ElseIf KL1 = False And KL2 = True Then : KL1 = True : CheckBox2.Checked = True
277
-            ElseIf KL1 = True And KL2 = False Then : KL2 = True : CheckBox2.Checked = True : ElseIf KL1 = True And KL2 = True Then : CheckBox2.Checked = False : End If
278
-        ElseIf CheckBox2.Checked = False Then
279
-            If KL1 = True And KL2 = True Then : KL1 = False : CheckBox2.Checked = False : ElseIf KL1 = True And KL2 = False Then : KL1 = False : CheckBox2.Checked = False
280
-            ElseIf KL1 = False And KL2 = True Then : KL2 = False : CheckBox2.Checked = False : ElseIf KL1 = False And KL2 = False Then : CheckBox2.Checked = False : End If
274
+    Private Sub CheckBox2_CheckedChanged(sender As Object, e As EventArgs) Handles 数值5_5_cb.Click
275
+        If 数值5_5_cb.Checked = True Then
276
+            If KL1 = False And KL2 = False Then : KL1 = True : 数值5_5_cb.Checked = True : ElseIf KL1 = False And KL2 = True Then : KL1 = True : 数值5_5_cb.Checked = True
277
+            ElseIf KL1 = True And KL2 = False Then : KL2 = True : 数值5_5_cb.Checked = True : ElseIf KL1 = True And KL2 = True Then : 数值5_5_cb.Checked = False : End If
278
+        ElseIf 数值5_5_cb.Checked = False Then
279
+            If KL1 = True And KL2 = True Then : KL1 = False : 数值5_5_cb.Checked = False : ElseIf KL1 = True And KL2 = False Then : KL1 = False : 数值5_5_cb.Checked = False
280
+            ElseIf KL1 = False And KL2 = True Then : KL2 = False : 数值5_5_cb.Checked = False : ElseIf KL1 = False And KL2 = False Then : 数值5_5_cb.Checked = False : End If
281 281
         End If
282 282
     End Sub
283
-    Private Sub CheckBox3_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox3.Click
284
-        If CheckBox3.Checked = True Then
285
-            If KL1 = False And KL2 = False Then : KL1 = True : CheckBox3.Checked = True : ElseIf KL1 = False And KL2 = True Then : KL1 = True : CheckBox3.Checked = True
286
-            ElseIf KL1 = True And KL2 = False Then : KL2 = True : CheckBox3.Checked = True : ElseIf KL1 = True And KL2 = True Then : CheckBox3.Checked = False : End If
287
-        ElseIf CheckBox3.Checked = False Then
288
-            If KL1 = True And KL2 = True Then : KL1 = False : CheckBox3.Checked = False : ElseIf KL1 = True And KL2 = False Then : KL1 = False : CheckBox3.Checked = False
289
-            ElseIf KL1 = False And KL2 = True Then : KL2 = False : CheckBox3.Checked = False : ElseIf KL1 = False And KL2 = False Then : CheckBox3.Checked = False : End If
283
+    Private Sub CheckBox3_CheckedChanged(sender As Object, e As EventArgs) Handles 数值6_cb.Click
284
+        If 数值6_cb.Checked = True Then
285
+            If KL1 = False And KL2 = False Then : KL1 = True : 数值6_cb.Checked = True : ElseIf KL1 = False And KL2 = True Then : KL1 = True : 数值6_cb.Checked = True
286
+            ElseIf KL1 = True And KL2 = False Then : KL2 = True : 数值6_cb.Checked = True : ElseIf KL1 = True And KL2 = True Then : 数值6_cb.Checked = False : End If
287
+        ElseIf 数值6_cb.Checked = False Then
288
+            If KL1 = True And KL2 = True Then : KL1 = False : 数值6_cb.Checked = False : ElseIf KL1 = True And KL2 = False Then : KL1 = False : 数值6_cb.Checked = False
289
+            ElseIf KL1 = False And KL2 = True Then : KL2 = False : 数值6_cb.Checked = False : ElseIf KL1 = False And KL2 = False Then : 数值6_cb.Checked = False : End If
290 290
         End If
291 291
     End Sub
292
-    Private Sub CheckBox4_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox4.Click
293
-        If CheckBox4.Checked = True Then
294
-            If KL1 = False And KL2 = False Then : KL1 = True : CheckBox4.Checked = True : ElseIf KL1 = False And KL2 = True Then : KL1 = True : CheckBox4.Checked = True
295
-            ElseIf KL1 = True And KL2 = False Then : KL2 = True : CheckBox4.Checked = True : ElseIf KL1 = True And KL2 = True Then : CheckBox4.Checked = False : End If
296
-        ElseIf CheckBox4.Checked = False Then
297
-            If KL1 = True And KL2 = True Then : KL1 = False : CheckBox4.Checked = False : ElseIf KL1 = True And KL2 = False Then : KL1 = False : CheckBox4.Checked = False
298
-            ElseIf KL1 = False And KL2 = True Then : KL2 = False : CheckBox4.Checked = False : ElseIf KL1 = False And KL2 = False Then : CheckBox4.Checked = False : End If
292
+    Private Sub CheckBox4_CheckedChanged(sender As Object, e As EventArgs) Handles 数值6_5_cb.Click
293
+        If 数值6_5_cb.Checked = True Then
294
+            If KL1 = False And KL2 = False Then : KL1 = True : 数值6_5_cb.Checked = True : ElseIf KL1 = False And KL2 = True Then : KL1 = True : 数值6_5_cb.Checked = True
295
+            ElseIf KL1 = True And KL2 = False Then : KL2 = True : 数值6_5_cb.Checked = True : ElseIf KL1 = True And KL2 = True Then : 数值6_5_cb.Checked = False : End If
296
+        ElseIf 数值6_5_cb.Checked = False Then
297
+            If KL1 = True And KL2 = True Then : KL1 = False : 数值6_5_cb.Checked = False : ElseIf KL1 = True And KL2 = False Then : KL1 = False : 数值6_5_cb.Checked = False
298
+            ElseIf KL1 = False And KL2 = True Then : KL2 = False : 数值6_5_cb.Checked = False : ElseIf KL1 = False And KL2 = False Then : 数值6_5_cb.Checked = False : End If
299 299
         End If
300 300
     End Sub
301
-    Private Sub CheckBox5_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox5.Click
302
-        If CheckBox5.Checked = True Then
303
-            If KL1 = False And KL2 = False Then : KL1 = True : CheckBox5.Checked = True : ElseIf KL1 = False And KL2 = True Then : KL1 = True : CheckBox5.Checked = True
304
-            ElseIf KL1 = True And KL2 = False Then : KL2 = True : CheckBox5.Checked = True : ElseIf KL1 = True And KL2 = True Then : CheckBox5.Checked = False : End If
305
-        ElseIf CheckBox5.Checked = False Then
306
-            If KL1 = True And KL2 = True Then : KL1 = False : CheckBox5.Checked = False : ElseIf KL1 = True And KL2 = False Then : KL1 = False : CheckBox5.Checked = False
307
-            ElseIf KL1 = False And KL2 = True Then : KL2 = False : CheckBox5.Checked = False : ElseIf KL1 = False And KL2 = False Then : CheckBox5.Checked = False : End If
301
+    Private Sub CheckBox5_CheckedChanged(sender As Object, e As EventArgs) Handles 数值7_cb.Click
302
+        If 数值7_cb.Checked = True Then
303
+            If KL1 = False And KL2 = False Then : KL1 = True : 数值7_cb.Checked = True : ElseIf KL1 = False And KL2 = True Then : KL1 = True : 数值7_cb.Checked = True
304
+            ElseIf KL1 = True And KL2 = False Then : KL2 = True : 数值7_cb.Checked = True : ElseIf KL1 = True And KL2 = True Then : 数值7_cb.Checked = False : End If
305
+        ElseIf 数值7_cb.Checked = False Then
306
+            If KL1 = True And KL2 = True Then : KL1 = False : 数值7_cb.Checked = False : ElseIf KL1 = True And KL2 = False Then : KL1 = False : 数值7_cb.Checked = False
307
+            ElseIf KL1 = False And KL2 = True Then : KL2 = False : 数值7_cb.Checked = False : ElseIf KL1 = False And KL2 = False Then : 数值7_cb.Checked = False : End If
308 308
         End If
309 309
     End Sub
310
-    Private Sub CheckBox6_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox6.Click
311
-        If CheckBox6.Checked = True Then
312
-            If KL1 = False And KL2 = False Then : KL1 = True : CheckBox6.Checked = True : ElseIf KL1 = False And KL2 = True Then : KL1 = True : CheckBox6.Checked = True
313
-            ElseIf KL1 = True And KL2 = False Then : KL2 = True : CheckBox6.Checked = True : ElseIf KL1 = True And KL2 = True Then : CheckBox6.Checked = False : End If
314
-        ElseIf CheckBox6.Checked = False Then
315
-            If KL1 = True And KL2 = True Then : KL1 = False : CheckBox6.Checked = False : ElseIf KL1 = True And KL2 = False Then : KL1 = False : CheckBox6.Checked = False
316
-            ElseIf KL1 = False And KL2 = True Then : KL2 = False : CheckBox6.Checked = False : ElseIf KL1 = False And KL2 = False Then : CheckBox6.Checked = False : End If
310
+    Private Sub CheckBox6_CheckedChanged(sender As Object, e As EventArgs) Handles 数值7_5_cb.Click
311
+        If 数值7_5_cb.Checked = True Then
312
+            If KL1 = False And KL2 = False Then : KL1 = True : 数值7_5_cb.Checked = True : ElseIf KL1 = False And KL2 = True Then : KL1 = True : 数值7_5_cb.Checked = True
313
+            ElseIf KL1 = True And KL2 = False Then : KL2 = True : 数值7_5_cb.Checked = True : ElseIf KL1 = True And KL2 = True Then : 数值7_5_cb.Checked = False : End If
314
+        ElseIf 数值7_5_cb.Checked = False Then
315
+            If KL1 = True And KL2 = True Then : KL1 = False : 数值7_5_cb.Checked = False : ElseIf KL1 = True And KL2 = False Then : KL1 = False : 数值7_5_cb.Checked = False
316
+            ElseIf KL1 = False And KL2 = True Then : KL2 = False : 数值7_5_cb.Checked = False : ElseIf KL1 = False And KL2 = False Then : 数值7_5_cb.Checked = False : End If
317 317
         End If
318 318
     End Sub
319
-    Private Sub CheckBox7_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox7.Click
320
-        If CheckBox7.Checked = True Then
321
-            If KL1 = False And KL2 = False Then : KL1 = True : CheckBox7.Checked = True : ElseIf KL1 = False And KL2 = True Then : KL1 = True : CheckBox7.Checked = True
322
-            ElseIf KL1 = True And KL2 = False Then : KL2 = True : CheckBox7.Checked = True : ElseIf KL1 = True And KL2 = True Then : CheckBox7.Checked = False : End If
323
-        ElseIf CheckBox7.Checked = False Then
324
-            If KL1 = True And KL2 = True Then : KL1 = False : CheckBox7.Checked = False : ElseIf KL1 = True And KL2 = False Then : KL1 = False : CheckBox7.Checked = False
325
-            ElseIf KL1 = False And KL2 = True Then : KL2 = False : CheckBox7.Checked = False : ElseIf KL1 = False And KL2 = False Then : CheckBox7.Checked = False : End If
319
+    Private Sub CheckBox7_CheckedChanged(sender As Object, e As EventArgs) Handles 数值8_cb.Click
320
+        If 数值8_cb.Checked = True Then
321
+            If KL1 = False And KL2 = False Then : KL1 = True : 数值8_cb.Checked = True : ElseIf KL1 = False And KL2 = True Then : KL1 = True : 数值8_cb.Checked = True
322
+            ElseIf KL1 = True And KL2 = False Then : KL2 = True : 数值8_cb.Checked = True : ElseIf KL1 = True And KL2 = True Then : 数值8_cb.Checked = False : End If
323
+        ElseIf 数值8_cb.Checked = False Then
324
+            If KL1 = True And KL2 = True Then : KL1 = False : 数值8_cb.Checked = False : ElseIf KL1 = True And KL2 = False Then : KL1 = False : 数值8_cb.Checked = False
325
+            ElseIf KL1 = False And KL2 = True Then : KL2 = False : 数值8_cb.Checked = False : ElseIf KL1 = False And KL2 = False Then : 数值8_cb.Checked = False : End If
326 326
         End If
327 327
     End Sub
328
-    Private Sub CheckBox8_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox8.Click
329
-        If CheckBox8.Checked = True Then
330
-            If KL1 = False And KL2 = False Then : KL1 = True : CheckBox8.Checked = True : ElseIf KL1 = False And KL2 = True Then : KL1 = True : CheckBox8.Checked = True
331
-            ElseIf KL1 = True And KL2 = False Then : KL2 = True : CheckBox8.Checked = True : ElseIf KL1 = True And KL2 = True Then : CheckBox8.Checked = False : End If
332
-        ElseIf CheckBox8.Checked = False Then
333
-            If KL1 = True And KL2 = True Then : KL1 = False : CheckBox8.Checked = False : ElseIf KL1 = True And KL2 = False Then : KL1 = False : CheckBox8.Checked = False
334
-            ElseIf KL1 = False And KL2 = True Then : KL2 = False : CheckBox8.Checked = False : ElseIf KL1 = False And KL2 = False Then : CheckBox8.Checked = False : End If
328
+    Private Sub CheckBox8_CheckedChanged(sender As Object, e As EventArgs) Handles 数值8_5_cb.Click
329
+        If 数值8_5_cb.Checked = True Then
330
+            If KL1 = False And KL2 = False Then : KL1 = True : 数值8_5_cb.Checked = True : ElseIf KL1 = False And KL2 = True Then : KL1 = True : 数值8_5_cb.Checked = True
331
+            ElseIf KL1 = True And KL2 = False Then : KL2 = True : 数值8_5_cb.Checked = True : ElseIf KL1 = True And KL2 = True Then : 数值8_5_cb.Checked = False : End If
332
+        ElseIf 数值8_5_cb.Checked = False Then
333
+            If KL1 = True And KL2 = True Then : KL1 = False : 数值8_5_cb.Checked = False : ElseIf KL1 = True And KL2 = False Then : KL1 = False : 数值8_5_cb.Checked = False
334
+            ElseIf KL1 = False And KL2 = True Then : KL2 = False : 数值8_5_cb.Checked = False : ElseIf KL1 = False And KL2 = False Then : 数值8_5_cb.Checked = False : End If
335 335
         End If
336 336
     End Sub
337 337
     Private Sub CheckBox9_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox9.Click
@@ -352,120 +352,120 @@ Public Class 鞋盒資料控制表
352 352
             ElseIf KL1 = False And KL2 = True Then : KL2 = False : CheckBox10.Checked = False : ElseIf KL1 = False And KL2 = False Then : CheckBox10.Checked = False : End If
353 353
         End If
354 354
     End Sub
355
-    Private Sub CheckBox11_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox11.Click
356
-        If CheckBox11.Checked = True Then
357
-            If KL1 = False And KL2 = False Then : KL1 = True : CheckBox11.Checked = True : ElseIf KL1 = False And KL2 = True Then : KL1 = True : CheckBox11.Checked = True
358
-            ElseIf KL1 = True And KL2 = False Then : KL2 = True : CheckBox11.Checked = True : ElseIf KL1 = True And KL2 = True Then : CheckBox11.Checked = False : End If
359
-        ElseIf CheckBox11.Checked = False Then
360
-            If KL1 = True And KL2 = True Then : KL1 = False : CheckBox11.Checked = False : ElseIf KL1 = True And KL2 = False Then : KL1 = False : CheckBox11.Checked = False
361
-            ElseIf KL1 = False And KL2 = True Then : KL2 = False : CheckBox11.Checked = False : ElseIf KL1 = False And KL2 = False Then : CheckBox11.Checked = False : End If
355
+    Private Sub CheckBox11_CheckedChanged(sender As Object, e As EventArgs) Handles 数值10_cb.Click
356
+        If 数值10_cb.Checked = True Then
357
+            If KL1 = False And KL2 = False Then : KL1 = True : 数值10_cb.Checked = True : ElseIf KL1 = False And KL2 = True Then : KL1 = True : 数值10_cb.Checked = True
358
+            ElseIf KL1 = True And KL2 = False Then : KL2 = True : 数值10_cb.Checked = True : ElseIf KL1 = True And KL2 = True Then : 数值10_cb.Checked = False : End If
359
+        ElseIf 数值10_cb.Checked = False Then
360
+            If KL1 = True And KL2 = True Then : KL1 = False : 数值10_cb.Checked = False : ElseIf KL1 = True And KL2 = False Then : KL1 = False : 数值10_cb.Checked = False
361
+            ElseIf KL1 = False And KL2 = True Then : KL2 = False : 数值10_cb.Checked = False : ElseIf KL1 = False And KL2 = False Then : 数值10_cb.Checked = False : End If
362 362
         End If
363 363
     End Sub
364
-    Private Sub CheckBox12_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox12.Click
365
-        If CheckBox12.Checked = True Then
366
-            If KL1 = False And KL2 = False Then : KL1 = True : CheckBox12.Checked = True : ElseIf KL1 = False And KL2 = True Then : KL1 = True : CheckBox12.Checked = True
367
-            ElseIf KL1 = True And KL2 = False Then : KL2 = True : CheckBox12.Checked = True : ElseIf KL1 = True And KL2 = True Then : CheckBox12.Checked = False : End If
368
-        ElseIf CheckBox12.Checked = False Then
369
-            If KL1 = True And KL2 = True Then : KL1 = False : CheckBox12.Checked = False : ElseIf KL1 = True And KL2 = False Then : KL1 = False : CheckBox12.Checked = False
370
-            ElseIf KL1 = False And KL2 = True Then : KL2 = False : CheckBox12.Checked = False : ElseIf KL1 = False And KL2 = False Then : CheckBox12.Checked = False : End If
364
+    Private Sub CheckBox12_CheckedChanged(sender As Object, e As EventArgs) Handles 数值10_5_cb.Click
365
+        If 数值10_5_cb.Checked = True Then
366
+            If KL1 = False And KL2 = False Then : KL1 = True : 数值10_5_cb.Checked = True : ElseIf KL1 = False And KL2 = True Then : KL1 = True : 数值10_5_cb.Checked = True
367
+            ElseIf KL1 = True And KL2 = False Then : KL2 = True : 数值10_5_cb.Checked = True : ElseIf KL1 = True And KL2 = True Then : 数值10_5_cb.Checked = False : End If
368
+        ElseIf 数值10_5_cb.Checked = False Then
369
+            If KL1 = True And KL2 = True Then : KL1 = False : 数值10_5_cb.Checked = False : ElseIf KL1 = True And KL2 = False Then : KL1 = False : 数值10_5_cb.Checked = False
370
+            ElseIf KL1 = False And KL2 = True Then : KL2 = False : 数值10_5_cb.Checked = False : ElseIf KL1 = False And KL2 = False Then : 数值10_5_cb.Checked = False : End If
371 371
         End If
372 372
     End Sub
373
-    Private Sub CheckBox13_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox13.Click
374
-        If CheckBox13.Checked = True Then
375
-            If KL1 = False And KL2 = False Then : KL1 = True : CheckBox13.Checked = True : ElseIf KL1 = False And KL2 = True Then : KL1 = True : CheckBox13.Checked = True
376
-            ElseIf KL1 = True And KL2 = False Then : KL2 = True : CheckBox13.Checked = True : ElseIf KL1 = True And KL2 = True Then : CheckBox13.Checked = False : End If
377
-        ElseIf CheckBox13.Checked = False Then
378
-            If KL1 = True And KL2 = True Then : KL1 = False : CheckBox13.Checked = False : ElseIf KL1 = True And KL2 = False Then : KL1 = False : CheckBox13.Checked = False
379
-            ElseIf KL1 = False And KL2 = True Then : KL2 = False : CheckBox13.Checked = False : ElseIf KL1 = False And KL2 = False Then : CheckBox13.Checked = False : End If
373
+    Private Sub CheckBox13_CheckedChanged(sender As Object, e As EventArgs) Handles 数值11_cb.Click
374
+        If 数值11_cb.Checked = True Then
375
+            If KL1 = False And KL2 = False Then : KL1 = True : 数值11_cb.Checked = True : ElseIf KL1 = False And KL2 = True Then : KL1 = True : 数值11_cb.Checked = True
376
+            ElseIf KL1 = True And KL2 = False Then : KL2 = True : 数值11_cb.Checked = True : ElseIf KL1 = True And KL2 = True Then : 数值11_cb.Checked = False : End If
377
+        ElseIf 数值11_cb.Checked = False Then
378
+            If KL1 = True And KL2 = True Then : KL1 = False : 数值11_cb.Checked = False : ElseIf KL1 = True And KL2 = False Then : KL1 = False : 数值11_cb.Checked = False
379
+            ElseIf KL1 = False And KL2 = True Then : KL2 = False : 数值11_cb.Checked = False : ElseIf KL1 = False And KL2 = False Then : 数值11_cb.Checked = False : End If
380 380
         End If
381 381
     End Sub
382
-    Private Sub CheckBox14_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox14.Click
383
-        If CheckBox14.Checked = True Then
384
-            If KL1 = False And KL2 = False Then : KL1 = True : CheckBox14.Checked = True : ElseIf KL1 = False And KL2 = True Then : KL1 = True : CheckBox14.Checked = True
385
-            ElseIf KL1 = True And KL2 = False Then : KL2 = True : CheckBox14.Checked = True : ElseIf KL1 = True And KL2 = True Then : CheckBox14.Checked = False : End If
386
-        ElseIf CheckBox14.Checked = False Then
387
-            If KL1 = True And KL2 = True Then : KL1 = False : CheckBox14.Checked = False : ElseIf KL1 = True And KL2 = False Then : KL1 = False : CheckBox14.Checked = False
388
-            ElseIf KL1 = False And KL2 = True Then : KL2 = False : CheckBox14.Checked = False : ElseIf KL1 = False And KL2 = False Then : CheckBox14.Checked = False : End If
382
+    Private Sub CheckBox14_CheckedChanged(sender As Object, e As EventArgs) Handles 数值11_5_cb.Click
383
+        If 数值11_5_cb.Checked = True Then
384
+            If KL1 = False And KL2 = False Then : KL1 = True : 数值11_5_cb.Checked = True : ElseIf KL1 = False And KL2 = True Then : KL1 = True : 数值11_5_cb.Checked = True
385
+            ElseIf KL1 = True And KL2 = False Then : KL2 = True : 数值11_5_cb.Checked = True : ElseIf KL1 = True And KL2 = True Then : 数值11_5_cb.Checked = False : End If
386
+        ElseIf 数值11_5_cb.Checked = False Then
387
+            If KL1 = True And KL2 = True Then : KL1 = False : 数值11_5_cb.Checked = False : ElseIf KL1 = True And KL2 = False Then : KL1 = False : 数值11_5_cb.Checked = False
388
+            ElseIf KL1 = False And KL2 = True Then : KL2 = False : 数值11_5_cb.Checked = False : ElseIf KL1 = False And KL2 = False Then : 数值11_5_cb.Checked = False : End If
389 389
         End If
390 390
     End Sub
391
-    Private Sub CheckBox15_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox15.Click
392
-        If CheckBox15.Checked = True Then
393
-            If KL1 = False And KL2 = False Then : KL1 = True : CheckBox15.Checked = True : ElseIf KL1 = False And KL2 = True Then : KL1 = True : CheckBox15.Checked = True
394
-            ElseIf KL1 = True And KL2 = False Then : KL2 = True : CheckBox15.Checked = True : ElseIf KL1 = True And KL2 = True Then : CheckBox15.Checked = False : End If
395
-        ElseIf CheckBox15.Checked = False Then
396
-            If KL1 = True And KL2 = True Then : KL1 = False : CheckBox15.Checked = False : ElseIf KL1 = True And KL2 = False Then : KL1 = False : CheckBox15.Checked = False
397
-            ElseIf KL1 = False And KL2 = True Then : KL2 = False : CheckBox15.Checked = False : ElseIf KL1 = False And KL2 = False Then : CheckBox15.Checked = False : End If
391
+    Private Sub CheckBox15_CheckedChanged(sender As Object, e As EventArgs) Handles 数值12_cb.Click
392
+        If 数值12_cb.Checked = True Then
393
+            If KL1 = False And KL2 = False Then : KL1 = True : 数值12_cb.Checked = True : ElseIf KL1 = False And KL2 = True Then : KL1 = True : 数值12_cb.Checked = True
394
+            ElseIf KL1 = True And KL2 = False Then : KL2 = True : 数值12_cb.Checked = True : ElseIf KL1 = True And KL2 = True Then : 数值12_cb.Checked = False : End If
395
+        ElseIf 数值12_cb.Checked = False Then
396
+            If KL1 = True And KL2 = True Then : KL1 = False : 数值12_cb.Checked = False : ElseIf KL1 = True And KL2 = False Then : KL1 = False : 数值12_cb.Checked = False
397
+            ElseIf KL1 = False And KL2 = True Then : KL2 = False : 数值12_cb.Checked = False : ElseIf KL1 = False And KL2 = False Then : 数值12_cb.Checked = False : End If
398 398
         End If
399 399
     End Sub
400
-    Private Sub CheckBox16_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox16.Click
401
-        If CheckBox16.Checked = True Then
402
-            If KL1 = False And KL2 = False Then : KL1 = True : CheckBox16.Checked = True : ElseIf KL1 = False And KL2 = True Then : KL1 = True : CheckBox16.Checked = True
403
-            ElseIf KL1 = True And KL2 = False Then : KL2 = True : CheckBox16.Checked = True : ElseIf KL1 = True And KL2 = True Then : CheckBox16.Checked = False : End If
404
-        ElseIf CheckBox16.Checked = False Then
405
-            If KL1 = True And KL2 = True Then : KL1 = False : CheckBox16.Checked = False : ElseIf KL1 = True And KL2 = False Then : KL1 = False : CheckBox16.Checked = False
406
-            ElseIf KL1 = False And KL2 = True Then : KL2 = False : CheckBox16.Checked = False : ElseIf KL1 = False And KL2 = False Then : CheckBox16.Checked = False : End If
400
+    Private Sub CheckBox16_CheckedChanged(sender As Object, e As EventArgs) Handles 数值12_5_cb.Click
401
+        If 数值12_5_cb.Checked = True Then
402
+            If KL1 = False And KL2 = False Then : KL1 = True : 数值12_5_cb.Checked = True : ElseIf KL1 = False And KL2 = True Then : KL1 = True : 数值12_5_cb.Checked = True
403
+            ElseIf KL1 = True And KL2 = False Then : KL2 = True : 数值12_5_cb.Checked = True : ElseIf KL1 = True And KL2 = True Then : 数值12_5_cb.Checked = False : End If
404
+        ElseIf 数值12_5_cb.Checked = False Then
405
+            If KL1 = True And KL2 = True Then : KL1 = False : 数值12_5_cb.Checked = False : ElseIf KL1 = True And KL2 = False Then : KL1 = False : 数值12_5_cb.Checked = False
406
+            ElseIf KL1 = False And KL2 = True Then : KL2 = False : 数值12_5_cb.Checked = False : ElseIf KL1 = False And KL2 = False Then : 数值12_5_cb.Checked = False : End If
407 407
         End If
408 408
     End Sub
409
-    Private Sub CheckBox17_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox17.Click
410
-        If CheckBox17.Checked = True Then
411
-            If KL1 = False And KL2 = False Then : KL1 = True : CheckBox17.Checked = True : ElseIf KL1 = False And KL2 = True Then : KL1 = True : CheckBox17.Checked = True
412
-            ElseIf KL1 = True And KL2 = False Then : KL2 = True : CheckBox17.Checked = True : ElseIf KL1 = True And KL2 = True Then : CheckBox17.Checked = False : End If
413
-        ElseIf CheckBox17.Checked = False Then
414
-            If KL1 = True And KL2 = True Then : KL1 = False : CheckBox17.Checked = False : ElseIf KL1 = True And KL2 = False Then : KL1 = False : CheckBox17.Checked = False
415
-            ElseIf KL1 = False And KL2 = True Then : KL2 = False : CheckBox17.Checked = False : ElseIf KL1 = False And KL2 = False Then : CheckBox17.Checked = False : End If
409
+    Private Sub CheckBox17_CheckedChanged(sender As Object, e As EventArgs) Handles 数值13_cb.Click
410
+        If 数值13_cb.Checked = True Then
411
+            If KL1 = False And KL2 = False Then : KL1 = True : 数值13_cb.Checked = True : ElseIf KL1 = False And KL2 = True Then : KL1 = True : 数值13_cb.Checked = True
412
+            ElseIf KL1 = True And KL2 = False Then : KL2 = True : 数值13_cb.Checked = True : ElseIf KL1 = True And KL2 = True Then : 数值13_cb.Checked = False : End If
413
+        ElseIf 数值13_cb.Checked = False Then
414
+            If KL1 = True And KL2 = True Then : KL1 = False : 数值13_cb.Checked = False : ElseIf KL1 = True And KL2 = False Then : KL1 = False : 数值13_cb.Checked = False
415
+            ElseIf KL1 = False And KL2 = True Then : KL2 = False : 数值13_cb.Checked = False : ElseIf KL1 = False And KL2 = False Then : 数值13_cb.Checked = False : End If
416 416
         End If
417 417
     End Sub
418
-    Private Sub CheckBox18_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox18.Click
419
-        If CheckBox18.Checked = True Then
420
-            If KL1 = False And KL2 = False Then : KL1 = True : CheckBox18.Checked = True : ElseIf KL1 = False And KL2 = True Then : KL1 = True : CheckBox18.Checked = True
421
-            ElseIf KL1 = True And KL2 = False Then : KL2 = True : CheckBox18.Checked = True : ElseIf KL1 = True And KL2 = True Then : CheckBox18.Checked = False : End If
422
-        ElseIf CheckBox18.Checked = False Then
423
-            If KL1 = True And KL2 = True Then : KL1 = False : CheckBox18.Checked = False : ElseIf KL1 = True And KL2 = False Then : KL1 = False : CheckBox18.Checked = False
424
-            ElseIf KL1 = False And KL2 = True Then : KL2 = False : CheckBox18.Checked = False : ElseIf KL1 = False And KL2 = False Then : CheckBox18.Checked = False : End If
418
+    Private Sub CheckBox18_CheckedChanged(sender As Object, e As EventArgs) Handles 数值14_cb.Click
419
+        If 数值14_cb.Checked = True Then
420
+            If KL1 = False And KL2 = False Then : KL1 = True : 数值14_cb.Checked = True : ElseIf KL1 = False And KL2 = True Then : KL1 = True : 数值14_cb.Checked = True
421
+            ElseIf KL1 = True And KL2 = False Then : KL2 = True : 数值14_cb.Checked = True : ElseIf KL1 = True And KL2 = True Then : 数值14_cb.Checked = False : End If
422
+        ElseIf 数值14_cb.Checked = False Then
423
+            If KL1 = True And KL2 = True Then : KL1 = False : 数值14_cb.Checked = False : ElseIf KL1 = True And KL2 = False Then : KL1 = False : 数值14_cb.Checked = False
424
+            ElseIf KL1 = False And KL2 = True Then : KL2 = False : 数值14_cb.Checked = False : ElseIf KL1 = False And KL2 = False Then : 数值14_cb.Checked = False : End If
425 425
         End If
426 426
     End Sub
427 427
     Private Sub 寫入後初始化()
428
-        If RadioButton1.Checked = True Then : TextBox1.Text = TextBox16.Text : ElseIf RadioButton2.Checked = True Then : TextBox2.Text = TextBox16.Text
429
-        ElseIf RadioButton3.Checked = True Then : TextBox3.Text = TextBox16.Text : ElseIf RadioButton4.Checked = True Then : TextBox4.Text = TextBox16.Text
430
-        ElseIf RadioButton5.Checked = True Then : TextBox9.Text = TextBox16.Text : ElseIf RadioButton6.Checked = True Then : TextBox10.Text = TextBox16.Text
431
-        ElseIf RadioButton7.Checked = True Then : TextBox11.Text = TextBox16.Text : ElseIf RadioButton8.Checked = True Then : TextBox12.Text = TextBox16.Text
428
+        If S_B_S_rbt.Checked = True Then : SMALLBOX_tb.Text = 流水號2_tb.Text : ElseIf M_B_S_rbt.Checked = True Then : MEDIUMBOX_tb.Text = 流水號2_tb.Text
429
+        ElseIf L_B_S_rbt.Checked = True Then : LARGERBOX_tb.Text = 流水號2_tb.Text : ElseIf E_B_S_rbt.Checked = True Then : EXTRABOX_tb.Text = 流水號2_tb.Text
430
+        ElseIf D_S_rbt.Checked = True Then : DimensionsS_tb.Text = 流水號2_tb.Text : ElseIf D_M_rbt.Checked = True Then : DimensionsM_tb.Text = 流水號2_tb.Text
431
+        ElseIf D_L_rbt.Checked = True Then : DimensionsL_tb.Text = 流水號2_tb.Text : ElseIf D_E_rbt.Checked = True Then : DimensionsE_tb.Text = 流水號2_tb.Text
432 432
         End If
433 433
         KL1 = False : KL2 = False
434
-        CheckBox1.Checked = False : CheckBox2.Checked = False : CheckBox3.Checked = False : CheckBox4.Checked = False : CheckBox5.Checked = False
435
-        CheckBox6.Checked = False : CheckBox7.Checked = False : CheckBox8.Checked = False : CheckBox9.Checked = False : CheckBox10.Checked = False
436
-        CheckBox11.Checked = False : CheckBox12.Checked = False : CheckBox13.Checked = False : CheckBox14.Checked = False : CheckBox15.Checked = False
437
-        CheckBox16.Checked = False : CheckBox17.Checked = False : CheckBox18.Checked = False
438
-        RadioButton1.Checked = False : RadioButton2.Checked = False : RadioButton3.Checked = False : RadioButton4.Checked = False
439
-        RadioButton5.Checked = False : RadioButton6.Checked = False : RadioButton7.Checked = False : RadioButton8.Checked = False
434
+        数值5_cb.Checked = False : 数值5_5_cb.Checked = False : 数值6_cb.Checked = False : 数值6_5_cb.Checked = False : 数值7_cb.Checked = False
435
+        数值7_5_cb.Checked = False : 数值8_cb.Checked = False : 数值8_5_cb.Checked = False : CheckBox9.Checked = False : CheckBox10.Checked = False
436
+        数值10_cb.Checked = False : 数值10_5_cb.Checked = False : 数值11_cb.Checked = False : 数值11_5_cb.Checked = False : 数值12_cb.Checked = False
437
+        数值12_5_cb.Checked = False : 数值13_cb.Checked = False : 数值14_cb.Checked = False
438
+        S_B_S_rbt.Checked = False : M_B_S_rbt.Checked = False : L_B_S_rbt.Checked = False : E_B_S_rbt.Checked = False
439
+        D_S_rbt.Checked = False : D_M_rbt.Checked = False : D_L_rbt.Checked = False : D_E_rbt.Checked = False
440 440
     End Sub
441 441
     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles 寫入鞋盒尺寸_bt.Click
442 442
         If KL1 = False Or KL2 = False Then
443 443
             MsgBox("尺碼範圍沒有正確選擇")
444 444
         Else
445
-            If CheckBox1.Checked = True Then : FG1 = "5" : ElseIf CheckBox2.Checked = True Then : FG1 = "5.5" : ElseIf CheckBox3.Checked = True Then : FG1 = "6"
446
-            ElseIf CheckBox4.Checked = True Then : FG1 = "6.5" : ElseIf CheckBox5.Checked = True Then : FG1 = "7" : ElseIf CheckBox6.Checked = True Then : FG1 = "7.5"
447
-            ElseIf CheckBox7.Checked = True Then : FG1 = "8" : ElseIf CheckBox8.Checked = True Then : FG1 = "8.5" : ElseIf CheckBox9.Checked = True Then : FG1 = "9"
448
-            ElseIf CheckBox10.Checked = True Then : FG1 = "9.5" : ElseIf CheckBox11.Checked = True Then : FG1 = "10" : ElseIf CheckBox12.Checked = True Then : FG1 = "10.5"
449
-            ElseIf CheckBox13.Checked = True Then : FG1 = "11" : ElseIf CheckBox14.Checked = True Then : FG1 = "11.5" : ElseIf CheckBox15.Checked = True Then : FG1 = "12"
450
-            ElseIf CheckBox16.Checked = True Then : FG1 = "12.5" : ElseIf CheckBox17.Checked = True Then : FG1 = "13" : ElseIf CheckBox18.Checked = True Then : FG1 = "14"
445
+            If 数值5_cb.Checked = True Then : FG1 = "5" : ElseIf 数值5_5_cb.Checked = True Then : FG1 = "5.5" : ElseIf 数值6_cb.Checked = True Then : FG1 = "6"
446
+            ElseIf 数值6_5_cb.Checked = True Then : FG1 = "6.5" : ElseIf 数值7_cb.Checked = True Then : FG1 = "7" : ElseIf 数值7_5_cb.Checked = True Then : FG1 = "7.5"
447
+            ElseIf 数值8_cb.Checked = True Then : FG1 = "8" : ElseIf 数值8_5_cb.Checked = True Then : FG1 = "8.5" : ElseIf CheckBox9.Checked = True Then : FG1 = "9"
448
+            ElseIf CheckBox10.Checked = True Then : FG1 = "9.5" : ElseIf 数值10_cb.Checked = True Then : FG1 = "10" : ElseIf 数值10_5_cb.Checked = True Then : FG1 = "10.5"
449
+            ElseIf 数值11_cb.Checked = True Then : FG1 = "11" : ElseIf 数值11_5_cb.Checked = True Then : FG1 = "11.5" : ElseIf 数值12_cb.Checked = True Then : FG1 = "12"
450
+            ElseIf 数值12_5_cb.Checked = True Then : FG1 = "12.5" : ElseIf 数值13_cb.Checked = True Then : FG1 = "13" : ElseIf 数值14_cb.Checked = True Then : FG1 = "14"
451 451
             End If
452 452
 
453
-            If CheckBox18.Checked = True Then : FG2 = "14" : ElseIf CheckBox17.Checked = True Then : FG2 = "13" : ElseIf CheckBox16.Checked = True Then : FG2 = "12.5"
454
-            ElseIf CheckBox15.Checked = True Then : FG2 = "12" : ElseIf CheckBox14.Checked = True Then : FG2 = "11.5" : ElseIf CheckBox13.Checked = True Then : FG2 = "11"
455
-            ElseIf CheckBox12.Checked = True Then : FG2 = "10.5" : ElseIf CheckBox11.Checked = True Then : FG2 = "10" : ElseIf CheckBox10.Checked = True Then : FG2 = "9.5"
456
-            ElseIf CheckBox9.Checked = True Then : FG2 = "9" : ElseIf CheckBox8.Checked = True Then : FG2 = "8.5" : ElseIf CheckBox7.Checked = True Then : FG2 = "8"
457
-            ElseIf CheckBox6.Checked = True Then : FG2 = "7.5" : ElseIf CheckBox5.Checked = True Then : FG2 = "7" : ElseIf CheckBox4.Checked = True Then : FG2 = "6.5"
458
-            ElseIf CheckBox3.Checked = True Then : FG2 = "6" : ElseIf CheckBox2.Checked = True Then : FG2 = "5.5" : ElseIf CheckBox1.Checked = True Then : FG2 = "5"
453
+            If 数值14_cb.Checked = True Then : FG2 = "14" : ElseIf 数值13_cb.Checked = True Then : FG2 = "13" : ElseIf 数值12_5_cb.Checked = True Then : FG2 = "12.5"
454
+            ElseIf 数值12_cb.Checked = True Then : FG2 = "12" : ElseIf 数值11_5_cb.Checked = True Then : FG2 = "11.5" : ElseIf 数值11_cb.Checked = True Then : FG2 = "11"
455
+            ElseIf 数值10_5_cb.Checked = True Then : FG2 = "10.5" : ElseIf 数值10_cb.Checked = True Then : FG2 = "10" : ElseIf CheckBox10.Checked = True Then : FG2 = "9.5"
456
+            ElseIf CheckBox9.Checked = True Then : FG2 = "9" : ElseIf 数值8_5_cb.Checked = True Then : FG2 = "8.5" : ElseIf 数值8_cb.Checked = True Then : FG2 = "8"
457
+            ElseIf 数值7_5_cb.Checked = True Then : FG2 = "7.5" : ElseIf 数值7_cb.Checked = True Then : FG2 = "7" : ElseIf 数值6_5_cb.Checked = True Then : FG2 = "6.5"
458
+            ElseIf 数值6_cb.Checked = True Then : FG2 = "6" : ElseIf 数值5_5_cb.Checked = True Then : FG2 = "5.5" : ElseIf 数值5_cb.Checked = True Then : FG2 = "5"
459 459
             End If
460 460
 
461
-            If ComboBox6.Enabled = False And ComboBox7.Enabled = False Then
461
+            If 寫入後初始化_cb.Enabled = False And 寫入後初始化1_cb.Enabled = False Then
462 462
                 MsgBox("紙箱尺寸沒有正確選擇")
463
-            ElseIf ComboBox6.Enabled = True And ComboBox7.Enabled = False And ComboBox6.Text <> "" And ComboBox6.Text <> " " Then
464
-                TextBox16.Text = "(" & FG1 & "-" & FG2 & "#)" & ComboBox6.Text
465
-                寫入後初始化() : ComboBox6.Text = " "
466
-            ElseIf ComboBox6.Enabled = False And ComboBox7.Enabled = True And ComboBox7.Text <> "" And ComboBox7.Text <> " " Then
467
-                TextBox16.Text = "(" & FG1 & "-" & FG2 & "#)" & ComboBox7.Text
468
-                寫入後初始化() : ComboBox7.Text = " "
463
+            ElseIf 寫入後初始化_cb.Enabled = True And 寫入後初始化1_cb.Enabled = False And 寫入後初始化_cb.Text <> "" And 寫入後初始化_cb.Text <> " " Then
464
+                流水號2_tb.Text = "(" & FG1 & "-" & FG2 & "#)" & 寫入後初始化_cb.Text
465
+                寫入後初始化() : 寫入後初始化_cb.Text = " "
466
+            ElseIf 寫入後初始化_cb.Enabled = False And 寫入後初始化1_cb.Enabled = True And 寫入後初始化1_cb.Text <> "" And 寫入後初始化1_cb.Text <> " " Then
467
+                流水號2_tb.Text = "(" & FG1 & "-" & FG2 & "#)" & 寫入後初始化1_cb.Text
468
+                寫入後初始化() : 寫入後初始化1_cb.Text = " "
469 469
             Else
470 470
                 MsgBox("紙箱尺寸沒有正確選擇")
471 471
             End If
@@ -473,9 +473,9 @@ Public Class 鞋盒資料控制表
473 473
     End Sub
474 474
     Private Sub Button29_Click(sender As Object, e As EventArgs) Handles 新增_bt.Click
475 475
         ComboBox1下拉表單資料載入() : ComboBox2下拉表單資料載入() : ComboBox3下拉表單資料載入() : ComboBox4下拉表單資料載入() : ComboBox5下拉表單資料載入()
476
-        TextBox1.Text = "" : TextBox2.Text = "" : TextBox3.Text = "" : TextBox4.Text = "" : TextBox5.Text = "" : TextBox6.Text = "" : TextBox7.Text = ""
477
-        TextBox8.Text = "" : TextBox9.Text = "" : TextBox10.Text = "" : TextBox11.Text = "" : TextBox12.Text = "" : PRSCRT_tb.Text = "" : QUK_tb.Text = ""
478
-        TextBox15.Text = "" : TextBox16.Text = ""
476
+        SMALLBOX_tb.Text = "" : MEDIUMBOX_tb.Text = "" : LARGERBOX_tb.Text = "" : EXTRABOX_tb.Text = "" : SMALL_tb.Text = "" : MEDIUM_tb.Text = "" : LARGE_tb.Text = ""
477
+        EXTRA_tb.Text = "" : DimensionsS_tb.Text = "" : DimensionsM_tb.Text = "" : DimensionsL_tb.Text = "" : DimensionsE_tb.Text = "" : PRSCRT_tb.Text = "" : QUK_tb.Text = ""
478
+        流水號_tb.Text = "" : 流水號2_tb.Text = ""
479 479
         新增_bt.Enabled = False : 確認新增_bt.Enabled = True
480 480
     End Sub
481 481
     Private Sub Button11_Click(sender As Object, e As EventArgs) Handles 確認新增_bt.Click
@@ -504,27 +504,27 @@ Public Class 鞋盒資料控制表
504 504
                                 If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
505 505
                                 SQL1 = "SELECT TOP (1) 鞋盒流水號 FROM 鞋盒資料控制表 GROUP BY 鞋盒流水號 ORDER BY 鞋盒流水號 DESC"
506 506
                                 cmd.Connection = conn : cmd.CommandText = SQL1 : dr = cmd.ExecuteReader
507
-                                If dr.Read() Then : TextBox17.Text = dr("鞋盒流水號").ToString : Else : TextBox17.Text = "" : End If
507
+                                If dr.Read() Then : 流水號1_tb.Text = dr("鞋盒流水號").ToString : Else : 流水號1_tb.Text = "" : End If
508 508
                                 conn.Close()
509 509
                                 Dim NUM1 As Integer
510
-                                NUM1 = Double.Parse(Strings.Right(TextBox17.Text, 8)) + 1
511
-                                If NUM1 < 10 Then : TextBox17.Text = "SB" & "0000000" & NUM1
512
-                                ElseIf NUM1 > 9 And NUM1 < 100 Then : TextBox17.Text = "SB" & "000000" & NUM1
513
-                                ElseIf NUM1 > 99 And NUM1 < 1000 Then : TextBox17.Text = "SB" & "00000" & NUM1
514
-                                ElseIf NUM1 > 999 And NUM1 < 10000 Then : TextBox17.Text = "SB" & "0000" & NUM1
515
-                                ElseIf NUM1 > 9999 And NUM1 < 100000 Then : TextBox17.Text = "SB" & "000" & NUM1
516
-                                ElseIf NUM1 > 99999 And NUM1 < 100000 Then : TextBox17.Text = "SB" & "00" & NUM1
517
-                                ElseIf NUM1 > 999999 And NUM1 < 1000000 Then : TextBox17.Text = "SB" & "0" & NUM1
518
-                                ElseIf NUM1 > 9999999 Then : TextBox17.Text = "SB" & NUM1
510
+                                NUM1 = Double.Parse(Strings.Right(流水號1_tb.Text, 8)) + 1
511
+                                If NUM1 < 10 Then : 流水號1_tb.Text = "SB" & "0000000" & NUM1
512
+                                ElseIf NUM1 > 9 And NUM1 < 100 Then : 流水號1_tb.Text = "SB" & "000000" & NUM1
513
+                                ElseIf NUM1 > 99 And NUM1 < 1000 Then : 流水號1_tb.Text = "SB" & "00000" & NUM1
514
+                                ElseIf NUM1 > 999 And NUM1 < 10000 Then : 流水號1_tb.Text = "SB" & "0000" & NUM1
515
+                                ElseIf NUM1 > 9999 And NUM1 < 100000 Then : 流水號1_tb.Text = "SB" & "000" & NUM1
516
+                                ElseIf NUM1 > 99999 And NUM1 < 100000 Then : 流水號1_tb.Text = "SB" & "00" & NUM1
517
+                                ElseIf NUM1 > 999999 And NUM1 < 1000000 Then : 流水號1_tb.Text = "SB" & "0" & NUM1
518
+                                ElseIf NUM1 > 9999999 Then : 流水號1_tb.Text = "SB" & NUM1
519 519
                                 End If
520 520
 
521 521
                                 If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
522 522
                                 SQL1 = "INSERT INTO 鞋盒資料控制表 (SEASON, CONSTRUCTION, FTY, STYLE, TVW, S_B_S, M_B_S, L_B_S, E_B_S, S_GW, M_GW, L_GW, E_GW, Dimensions_S, Dimensions_M, Dimensions_L, " &
523 523
                                                                    "Dimensions_E, PRS_CRT, QUK, 鞋盒流水號) " &
524
-                                       "VALUES ('" & 季節_cb.Text & "','" & 構造名稱_cb.Text & "','" & FTY_cb.Text & "','" & 風格_cb.Text & "','" & TVW_cb.Text & "','" & TextBox1.Text &
525
-                                       "','" & TextBox2.Text & "','" & TextBox3.Text & "','" & TextBox4.Text & "','" & TextBox5.Text & "','" & TextBox6.Text & "','" & TextBox7.Text &
526
-                                       "','" & TextBox8.Text & "','" & TextBox9.Text & "','" & TextBox10.Text & "','" & TextBox11.Text & "','" & TextBox12.Text & "','" & PRSCRT_tb.Text &
527
-                                       "','" & QUK_tb.Text & "','" & TextBox17.Text & "')"
524
+                                       "VALUES ('" & 季節_cb.Text & "','" & 構造名稱_cb.Text & "','" & FTY_cb.Text & "','" & 風格_cb.Text & "','" & TVW_cb.Text & "','" & SMALLBOX_tb.Text &
525
+                                       "','" & MEDIUMBOX_tb.Text & "','" & LARGERBOX_tb.Text & "','" & EXTRABOX_tb.Text & "','" & SMALL_tb.Text & "','" & MEDIUM_tb.Text & "','" & LARGE_tb.Text &
526
+                                       "','" & EXTRA_tb.Text & "','" & DimensionsS_tb.Text & "','" & DimensionsM_tb.Text & "','" & DimensionsL_tb.Text & "','" & DimensionsE_tb.Text & "','" & PRSCRT_tb.Text &
527
+                                       "','" & QUK_tb.Text & "','" & 流水號1_tb.Text & "')"
528 528
                                 cmd.Connection = conn : cmd.CommandText = SQL1 : cmd.ExecuteNonQuery() : conn.Close()
529 529
                                 Set_清單1() : Set_grid1() : Set_清單2() : Set_grid2()
530 530
                                 MsgBox("新增完成")
@@ -537,28 +537,28 @@ Public Class 鞋盒資料控制表
537 537
         End If
538 538
     End Sub
539 539
     Private Sub Button12_Click(sender As Object, e As EventArgs) Handles 修改_bt.Click
540
-        If TextBox15.Text = "" Then
540
+        If 流水號_tb.Text = "" Then
541 541
             MsgBox("未選擇要修改的資料")
542 542
         Else
543 543
             If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
544 544
             SQL1 = "UPDATE 鞋盒資料控制表 SET SEASON = '" & 季節_cb.Text & "', CONSTRUCTION = '" & 構造名稱_cb.Text & "', FTY = '" & FTY_cb.Text & "', STYLE = '" & 風格_cb.Text &
545
-                   "', TVW = '" & TVW_cb.Text & "', S_B_S = '" & TextBox1.Text & "', M_B_S = '" & TextBox2.Text & "', L_B_S = '" & TextBox3.Text & "', E_B_S = '" & TextBox4.Text &
546
-                   "', S_GW = '" & TextBox5.Text & "', M_GW = '" & TextBox6.Text & "', L_GW = '" & TextBox7.Text & "', E_GW = '" & TextBox8.Text & "', Dimensions_S = '" & TextBox9.Text &
547
-                   "', Dimensions_M = '" & TextBox10.Text & "', Dimensions_L = '" & TextBox11.Text & "', Dimensions_E = '" & TextBox12.Text & "', PRS_CRT = '" & PRSCRT_tb.Text &
548
-                   "', QUK = '" & QUK_tb.Text & "' WHERE (鞋盒流水號 = '" & TextBox15.Text & "')"
545
+                   "', TVW = '" & TVW_cb.Text & "', S_B_S = '" & SMALLBOX_tb.Text & "', M_B_S = '" & MEDIUMBOX_tb.Text & "', L_B_S = '" & LARGERBOX_tb.Text & "', E_B_S = '" & EXTRABOX_tb.Text &
546
+                   "', S_GW = '" & SMALL_tb.Text & "', M_GW = '" & MEDIUM_tb.Text & "', L_GW = '" & LARGE_tb.Text & "', E_GW = '" & EXTRA_tb.Text & "', Dimensions_S = '" & DimensionsS_tb.Text &
547
+                   "', Dimensions_M = '" & DimensionsM_tb.Text & "', Dimensions_L = '" & DimensionsL_tb.Text & "', Dimensions_E = '" & DimensionsE_tb.Text & "', PRS_CRT = '" & PRSCRT_tb.Text &
548
+                   "', QUK = '" & QUK_tb.Text & "' WHERE (鞋盒流水號 = '" & 流水號_tb.Text & "')"
549 549
             cmd.CommandText = SQL1 : cmd.ExecuteNonQuery() : conn.Close()
550 550
             Set_清單1() : Set_grid1() : Set_清單2() : Set_grid2()
551 551
             MsgBox("修改完成")
552 552
         End If
553 553
     End Sub
554 554
     Private Sub Button10_Click(sender As Object, e As EventArgs) Handles 刪除_bt.Click
555
-        If TextBox15.Text = "" Then
555
+        If 流水號_tb.Text = "" Then
556 556
             MsgBox("未選擇要刪除的資料")
557 557
         Else
558 558
             aa = MsgBox("確定要刪除該筆資料?", MsgBoxStyle.OkCancel)
559 559
             If aa = MsgBoxResult.Ok Then
560 560
                 If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
561
-                SQL1 = "DELETE FROM 鞋盒資料控制表 WHERE (鞋盒流水號 = '" & TextBox15.Text & "')"
561
+                SQL1 = "DELETE FROM 鞋盒資料控制表 WHERE (鞋盒流水號 = '" & 流水號_tb.Text & "')"
562 562
                 cmd.CommandText = SQL1 : cmd.Connection = conn : cmd.ExecuteNonQuery() : conn.Close()
563 563
                 Set_清單1() : Set_grid1() : Set_清單2() : Set_grid2()
564 564
                 MsgBox("刪除完成")
@@ -617,27 +617,27 @@ Public Class 鞋盒資料控制表
617 617
                                 If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
618 618
                                 SQL1 = "SELECT TOP (1) 鞋盒流水號 FROM 鞋盒資料控制表 GROUP BY 鞋盒流水號 ORDER BY 鞋盒流水號 DESC"
619 619
                                 cmd.Connection = conn : cmd.CommandText = SQL1 : dr = cmd.ExecuteReader
620
-                                If dr.Read() Then : TextBox17.Text = dr("鞋盒流水號").ToString : Else : TextBox17.Text = "" : End If
620
+                                If dr.Read() Then : 流水號1_tb.Text = dr("鞋盒流水號").ToString : Else : 流水號1_tb.Text = "" : End If
621 621
                                 conn.Close()
622 622
                                 Dim NUM1 As Integer
623
-                                NUM1 = Double.Parse(Strings.Right(TextBox17.Text, 8)) + 1
624
-                                If NUM1 < 10 Then : TextBox17.Text = "SB" & "0000000" & NUM1
625
-                                ElseIf NUM1 > 9 And NUM1 < 100 Then : TextBox17.Text = "SB" & "000000" & NUM1
626
-                                ElseIf NUM1 > 99 And NUM1 < 1000 Then : TextBox17.Text = "SB" & "00000" & NUM1
627
-                                ElseIf NUM1 > 999 And NUM1 < 10000 Then : TextBox17.Text = "SB" & "0000" & NUM1
628
-                                ElseIf NUM1 > 9999 And NUM1 < 100000 Then : TextBox17.Text = "SB" & "000" & NUM1
629
-                                ElseIf NUM1 > 99999 And NUM1 < 100000 Then : TextBox17.Text = "SB" & "00" & NUM1
630
-                                ElseIf NUM1 > 999999 And NUM1 < 1000000 Then : TextBox17.Text = "SB" & "0" & NUM1
631
-                                ElseIf NUM1 > 9999999 Then : TextBox17.Text = "SB" & NUM1
623
+                                NUM1 = Double.Parse(Strings.Right(流水號1_tb.Text, 8)) + 1
624
+                                If NUM1 < 10 Then : 流水號1_tb.Text = "SB" & "0000000" & NUM1
625
+                                ElseIf NUM1 > 9 And NUM1 < 100 Then : 流水號1_tb.Text = "SB" & "000000" & NUM1
626
+                                ElseIf NUM1 > 99 And NUM1 < 1000 Then : 流水號1_tb.Text = "SB" & "00000" & NUM1
627
+                                ElseIf NUM1 > 999 And NUM1 < 10000 Then : 流水號1_tb.Text = "SB" & "0000" & NUM1
628
+                                ElseIf NUM1 > 9999 And NUM1 < 100000 Then : 流水號1_tb.Text = "SB" & "000" & NUM1
629
+                                ElseIf NUM1 > 99999 And NUM1 < 100000 Then : 流水號1_tb.Text = "SB" & "00" & NUM1
630
+                                ElseIf NUM1 > 999999 And NUM1 < 1000000 Then : 流水號1_tb.Text = "SB" & "0" & NUM1
631
+                                ElseIf NUM1 > 9999999 Then : 流水號1_tb.Text = "SB" & NUM1
632 632
                                 End If
633 633
 
634 634
                                 If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
635 635
                                 SQL1 = "INSERT INTO 鞋盒資料控制表 (SEASON, CONSTRUCTION, FTY, STYLE, TVW, S_B_S, M_B_S, L_B_S, E_B_S, S_GW, M_GW, L_GW, E_GW, Dimensions_S, Dimensions_M, Dimensions_L, " &
636 636
                                                                    "Dimensions_E, PRS_CRT, QUK, 鞋盒流水號) " &
637
-                                       "VALUES ('" & 季節_cb.Text & "','" & 構造名稱_cb.Text & "','" & FTY_cb.Text & "','" & 風格_cb.Text & "','" & TVW_cb.Text & "','" & TextBox1.Text &
638
-                                       "','" & TextBox2.Text & "','" & TextBox3.Text & "','" & TextBox4.Text & "','" & TextBox5.Text & "','" & TextBox6.Text & "','" & TextBox7.Text &
639
-                                       "','" & TextBox8.Text & "','" & TextBox9.Text & "','" & TextBox10.Text & "','" & TextBox11.Text & "','" & TextBox12.Text & "','" & PRSCRT_tb.Text &
640
-                                       "','" & QUK_tb.Text & "','" & TextBox17.Text & "')"
637
+                                       "VALUES ('" & 季節_cb.Text & "','" & 構造名稱_cb.Text & "','" & FTY_cb.Text & "','" & 風格_cb.Text & "','" & TVW_cb.Text & "','" & SMALLBOX_tb.Text &
638
+                                       "','" & MEDIUMBOX_tb.Text & "','" & LARGERBOX_tb.Text & "','" & EXTRABOX_tb.Text & "','" & SMALL_tb.Text & "','" & MEDIUM_tb.Text & "','" & LARGE_tb.Text &
639
+                                       "','" & EXTRA_tb.Text & "','" & DimensionsS_tb.Text & "','" & DimensionsM_tb.Text & "','" & DimensionsL_tb.Text & "','" & DimensionsE_tb.Text & "','" & PRSCRT_tb.Text &
640
+                                       "','" & QUK_tb.Text & "','" & 流水號1_tb.Text & "')"
641 641
                                 cmd.Connection = conn : cmd.CommandText = SQL1 : cmd.ExecuteNonQuery() : conn.Close()
642 642
                                 Set_清單1() : Set_grid1() : Set_清單2() : Set_grid2()
643 643
                                 MsgBox("新增完成")

Loading…
取消
儲存