B70340 2 gadus atpakaļ
vecāks
revīzija
1fe62faa5d

.vs/TENDEN-MES-SYS/FileContentIndex/2076bacc-e531-4a1a-bee6-1c3a8030505b.vsidx → .vs/TENDEN-MES-SYS/FileContentIndex/1e2995c3-90eb-4020-b32f-963b365518f4.vsidx Parādīt failu


Binārs
.vs/TENDEN-MES-SYS/FileContentIndex/2dfc8897-cb95-4e26-8133-2c0bb106673c.vsidx → .vs/TENDEN-MES-SYS/FileContentIndex/6c994f0c-5602-461c-99f1-0df5647fa969.vsidx Parādīt failu


Binārs
.vs/TENDEN-MES-SYS/FileContentIndex/b30f61a2-b9b0-476d-b9a4-17e30c8a5e6b.vsidx → .vs/TENDEN-MES-SYS/FileContentIndex/8932a195-f9fe-454d-9cde-da81c03fa720.vsidx Parādīt failu


Binārs
.vs/TENDEN-MES-SYS/v17/.suo Parādīt failu


Binārs
.vs/TENDEN-MES-SYS/v17/bi05ciab.yqt Parādīt failu


Binārs
.vs/TENDEN-MES-SYS/v17/prib4ig5.slg Parādīt failu


+ 38
- 1
TENDEN-MES-SYS/Module/SQL_樣品訂單管理.vb Parādīt failu

@@ -283,7 +283,7 @@
283 283
     Friend Sub SQL_其他LOGO導入()
284 284
         ConnOpen() : SQL1 = "SELECT 圖片 FROM 圖片庫一 WHERE 圖片編號 LIKE '" & 中文樣品單.TextBox17.Text & "'" : CmdSet_For_dr()
285 285
     End Sub
286
-    Friend Sub SQL_再次導入清單()
286
+    Friend Sub SQL_確認樣品單明細表0()
287 287
         ConnOpen()
288 288
         If 暫存模式 = False Then
289 289
             SQL1 = "SELECT 確認樣品單控制表.顏色, 確認樣品單明細表.樣品流水號二, 確認樣品單明細表.樣品流水號三, 確認樣品單明細表.細項, 確認樣品單明細表.內容, 確認樣品單明細表.廠商, 
@@ -298,6 +298,25 @@
298 298
         End If
299 299
         CmdSet_For_DGV()
300 300
     End Sub
301
+    Friend Sub SQL_確認樣品單明細表_敘述攔()
302
+        ConnOpen()
303
+        If 暫存模式 = False Then
304
+            SQL1 = "SELECT    確認樣品單明細表.細項, 確認樣品單敘述欄.內容
305
+                    FROM      確認樣品單明細表 LEFT OUTER JOIN 確認樣品單敘述欄 ON 確認樣品單明細表.樣品流水號 = 確認樣品單敘述欄.樣品流水號 AND 
306
+                              確認樣品單明細表.細項 = 確認樣品單敘述欄.細項
307
+                    WHERE    (確認樣品單明細表.樣品流水號 LIKE '" & 中文樣品單.樣品單號_tb.Text & "') AND (確認樣品單明細表.細項 NOT LIKE '') AND 
308
+                             (RIGHT(確認樣品單明細表.樣品流水號二, 1) LIKE '" & PA31 & "')
309
+                    GROUP BY  確認樣品單明細表.細項, 確認樣品單敘述欄.內容"
310
+        Else
311
+            SQL1 = "SELECT    確認樣品單明細表暫存檔.細項, 確認樣品單敘述欄.內容
312
+                    FROM      確認樣品單明細表暫存檔 LEFT OUTER JOIN 確認樣品單敘述欄 ON 確認樣品單明細表暫存檔.樣品流水號 = 確認樣品單敘述欄.樣品流水號 AND 
313
+                              確認樣品單明細表暫存檔.細項 = 確認樣品單敘述欄.細項
314
+                    WHERE    (確認樣品單明細表暫存檔.樣品流水號 LIKE '" & 中文樣品單.樣品單號_tb.Text & "') AND (確認樣品單明細表暫存檔.細項 NOT LIKE '') AND 
315
+                             (RIGHT(確認樣品單明細表暫存檔.樣品流水號二, 1) LIKE '" & PA31 & "')
316
+                    GROUP BY  確認樣品單明細表暫存檔.細項, 確認樣品單敘述欄.內容"
317
+        End If
318
+        CmdSet_For_DGV()
319
+    End Sub
301 320
     Friend Sub SQL_訂單控制表材料細項清單()
302 321
         ConnOpen() : SQL1 = "SELECT 細項 FROM 訂單控制表材料細項清單 ORDER BY 細項" : CmdSet_For_dr()
303 322
     End Sub
@@ -759,6 +778,15 @@
759 778
                            "AND 樣品流水號 LIKE '" & PA5 & "'"
760 779
         CmdSet_For_dr()
761 780
     End Sub
781
+    Friend Sub SQL_確認樣品單敘述欄_確認()
782
+        ConnOpen() : SQL1 = "SELECT 內容 FROM 確認樣品單敘述欄 WHERE (樣品流水號 LIKE '" & 中文樣品單.樣品單號_tb.Text & "') AND (細項 LIKE N'" & PA & "')" : CmdSet_For_dr()
783
+    End Sub
784
+    Friend Sub SQL_確認樣品單敘述欄_新增()
785
+        ConnOpen() : SQL1 = "INSERT INTO 確認樣品單敘述欄 (樣品流水號, 細項, 內容) VALUES ('" & PA5 & "',N'" & PA & "', N'" & PA1 & "')" : CmdSet_For_dr()
786
+    End Sub
787
+    Friend Sub SQL_確認樣品單敘述欄_修改()
788
+        ConnOpen() : SQL1 = "UPDATE 確認樣品單敘述欄 SET 內容 = N'" & PA1 & "' WHERE (樣品流水號 LIKE '" & 中文樣品單.樣品單號_tb.Text & "') AND (細項 LIKE N'" & PA & "')" : CmdSet_For_dr()
789
+    End Sub
762 790
     Friend Sub SQL_修改確認樣品單明細表1()
763 791
         ConnOpen()
764 792
         SQL1 = "UPDATE 確認樣品單明細表 SET 細項 = N'" & PA & "', 內容 = N'" & PA1 & "', 
@@ -1651,6 +1679,15 @@
1651 1679
         CmdSet_For_DGV()
1652 1680
     End Sub
1653 1681
     '-----------------列印_中文樣品單------------------------------
1682
+    Friend Sub SQL_列印_中文樣品單_敘述攔()
1683
+        ConnOpen()
1684
+        SQL1 = "SELECT    確認樣品單明細表.細項, 確認樣品單敘述欄.內容
1685
+                    FROM      確認樣品單明細表 LEFT OUTER JOIN 確認樣品單敘述欄 ON 確認樣品單明細表.樣品流水號 = 確認樣品單敘述欄.樣品流水號 AND 
1686
+                              確認樣品單明細表.細項 = 確認樣品單敘述欄.細項
1687
+                    WHERE    (確認樣品單明細表.樣品流水號 LIKE '" & 列印用SQL & "') AND (確認樣品單明細表.細項 NOT LIKE '') 
1688
+                    GROUP BY  確認樣品單明細表.細項, 確認樣品單敘述欄.內容"
1689
+        CmdSet_For_DGV()
1690
+    End Sub
1654 1691
     Friend Sub SQL_列印_中文樣品單()
1655 1692
         ConnOpen()
1656 1693
         SQL1 = "SELECT 樣品流水號, 品牌, 季節, 工廠, 楦頭, Construction, 型體名, 型體號碼, 内里印刷, 中文樣品單產地標, 中文樣品單鞋圖, 新舊形體, 舊型體季別, 日期, " &

+ 2
- 2
TENDEN-MES-SYS/Module/全域變數.vb Parādīt failu

@@ -3,7 +3,7 @@
3 3
     Public g_conn_type, gUserName, 版本號, Target, Target1, Target2, FTP帳號, FTP密碼, 登入人IP, AA(99), 圖片庫, SQL密碼 As String
4 4
     Public CC(99), 登入判斷 As Boolean
5 5
     '----系統版本-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
6
-    Public 版本 As String = "2022122301"
6
+    Public 版本 As String = "2023010401"
7 7
     '----系統用全域變數-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
8 8
     Public 匯率 As Double
9 9
     '----系統用全域變數----------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -17,7 +17,7 @@
17 17
     Public 財務列印(3), 修改清單(16), 中文樣品單開啟修改, 量產樣品匯入列表開啟, BL(1), 暫存模式, 開發部門, 確認部門, 匯入列表開啟, 力威匯入列表, frmOpenFlag As Boolean
18 18
     '--------------字串變數
19 19
     Public PA, PA1, PA2, PA3, PA4, PA5, PA6, PA7, PA8, PA9, PA10, PA11, PA12, PA13, PA14, PA15, PA16, PA17, PA18, PA19, PA20, PA21, PA22, PA23, PA24, PA25, PA26,
20
-           PA27, PA28, PA29, PA30, PA49, WW, 條件, WWD1, WWD2, WWD3, 流水號2, EDFR, 日期(1), QQWEE, 樣品單流水號變數1, 樣品單流水號變數2, 樣品單流水號變數3, 部門, QWWE, ZXC,
20
+           PA27, PA28, PA29, PA30, PA31, PA49, WW, 條件, WWD1, WWD2, WWD3, 流水號2, EDFR, 日期(1), QQWEE, 樣品單流水號變數1, 樣品單流水號變數2, 樣品單流水號變數3, 部門, QWWE, ZXC,
21 21
            kkk1, kkk2, kkk3, kkk4, kkk5, kkk6, YR, YS, YD, ASDF, PP, 品牌V_R判斷, QA, PP1, PP2, PP3, PP4, PP5, PP6, PP7, PP8, ASD, 列印用SQL, 驗貨報告, 訂單紀錄流水號,
22 22
            PPAA, PPBB(3000), 排序(1), OD(42), 訂單資料表(10), PB(60), 利潤表流水號 As String
23 23
     '--------------整數變數

Binārs
TENDEN-MES-SYS/bin/Debug/TENDEN-ERP-SYS.exe Parādīt failu


Binārs
TENDEN-MES-SYS/bin/Debug/TENDEN-ERP-SYS.pdb Parādīt failu


Binārs
TENDEN-MES-SYS/obj/Debug/TENDEN-ERP-SYS.exe Parādīt failu


Binārs
TENDEN-MES-SYS/obj/Debug/TENDEN-ERP-SYS.pdb Parādīt failu


Binārs
TENDEN-MES-SYS/obj/Debug/天盾系統.vbproj.GenerateResource.cache Parādīt failu


+ 229
- 121
TENDEN-MES-SYS/樣品訂單管理/中文樣品單系統/中文樣品單.Designer.vb Parādīt failu

@@ -22,12 +22,16 @@ 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()
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()
28 31
         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()
32
+        Dim DataGridViewCellStyle9 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
33
+        Dim DataGridViewCellStyle8 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
34
+        Dim DataGridViewCellStyle7 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
31 35
         Me.Label1 = New System.Windows.Forms.Label()
32 36
         Me.Label2 = New System.Windows.Forms.Label()
33 37
         Me.Label3 = New System.Windows.Forms.Label()
@@ -240,15 +244,12 @@ Partial Class 中文樣品單
240 244
         Me.下拉5_bt = New System.Windows.Forms.Button()
241 245
         Me.視窗2_pl = New System.Windows.Forms.Panel()
242 246
         Me.Panel5 = New System.Windows.Forms.Panel()
247
+        Me.Label54 = New System.Windows.Forms.Label()
243 248
         Me.圖片資料庫_lb = New System.Windows.Forms.Label()
244 249
         Me.Label53 = New System.Windows.Forms.Label()
245
-        Me.新FTP_p = New System.Windows.Forms.Panel()
246
-        Me.日報表編輯_lb = New System.Windows.Forms.Label()
247
-        Me.CanceL2_bt = New System.Windows.Forms.Button()
248
-        Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog()
249
-        Me.Label54 = New System.Windows.Forms.Label()
250 250
         Me.圖檔入系統_bt = New System.Windows.Forms.Button()
251 251
         Me.讀取資料夾路徑_bt = New System.Windows.Forms.Button()
252
+        Me.新FTP_p = New System.Windows.Forms.Panel()
252 253
         Me.PB15 = New System.Windows.Forms.PictureBox()
253 254
         Me.PB10 = New System.Windows.Forms.PictureBox()
254 255
         Me.PB5 = New System.Windows.Forms.PictureBox()
@@ -264,10 +265,17 @@ Partial Class 中文樣品單
264 265
         Me.PB11 = New System.Windows.Forms.PictureBox()
265 266
         Me.PB6 = New System.Windows.Forms.PictureBox()
266 267
         Me.PB1 = New System.Windows.Forms.PictureBox()
268
+        Me.日報表編輯_lb = New System.Windows.Forms.Label()
269
+        Me.CanceL2_bt = New System.Windows.Forms.Button()
270
+        Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog()
267 271
         Me.PictureBox4 = New System.Windows.Forms.PictureBox()
268 272
         Me.PictureBox3 = New System.Windows.Forms.PictureBox()
269 273
         Me.PictureBox2 = New System.Windows.Forms.PictureBox()
270 274
         Me.PictureBox1 = New System.Windows.Forms.PictureBox()
275
+        Me.面料1_dgv = New System.Windows.Forms.DataGridView()
276
+        Me.內裡1_dgv = New System.Windows.Forms.DataGridView()
277
+        Me.底部1_dgv = New System.Windows.Forms.DataGridView()
278
+        Me.飾物1_dgv = New System.Windows.Forms.DataGridView()
271 279
         CType(Me.清單_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
272 280
         CType(Me.圖片1_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
273 281
         CType(Me.圖片2_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -313,6 +321,10 @@ Partial Class 中文樣品單
313 321
         CType(Me.PictureBox3, System.ComponentModel.ISupportInitialize).BeginInit()
314 322
         CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).BeginInit()
315 323
         CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
324
+        CType(Me.面料1_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
325
+        CType(Me.內裡1_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
326
+        CType(Me.底部1_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
327
+        CType(Me.飾物1_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
316 328
         Me.SuspendLayout()
317 329
         '
318 330
         'Label1
@@ -528,8 +540,8 @@ Partial Class 中文樣品單
528 540
         '
529 541
         '清單_dgv
530 542
         '
531
-        DataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
532
-        Me.清單_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle7
543
+        DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
544
+        Me.清單_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
533 545
         Me.清單_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
534 546
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
535 547
         Me.清單_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
@@ -734,8 +746,8 @@ Partial Class 中文樣品單
734 746
         '
735 747
         '圖片1_dgv
736 748
         '
737
-        DataGridViewCellStyle8.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
738
-        Me.圖片1_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle8
749
+        DataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
750
+        Me.圖片1_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2
739 751
         Me.圖片1_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
740 752
         Me.圖片1_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
741 753
         Me.圖片1_dgv.Location = New System.Drawing.Point(1016, 4)
@@ -747,15 +759,15 @@ Partial Class 中文樣品單
747 759
         '
748 760
         '圖片2_dgv
749 761
         '
750
-        DataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
751
-        Me.圖片2_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle9
762
+        DataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
763
+        Me.圖片2_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
752 764
         Me.圖片2_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
753 765
         Me.圖片2_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
754 766
         Me.圖片2_dgv.Location = New System.Drawing.Point(1016, 4)
755 767
         Me.圖片2_dgv.Name = "圖片2_dgv"
756 768
         Me.圖片2_dgv.RowHeadersWidth = 5
757
-        DataGridViewCellStyle10.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
758
-        Me.圖片2_dgv.RowsDefaultCellStyle = DataGridViewCellStyle10
769
+        DataGridViewCellStyle4.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
770
+        Me.圖片2_dgv.RowsDefaultCellStyle = DataGridViewCellStyle4
759 771
         Me.圖片2_dgv.RowTemplate.Height = 24
760 772
         Me.圖片2_dgv.Size = New System.Drawing.Size(900, 208)
761 773
         Me.圖片2_dgv.TabIndex = 343
@@ -801,11 +813,11 @@ Partial Class 中文樣品單
801 813
         Me.面料_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
802 814
         Me.面料_dgv.BackgroundColor = System.Drawing.Color.White
803 815
         Me.面料_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
804
-        Me.面料_dgv.Location = New System.Drawing.Point(85, 3)
816
+        Me.面料_dgv.Location = New System.Drawing.Point(387, 32)
805 817
         Me.面料_dgv.Name = "面料_dgv"
806 818
         Me.面料_dgv.RowHeadersWidth = 5
807 819
         Me.面料_dgv.RowTemplate.Height = 24
808
-        Me.面料_dgv.Size = New System.Drawing.Size(1454, 470)
820
+        Me.面料_dgv.Size = New System.Drawing.Size(1152, 441)
809 821
         Me.面料_dgv.TabIndex = 347
810 822
         '
811 823
         '內裡_dgv
@@ -815,11 +827,11 @@ Partial Class 中文樣品單
815 827
         Me.內裡_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
816 828
         Me.內裡_dgv.BackgroundColor = System.Drawing.Color.White
817 829
         Me.內裡_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
818
-        Me.內裡_dgv.Location = New System.Drawing.Point(85, 477)
830
+        Me.內裡_dgv.Location = New System.Drawing.Point(387, 506)
819 831
         Me.內裡_dgv.Name = "內裡_dgv"
820 832
         Me.內裡_dgv.RowHeadersWidth = 5
821 833
         Me.內裡_dgv.RowTemplate.Height = 24
822
-        Me.內裡_dgv.Size = New System.Drawing.Size(1454, 470)
834
+        Me.內裡_dgv.Size = New System.Drawing.Size(1152, 441)
823 835
         Me.內裡_dgv.TabIndex = 348
824 836
         '
825 837
         '底部_dgv
@@ -829,11 +841,11 @@ Partial Class 中文樣品單
829 841
         Me.底部_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
830 842
         Me.底部_dgv.BackgroundColor = System.Drawing.Color.White
831 843
         Me.底部_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
832
-        Me.底部_dgv.Location = New System.Drawing.Point(85, 949)
844
+        Me.底部_dgv.Location = New System.Drawing.Point(387, 979)
833 845
         Me.底部_dgv.Name = "底部_dgv"
834 846
         Me.底部_dgv.RowHeadersWidth = 5
835 847
         Me.底部_dgv.RowTemplate.Height = 24
836
-        Me.底部_dgv.Size = New System.Drawing.Size(1454, 470)
848
+        Me.底部_dgv.Size = New System.Drawing.Size(1152, 441)
837 849
         Me.底部_dgv.TabIndex = 349
838 850
         '
839 851
         '飾物_dgv
@@ -843,11 +855,11 @@ Partial Class 中文樣品單
843 855
         Me.飾物_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
844 856
         Me.飾物_dgv.BackgroundColor = System.Drawing.Color.White
845 857
         Me.飾物_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
846
-        Me.飾物_dgv.Location = New System.Drawing.Point(85, 1421)
858
+        Me.飾物_dgv.Location = New System.Drawing.Point(387, 1454)
847 859
         Me.飾物_dgv.Name = "飾物_dgv"
848 860
         Me.飾物_dgv.RowHeadersWidth = 5
849 861
         Me.飾物_dgv.RowTemplate.Height = 24
850
-        Me.飾物_dgv.Size = New System.Drawing.Size(1454, 470)
862
+        Me.飾物_dgv.Size = New System.Drawing.Size(1152, 441)
851 863
         Me.飾物_dgv.TabIndex = 350
852 864
         '
853 865
         '新增顏色清單_bt
@@ -863,36 +875,40 @@ Partial Class 中文樣品單
863 875
         'Label11
864 876
         '
865 877
         Me.Label11.AutoSize = True
866
-        Me.Label11.Location = New System.Drawing.Point(6, 4)
878
+        Me.Label11.Font = New System.Drawing.Font("微軟正黑體", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
879
+        Me.Label11.Location = New System.Drawing.Point(6, 6)
867 880
         Me.Label11.Name = "Label11"
868
-        Me.Label11.Size = New System.Drawing.Size(31, 16)
881
+        Me.Label11.Size = New System.Drawing.Size(41, 20)
869 882
         Me.Label11.TabIndex = 352
870 883
         Me.Label11.Text = "面料"
871 884
         '
872 885
         'Label12
873 886
         '
874 887
         Me.Label12.AutoSize = True
888
+        Me.Label12.Font = New System.Drawing.Font("微軟正黑體", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
875 889
         Me.Label12.Location = New System.Drawing.Point(6, 479)
876 890
         Me.Label12.Name = "Label12"
877
-        Me.Label12.Size = New System.Drawing.Size(31, 16)
891
+        Me.Label12.Size = New System.Drawing.Size(41, 20)
878 892
         Me.Label12.TabIndex = 355
879 893
         Me.Label12.Text = "內裏"
880 894
         '
881 895
         'Label13
882 896
         '
883 897
         Me.Label13.AutoSize = True
884
-        Me.Label13.Location = New System.Drawing.Point(6, 951)
898
+        Me.Label13.Font = New System.Drawing.Font("微軟正黑體", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
899
+        Me.Label13.Location = New System.Drawing.Point(6, 953)
885 900
         Me.Label13.Name = "Label13"
886
-        Me.Label13.Size = New System.Drawing.Size(31, 16)
901
+        Me.Label13.Size = New System.Drawing.Size(41, 20)
887 902
         Me.Label13.TabIndex = 356
888 903
         Me.Label13.Text = "底部"
889 904
         '
890 905
         'Label14
891 906
         '
892 907
         Me.Label14.AutoSize = True
893
-        Me.Label14.Location = New System.Drawing.Point(6, 1422)
908
+        Me.Label14.Font = New System.Drawing.Font("微軟正黑體", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
909
+        Me.Label14.Location = New System.Drawing.Point(6, 1427)
894 910
         Me.Label14.Name = "Label14"
895
-        Me.Label14.Size = New System.Drawing.Size(31, 16)
911
+        Me.Label14.Size = New System.Drawing.Size(41, 20)
896 912
         Me.Label14.TabIndex = 357
897 913
         Me.Label14.Text = "飾物"
898 914
         '
@@ -973,7 +989,7 @@ Partial Class 中文樣品單
973 989
         '新增面料_bt
974 990
         '
975 991
         Me.新增面料_bt.ForeColor = System.Drawing.Color.Blue
976
-        Me.新增面料_bt.Location = New System.Drawing.Point(2, 71)
992
+        Me.新增面料_bt.Location = New System.Drawing.Point(215, 1)
977 993
         Me.新增面料_bt.Name = "新增面料_bt"
978 994
         Me.新增面料_bt.Size = New System.Drawing.Size(80, 30)
979 995
         Me.新增面料_bt.TabIndex = 365
@@ -983,7 +999,7 @@ Partial Class 中文樣品單
983 999
         '新增內裏_bt
984 1000
         '
985 1001
         Me.新增內裏_bt.ForeColor = System.Drawing.Color.Blue
986
-        Me.新增內裏_bt.Location = New System.Drawing.Point(2, 546)
1002
+        Me.新增內裏_bt.Location = New System.Drawing.Point(215, 475)
987 1003
         Me.新增內裏_bt.Name = "新增內裏_bt"
988 1004
         Me.新增內裏_bt.Size = New System.Drawing.Size(80, 30)
989 1005
         Me.新增內裏_bt.TabIndex = 366
@@ -993,7 +1009,7 @@ Partial Class 中文樣品單
993 1009
         '新增底部_bt
994 1010
         '
995 1011
         Me.新增底部_bt.ForeColor = System.Drawing.Color.Blue
996
-        Me.新增底部_bt.Location = New System.Drawing.Point(2, 1018)
1012
+        Me.新增底部_bt.Location = New System.Drawing.Point(215, 948)
997 1013
         Me.新增底部_bt.Name = "新增底部_bt"
998 1014
         Me.新增底部_bt.Size = New System.Drawing.Size(80, 30)
999 1015
         Me.新增底部_bt.TabIndex = 367
@@ -1003,7 +1019,7 @@ Partial Class 中文樣品單
1003 1019
         '新增飾物_bt
1004 1020
         '
1005 1021
         Me.新增飾物_bt.ForeColor = System.Drawing.Color.Blue
1006
-        Me.新增飾物_bt.Location = New System.Drawing.Point(2, 1489)
1022
+        Me.新增飾物_bt.Location = New System.Drawing.Point(215, 1422)
1007 1023
         Me.新增飾物_bt.Name = "新增飾物_bt"
1008 1024
         Me.新增飾物_bt.Size = New System.Drawing.Size(80, 30)
1009 1025
         Me.新增飾物_bt.TabIndex = 368
@@ -1022,7 +1038,7 @@ Partial Class 中文樣品單
1022 1038
         '
1023 1039
         'TextBox6
1024 1040
         '
1025
-        Me.TextBox6.Location = New System.Drawing.Point(2, 47)
1041
+        Me.TextBox6.Location = New System.Drawing.Point(134, 5)
1026 1042
         Me.TextBox6.Name = "TextBox6"
1027 1043
         Me.TextBox6.Size = New System.Drawing.Size(80, 23)
1028 1044
         Me.TextBox6.TabIndex = 370
@@ -1031,7 +1047,7 @@ Partial Class 中文樣品單
1031 1047
         '刪除面料_bt
1032 1048
         '
1033 1049
         Me.刪除面料_bt.ForeColor = System.Drawing.Color.Red
1034
-        Me.刪除面料_bt.Location = New System.Drawing.Point(2, 102)
1050
+        Me.刪除面料_bt.Location = New System.Drawing.Point(301, 1)
1035 1051
         Me.刪除面料_bt.Name = "刪除面料_bt"
1036 1052
         Me.刪除面料_bt.Size = New System.Drawing.Size(80, 30)
1037 1053
         Me.刪除面料_bt.TabIndex = 374
@@ -1041,7 +1057,7 @@ Partial Class 中文樣品單
1041 1057
         '刪除內裏_bt
1042 1058
         '
1043 1059
         Me.刪除內裏_bt.ForeColor = System.Drawing.Color.Red
1044
-        Me.刪除內裏_bt.Location = New System.Drawing.Point(2, 577)
1060
+        Me.刪除內裏_bt.Location = New System.Drawing.Point(301, 475)
1045 1061
         Me.刪除內裏_bt.Name = "刪除內裏_bt"
1046 1062
         Me.刪除內裏_bt.Size = New System.Drawing.Size(80, 30)
1047 1063
         Me.刪除內裏_bt.TabIndex = 375
@@ -1051,7 +1067,7 @@ Partial Class 中文樣品單
1051 1067
         '刪除底部_bt
1052 1068
         '
1053 1069
         Me.刪除底部_bt.ForeColor = System.Drawing.Color.Red
1054
-        Me.刪除底部_bt.Location = New System.Drawing.Point(2, 1049)
1070
+        Me.刪除底部_bt.Location = New System.Drawing.Point(301, 948)
1055 1071
         Me.刪除底部_bt.Name = "刪除底部_bt"
1056 1072
         Me.刪除底部_bt.Size = New System.Drawing.Size(80, 30)
1057 1073
         Me.刪除底部_bt.TabIndex = 376
@@ -1061,7 +1077,7 @@ Partial Class 中文樣品單
1061 1077
         '刪除飾物_bt
1062 1078
         '
1063 1079
         Me.刪除飾物_bt.ForeColor = System.Drawing.Color.Red
1064
-        Me.刪除飾物_bt.Location = New System.Drawing.Point(2, 1520)
1080
+        Me.刪除飾物_bt.Location = New System.Drawing.Point(301, 1422)
1065 1081
         Me.刪除飾物_bt.Name = "刪除飾物_bt"
1066 1082
         Me.刪除飾物_bt.Size = New System.Drawing.Size(80, 30)
1067 1083
         Me.刪除飾物_bt.TabIndex = 377
@@ -1070,7 +1086,7 @@ Partial Class 中文樣品單
1070 1086
         '
1071 1087
         '樣品流水號_tb
1072 1088
         '
1073
-        Me.樣品流水號_tb.Location = New System.Drawing.Point(2, 22)
1089
+        Me.樣品流水號_tb.Location = New System.Drawing.Point(52, 5)
1074 1090
         Me.樣品流水號_tb.Name = "樣品流水號_tb"
1075 1091
         Me.樣品流水號_tb.Size = New System.Drawing.Size(80, 23)
1076 1092
         Me.樣品流水號_tb.TabIndex = 378
@@ -1205,8 +1221,8 @@ Partial Class 中文樣品單
1205 1221
         '
1206 1222
         '圖片4_dgv
1207 1223
         '
1208
-        DataGridViewCellStyle11.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
1209
-        Me.圖片4_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle11
1224
+        DataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
1225
+        Me.圖片4_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle5
1210 1226
         Me.圖片4_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
1211 1227
         Me.圖片4_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
1212 1228
         Me.圖片4_dgv.Location = New System.Drawing.Point(1016, 4)
@@ -1245,7 +1261,7 @@ Partial Class 中文樣品單
1245 1261
         '
1246 1262
         '樣品流水號1_tb
1247 1263
         '
1248
-        Me.樣品流水號1_tb.Location = New System.Drawing.Point(2, 497)
1264
+        Me.樣品流水號1_tb.Location = New System.Drawing.Point(52, 479)
1249 1265
         Me.樣品流水號1_tb.Name = "樣品流水號1_tb"
1250 1266
         Me.樣品流水號1_tb.Size = New System.Drawing.Size(80, 23)
1251 1267
         Me.樣品流水號1_tb.TabIndex = 399
@@ -1253,7 +1269,7 @@ Partial Class 中文樣品單
1253 1269
         '
1254 1270
         '樣品流水號2_tb
1255 1271
         '
1256
-        Me.樣品流水號2_tb.Location = New System.Drawing.Point(2, 969)
1272
+        Me.樣品流水號2_tb.Location = New System.Drawing.Point(52, 952)
1257 1273
         Me.樣品流水號2_tb.Name = "樣品流水號2_tb"
1258 1274
         Me.樣品流水號2_tb.Size = New System.Drawing.Size(80, 23)
1259 1275
         Me.樣品流水號2_tb.TabIndex = 400
@@ -1261,7 +1277,7 @@ Partial Class 中文樣品單
1261 1277
         '
1262 1278
         'TextBox13
1263 1279
         '
1264
-        Me.TextBox13.Location = New System.Drawing.Point(2, 1440)
1280
+        Me.TextBox13.Location = New System.Drawing.Point(52, 1426)
1265 1281
         Me.TextBox13.Name = "TextBox13"
1266 1282
         Me.TextBox13.Size = New System.Drawing.Size(80, 23)
1267 1283
         Me.TextBox13.TabIndex = 401
@@ -1269,7 +1285,7 @@ Partial Class 中文樣品單
1269 1285
         '
1270 1286
         'TextBox14
1271 1287
         '
1272
-        Me.TextBox14.Location = New System.Drawing.Point(2, 522)
1288
+        Me.TextBox14.Location = New System.Drawing.Point(134, 479)
1273 1289
         Me.TextBox14.Name = "TextBox14"
1274 1290
         Me.TextBox14.Size = New System.Drawing.Size(80, 23)
1275 1291
         Me.TextBox14.TabIndex = 402
@@ -1277,7 +1293,7 @@ Partial Class 中文樣品單
1277 1293
         '
1278 1294
         'TextBox15
1279 1295
         '
1280
-        Me.TextBox15.Location = New System.Drawing.Point(2, 994)
1296
+        Me.TextBox15.Location = New System.Drawing.Point(134, 952)
1281 1297
         Me.TextBox15.Name = "TextBox15"
1282 1298
         Me.TextBox15.Size = New System.Drawing.Size(80, 23)
1283 1299
         Me.TextBox15.TabIndex = 403
@@ -1285,7 +1301,7 @@ Partial Class 中文樣品單
1285 1301
         '
1286 1302
         'TextBox16
1287 1303
         '
1288
-        Me.TextBox16.Location = New System.Drawing.Point(2, 1465)
1304
+        Me.TextBox16.Location = New System.Drawing.Point(134, 1426)
1289 1305
         Me.TextBox16.Name = "TextBox16"
1290 1306
         Me.TextBox16.Size = New System.Drawing.Size(80, 23)
1291 1307
         Me.TextBox16.TabIndex = 404
@@ -1293,8 +1309,8 @@ Partial Class 中文樣品單
1293 1309
         '
1294 1310
         '圖片3_dgv
1295 1311
         '
1296
-        DataGridViewCellStyle12.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
1297
-        Me.圖片3_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle12
1312
+        DataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
1313
+        Me.圖片3_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle6
1298 1314
         Me.圖片3_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
1299 1315
         Me.圖片3_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
1300 1316
         Me.圖片3_dgv.Location = New System.Drawing.Point(1016, 4)
@@ -1343,7 +1359,7 @@ Partial Class 中文樣品單
1343 1359
         '面料顏色排序_bt
1344 1360
         '
1345 1361
         Me.面料顏色排序_bt.ForeColor = System.Drawing.Color.Green
1346
-        Me.面料顏色排序_bt.Location = New System.Drawing.Point(2, 132)
1362
+        Me.面料顏色排序_bt.Location = New System.Drawing.Point(387, 1)
1347 1363
         Me.面料顏色排序_bt.Name = "面料顏色排序_bt"
1348 1364
         Me.面料顏色排序_bt.Size = New System.Drawing.Size(80, 30)
1349 1365
         Me.面料顏色排序_bt.TabIndex = 410
@@ -1353,7 +1369,7 @@ Partial Class 中文樣品單
1353 1369
         '面料項次排序_bt
1354 1370
         '
1355 1371
         Me.面料項次排序_bt.ForeColor = System.Drawing.Color.Green
1356
-        Me.面料項次排序_bt.Location = New System.Drawing.Point(2, 163)
1372
+        Me.面料項次排序_bt.Location = New System.Drawing.Point(473, 1)
1357 1373
         Me.面料項次排序_bt.Name = "面料項次排序_bt"
1358 1374
         Me.面料項次排序_bt.Size = New System.Drawing.Size(80, 30)
1359 1375
         Me.面料項次排序_bt.TabIndex = 411
@@ -1363,7 +1379,7 @@ Partial Class 中文樣品單
1363 1379
         '內裏項次排序_tb
1364 1380
         '
1365 1381
         Me.內裏項次排序_tb.ForeColor = System.Drawing.Color.Green
1366
-        Me.內裏項次排序_tb.Location = New System.Drawing.Point(2, 638)
1382
+        Me.內裏項次排序_tb.Location = New System.Drawing.Point(473, 474)
1367 1383
         Me.內裏項次排序_tb.Name = "內裏項次排序_tb"
1368 1384
         Me.內裏項次排序_tb.Size = New System.Drawing.Size(80, 30)
1369 1385
         Me.內裏項次排序_tb.TabIndex = 413
@@ -1373,7 +1389,7 @@ Partial Class 中文樣品單
1373 1389
         '內裏顏色排序_tb
1374 1390
         '
1375 1391
         Me.內裏顏色排序_tb.ForeColor = System.Drawing.Color.Green
1376
-        Me.內裏顏色排序_tb.Location = New System.Drawing.Point(2, 607)
1392
+        Me.內裏顏色排序_tb.Location = New System.Drawing.Point(387, 475)
1377 1393
         Me.內裏顏色排序_tb.Name = "內裏顏色排序_tb"
1378 1394
         Me.內裏顏色排序_tb.Size = New System.Drawing.Size(80, 30)
1379 1395
         Me.內裏顏色排序_tb.TabIndex = 412
@@ -1383,7 +1399,7 @@ Partial Class 中文樣品單
1383 1399
         '底部項次排序_bt
1384 1400
         '
1385 1401
         Me.底部項次排序_bt.ForeColor = System.Drawing.Color.Green
1386
-        Me.底部項次排序_bt.Location = New System.Drawing.Point(2, 1109)
1402
+        Me.底部項次排序_bt.Location = New System.Drawing.Point(473, 948)
1387 1403
         Me.底部項次排序_bt.Name = "底部項次排序_bt"
1388 1404
         Me.底部項次排序_bt.Size = New System.Drawing.Size(80, 30)
1389 1405
         Me.底部項次排序_bt.TabIndex = 415
@@ -1393,7 +1409,7 @@ Partial Class 中文樣品單
1393 1409
         '底部顏色排序_bt
1394 1410
         '
1395 1411
         Me.底部顏色排序_bt.ForeColor = System.Drawing.Color.Green
1396
-        Me.底部顏色排序_bt.Location = New System.Drawing.Point(2, 1079)
1412
+        Me.底部顏色排序_bt.Location = New System.Drawing.Point(387, 948)
1397 1413
         Me.底部顏色排序_bt.Name = "底部顏色排序_bt"
1398 1414
         Me.底部顏色排序_bt.Size = New System.Drawing.Size(80, 30)
1399 1415
         Me.底部顏色排序_bt.TabIndex = 414
@@ -1403,7 +1419,7 @@ Partial Class 中文樣品單
1403 1419
         '飾物項次排序_bt
1404 1420
         '
1405 1421
         Me.飾物項次排序_bt.ForeColor = System.Drawing.Color.Green
1406
-        Me.飾物項次排序_bt.Location = New System.Drawing.Point(3, 1581)
1422
+        Me.飾物項次排序_bt.Location = New System.Drawing.Point(473, 1422)
1407 1423
         Me.飾物項次排序_bt.Name = "飾物項次排序_bt"
1408 1424
         Me.飾物項次排序_bt.Size = New System.Drawing.Size(80, 30)
1409 1425
         Me.飾物項次排序_bt.TabIndex = 417
@@ -1413,7 +1429,7 @@ Partial Class 中文樣品單
1413 1429
         '飾物顏色排序_bt
1414 1430
         '
1415 1431
         Me.飾物顏色排序_bt.ForeColor = System.Drawing.Color.Green
1416
-        Me.飾物顏色排序_bt.Location = New System.Drawing.Point(2, 1550)
1432
+        Me.飾物顏色排序_bt.Location = New System.Drawing.Point(387, 1422)
1417 1433
         Me.飾物顏色排序_bt.Name = "飾物顏色排序_bt"
1418 1434
         Me.飾物顏色排序_bt.Size = New System.Drawing.Size(80, 30)
1419 1435
         Me.飾物顏色排序_bt.TabIndex = 416
@@ -2212,6 +2228,10 @@ Partial Class 中文樣品單
2212 2228
             Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
2213 2229
         Me.Panel2.AutoScroll = True
2214 2230
         Me.Panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
2231
+        Me.Panel2.Controls.Add(Me.飾物1_dgv)
2232
+        Me.Panel2.Controls.Add(Me.底部1_dgv)
2233
+        Me.Panel2.Controls.Add(Me.內裡1_dgv)
2234
+        Me.Panel2.Controls.Add(Me.面料1_dgv)
2215 2235
         Me.Panel2.Controls.Add(Me.Label50)
2216 2236
         Me.Panel2.Controls.Add(Me.Label11)
2217 2237
         Me.Panel2.Controls.Add(Me.樣品流水號_tb)
@@ -2522,6 +2542,16 @@ Partial Class 中文樣品單
2522 2542
         Me.Panel5.Size = New System.Drawing.Size(775, 386)
2523 2543
         Me.Panel5.TabIndex = 1367
2524 2544
         '
2545
+        'Label54
2546
+        '
2547
+        Me.Label54.AutoSize = True
2548
+        Me.Label54.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
2549
+        Me.Label54.Location = New System.Drawing.Point(308, 13)
2550
+        Me.Label54.Name = "Label54"
2551
+        Me.Label54.Size = New System.Drawing.Size(55, 16)
2552
+        Me.Label54.TabIndex = 1849
2553
+        Me.Label54.Text = "樣品單號"
2554
+        '
2525 2555
         '圖片資料庫_lb
2526 2556
         '
2527 2557
         Me.圖片資料庫_lb.AutoSize = True
@@ -2542,65 +2572,6 @@ Partial Class 中文樣品單
2542 2572
         Me.Label53.TabIndex = 1847
2543 2573
         Me.Label53.Text = "圖片資料庫 : "
2544 2574
         '
2545
-        '新FTP_p
2546
-        '
2547
-        Me.新FTP_p.Controls.Add(Me.PB15)
2548
-        Me.新FTP_p.Controls.Add(Me.PB10)
2549
-        Me.新FTP_p.Controls.Add(Me.PB5)
2550
-        Me.新FTP_p.Controls.Add(Me.PB14)
2551
-        Me.新FTP_p.Controls.Add(Me.PB9)
2552
-        Me.新FTP_p.Controls.Add(Me.PB4)
2553
-        Me.新FTP_p.Controls.Add(Me.PB13)
2554
-        Me.新FTP_p.Controls.Add(Me.PB8)
2555
-        Me.新FTP_p.Controls.Add(Me.PB3)
2556
-        Me.新FTP_p.Controls.Add(Me.PB12)
2557
-        Me.新FTP_p.Controls.Add(Me.PB7)
2558
-        Me.新FTP_p.Controls.Add(Me.PB2)
2559
-        Me.新FTP_p.Controls.Add(Me.PB11)
2560
-        Me.新FTP_p.Controls.Add(Me.PB6)
2561
-        Me.新FTP_p.Controls.Add(Me.PB1)
2562
-        Me.新FTP_p.Location = New System.Drawing.Point(1, 44)
2563
-        Me.新FTP_p.Name = "新FTP_p"
2564
-        Me.新FTP_p.Size = New System.Drawing.Size(770, 338)
2565
-        Me.新FTP_p.TabIndex = 1845
2566
-        '
2567
-        '日報表編輯_lb
2568
-        '
2569
-        Me.日報表編輯_lb.AutoSize = True
2570
-        Me.日報表編輯_lb.Location = New System.Drawing.Point(5, 7)
2571
-        Me.日報表編輯_lb.Name = "日報表編輯_lb"
2572
-        Me.日報表編輯_lb.Size = New System.Drawing.Size(67, 16)
2573
-        Me.日報表編輯_lb.TabIndex = 1375
2574
-        Me.日報表編輯_lb.Text = "日報表編輯"
2575
-        '
2576
-        'CanceL2_bt
2577
-        '
2578
-        Me.CanceL2_bt.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
2579
-        Me.CanceL2_bt.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
2580
-        Me.CanceL2_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
2581
-        Me.CanceL2_bt.ForeColor = System.Drawing.Color.Black
2582
-        Me.CanceL2_bt.Location = New System.Drawing.Point(750, 2)
2583
-        Me.CanceL2_bt.Name = "CanceL2_bt"
2584
-        Me.CanceL2_bt.Size = New System.Drawing.Size(26, 26)
2585
-        Me.CanceL2_bt.TabIndex = 1374
2586
-        Me.CanceL2_bt.Text = "X"
2587
-        Me.CanceL2_bt.UseVisualStyleBackColor = False
2588
-        '
2589
-        'OpenFileDialog1
2590
-        '
2591
-        Me.OpenFileDialog1.FileName = "OpenFileDialog1"
2592
-        Me.OpenFileDialog1.Multiselect = True
2593
-        '
2594
-        'Label54
2595
-        '
2596
-        Me.Label54.AutoSize = True
2597
-        Me.Label54.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
2598
-        Me.Label54.Location = New System.Drawing.Point(308, 13)
2599
-        Me.Label54.Name = "Label54"
2600
-        Me.Label54.Size = New System.Drawing.Size(55, 16)
2601
-        Me.Label54.TabIndex = 1849
2602
-        Me.Label54.Text = "樣品單號"
2603
-        '
2604 2575
         '圖檔入系統_bt
2605 2576
         '
2606 2577
         Me.圖檔入系統_bt.BackgroundImage = Global.天盾國際管理系統.My.Resources.Resources.Add_Image
@@ -2624,6 +2595,28 @@ Partial Class 中文樣品單
2624 2595
         Me.讀取資料夾路徑_bt.TabIndex = 1684
2625 2596
         Me.讀取資料夾路徑_bt.UseVisualStyleBackColor = True
2626 2597
         '
2598
+        '新FTP_p
2599
+        '
2600
+        Me.新FTP_p.Controls.Add(Me.PB15)
2601
+        Me.新FTP_p.Controls.Add(Me.PB10)
2602
+        Me.新FTP_p.Controls.Add(Me.PB5)
2603
+        Me.新FTP_p.Controls.Add(Me.PB14)
2604
+        Me.新FTP_p.Controls.Add(Me.PB9)
2605
+        Me.新FTP_p.Controls.Add(Me.PB4)
2606
+        Me.新FTP_p.Controls.Add(Me.PB13)
2607
+        Me.新FTP_p.Controls.Add(Me.PB8)
2608
+        Me.新FTP_p.Controls.Add(Me.PB3)
2609
+        Me.新FTP_p.Controls.Add(Me.PB12)
2610
+        Me.新FTP_p.Controls.Add(Me.PB7)
2611
+        Me.新FTP_p.Controls.Add(Me.PB2)
2612
+        Me.新FTP_p.Controls.Add(Me.PB11)
2613
+        Me.新FTP_p.Controls.Add(Me.PB6)
2614
+        Me.新FTP_p.Controls.Add(Me.PB1)
2615
+        Me.新FTP_p.Location = New System.Drawing.Point(1, 44)
2616
+        Me.新FTP_p.Name = "新FTP_p"
2617
+        Me.新FTP_p.Size = New System.Drawing.Size(770, 338)
2618
+        Me.新FTP_p.TabIndex = 1845
2619
+        '
2627 2620
         'PB15
2628 2621
         '
2629 2622
         Me.PB15.BackColor = System.Drawing.Color.White
@@ -2819,6 +2812,33 @@ Partial Class 中文樣品單
2819 2812
         Me.PB1.TabIndex = 1698
2820 2813
         Me.PB1.TabStop = False
2821 2814
         '
2815
+        '日報表編輯_lb
2816
+        '
2817
+        Me.日報表編輯_lb.AutoSize = True
2818
+        Me.日報表編輯_lb.Location = New System.Drawing.Point(5, 7)
2819
+        Me.日報表編輯_lb.Name = "日報表編輯_lb"
2820
+        Me.日報表編輯_lb.Size = New System.Drawing.Size(67, 16)
2821
+        Me.日報表編輯_lb.TabIndex = 1375
2822
+        Me.日報表編輯_lb.Text = "日報表編輯"
2823
+        '
2824
+        'CanceL2_bt
2825
+        '
2826
+        Me.CanceL2_bt.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
2827
+        Me.CanceL2_bt.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
2828
+        Me.CanceL2_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
2829
+        Me.CanceL2_bt.ForeColor = System.Drawing.Color.Black
2830
+        Me.CanceL2_bt.Location = New System.Drawing.Point(750, 2)
2831
+        Me.CanceL2_bt.Name = "CanceL2_bt"
2832
+        Me.CanceL2_bt.Size = New System.Drawing.Size(26, 26)
2833
+        Me.CanceL2_bt.TabIndex = 1374
2834
+        Me.CanceL2_bt.Text = "X"
2835
+        Me.CanceL2_bt.UseVisualStyleBackColor = False
2836
+        '
2837
+        'OpenFileDialog1
2838
+        '
2839
+        Me.OpenFileDialog1.FileName = "OpenFileDialog1"
2840
+        Me.OpenFileDialog1.Multiselect = True
2841
+        '
2822 2842
         'PictureBox4
2823 2843
         '
2824 2844
         Me.PictureBox4.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
@@ -2859,13 +2879,92 @@ Partial Class 中文樣品單
2859 2879
         Me.PictureBox1.TabIndex = 195
2860 2880
         Me.PictureBox1.TabStop = False
2861 2881
         '
2882
+        '面料1_dgv
2883
+        '
2884
+        Me.面料1_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
2885
+        Me.面料1_dgv.BackgroundColor = System.Drawing.Color.White
2886
+        Me.面料1_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
2887
+        DataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
2888
+        DataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Window
2889
+        DataGridViewCellStyle10.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
2890
+        DataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.ControlText
2891
+        DataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight
2892
+        DataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText
2893
+        DataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
2894
+        Me.面料1_dgv.DefaultCellStyle = DataGridViewCellStyle10
2895
+        Me.面料1_dgv.Location = New System.Drawing.Point(1, 32)
2896
+        Me.面料1_dgv.Name = "面料1_dgv"
2897
+        Me.面料1_dgv.RowHeadersWidth = 5
2898
+        Me.面料1_dgv.RowTemplate.Height = 24
2899
+        Me.面料1_dgv.Size = New System.Drawing.Size(387, 441)
2900
+        Me.面料1_dgv.TabIndex = 419
2901
+        '
2902
+        '內裡1_dgv
2903
+        '
2904
+        Me.內裡1_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
2905
+        Me.內裡1_dgv.BackgroundColor = System.Drawing.Color.White
2906
+        Me.內裡1_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
2907
+        DataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
2908
+        DataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Window
2909
+        DataGridViewCellStyle9.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
2910
+        DataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.ControlText
2911
+        DataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight
2912
+        DataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.HighlightText
2913
+        DataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
2914
+        Me.內裡1_dgv.DefaultCellStyle = DataGridViewCellStyle9
2915
+        Me.內裡1_dgv.Location = New System.Drawing.Point(1, 506)
2916
+        Me.內裡1_dgv.Name = "內裡1_dgv"
2917
+        Me.內裡1_dgv.RowHeadersWidth = 5
2918
+        Me.內裡1_dgv.RowTemplate.Height = 24
2919
+        Me.內裡1_dgv.Size = New System.Drawing.Size(387, 441)
2920
+        Me.內裡1_dgv.TabIndex = 420
2921
+        '
2922
+        '底部1_dgv
2923
+        '
2924
+        Me.底部1_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
2925
+        Me.底部1_dgv.BackgroundColor = System.Drawing.Color.White
2926
+        Me.底部1_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
2927
+        DataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
2928
+        DataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Window
2929
+        DataGridViewCellStyle8.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
2930
+        DataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.ControlText
2931
+        DataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight
2932
+        DataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText
2933
+        DataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
2934
+        Me.底部1_dgv.DefaultCellStyle = DataGridViewCellStyle8
2935
+        Me.底部1_dgv.Location = New System.Drawing.Point(1, 979)
2936
+        Me.底部1_dgv.Name = "底部1_dgv"
2937
+        Me.底部1_dgv.RowHeadersWidth = 5
2938
+        Me.底部1_dgv.RowTemplate.Height = 24
2939
+        Me.底部1_dgv.Size = New System.Drawing.Size(387, 441)
2940
+        Me.底部1_dgv.TabIndex = 421
2941
+        '
2942
+        '飾物1_dgv
2943
+        '
2944
+        Me.飾物1_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
2945
+        Me.飾物1_dgv.BackgroundColor = System.Drawing.Color.White
2946
+        Me.飾物1_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
2947
+        DataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
2948
+        DataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Window
2949
+        DataGridViewCellStyle7.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
2950
+        DataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.ControlText
2951
+        DataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight
2952
+        DataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText
2953
+        DataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
2954
+        Me.飾物1_dgv.DefaultCellStyle = DataGridViewCellStyle7
2955
+        Me.飾物1_dgv.Location = New System.Drawing.Point(1, 1454)
2956
+        Me.飾物1_dgv.Name = "飾物1_dgv"
2957
+        Me.飾物1_dgv.RowHeadersWidth = 5
2958
+        Me.飾物1_dgv.RowTemplate.Height = 24
2959
+        Me.飾物1_dgv.Size = New System.Drawing.Size(387, 441)
2960
+        Me.飾物1_dgv.TabIndex = 422
2961
+        '
2862 2962
         '中文樣品單
2863 2963
         '
2864 2964
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
2865 2965
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
2866 2966
         Me.AutoScroll = True
2867 2967
         Me.ClientSize = New System.Drawing.Size(1924, 966)
2868
-        Me.Controls.Add(Me.視窗2_pl)
2869 2968
         Me.Controls.Add(Me.下拉5_bt)
2870 2969
         Me.Controls.Add(Me.下拉4_bt)
2871 2970
         Me.Controls.Add(Me.下拉3_bt)
@@ -2928,6 +3027,7 @@ Partial Class 中文樣品單
2928 3027
         Me.Controls.Add(Me.圖片1_dgv)
2929 3028
         Me.Controls.Add(Me.圖片3_dgv)
2930 3029
         Me.Controls.Add(Me.圖片4_dgv)
3030
+        Me.Controls.Add(Me.視窗2_pl)
2931 3031
         Me.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
2932 3032
         Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
2933 3033
         Me.Name = "中文樣品單"
@@ -2987,6 +3087,10 @@ Partial Class 中文樣品單
2987 3087
         CType(Me.PictureBox3, System.ComponentModel.ISupportInitialize).EndInit()
2988 3088
         CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).EndInit()
2989 3089
         CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
3090
+        CType(Me.面料1_dgv, System.ComponentModel.ISupportInitialize).EndInit()
3091
+        CType(Me.內裡1_dgv, System.ComponentModel.ISupportInitialize).EndInit()
3092
+        CType(Me.底部1_dgv, System.ComponentModel.ISupportInitialize).EndInit()
3093
+        CType(Me.飾物1_dgv, System.ComponentModel.ISupportInitialize).EndInit()
2990 3094
         Me.ResumeLayout(False)
2991 3095
         Me.PerformLayout()
2992 3096
 
@@ -3232,4 +3336,8 @@ Partial Class 中文樣品單
3232 3336
     Friend WithEvents 圖片資料庫_lb As Label
3233 3337
     Friend WithEvents Label53 As Label
3234 3338
     Friend WithEvents Label54 As Label
3339
+    Friend WithEvents 面料1_dgv As DataGridView
3340
+    Friend WithEvents 內裡1_dgv As DataGridView
3341
+    Friend WithEvents 飾物1_dgv As DataGridView
3342
+    Friend WithEvents 底部1_dgv As DataGridView
3235 3343
 End Class

+ 384
- 350
TENDEN-MES-SYS/樣品訂單管理/中文樣品單系統/中文樣品單.vb Parādīt failu

@@ -1,7 +1,7 @@
1 1
 Option Strict Off
2 2
 Imports System.IO
3 3
 Public Class 中文樣品單
4
-    ReadOnly ds, ds1, ds2, ds3, ds4, ds5, ds6, ds7, ds8, ds9, ds10, ds11 As New DataSet
4
+    ReadOnly ds, ds1, ds2, ds3, ds4, ds5, ds6, ds7, ds8, ds9, ds10, ds11, ds12, ds13, ds14, ds15 As New DataSet
5 5
     ReadOnly DTP(0), WW(14) As String
6 6
     ReadOnly 控制表行數 As Integer
7 7
     Dim 新增面料 As Integer = 0 : Dim 新增內裏 As Integer = 0 : Dim 新增底部 As Integer = 0 : Dim 新增飾物 As Integer = 0
@@ -190,152 +190,174 @@ Public Class 中文樣品單
190 190
         Construc_Name_tb.Enabled = False : GroupBox6.Visible = False
191 191
     End Sub
192 192
     Private Sub Set_產地標圖片導入()
193
-        Try
194
-            SQL_產地標圖片導入()
195
-            While dr.Read() = True
196
-                Dim unused As Byte() = New Byte(-1) {} : Dim bytes As Byte() = DirectCast(dr.Item("圖片"), Byte())
197
-                Dim oStream As New MemoryStream(bytes) : PictureBox1.Image = Bitmap.FromStream(oStream)
198
-            End While
199
-            conn.Close() : PictureBox1.SizeMode = 4
200
-        Catch ex As Exception : MsgBox(ex.Message) : End Try
193
+        SQL_產地標圖片導入()
194
+        While dr.Read() = True
195
+            Dim unused As Byte() = New Byte(-1) {} : Dim bytes As Byte() = DirectCast(dr.Item("圖片"), Byte())
196
+            Dim oStream As New MemoryStream(bytes) : PictureBox1.Image = Bitmap.FromStream(oStream)
197
+        End While
198
+        conn.Close() : PictureBox1.SizeMode = 4
201 199
     End Sub
202 200
     Private Sub Set_設計圖圖片導入()
203
-        Try
204
-            SQL_設計圖圖片導入()
205
-            While dr.Read() = True
201
+        SQL_設計圖圖片導入()
202
+        While dr.Read() = True
206 203
                 Dim unused As Byte() = New Byte(-1) {} : Dim bytes As Byte() = DirectCast(dr.Item("圖片"), Byte())
207 204
                 Dim oStream As New MemoryStream(bytes) : PictureBox2.Image = Bitmap.FromStream(oStream)
208
-            End While
209
-            conn.Close() : PictureBox2.SizeMode = 4
210
-        Catch ex As Exception : MsgBox(ex.Message) : End Try
205
+        End While
206
+        conn.Close() : PictureBox2.SizeMode = 4
211 207
     End Sub
212 208
     Private Sub Set_中底LOGO導入()
213
-        Try
214
-            SQL_中底LOGO導入()
215
-            While dr.Read() = True
216
-                Dim unused As Byte() = New Byte(-1) {} : Dim bytes As Byte() = DirectCast(dr.Item("圖片"), Byte())
217
-                Dim oStream As New MemoryStream(bytes) : PictureBox3.Image = Bitmap.FromStream(oStream)
218
-            End While
219
-            conn.Close() : PictureBox3.SizeMode = 4
220
-        Catch ex As Exception : MsgBox(ex.Message) : End Try
209
+        SQL_中底LOGO導入()
210
+        While dr.Read() = True
211
+            Dim unused As Byte() = New Byte(-1) {} : Dim bytes As Byte() = DirectCast(dr.Item("圖片"), Byte())
212
+            Dim oStream As New MemoryStream(bytes) : PictureBox3.Image = Bitmap.FromStream(oStream)
213
+        End While
214
+        conn.Close() : PictureBox3.SizeMode = 4
221 215
     End Sub
222 216
     Private Sub Set_其他LOGO導入()
223
-        Try
224
-            SQL_其他LOGO導入()
225
-            While dr.Read() = True
226
-                Dim unused As Byte() = New Byte(-1) {} : Dim bytes As Byte() = DirectCast(dr.Item("圖片"), Byte())
227
-                Dim oStream As New MemoryStream(bytes) : PictureBox4.Image = Bitmap.FromStream(oStream)
228
-            End While
229
-            conn.Close() : PictureBox4.SizeMode = 4
230
-        Catch ex As Exception : MsgBox(ex.Message) : End Try
217
+        SQL_其他LOGO導入()
218
+        While dr.Read() = True
219
+            Dim unused As Byte() = New Byte(-1) {} : Dim bytes As Byte() = DirectCast(dr.Item("圖片"), Byte())
220
+            Dim oStream As New MemoryStream(bytes) : PictureBox4.Image = Bitmap.FromStream(oStream)
221
+        End While
222
+        conn.Close() : PictureBox4.SizeMode = 4
231 223
     End Sub
232 224
     Private Sub Set_再次導入清單()
233
-        Try
234
-            Set_顏色清單()
235
-            '------------------------------------------------------------------------------------------------------------------------------------------------------------
236
-            面料_dgv.DataSource = Nothing : ds4.Clear()
237
-            面料_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
238
-            面料_dgv.ColumnHeadersHeight = 25 : 面料_dgv.AllowUserToAddRows = False
239
-            SQL_再次導入清單()
240
-            da.SelectCommand.CommandTimeout = 900 : da.Fill(ds4) : 面料_dgv.DataSource = ds4.Tables(0) : conn.Close()
241
-            If 面料_dgv.Columns.Count.ToString = 9 Then : 面料_dgv.Columns.Remove("Item_N") : 面料_dgv.Columns.Remove("Factory") : End If
225
+        Set_顏色清單()
226
+        '------------------------------------------------------------------------------------------------------------------------------------------------------------
227
+        面料_dgv.DataSource = Nothing : ds4.Clear()
228
+        面料_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
229
+        面料_dgv.ColumnHeadersHeight = 25 : 面料_dgv.AllowUserToAddRows = False
230
+        SQL_確認樣品單明細表0()
231
+        da.SelectCommand.CommandTimeout = 900 : da.Fill(ds4) : 面料_dgv.DataSource = ds4.Tables(0) : conn.Close()
232
+        If 面料_dgv.Columns.Count.ToString = 9 Then : 面料_dgv.Columns.Remove("Item_N") : 面料_dgv.Columns.Remove("Factory") : End If
242 233
 
243
-            Dim Col As New DataGridViewComboBoxColumn With {
234
+        Dim Col As New DataGridViewComboBoxColumn With {
244 235
                 .FillWeight = 200,
245 236
                 .DataPropertyName = "細項"
246 237
             }
247
-            SQL_訂單控制表材料細項清單() : Col.Items.Clear()
248
-            While (dr.Read()) : Col.Items.Add(dr("細項")) : End While : Col.HeaderText = "Item_N" : Col.Name = "Item_N" : 面料_dgv.Columns.Insert(4, Col)
238
+        SQL_訂單控制表材料細項清單() : Col.Items.Clear()
239
+        While (dr.Read()) : Col.Items.Add(dr("細項")) : End While : Col.HeaderText = "Item_N" : Col.Name = "Item_N" : 面料_dgv.Columns.Insert(4, Col)
249 240
 
250
-            Dim Col1 As New DataGridViewComboBoxColumn With {
241
+        Dim Col1 As New DataGridViewComboBoxColumn With {
251 242
                 .FillWeight = 200,
252 243
                 .DataPropertyName = "廠商"
253 244
             }
254
-            SQL_訂單控制表材料廠商清單() : Col1.Items.Clear()
255
-            While (dr.Read()) : Col1.Items.Add(dr("Factory")) : End While : Col1.HeaderText = "Factory" : Col1.Name = "Factory" : 面料_dgv.Columns.Insert(6, Col1)
245
+        SQL_訂單控制表材料廠商清單() : Col1.Items.Clear()
246
+        While (dr.Read()) : Col1.Items.Add(dr("Factory")) : End While : Col1.HeaderText = "Factory" : Col1.Name = "Factory" : 面料_dgv.Columns.Insert(6, Col1)
256 247
 
257
-            面料_dgv.Columns(0).FillWeight = 150 : 面料_dgv.Columns(5).FillWeight = 934
258
-            面料_dgv.Columns(1).Visible = False : 面料_dgv.Columns(2).Visible = False : 面料_dgv.Columns(3).Visible = False : 面料_dgv.Columns(7).Visible = False
259
-            面料_dgv.Columns(8).Visible = False
260
-            面料_dgv.EditMode = DataGridViewEditMode.EditOnEnter
261
-            '-------------------------------------------------------------------------------------------------------------------------------------------------------------
262
-            內裡_dgv.DataSource = Nothing : ds5.Clear()
263
-            內裡_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
264
-            內裡_dgv.ColumnHeadersHeight = 25 : 內裡_dgv.AllowUserToAddRows = False
265
-            SQL_確認樣品單明細表()
266
-            da.SelectCommand.CommandTimeout = 900 : da.Fill(ds5) : 內裡_dgv.DataSource = ds5.Tables(0) : conn.Close()
267
-            If 內裡_dgv.Columns.Count.ToString = 9 Then : 內裡_dgv.Columns.Remove("Item_N") : 內裡_dgv.Columns.Remove("Factory") : End If
248
+        面料_dgv.Columns(0).FillWeight = 150 : 面料_dgv.Columns(5).FillWeight = 934
249
+        面料_dgv.Columns(1).Visible = False : 面料_dgv.Columns(2).Visible = False : 面料_dgv.Columns(3).Visible = False : 面料_dgv.Columns(7).Visible = False
250
+        面料_dgv.Columns(8).Visible = False
251
+        面料_dgv.EditMode = DataGridViewEditMode.EditOnEnter
268 252
 
269
-            Dim Col2 As New DataGridViewComboBoxColumn With {
253
+        面料1_dgv.DataSource = Nothing : ds12.Clear()
254
+        面料1_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
255
+        面料1_dgv.ColumnHeadersHeight = 25 : 面料1_dgv.AllowUserToAddRows = False : 面料1_dgv.RowTemplate.Height = 45
256
+        PA31 = "1" : SQL_確認樣品單明細表_敘述攔()
257
+        da.SelectCommand.CommandTimeout = 900 : da.Fill(ds12) : 面料1_dgv.DataSource = ds12.Tables(0) : conn.Close()
258
+        面料1_dgv.Columns(0).FillWeight = 80 : 面料1_dgv.Columns(1).FillWeight = 200 : 面料1_dgv.Columns(0).ReadOnly = True
259
+        面料1_dgv.EditMode = DataGridViewEditMode.EditOnEnter
260
+        '-------------------------------------------------------------------------------------------------------------------------------------------------------------
261
+        內裡_dgv.DataSource = Nothing : ds5.Clear()
262
+        內裡_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
263
+        內裡_dgv.ColumnHeadersHeight = 25 : 內裡_dgv.AllowUserToAddRows = False
264
+        SQL_確認樣品單明細表()
265
+        da.SelectCommand.CommandTimeout = 900 : da.Fill(ds5) : 內裡_dgv.DataSource = ds5.Tables(0) : conn.Close()
266
+        If 內裡_dgv.Columns.Count.ToString = 9 Then : 內裡_dgv.Columns.Remove("Item_N") : 內裡_dgv.Columns.Remove("Factory") : End If
267
+
268
+        Dim Col2 As New DataGridViewComboBoxColumn With {
270 269
                 .FillWeight = 200,
271 270
                 .DataPropertyName = "細項"
272 271
             }
273
-            SQL_訂單控制表材料細項清單() : Col2.Items.Clear()
274
-            While (dr.Read()) : Col2.Items.Add(dr("細項")) : End While : Col2.HeaderText = "Item_N" : Col2.Name = "Item_N" : 內裡_dgv.Columns.Insert(4, Col2)
272
+        SQL_訂單控制表材料細項清單() : Col2.Items.Clear()
273
+        While (dr.Read()) : Col2.Items.Add(dr("細項")) : End While : Col2.HeaderText = "Item_N" : Col2.Name = "Item_N" : 內裡_dgv.Columns.Insert(4, Col2)
275 274
 
276
-            Dim Col3 As New DataGridViewComboBoxColumn With {
275
+        Dim Col3 As New DataGridViewComboBoxColumn With {
277 276
                 .FillWeight = 200,
278 277
                 .DataPropertyName = "廠商"
279 278
             }
280
-            SQL_訂單控制表材料廠商清單() : Col3.Items.Clear()
281
-            While (dr.Read()) : Col3.Items.Add(dr("Factory")) : End While : Col3.HeaderText = "Factory" : Col3.Name = "Factory" : 內裡_dgv.Columns.Insert(6, Col3)
279
+        SQL_訂單控制表材料廠商清單() : Col3.Items.Clear()
280
+        While (dr.Read()) : Col3.Items.Add(dr("Factory")) : End While : Col3.HeaderText = "Factory" : Col3.Name = "Factory" : 內裡_dgv.Columns.Insert(6, Col3)
281
+
282
+        內裡_dgv.Columns(0).FillWeight = 150 : 內裡_dgv.Columns(5).FillWeight = 934
283
+        內裡_dgv.Columns(1).Visible = False : 內裡_dgv.Columns(2).Visible = False : 內裡_dgv.Columns(3).Visible = False : 內裡_dgv.Columns(7).Visible = False
284
+        內裡_dgv.Columns(8).Visible = False
285
+        內裡_dgv.EditMode = DataGridViewEditMode.EditOnEnter
282 286
 
283
-            內裡_dgv.Columns(0).FillWeight = 150 : 內裡_dgv.Columns(5).FillWeight = 934
284
-            內裡_dgv.Columns(1).Visible = False : 內裡_dgv.Columns(2).Visible = False : 內裡_dgv.Columns(3).Visible = False : 內裡_dgv.Columns(7).Visible = False
285
-            內裡_dgv.Columns(8).Visible = False
286
-            內裡_dgv.EditMode = DataGridViewEditMode.EditOnEnter
287
-            '-------------------------------------------------------------------------------------------------------------------------------------------------------------
288
-            底部_dgv.DataSource = Nothing : ds6.Clear()
289
-            底部_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
290
-            底部_dgv.ColumnHeadersHeight = 25 : 底部_dgv.AllowUserToAddRows = False
291
-            SQL_確認樣品單明細表1()
292
-            da.SelectCommand.CommandTimeout = 900 : da.Fill(ds6) : 底部_dgv.DataSource = ds6.Tables(0) : conn.Close()
293
-            If 底部_dgv.Columns.Count.ToString = 9 Then : 底部_dgv.Columns.Remove("Item_N") : 底部_dgv.Columns.Remove("Factory") : End If
294
-            Dim Col4 As New DataGridViewComboBoxColumn With {
287
+        內裡1_dgv.DataSource = Nothing : ds13.Clear()
288
+        內裡1_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
289
+        內裡1_dgv.ColumnHeadersHeight = 25 : 內裡1_dgv.AllowUserToAddRows = False : 內裡1_dgv.RowTemplate.Height = 45
290
+        PA31 = "2" : SQL_確認樣品單明細表_敘述攔()
291
+        da.SelectCommand.CommandTimeout = 900 : da.Fill(ds13) : 內裡1_dgv.DataSource = ds13.Tables(0) : conn.Close()
292
+        內裡1_dgv.Columns(0).FillWeight = 80 : 內裡1_dgv.Columns(1).FillWeight = 200 : 內裡1_dgv.Columns(0).ReadOnly = True
293
+        內裡1_dgv.EditMode = DataGridViewEditMode.EditOnEnter
294
+        '-------------------------------------------------------------------------------------------------------------------------------------------------------------
295
+        底部_dgv.DataSource = Nothing : ds6.Clear()
296
+        底部_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
297
+        底部_dgv.ColumnHeadersHeight = 25 : 底部_dgv.AllowUserToAddRows = False
298
+        SQL_確認樣品單明細表1()
299
+        da.SelectCommand.CommandTimeout = 900 : da.Fill(ds6) : 底部_dgv.DataSource = ds6.Tables(0) : conn.Close()
300
+        If 底部_dgv.Columns.Count.ToString = 9 Then : 底部_dgv.Columns.Remove("Item_N") : 底部_dgv.Columns.Remove("Factory") : End If
301
+        Dim Col4 As New DataGridViewComboBoxColumn With {
295 302
                 .FillWeight = 200,
296 303
                 .DataPropertyName = "細項"
297 304
             }
298
-            SQL_訂單控制表材料細項清單() : Col4.Items.Clear()
299
-            While (dr.Read()) : Col4.Items.Add(dr("細項")) : End While : Col4.HeaderText = "Item_N" : Col4.Name = "Item_N" : 底部_dgv.Columns.Insert(4, Col4)
305
+        SQL_訂單控制表材料細項清單() : Col4.Items.Clear()
306
+        While (dr.Read()) : Col4.Items.Add(dr("細項")) : End While : Col4.HeaderText = "Item_N" : Col4.Name = "Item_N" : 底部_dgv.Columns.Insert(4, Col4)
300 307
 
301
-            Dim Col5 As New DataGridViewComboBoxColumn With {
308
+        Dim Col5 As New DataGridViewComboBoxColumn With {
302 309
                 .FillWeight = 200,
303 310
                 .DataPropertyName = "廠商"
304 311
             }
305
-            SQL_訂單控制表材料廠商清單() : Col5.Items.Clear()
306
-            While (dr.Read()) : Col5.Items.Add(dr("Factory")) : End While : Col5.HeaderText = "Factory" : Col5.Name = "Factory" : 底部_dgv.Columns.Insert(6, Col5)
312
+        SQL_訂單控制表材料廠商清單() : Col5.Items.Clear()
313
+        While (dr.Read()) : Col5.Items.Add(dr("Factory")) : End While : Col5.HeaderText = "Factory" : Col5.Name = "Factory" : 底部_dgv.Columns.Insert(6, Col5)
307 314
 
308
-            底部_dgv.Columns(0).FillWeight = 150 : 底部_dgv.Columns(5).FillWeight = 934
309
-            底部_dgv.Columns(1).Visible = False : 底部_dgv.Columns(2).Visible = False : 底部_dgv.Columns(3).Visible = False : 底部_dgv.Columns(7).Visible = False
310
-            底部_dgv.Columns(8).Visible = False
311
-            底部_dgv.EditMode = DataGridViewEditMode.EditOnEnter
312
-            '-------------------------------------------------------------------------------------------------------------------------------------------------------------
313
-            飾物_dgv.DataSource = Nothing : ds7.Clear()
314
-            飾物_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
315
-            飾物_dgv.ColumnHeadersHeight = 25 : 飾物_dgv.AllowUserToAddRows = False
316
-            SQL_確認樣品單明細表2()
317
-            da.SelectCommand.CommandTimeout = 900 : da.Fill(ds7) : 飾物_dgv.DataSource = ds7.Tables(0) : conn.Close()
318
-            If 飾物_dgv.Columns.Count.ToString = 9 Then : 飾物_dgv.Columns.Remove("Item_N") : 飾物_dgv.Columns.Remove("Factory") : End If
315
+        底部_dgv.Columns(0).FillWeight = 150 : 底部_dgv.Columns(5).FillWeight = 934
316
+        底部_dgv.Columns(1).Visible = False : 底部_dgv.Columns(2).Visible = False : 底部_dgv.Columns(3).Visible = False : 底部_dgv.Columns(7).Visible = False
317
+        底部_dgv.Columns(8).Visible = False
318
+        底部_dgv.EditMode = DataGridViewEditMode.EditOnEnter
319 319
 
320
-            Dim Col6 As New DataGridViewComboBoxColumn With {
320
+        底部1_dgv.DataSource = Nothing : ds14.Clear()
321
+        底部1_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
322
+        底部1_dgv.ColumnHeadersHeight = 25 : 底部1_dgv.AllowUserToAddRows = False : 底部1_dgv.RowTemplate.Height = 45
323
+        PA31 = "3" : SQL_確認樣品單明細表_敘述攔()
324
+        da.SelectCommand.CommandTimeout = 900 : da.Fill(ds14) : 底部1_dgv.DataSource = ds14.Tables(0) : conn.Close()
325
+        底部1_dgv.Columns(0).FillWeight = 80 : 底部1_dgv.Columns(1).FillWeight = 200 : 底部1_dgv.Columns(0).ReadOnly = True
326
+        底部1_dgv.EditMode = DataGridViewEditMode.EditOnEnter
327
+        '-------------------------------------------------------------------------------------------------------------------------------------------------------------
328
+        飾物_dgv.DataSource = Nothing : ds7.Clear()
329
+        飾物_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
330
+        飾物_dgv.ColumnHeadersHeight = 25 : 飾物_dgv.AllowUserToAddRows = False
331
+        SQL_確認樣品單明細表2()
332
+        da.SelectCommand.CommandTimeout = 900 : da.Fill(ds7) : 飾物_dgv.DataSource = ds7.Tables(0) : conn.Close()
333
+        If 飾物_dgv.Columns.Count.ToString = 9 Then : 飾物_dgv.Columns.Remove("Item_N") : 飾物_dgv.Columns.Remove("Factory") : End If
334
+
335
+        Dim Col6 As New DataGridViewComboBoxColumn With {
321 336
                 .FillWeight = 200,
322 337
                 .DataPropertyName = "細項"
323 338
             }
324
-            SQL_訂單控制表材料細項清單() : Col6.Items.Clear()
325
-            While (dr.Read()) : Col6.Items.Add(dr("細項")) : End While : Col.HeaderText = "Item_N" : Col6.Name = "Item_N" : 飾物_dgv.Columns.Insert(4, Col6)
339
+        SQL_訂單控制表材料細項清單() : Col6.Items.Clear()
340
+        While (dr.Read()) : Col6.Items.Add(dr("細項")) : End While : Col.HeaderText = "Item_N" : Col6.Name = "Item_N" : 飾物_dgv.Columns.Insert(4, Col6)
326 341
 
327
-            Dim Col7 As New DataGridViewComboBoxColumn With {
342
+        Dim Col7 As New DataGridViewComboBoxColumn With {
328 343
                 .FillWeight = 200,
329 344
                 .DataPropertyName = "廠商"
330 345
             }
331
-            SQL_訂單控制表材料廠商清單() : Col7.Items.Clear()
332
-            While (dr.Read()) : Col7.Items.Add(dr("Factory")) : End While : Col7.HeaderText = "Factory" : Col7.Name = "Factory" : 飾物_dgv.Columns.Insert(6, Col7)
346
+        SQL_訂單控制表材料廠商清單() : Col7.Items.Clear()
347
+        While (dr.Read()) : Col7.Items.Add(dr("Factory")) : End While : Col7.HeaderText = "Factory" : Col7.Name = "Factory" : 飾物_dgv.Columns.Insert(6, Col7)
348
+
349
+        飾物_dgv.Columns(0).FillWeight = 150 : 飾物_dgv.Columns(5).FillWeight = 934
350
+        飾物_dgv.Columns(1).Visible = False : 飾物_dgv.Columns(2).Visible = False : 飾物_dgv.Columns(3).Visible = False : 飾物_dgv.Columns(7).Visible = False
351
+        飾物_dgv.Columns(8).Visible = False
352
+        飾物_dgv.EditMode = DataGridViewEditMode.EditOnEnter
333 353
 
334
-            飾物_dgv.Columns(0).FillWeight = 150 : 飾物_dgv.Columns(5).FillWeight = 934
335
-            飾物_dgv.Columns(1).Visible = False : 飾物_dgv.Columns(2).Visible = False : 飾物_dgv.Columns(3).Visible = False : 飾物_dgv.Columns(7).Visible = False
336
-            飾物_dgv.Columns(8).Visible = False
337
-            飾物_dgv.EditMode = DataGridViewEditMode.EditOnEnter
338
-        Catch ex As Exception : MsgBox(ex.Message) : End Try
354
+        飾物1_dgv.DataSource = Nothing : ds15.Clear()
355
+        飾物1_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
356
+        飾物1_dgv.ColumnHeadersHeight = 25 : 飾物1_dgv.AllowUserToAddRows = False : 飾物1_dgv.RowTemplate.Height = 45
357
+        PA31 = "4" : SQL_確認樣品單明細表_敘述攔()
358
+        da.SelectCommand.CommandTimeout = 900 : da.Fill(ds15) : 飾物1_dgv.DataSource = ds15.Tables(0) : conn.Close()
359
+        飾物1_dgv.Columns(0).FillWeight = 80 : 飾物1_dgv.Columns(1).FillWeight = 200 : 飾物1_dgv.Columns(0).ReadOnly = True
360
+        飾物1_dgv.EditMode = DataGridViewEditMode.EditOnEnter
339 361
     End Sub
340 362
     Private Sub 中文樣品單_Load(sender As Object, e As EventArgs) Handles MyBase.Load
341 363
         TENDEN_MES_SYS.WindowState = 2
@@ -365,22 +387,20 @@ Public Class 中文樣品單
365 387
         If Val(screenWidth.ToString()) <= 1366 And Val(screenHeight.ToString()) <= 768 Then : TENDEN_MES_SYS.WindowState = 2 : Else : TENDEN_MES_SYS.WindowState = 0 : End If
366 388
     End Sub
367 389
     Private Sub 顏色_dgv_CellEnter(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 顏色_dgv.CellEndEdit
368
-        Try
369
-            For I As Integer = 0 To 顏色_dgv.Rows.Count - 1
370
-                If 顏色_dgv("ItemNumber", I).Value.ToString <> "" Then
371
-                    PA = 顏色_dgv("ItemNumber", I).Value.ToString : SQL_STYLELIST()
372
-                    If dr.Read() Then
373
-                        顏色_dgv("T1", I).Value = dr("T1").ToString : 顏色_dgv("T2", I).Value = dr("T2").ToString : 顏色_dgv("T3", I).Value = dr("T3").ToString
374
-                        顏色_dgv("T4", I).Value = dr("T4").ToString : 顏色_dgv("WEAR_TEST", I).Value = dr("WEAR_TEST").ToString
375
-                    Else
376
-                        顏色_dgv("T1", I).Value = "" : 顏色_dgv("T2", I).Value = "" : 顏色_dgv("T3", I).Value = "" : 顏色_dgv("T4", I).Value = "" : 顏色_dgv("WEAR_TEST", I).Value = ""
377
-                    End If : conn.Close()
378
-                End If
379
-            Next
390
+        For I As Integer = 0 To 顏色_dgv.Rows.Count - 1
391
+            If 顏色_dgv("ItemNumber", I).Value.ToString <> "" Then
392
+                PA = 顏色_dgv("ItemNumber", I).Value.ToString : SQL_STYLELIST()
393
+                If dr.Read() Then
394
+                    顏色_dgv("T1", I).Value = dr("T1").ToString : 顏色_dgv("T2", I).Value = dr("T2").ToString : 顏色_dgv("T3", I).Value = dr("T3").ToString
395
+                    顏色_dgv("T4", I).Value = dr("T4").ToString : 顏色_dgv("WEAR_TEST", I).Value = dr("WEAR_TEST").ToString
396
+                Else
397
+                    顏色_dgv("T1", I).Value = "" : 顏色_dgv("T2", I).Value = "" : 顏色_dgv("T3", I).Value = "" : 顏色_dgv("T4", I).Value = "" : 顏色_dgv("WEAR_TEST", I).Value = ""
398
+                End If : conn.Close()
399
+            End If
400
+        Next
380 401
 
381
-            Dim EU As String = 顏色_dgv("CFM", e.RowIndex).Value.ToString
382
-            If EU = "" Then : Else : 日期1_dtp.Text = EU : 顏色_dgv.Rows(e.RowIndex).Cells("CFM").Value = Format(日期1_dtp.Value, "yyyy/MM/dd") : End If
383
-        Catch ex As Exception : MsgBox(ex.Message) : End Try
402
+        Dim EU As String = 顏色_dgv("CFM", e.RowIndex).Value.ToString
403
+        If EU = "" Then : Else : 日期1_dtp.Text = EU : 顏色_dgv.Rows(e.RowIndex).Cells("CFM").Value = Format(日期1_dtp.Value, "yyyy/MM/dd") : End If
384 404
     End Sub
385 405
     Private Sub DataGridView5_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles 面料_dgv.RowPostPaint
386 406
         If 面料顏色排序_bt.Enabled = False And 面料項次排序_bt.Enabled = True Then
@@ -475,58 +495,56 @@ Public Class 中文樣品單
475 495
         End If
476 496
     End Sub
477 497
     Private Sub 清單_dgv_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 清單_dgv.CellClick
478
-        Try
479
-            If e.RowIndex = -1 Then : Else
480
-                If 編輯模式_bt.Enabled = True Then
481
-                    If 暫存模式 = False Then
482
-                        PictureBox1.Image = Nothing : PictureBox2.Image = Nothing : PictureBox3.Image = Nothing : PictureBox4.Image = Nothing
483
-                        樣品單號_tb.Text = 清單_dgv(0, e.RowIndex).Value.ToString : 品牌_cb.Text = 清單_dgv(1, e.RowIndex).Value.ToString
484
-                        季節_tb.Text = 清單_dgv(2, e.RowIndex).Value.ToString : 工廠_tb.Text = 清單_dgv(4, e.RowIndex).Value.ToString
485
-                        楦頭_tb.Text = 清單_dgv(5, e.RowIndex).Value.ToString : Construc_tionName_cb.Text = 清單_dgv(6, e.RowIndex).Value.ToString
486
-                        型體名字_tb.Text = 清單_dgv(7, e.RowIndex).Value.ToString : 型體號碼_tb.Text = 清單_dgv(8, e.RowIndex).Value.ToString
487
-                        内里OR大底_tb.Text = 清單_dgv(9, e.RowIndex).Value.ToString : TextBox4.Text = 清單_dgv(10, e.RowIndex).Value.ToString
488
-                        TextBox5.Text = 清單_dgv(11, e.RowIndex).Value.ToString : 新型體_ch.Checked = 清單_dgv(12, e.RowIndex).Value.ToString
489
-                        舊形體季別_tb.Text = 清單_dgv(13, e.RowIndex).Value.ToString : DTP(0) = 清單_dgv(14, e.RowIndex).Value.ToString
490
-                        TextBox10.Text = 清單_dgv(16, e.RowIndex).Value.ToString : TextBox17.Text = 清單_dgv(17, e.RowIndex).Value.ToString
491
-                        開發人員_tb.Text = 清單_dgv(18, e.RowIndex).Value.ToString : 圖片資料庫指定 = 清單_dgv(19, e.RowIndex).Value.ToString
492
-                        If DTP(0) = "" Then : 建檔日期_dtp.Format = DateTimePickerFormat.Custom : 建檔日期_dtp.CustomFormat = " "
493
-                        Else : 建檔日期_dtp.Format = DateTimePickerFormat.Short : 建檔日期_dtp.Text = DTP(0) : End If
494
-                        If 新型體_ch.Checked = True Then : 新型體_ch.Checked = True : 舊型體_ch.Checked = False : Else : 新型體_ch.Checked = False : 舊型體_ch.Checked = True : End If
495
-                        Set_產地標圖片導入() : Set_設計圖圖片導入() : Set_中底LOGO導入() : Set_其他LOGO導入() : Set_再次導入清單()
496
-                        列印用SQL = 樣品單號_tb.Text : QA = 清單_dgv(3, e.RowIndex).Value.ToString
497
-                        If 開發部門 = False And 確認部門 = True Then
498
-                            If QA = "CFM" Then : 樣品單列印_bt.Enabled = True : 樣品單存檔_bt.Enabled = True : 刷新資料_bt.Enabled = True : 刪除樣品單_bt.Enabled = True
499
-                            Else : 樣品單列印_bt.Enabled = False : 樣品單存檔_bt.Enabled = False : 刷新資料_bt.Enabled = False : 刪除樣品單_bt.Enabled = False : End If
500
-                        ElseIf 開發部門 = True And 確認部門 = False Then
501
-                            If QA = "ILR" Or QA = "FLR" Or QA = "SMS" Or QA = "SMU" Or QA = "Proto" Or QA = "Line" Or QA = "Canada" Then
502
-                                樣品單列印_bt.Enabled = True : 樣品單存檔_bt.Enabled = True : 刷新資料_bt.Enabled = True : 刪除樣品單_bt.Enabled = True
503
-                            Else : 樣品單列印_bt.Enabled = False : 樣品單存檔_bt.Enabled = False : 刷新資料_bt.Enabled = False : 刪除樣品單_bt.Enabled = False : End If
504
-                        End If
505
-                        ComboBox8下拉表單資料載入()
506
-                        階段_cb.Text = 清單_dgv(3, e.RowIndex).Value.ToString : VIONIC_tb.Text = 季節_tb.Text
507
-                        月_tb.Text = Microsoft.VisualBasic.Left(顏色_dgv(32, 0).Value.ToString, 4) : 天_tb.Text = Mid(顏色_dgv(32, 0).Value.ToString, 6, 2)
508
-                        年_tb.Text = Microsoft.VisualBasic.Right(顏色_dgv(32, 0).Value.ToString, 2)
509
-                        樣式名稱_tb.Text = 型體名字_tb.Text : 型體號_tb.Text = 型體號碼_tb.Text : 工廠1_tb.Text = 工廠_tb.Text
510
-                        顏色_tb.Text = 顏色_dgv(33, 0).Value.ToString : Material_Article_tb.Text = 顏色_dgv(34, 0).Value.ToString : 楦頭1_tb.Text = 楦頭_tb.Text
511
-                        Construc_Name_tb.Text = 顏色_dgv(35, 0).Value.ToString : 鞋墊_tb.Text = 顏色_dgv(36, 0).Value.ToString
512
-                        鞋床_tb.Text = 顏色_dgv(37, 0).Value.ToString : 掛牌_tb.Text = 顏色_dgv(38, 0).Value.ToString & "/" & 顏色_dgv(39, 0).Value.ToString
513
-                        備註_tb.Text = 顏色_dgv(43, 0).Value.ToString : 尺寸_cb.Text = 顏色_dgv(38, 0).Value.ToString
514
-                        Gender_cb.Text = 顏色_dgv(39, 0).Value.ToString : Wldth_cb.Text = 顏色_dgv(40, 0).Value.ToString
498
+        If e.RowIndex = -1 Then : Else
499
+            If 編輯模式_bt.Enabled = True Then
500
+                If 暫存模式 = False Then
501
+                    PictureBox1.Image = Nothing : PictureBox2.Image = Nothing : PictureBox3.Image = Nothing : PictureBox4.Image = Nothing
502
+                    樣品單號_tb.Text = 清單_dgv(0, e.RowIndex).Value.ToString : 品牌_cb.Text = 清單_dgv(1, e.RowIndex).Value.ToString
503
+                    季節_tb.Text = 清單_dgv(2, e.RowIndex).Value.ToString : 工廠_tb.Text = 清單_dgv(4, e.RowIndex).Value.ToString
504
+                    楦頭_tb.Text = 清單_dgv(5, e.RowIndex).Value.ToString : Construc_tionName_cb.Text = 清單_dgv(6, e.RowIndex).Value.ToString
505
+                    型體名字_tb.Text = 清單_dgv(7, e.RowIndex).Value.ToString : 型體號碼_tb.Text = 清單_dgv(8, e.RowIndex).Value.ToString
506
+                    内里OR大底_tb.Text = 清單_dgv(9, e.RowIndex).Value.ToString : TextBox4.Text = 清單_dgv(10, e.RowIndex).Value.ToString
507
+                    TextBox5.Text = 清單_dgv(11, e.RowIndex).Value.ToString : 新型體_ch.Checked = 清單_dgv(12, e.RowIndex).Value.ToString
508
+                    舊形體季別_tb.Text = 清單_dgv(13, e.RowIndex).Value.ToString : DTP(0) = 清單_dgv(14, e.RowIndex).Value.ToString
509
+                    TextBox10.Text = 清單_dgv(16, e.RowIndex).Value.ToString : TextBox17.Text = 清單_dgv(17, e.RowIndex).Value.ToString
510
+                    開發人員_tb.Text = 清單_dgv(18, e.RowIndex).Value.ToString : 圖片資料庫指定 = 清單_dgv(19, e.RowIndex).Value.ToString
511
+                    If DTP(0) = "" Then : 建檔日期_dtp.Format = DateTimePickerFormat.Custom : 建檔日期_dtp.CustomFormat = " "
512
+                    Else : 建檔日期_dtp.Format = DateTimePickerFormat.Short : 建檔日期_dtp.Text = DTP(0) : End If
513
+                    If 新型體_ch.Checked = True Then : 新型體_ch.Checked = True : 舊型體_ch.Checked = False : Else : 新型體_ch.Checked = False : 舊型體_ch.Checked = True : End If
514
+                    Set_產地標圖片導入() : Set_設計圖圖片導入() : Set_中底LOGO導入() : Set_其他LOGO導入() : Set_再次導入清單()
515
+                    列印用SQL = 樣品單號_tb.Text : QA = 清單_dgv(3, e.RowIndex).Value.ToString
516
+                    If 開發部門 = False And 確認部門 = True Then
517
+                        If QA = "CFM" Then : 樣品單列印_bt.Enabled = True : 樣品單存檔_bt.Enabled = True : 刷新資料_bt.Enabled = True : 刪除樣品單_bt.Enabled = True
518
+                        Else : 樣品單列印_bt.Enabled = False : 樣品單存檔_bt.Enabled = False : 刷新資料_bt.Enabled = False : 刪除樣品單_bt.Enabled = False : End If
519
+                    ElseIf 開發部門 = True And 確認部門 = False Then
520
+                        If QA = "ILR" Or QA = "FLR" Or QA = "SMS" Or QA = "SMU" Or QA = "Proto" Or QA = "Line" Or QA = "Canada" Then
521
+                            樣品單列印_bt.Enabled = True : 樣品單存檔_bt.Enabled = True : 刷新資料_bt.Enabled = True : 刪除樣品單_bt.Enabled = True
522
+                        Else : 樣品單列印_bt.Enabled = False : 樣品單存檔_bt.Enabled = False : 刷新資料_bt.Enabled = False : 刪除樣品單_bt.Enabled = False : End If
515 523
                     End If
524
+                    ComboBox8下拉表單資料載入()
525
+                    階段_cb.Text = 清單_dgv(3, e.RowIndex).Value.ToString : VIONIC_tb.Text = 季節_tb.Text
526
+                    月_tb.Text = Microsoft.VisualBasic.Left(顏色_dgv(32, 0).Value.ToString, 4) : 天_tb.Text = Mid(顏色_dgv(32, 0).Value.ToString, 6, 2)
527
+                    年_tb.Text = Microsoft.VisualBasic.Right(顏色_dgv(32, 0).Value.ToString, 2)
528
+                    樣式名稱_tb.Text = 型體名字_tb.Text : 型體號_tb.Text = 型體號碼_tb.Text : 工廠1_tb.Text = 工廠_tb.Text
529
+                    顏色_tb.Text = 顏色_dgv(33, 0).Value.ToString : Material_Article_tb.Text = 顏色_dgv(34, 0).Value.ToString : 楦頭1_tb.Text = 楦頭_tb.Text
530
+                    Construc_Name_tb.Text = 顏色_dgv(35, 0).Value.ToString : 鞋墊_tb.Text = 顏色_dgv(36, 0).Value.ToString
531
+                    鞋床_tb.Text = 顏色_dgv(37, 0).Value.ToString : 掛牌_tb.Text = 顏色_dgv(38, 0).Value.ToString & "/" & 顏色_dgv(39, 0).Value.ToString
532
+                    備註_tb.Text = 顏色_dgv(43, 0).Value.ToString : 尺寸_cb.Text = 顏色_dgv(38, 0).Value.ToString
533
+                    Gender_cb.Text = 顏色_dgv(39, 0).Value.ToString : Wldth_cb.Text = 顏色_dgv(40, 0).Value.ToString
516 534
                 End If
517
-                VIONIC_tb.Text = 季節_tb.Text : 樣式名稱_tb.Text = 型體名字_tb.Text : 型體號_tb.Text = 型體號碼_tb.Text : 工廠1_tb.Text = 工廠_tb.Text : 楦頭1_tb.Text = 楦頭_tb.Text
518
-                If 階段_cb.Text = "ILR" Then : Stage_cb.Text = "ILR" : ElseIf 階段_cb.Text = "FLR" Then : Stage_cb.Text = "FLR" : ElseIf 階段_cb.Text = "SMS" Then : Stage_cb.Text = "SS"
519
-                ElseIf 階段_cb.Text = "SMU" Or 階段_cb.Text = "SMU" Then : Stage_cb.Text = "" : ElseIf 階段_cb.Text = "Proto" Then : Stage_cb.Text = "Proto"
520
-                ElseIf 階段_cb.Text = "Line" Then : Stage_cb.Text = "Line" : ElseIf 階段_cb.Text = "Canada" Then : Stage_cb.Text = "Canada" : End If
521
-                If 階段_cb.Text = "ILR" Or 階段_cb.Text = "FLR" Then : 發展_ch.Checked = True : 確認_ch.Checked = False : 銷售樣本_ch.Checked = False
522
-                ElseIf 階段_cb.Text = "CFM" Then : 發展_ch.Checked = False : 確認_ch.Checked = True : 銷售樣本_ch.Checked = False
523
-                ElseIf 階段_cb.Text = "SMS" Then : 發展_ch.Checked = False : 確認_ch.Checked = False : 銷售樣本_ch.Checked = True
524
-                ElseIf 階段_cb.Text = "SMU" Then : 發展_ch.Checked = False : 確認_ch.Checked = False : 銷售樣本_ch.Checked = False
525
-                ElseIf 階段_cb.Text = "Proto" Then : 發展_ch.Checked = False : 確認_ch.Checked = False : 銷售樣本_ch.Checked = False
526
-                ElseIf 階段_cb.Text = "Line" Then : 發展_ch.Checked = False : 確認_ch.Checked = False : 銷售樣本_ch.Checked = False
527
-                ElseIf 階段_cb.Text = "Canada" Then : 發展_ch.Checked = False : 確認_ch.Checked = False : 銷售樣本_ch.Checked = False : End If
528 535
             End If
529
-        Catch ex As Exception : MsgBox(ex.Message) : End Try
536
+            VIONIC_tb.Text = 季節_tb.Text : 樣式名稱_tb.Text = 型體名字_tb.Text : 型體號_tb.Text = 型體號碼_tb.Text : 工廠1_tb.Text = 工廠_tb.Text : 楦頭1_tb.Text = 楦頭_tb.Text
537
+            If 階段_cb.Text = "ILR" Then : Stage_cb.Text = "ILR" : ElseIf 階段_cb.Text = "FLR" Then : Stage_cb.Text = "FLR" : ElseIf 階段_cb.Text = "SMS" Then : Stage_cb.Text = "SS"
538
+            ElseIf 階段_cb.Text = "SMU" Or 階段_cb.Text = "SMU" Then : Stage_cb.Text = "" : ElseIf 階段_cb.Text = "Proto" Then : Stage_cb.Text = "Proto"
539
+            ElseIf 階段_cb.Text = "Line" Then : Stage_cb.Text = "Line" : ElseIf 階段_cb.Text = "Canada" Then : Stage_cb.Text = "Canada" : End If
540
+            If 階段_cb.Text = "ILR" Or 階段_cb.Text = "FLR" Then : 發展_ch.Checked = True : 確認_ch.Checked = False : 銷售樣本_ch.Checked = False
541
+            ElseIf 階段_cb.Text = "CFM" Then : 發展_ch.Checked = False : 確認_ch.Checked = True : 銷售樣本_ch.Checked = False
542
+            ElseIf 階段_cb.Text = "SMS" Then : 發展_ch.Checked = False : 確認_ch.Checked = False : 銷售樣本_ch.Checked = True
543
+            ElseIf 階段_cb.Text = "SMU" Then : 發展_ch.Checked = False : 確認_ch.Checked = False : 銷售樣本_ch.Checked = False
544
+            ElseIf 階段_cb.Text = "Proto" Then : 發展_ch.Checked = False : 確認_ch.Checked = False : 銷售樣本_ch.Checked = False
545
+            ElseIf 階段_cb.Text = "Line" Then : 發展_ch.Checked = False : 確認_ch.Checked = False : 銷售樣本_ch.Checked = False
546
+            ElseIf 階段_cb.Text = "Canada" Then : 發展_ch.Checked = False : 確認_ch.Checked = False : 銷售樣本_ch.Checked = False : End If
547
+        End If
530 548
     End Sub
531 549
     Private Sub DataGridView2_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 圖片1_dgv.CellClick
532 550
         If e.RowIndex = -1 Then : Else : TextBox4.Text = 圖片1_dgv(4, e.RowIndex).Value.ToString : Set_產地標圖片導入() : End If
@@ -541,29 +559,27 @@ Public Class 中文樣品單
541 559
         If e.RowIndex = -1 Then : Else : TextBox17.Text = 圖片3_dgv(4, e.RowIndex).Value.ToString : Set_其他LOGO導入() : End If
542 560
     End Sub
543 561
     Private Sub DataGridView4_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 顏色_dgv.CellClick
544
-        Try
545
-            If e.RowIndex = -1 Then : Else
546
-                樣品單顏色_tb.Text = 顏色_dgv(2, e.RowIndex).Value.ToString : TextBox9.Text = 顏色_dgv(1, e.RowIndex).Value.ToString : VIONIC_tb.Text = 季節_tb.Text
547
-                月_tb.Text = Microsoft.VisualBasic.Left(顏色_dgv(32, e.RowIndex).Value.ToString, 4) : 天_tb.Text = Mid(顏色_dgv(32, e.RowIndex).Value.ToString, 6, 2)
548
-                年_tb.Text = Microsoft.VisualBasic.Right(顏色_dgv(32, e.RowIndex).Value.ToString, 2)
549
-                樣式名稱_tb.Text = 型體名字_tb.Text : 型體號_tb.Text = 型體號碼_tb.Text : 工廠1_tb.Text = 工廠_tb.Text
550
-                顏色_tb.Text = 顏色_dgv(33, e.RowIndex).Value.ToString : Material_Article_tb.Text = 顏色_dgv(34, e.RowIndex).Value.ToString : 楦頭1_tb.Text = 楦頭_tb.Text
551
-                Construc_Name_tb.Text = 顏色_dgv(35, e.RowIndex).Value.ToString : 鞋墊_tb.Text = 顏色_dgv(36, e.RowIndex).Value.ToString
552
-                鞋床_tb.Text = 顏色_dgv(37, e.RowIndex).Value.ToString : 掛牌_tb.Text = 顏色_dgv(38, e.RowIndex).Value.ToString & "/" & 顏色_dgv(39, e.RowIndex).Value.ToString
553
-                備註_tb.Text = 顏色_dgv(43, e.RowIndex).Value.ToString : 尺寸_cb.Text = 顏色_dgv(38, e.RowIndex).Value.ToString
554
-                Gender_cb.Text = 顏色_dgv(39, e.RowIndex).Value.ToString : Wldth_cb.Text = 顏色_dgv(40, e.RowIndex).Value.ToString
555
-                If 階段_cb.Text = "ILR" Then : Stage_cb.Text = "ILR" : ElseIf 階段_cb.Text = "FLR" Then : Stage_cb.Text = "FLR" : ElseIf 階段_cb.Text = "SMS" Then : Stage_cb.Text = "SS"
556
-                ElseIf 階段_cb.Text = "SMU" Or 階段_cb.Text = "SMU" Then : Stage_cb.Text = "" : ElseIf 階段_cb.Text = "Proto" Then : Stage_cb.Text = "Proto"
557
-                ElseIf 階段_cb.Text = "Line" Then : Stage_cb.Text = "Line" : ElseIf 階段_cb.Text = "Canada" Then : Stage_cb.Text = "Canada" : End If
558
-                If 階段_cb.Text = "ILR" Or 階段_cb.Text = "FLR" Then : 發展_ch.Checked = True : 確認_ch.Checked = False : 銷售樣本_ch.Checked = False
559
-                ElseIf 階段_cb.Text = "CFM" Then : 發展_ch.Checked = False : 確認_ch.Checked = True : 銷售樣本_ch.Checked = False
560
-                ElseIf 階段_cb.Text = "SMS" Then : 發展_ch.Checked = False : 確認_ch.Checked = False : 銷售樣本_ch.Checked = True
561
-                ElseIf 階段_cb.Text = "SMU" Then : 發展_ch.Checked = False : 確認_ch.Checked = False : 銷售樣本_ch.Checked = False
562
-                ElseIf 階段_cb.Text = "Proto" Then : 發展_ch.Checked = False : 確認_ch.Checked = False : 銷售樣本_ch.Checked = False
563
-                ElseIf 階段_cb.Text = "Line" Then : 發展_ch.Checked = False : 確認_ch.Checked = False : 銷售樣本_ch.Checked = False
564
-                ElseIf 階段_cb.Text = "Canada" Then : 發展_ch.Checked = False : 確認_ch.Checked = False : 銷售樣本_ch.Checked = False : End If
565
-            End If
566
-        Catch ex As Exception : MsgBox(ex.Message) : End Try
562
+        If e.RowIndex = -1 Then : Else
563
+            樣品單顏色_tb.Text = 顏色_dgv(2, e.RowIndex).Value.ToString : TextBox9.Text = 顏色_dgv(1, e.RowIndex).Value.ToString : VIONIC_tb.Text = 季節_tb.Text
564
+            月_tb.Text = Microsoft.VisualBasic.Left(顏色_dgv(32, e.RowIndex).Value.ToString, 4) : 天_tb.Text = Mid(顏色_dgv(32, e.RowIndex).Value.ToString, 6, 2)
565
+            年_tb.Text = Microsoft.VisualBasic.Right(顏色_dgv(32, e.RowIndex).Value.ToString, 2)
566
+            樣式名稱_tb.Text = 型體名字_tb.Text : 型體號_tb.Text = 型體號碼_tb.Text : 工廠1_tb.Text = 工廠_tb.Text
567
+            顏色_tb.Text = 顏色_dgv(33, e.RowIndex).Value.ToString : Material_Article_tb.Text = 顏色_dgv(34, e.RowIndex).Value.ToString : 楦頭1_tb.Text = 楦頭_tb.Text
568
+            Construc_Name_tb.Text = 顏色_dgv(35, e.RowIndex).Value.ToString : 鞋墊_tb.Text = 顏色_dgv(36, e.RowIndex).Value.ToString
569
+            鞋床_tb.Text = 顏色_dgv(37, e.RowIndex).Value.ToString : 掛牌_tb.Text = 顏色_dgv(38, e.RowIndex).Value.ToString & "/" & 顏色_dgv(39, e.RowIndex).Value.ToString
570
+            備註_tb.Text = 顏色_dgv(43, e.RowIndex).Value.ToString : 尺寸_cb.Text = 顏色_dgv(38, e.RowIndex).Value.ToString
571
+            Gender_cb.Text = 顏色_dgv(39, e.RowIndex).Value.ToString : Wldth_cb.Text = 顏色_dgv(40, e.RowIndex).Value.ToString
572
+            If 階段_cb.Text = "ILR" Then : Stage_cb.Text = "ILR" : ElseIf 階段_cb.Text = "FLR" Then : Stage_cb.Text = "FLR" : ElseIf 階段_cb.Text = "SMS" Then : Stage_cb.Text = "SS"
573
+            ElseIf 階段_cb.Text = "SMU" Or 階段_cb.Text = "SMU" Then : Stage_cb.Text = "" : ElseIf 階段_cb.Text = "Proto" Then : Stage_cb.Text = "Proto"
574
+            ElseIf 階段_cb.Text = "Line" Then : Stage_cb.Text = "Line" : ElseIf 階段_cb.Text = "Canada" Then : Stage_cb.Text = "Canada" : End If
575
+            If 階段_cb.Text = "ILR" Or 階段_cb.Text = "FLR" Then : 發展_ch.Checked = True : 確認_ch.Checked = False : 銷售樣本_ch.Checked = False
576
+            ElseIf 階段_cb.Text = "CFM" Then : 發展_ch.Checked = False : 確認_ch.Checked = True : 銷售樣本_ch.Checked = False
577
+            ElseIf 階段_cb.Text = "SMS" Then : 發展_ch.Checked = False : 確認_ch.Checked = False : 銷售樣本_ch.Checked = True
578
+            ElseIf 階段_cb.Text = "SMU" Then : 發展_ch.Checked = False : 確認_ch.Checked = False : 銷售樣本_ch.Checked = False
579
+            ElseIf 階段_cb.Text = "Proto" Then : 發展_ch.Checked = False : 確認_ch.Checked = False : 銷售樣本_ch.Checked = False
580
+            ElseIf 階段_cb.Text = "Line" Then : 發展_ch.Checked = False : 確認_ch.Checked = False : 銷售樣本_ch.Checked = False
581
+            ElseIf 階段_cb.Text = "Canada" Then : 發展_ch.Checked = False : 確認_ch.Checked = False : 銷售樣本_ch.Checked = False : End If
582
+        End If
567 583
     End Sub
568 584
     Private Sub Button8_Click(sender As Object, e As EventArgs) Handles 品牌查詢_bt.Click
569 585
         PP1 = InputBox("請輸入要查詢的資料") : ComboBox1下拉表單資料載入() : If (品牌_cb.Items.Count = 0) Then : Else : 品牌_cb.SelectedIndex = 0 : End If
@@ -697,14 +713,25 @@ Public Class 中文樣品單
697 713
         If 複製樣品單_ch.Checked = True Then : 新增樣品單_ch.Checked = False : 複製樣品單_ch.Checked = True : Else : 新增樣品單_ch.Checked = True : 複製樣品單_ch.Checked = False : End If
698 714
     End Sub
699 715
     Private Sub Set_樣品單流水編號設定1()
700
-        Try
701
-            新增樣品單_bt.Enabled = False : 樣品單存檔_bt.Enabled = False : 樣品單列印_bt.Enabled = False
702
-            新增顏色清單_bt.Enabled = True : 新增項目清單_bt.Enabled = True : 新增廠商清單_bt.Enabled = True : 新增面料_bt.Enabled = True
703
-            新增內裏_bt.Enabled = True : 新增底部_bt.Enabled = True : 新增飾物_bt.Enabled = True : 新增OR複製_bt.Enabled = True : 產地標清單_bt.Enabled = True : 設計圖清單_bt.Enabled = True
704
-            刪除面料_bt.Enabled = True : 刪除內裏_bt.Enabled = True : 刪除底部_bt.Enabled = True : 刪除飾物_bt.Enabled = True : 刪除顏色_bt.Enabled = True : 新增顏色_bt.Enabled = True
705
-            SQL_最後一筆樣品流水號()
706
-            If dr.Read() Then : 樣品單流水號變數1 = dr("樣品流水號").ToString : Else : 樣品單流水號變數1 = "" : End If : conn.Close()
707
-            Dim NUM1 As Integer = Double.Parse(Strings.Right(樣品單流水號變數1, 8) + 1)
716
+        新增樣品單_bt.Enabled = False : 樣品單存檔_bt.Enabled = False : 樣品單列印_bt.Enabled = False
717
+        新增顏色清單_bt.Enabled = True : 新增項目清單_bt.Enabled = True : 新增廠商清單_bt.Enabled = True : 新增面料_bt.Enabled = True
718
+        新增內裏_bt.Enabled = True : 新增底部_bt.Enabled = True : 新增飾物_bt.Enabled = True : 新增OR複製_bt.Enabled = True : 產地標清單_bt.Enabled = True : 設計圖清單_bt.Enabled = True
719
+        刪除面料_bt.Enabled = True : 刪除內裏_bt.Enabled = True : 刪除底部_bt.Enabled = True : 刪除飾物_bt.Enabled = True : 刪除顏色_bt.Enabled = True : 新增顏色_bt.Enabled = True
720
+        SQL_最後一筆樣品流水號()
721
+        If dr.Read() Then : 樣品單流水號變數1 = dr("樣品流水號").ToString : Else : 樣品單流水號變數1 = "" : End If : conn.Close()
722
+        Dim NUM1 As Integer = Double.Parse(Strings.Right(樣品單流水號變數1, 8) + 1)
723
+        If NUM1 < 10 Then : 樣品單流水號變數1 = "SA" & "0000000" & NUM1
724
+        ElseIf NUM1 > 9 And NUM1 < 100 Then : 樣品單流水號變數1 = "SA" & "000000" & NUM1
725
+        ElseIf NUM1 > 99 And NUM1 < 1000 Then : 樣品單流水號變數1 = "SA" & "00000" & NUM1
726
+        ElseIf NUM1 > 999 And NUM1 < 10000 Then : 樣品單流水號變數1 = "SA" & "0000" & NUM1
727
+        ElseIf NUM1 > 9999 And NUM1 < 100000 Then : 樣品單流水號變數1 = "SA" & "000" & NUM1
728
+        ElseIf NUM1 > 99999 And NUM1 < 100000 Then : 樣品單流水號變數1 = "SA" & "00" & NUM1
729
+        ElseIf NUM1 > 999999 And NUM1 < 1000000 Then : 樣品單流水號變數1 = "SA" & "0" & NUM1
730
+        ElseIf NUM1 > 9999999 Then : 樣品單流水號變數1 = "SA" & NUM1 : End If
731
+        SQL_樣品流水號()
732
+        If dr.Read() Then
733
+            SQL_樣品流水號1() : If dr.Read() Then : 樣品單流水號變數1 = dr("樣品流水號").ToString : Else : 樣品單流水號變數1 = "" : End If : conn.Close()
734
+            NUM1 = Double.Parse(Strings.Right(樣品單流水號變數1, 8) + 1)
708 735
             If NUM1 < 10 Then : 樣品單流水號變數1 = "SA" & "0000000" & NUM1
709 736
             ElseIf NUM1 > 9 And NUM1 < 100 Then : 樣品單流水號變數1 = "SA" & "000000" & NUM1
710 737
             ElseIf NUM1 > 99 And NUM1 < 1000 Then : 樣品單流水號變數1 = "SA" & "00000" & NUM1
@@ -712,22 +739,9 @@ Public Class 中文樣品單
712 739
             ElseIf NUM1 > 9999 And NUM1 < 100000 Then : 樣品單流水號變數1 = "SA" & "000" & NUM1
713 740
             ElseIf NUM1 > 99999 And NUM1 < 100000 Then : 樣品單流水號變數1 = "SA" & "00" & NUM1
714 741
             ElseIf NUM1 > 999999 And NUM1 < 1000000 Then : 樣品單流水號變數1 = "SA" & "0" & NUM1
715
-            ElseIf NUM1 > 9999999 Then : 樣品單流水號變數1 = "SA" & NUM1 : End If
716
-            SQL_樣品流水號()
717
-            If dr.Read() Then
718
-                SQL_樣品流水號1() : If dr.Read() Then : 樣品單流水號變數1 = dr("樣品流水號").ToString : Else : 樣品單流水號變數1 = "" : End If : conn.Close()
719
-                NUM1 = Double.Parse(Strings.Right(樣品單流水號變數1, 8) + 1)
720
-                If NUM1 < 10 Then : 樣品單流水號變數1 = "SA" & "0000000" & NUM1
721
-                ElseIf NUM1 > 9 And NUM1 < 100 Then : 樣品單流水號變數1 = "SA" & "000000" & NUM1
722
-                ElseIf NUM1 > 99 And NUM1 < 1000 Then : 樣品單流水號變數1 = "SA" & "00000" & NUM1
723
-                ElseIf NUM1 > 999 And NUM1 < 10000 Then : 樣品單流水號變數1 = "SA" & "0000" & NUM1
724
-                ElseIf NUM1 > 9999 And NUM1 < 100000 Then : 樣品單流水號變數1 = "SA" & "000" & NUM1
725
-                ElseIf NUM1 > 99999 And NUM1 < 100000 Then : 樣品單流水號變數1 = "SA" & "00" & NUM1
726
-                ElseIf NUM1 > 999999 And NUM1 < 1000000 Then : 樣品單流水號變數1 = "SA" & "0" & NUM1
727
-                ElseIf NUM1 > 9999999 Then : 樣品單流水號變數1 = "SA" & NUM1
728
-                End If
729
-            Else : End If : conn.Close()
730
-        Catch ex As Exception : MsgBox(ex.Message) : End Try
742
+            ElseIf NUM1 > 9999999 Then : 樣品單流水號變數1 = "SA" & NUM1
743
+            End If
744
+        Else : End If : conn.Close()
731 745
     End Sub
732 746
     Private Sub Set_樣品單流水編號設定1_1()
733 747
         SQL_樣品單流水編號設定1_1() : conn.Close()
@@ -736,8 +750,19 @@ Public Class 中文樣品單
736 750
         SQL_樣品單流水編號設定2() : If dr.Read() Then : 樣品單流水號變數2 = dr("樣品流水號一").ToString : Else : 樣品單流水號變數2 = "" : End If : conn.Close()
737 751
     End Sub
738 752
     Private Sub Set_樣品單流水編號設定2_1()
739
-        Try
740
-            Dim NUM2 As Integer
753
+        Dim NUM2 As Integer
754
+        NUM2 = Double.Parse(Strings.Right(樣品單流水號變數2, 8) + 1)
755
+        If NUM2 < 10 Then : 樣品單流水號變數2 = "CO" & "0000000" & NUM2
756
+        ElseIf NUM2 > 9 And NUM2 < 100 Then : 樣品單流水號變數2 = "CO" & "000000" & NUM2
757
+        ElseIf NUM2 > 99 And NUM2 < 1000 Then : 樣品單流水號變數2 = "CO" & "00000" & NUM2
758
+        ElseIf NUM2 > 999 And NUM2 < 10000 Then : 樣品單流水號變數2 = "CO" & "0000" & NUM2
759
+        ElseIf NUM2 > 9999 And NUM2 < 100000 Then : 樣品單流水號變數2 = "CO" & "000" & NUM2
760
+        ElseIf NUM2 > 99999 And NUM2 < 100000 Then : 樣品單流水號變數2 = "CO" & "00" & NUM2
761
+        ElseIf NUM2 > 999999 And NUM2 < 1000000 Then : 樣品單流水號變數2 = "CO" & "0" & NUM2
762
+        ElseIf NUM2 > 9999999 Then : 樣品單流水號變數2 = "CO" & NUM2 : End If
763
+        SQL_樣品單流水編號設定2_1()
764
+        If dr.Read() Then
765
+            SQL_樣品流水號一() : If dr.Read() Then : 樣品單流水號變數2 = dr("樣品流水號一").ToString : Else : 樣品單流水號變數2 = "" : End If : conn.Close()
741 766
             NUM2 = Double.Parse(Strings.Right(樣品單流水號變數2, 8) + 1)
742 767
             If NUM2 < 10 Then : 樣品單流水號變數2 = "CO" & "0000000" & NUM2
743 768
             ElseIf NUM2 > 9 And NUM2 < 100 Then : 樣品單流水號變數2 = "CO" & "000000" & NUM2
@@ -747,153 +772,134 @@ Public Class 中文樣品單
747 772
             ElseIf NUM2 > 99999 And NUM2 < 100000 Then : 樣品單流水號變數2 = "CO" & "00" & NUM2
748 773
             ElseIf NUM2 > 999999 And NUM2 < 1000000 Then : 樣品單流水號變數2 = "CO" & "0" & NUM2
749 774
             ElseIf NUM2 > 9999999 Then : 樣品單流水號變數2 = "CO" & NUM2 : End If
750
-            SQL_樣品單流水編號設定2_1()
751
-            If dr.Read() Then
752
-                SQL_樣品流水號一() : If dr.Read() Then : 樣品單流水號變數2 = dr("樣品流水號一").ToString : Else : 樣品單流水號變數2 = "" : End If : conn.Close()
753
-                NUM2 = Double.Parse(Strings.Right(樣品單流水號變數2, 8) + 1)
754
-                If NUM2 < 10 Then : 樣品單流水號變數2 = "CO" & "0000000" & NUM2
755
-                ElseIf NUM2 > 9 And NUM2 < 100 Then : 樣品單流水號變數2 = "CO" & "000000" & NUM2
756
-                ElseIf NUM2 > 99 And NUM2 < 1000 Then : 樣品單流水號變數2 = "CO" & "00000" & NUM2
757
-                ElseIf NUM2 > 999 And NUM2 < 10000 Then : 樣品單流水號變數2 = "CO" & "0000" & NUM2
758
-                ElseIf NUM2 > 9999 And NUM2 < 100000 Then : 樣品單流水號變數2 = "CO" & "000" & NUM2
759
-                ElseIf NUM2 > 99999 And NUM2 < 100000 Then : 樣品單流水號變數2 = "CO" & "00" & NUM2
760
-                ElseIf NUM2 > 999999 And NUM2 < 1000000 Then : 樣品單流水號變數2 = "CO" & "0" & NUM2
761
-                ElseIf NUM2 > 9999999 Then : 樣品單流水號變數2 = "CO" & NUM2 : End If
762
-            Else : End If : conn.Close()
763
-        Catch ex As Exception : MsgBox(ex.Message) : End Try
775
+        Else : End If : conn.Close()
764 776
     End Sub
765 777
     Private Sub Set_樣品單流水編號設定2_2()
766
-        Try
767
-            SQL_樣品單流水編號設定2() : If dr.Read() Then : 樣品單流水號變數2 = dr("樣品流水號一").ToString : Else : 樣品單流水號變數2 = "" : End If : conn.Close()
768
-            Dim NUM2 As Integer = Double.Parse(Strings.Right(樣品單流水號變數2, 8) + 1)
769
-            If NUM2 < 10 Then : 樣品單流水號變數2 = "CO" & "0000000" & NUM2
770
-            ElseIf NUM2 > 9 And NUM2 < 100 Then : 樣品單流水號變數2 = "CO" & "000000" & NUM2
771
-            ElseIf NUM2 > 99 And NUM2 < 1000 Then : 樣品單流水號變數2 = "CO" & "00000" & NUM2
772
-            ElseIf NUM2 > 999 And NUM2 < 10000 Then : 樣品單流水號變數2 = "CO" & "0000" & NUM2
773
-            ElseIf NUM2 > 9999 And NUM2 < 100000 Then : 樣品單流水號變數2 = "CO" & "000" & NUM2
774
-            ElseIf NUM2 > 99999 And NUM2 < 100000 Then : 樣品單流水號變數2 = "CO" & "00" & NUM2
775
-            ElseIf NUM2 > 999999 And NUM2 < 1000000 Then : 樣品單流水號變數2 = "CO" & "0" & NUM2
776
-            ElseIf NUM2 > 9999999 Then : 樣品單流水號變數2 = "CO" & NUM2 : End If
777
-        Catch ex As Exception : MsgBox(ex.Message) : End Try
778
+        SQL_樣品單流水編號設定2() : If dr.Read() Then : 樣品單流水號變數2 = dr("樣品流水號一").ToString : Else : 樣品單流水號變數2 = "" : End If : conn.Close()
779
+        Dim NUM2 As Integer = Double.Parse(Strings.Right(樣品單流水號變數2, 8) + 1)
780
+        If NUM2 < 10 Then : 樣品單流水號變數2 = "CO" & "0000000" & NUM2
781
+        ElseIf NUM2 > 9 And NUM2 < 100 Then : 樣品單流水號變數2 = "CO" & "000000" & NUM2
782
+        ElseIf NUM2 > 99 And NUM2 < 1000 Then : 樣品單流水號變數2 = "CO" & "00000" & NUM2
783
+        ElseIf NUM2 > 999 And NUM2 < 10000 Then : 樣品單流水號變數2 = "CO" & "0000" & NUM2
784
+        ElseIf NUM2 > 9999 And NUM2 < 100000 Then : 樣品單流水號變數2 = "CO" & "000" & NUM2
785
+        ElseIf NUM2 > 99999 And NUM2 < 100000 Then : 樣品單流水號變數2 = "CO" & "00" & NUM2
786
+        ElseIf NUM2 > 999999 And NUM2 < 1000000 Then : 樣品單流水號變數2 = "CO" & "0" & NUM2
787
+        ElseIf NUM2 > 9999999 Then : 樣品單流水號變數2 = "CO" & NUM2 : End If
778 788
     End Sub
779 789
     Private Sub Button24_Click(sender As Object, e As EventArgs) Handles 新增樣品單_bt.Click
780
-        Try
781
-            If 開發部門 = False And 確認部門 = True Then : ElseIf 開發部門 = True And 確認部門 = False Then : 中文樣品單階段.ShowDialog() : 階段_cb.Text = QA : End If
782
-            排序(0) = "ORDER BY 確認樣品單控制表.顏色, 確認樣品單明細表.細項" : 排序(1) = "ORDER BY 確認樣品單控制表暫存檔.顏色, 確認樣品單明細表暫存檔.細項"
783
-            面料顏色排序_bt.Enabled = False : 面料項次排序_bt.Enabled = True : 內裏顏色排序_tb.Enabled = False : 內裏項次排序_tb.Enabled = True
784
-            底部顏色排序_bt.Enabled = False : 底部項次排序_bt.Enabled = True : 飾物顏色排序_bt.Enabled = False : 飾物項次排序_bt.Enabled = True
785
-            Set_再次導入清單()
786
-            If 新增樣品單_ch.Checked = True Then
787
-                PA = InputBox("請輸入需要新增的顏色數量") : DTP(0) = Today
788
-                If DTP(0) = "" Then : 建檔日期_dtp.Format = DateTimePickerFormat.Custom : 建檔日期_dtp.CustomFormat = " "
789
-                Else : 建檔日期_dtp.Format = DateTimePickerFormat.Short : 建檔日期_dtp.Text = DTP(0) : End If
790
-                Set_樣品單流水編號設定1()
791
-                品牌_cb.Items.Clear() : 季節_tb.Items.Clear() : 工廠_tb.Items.Clear() : 楦頭_tb.Items.Clear() : Construc_tionName_cb.Items.Clear()
792
-                型體名字_tb.Items.Clear() : 型體號碼_tb.Items.Clear()
793
-                ComboBox1下拉表單資料載入() : ComboBox2下拉表單資料載入() : ComboBox3下拉表單資料載入() : ComboBox4下拉表單資料載入()
794
-                ComboBox5下拉表單資料載入() : ComboBox6下拉表單資料載入() : ComboBox7下拉表單資料載入()
795
-                内里OR大底_tb.Text = "透明色底+" & "SAMPLE NOT FOR RESALE" & "字体(注:浅色内里印黑色/深色内里印白色)"
796
-                TextBox4.Text = "" : TextBox5.Text = "" : 舊形體季別_tb.Text = "" : 新型體_ch.Checked = True : 建檔日期_dtp.Value = Today
797
-                TextBox10.Text = "" : TextBox17.Text = "" : QA = ""
798
-                PictureBox1.Image = Nothing : PictureBox2.Image = Nothing : PictureBox3.Image = Nothing : PictureBox4.Image = Nothing
799
-                樣品單號_tb.Text = 樣品單流水號變數1
800
-                Set_樣品單流水編號設定1_1()
790
+        If 開發部門 = False And 確認部門 = True Then : ElseIf 開發部門 = True And 確認部門 = False Then : 中文樣品單階段.ShowDialog() : 階段_cb.Text = QA : End If
791
+        排序(0) = "ORDER BY 確認樣品單控制表.顏色, 確認樣品單明細表.細項" : 排序(1) = "ORDER BY 確認樣品單控制表暫存檔.顏色, 確認樣品單明細表暫存檔.細項"
792
+        面料顏色排序_bt.Enabled = False : 面料項次排序_bt.Enabled = True : 內裏顏色排序_tb.Enabled = False : 內裏項次排序_tb.Enabled = True
793
+        底部顏色排序_bt.Enabled = False : 底部項次排序_bt.Enabled = True : 飾物顏色排序_bt.Enabled = False : 飾物項次排序_bt.Enabled = True
794
+        Set_再次導入清單()
795
+        If 新增樣品單_ch.Checked = True Then
796
+            PA = InputBox("請輸入需要新增的顏色數量") : DTP(0) = Today
797
+            If DTP(0) = "" Then : 建檔日期_dtp.Format = DateTimePickerFormat.Custom : 建檔日期_dtp.CustomFormat = " "
798
+            Else : 建檔日期_dtp.Format = DateTimePickerFormat.Short : 建檔日期_dtp.Text = DTP(0) : End If
799
+            Set_樣品單流水編號設定1()
800
+            品牌_cb.Items.Clear() : 季節_tb.Items.Clear() : 工廠_tb.Items.Clear() : 楦頭_tb.Items.Clear() : Construc_tionName_cb.Items.Clear()
801
+            型體名字_tb.Items.Clear() : 型體號碼_tb.Items.Clear()
802
+            ComboBox1下拉表單資料載入() : ComboBox2下拉表單資料載入() : ComboBox3下拉表單資料載入() : ComboBox4下拉表單資料載入()
803
+            ComboBox5下拉表單資料載入() : ComboBox6下拉表單資料載入() : ComboBox7下拉表單資料載入()
804
+            内里OR大底_tb.Text = "透明色底+" & "SAMPLE NOT FOR RESALE" & "字体(注:浅色内里印黑色/深色内里印白色)"
805
+            TextBox4.Text = "" : TextBox5.Text = "" : 舊形體季別_tb.Text = "" : 新型體_ch.Checked = True : 建檔日期_dtp.Value = Today
806
+            TextBox10.Text = "" : TextBox17.Text = "" : QA = ""
807
+            PictureBox1.Image = Nothing : PictureBox2.Image = Nothing : PictureBox3.Image = Nothing : PictureBox4.Image = Nothing
808
+            樣品單號_tb.Text = 樣品單流水號變數1
809
+            Set_樣品單流水編號設定1_1()
810
+            '-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
811
+            Set_樣品單流水編號設定2()
812
+            If 發展_ch.Checked = True Then : ASD = "D" : ElseIf 確認_ch.Checked = True Then : ASD = "C" : ElseIf 銷售樣本_ch.Checked = True Then : ASD = "S"
813
+            ElseIf 發展_ch.Checked = False And 確認_ch.Checked = False And 銷售樣本_ch.Checked = False Then : ASD = "" : End If
814
+            For i As Integer = 1 To PA : Set_樣品單流水編號設定2_1() : SQL_新增確認樣品單控制表暫存檔() : conn.Close() : Next
815
+            暫存模式 = True
816
+        ElseIf 新增樣品單_ch.Checked = False Then
817
+            If 樣品單號_tb.Text = "" Then : MsgBox("沒有選擇要新增樣品單的範本,請重新選擇要新增的樣品單類型") : Else
818
+                Set_樣品單流水編號設定1() : Set_樣品單流水編號設定1_1()
801 819
                 '-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
802 820
                 Set_樣品單流水編號設定2()
803
-                If 發展_ch.Checked = True Then : ASD = "D" : ElseIf 確認_ch.Checked = True Then : ASD = "C" : ElseIf 銷售樣本_ch.Checked = True Then : ASD = "S"
804
-                ElseIf 發展_ch.Checked = False And 確認_ch.Checked = False And 銷售樣本_ch.Checked = False Then : ASD = "" : End If
805
-                For i As Integer = 1 To PA : Set_樣品單流水編號設定2_1() : SQL_新增確認樣品單控制表暫存檔() : conn.Close() : Next
806
-                暫存模式 = True
807
-            ElseIf 新增樣品單_ch.Checked = False Then
808
-                If 樣品單號_tb.Text = "" Then : MsgBox("沒有選擇要新增樣品單的範本,請重新選擇要新增的樣品單類型") : Else
809
-                    Set_樣品單流水編號設定1() : Set_樣品單流水編號設定1_1()
821
+                For i As Integer = 0 To 顏色_dgv.Rows.Count - 1
822
+                    Set_樣品單流水編號設定2_1()
823
+                    PA = 顏色_dgv.Rows(i).Cells("顏色").Value.ToString : PA1 = 顏色_dgv.Rows(i).Cells("訂單顏色").Value.ToString
824
+                    PA2 = 顏色_dgv.Rows(i).Cells("數量").Value.ToString : PA3 = 顏色_dgv.Rows(i).Cells("備註").Value.ToString
825
+                    PA4 = 顏色_dgv.Rows(i).Cells("FINISH").Value.ToString : PA5 = 顏色_dgv.Rows(i).Cells("掛牌Date").Value.ToString
826
+                    PA6 = 顏色_dgv.Rows(i).Cells("掛牌Color").Value.ToString : PA7 = 顏色_dgv.Rows(i).Cells("Material_Article").Value.ToString
827
+                    PA8 = 顏色_dgv.Rows(i).Cells("Construc_Name").Value.ToString : PA9 = 顏色_dgv.Rows(i).Cells("Insole").Value.ToString
828
+                    PA10 = 顏色_dgv.Rows(i).Cells("Footbed").Value.ToString : PA11 = 顏色_dgv.Rows(i).Cells("掛牌Size").Value.ToString
829
+                    PA12 = 顏色_dgv.Rows(i).Cells("Gender").Value.ToString : PA13 = 顏色_dgv.Rows(i).Cells("Width").Value.ToString
830
+                    PA14 = 顏色_dgv.Rows(i).Cells("D_C_S").Value.ToString : PA15 = 顏色_dgv.Rows(i).Cells("Stage").Value.ToString
831
+                    PA16 = 顏色_dgv.Rows(i).Cells("掛牌Comments").Value.ToString : PA17 = 顏色_dgv.Rows(i).Cells("ItemNumber").Value.ToString
832
+                    PA18 = 顏色_dgv.Rows(i).Cells("CFM").Value.ToString
833
+                    SQL_新增確認樣品單控制表暫存檔1() : conn.Close()
810 834
                     '-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
811
-                    Set_樣品單流水編號設定2()
812
-                    For i As Integer = 0 To 顏色_dgv.Rows.Count - 1
813
-                        Set_樣品單流水編號設定2_1()
814
-                        PA = 顏色_dgv.Rows(i).Cells("顏色").Value.ToString : PA1 = 顏色_dgv.Rows(i).Cells("訂單顏色").Value.ToString
815
-                        PA2 = 顏色_dgv.Rows(i).Cells("數量").Value.ToString : PA3 = 顏色_dgv.Rows(i).Cells("備註").Value.ToString
816
-                        PA4 = 顏色_dgv.Rows(i).Cells("FINISH").Value.ToString : PA5 = 顏色_dgv.Rows(i).Cells("掛牌Date").Value.ToString
817
-                        PA6 = 顏色_dgv.Rows(i).Cells("掛牌Color").Value.ToString : PA7 = 顏色_dgv.Rows(i).Cells("Material_Article").Value.ToString
818
-                        PA8 = 顏色_dgv.Rows(i).Cells("Construc_Name").Value.ToString : PA9 = 顏色_dgv.Rows(i).Cells("Insole").Value.ToString
819
-                        PA10 = 顏色_dgv.Rows(i).Cells("Footbed").Value.ToString : PA11 = 顏色_dgv.Rows(i).Cells("掛牌Size").Value.ToString
820
-                        PA12 = 顏色_dgv.Rows(i).Cells("Gender").Value.ToString : PA13 = 顏色_dgv.Rows(i).Cells("Width").Value.ToString
821
-                        PA14 = 顏色_dgv.Rows(i).Cells("D_C_S").Value.ToString : PA15 = 顏色_dgv.Rows(i).Cells("Stage").Value.ToString
822
-                        PA16 = 顏色_dgv.Rows(i).Cells("掛牌Comments").Value.ToString : PA17 = 顏色_dgv.Rows(i).Cells("ItemNumber").Value.ToString
823
-                        PA18 = 顏色_dgv.Rows(i).Cells("CFM").Value.ToString
824
-                        SQL_新增確認樣品單控制表暫存檔1() : conn.Close()
825
-                        '-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
826
-                        中繼_dgv.DataSource = Nothing : ds8.Clear()
827
-                        中繼_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
828
-                        中繼_dgv.ColumnHeadersHeight = 25 : 中繼_dgv.AllowUserToAddRows = False
829
-                        PA = 顏色_dgv.Rows(i).Cells("顏色").Value.ToString
830
-                        SQL_確認樣品單明細表清單1()
831
-                        da.SelectCommand.CommandTimeout = 900 : da.Fill(ds8) : 中繼_dgv.DataSource = ds8.Tables(0) : conn.Close()
832
-                        For ii As Integer = 0 To 中繼_dgv.Rows.Count - 1
833
-                            If ii < 10 Then : 樣品單流水號變數3 = 樣品單流水號變數2 & "1" & "0" & ii + 1
834
-                            ElseIf ii > 9 Then : 樣品單流水號變數3 = 樣品單流水號變數2 & "1" & ii + 1 : End If
835
-                            PA19 = 中繼_dgv.Rows(ii).Cells("內容").Value.ToString : PA20 = 中繼_dgv.Rows(ii).Cells("廠商").Value.ToString
836
-                            PA21 = 中繼_dgv.Rows(ii).Cells("細項").Value.ToString
837
-                            SQL_新增確認樣品單控制表暫存檔2() : conn.Close()
838
-                            新增面料 = ii + 1
839
-                        Next
835
+                    中繼_dgv.DataSource = Nothing : ds8.Clear()
836
+                    中繼_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
837
+                    中繼_dgv.ColumnHeadersHeight = 25 : 中繼_dgv.AllowUserToAddRows = False
838
+                    PA = 顏色_dgv.Rows(i).Cells("顏色").Value.ToString
839
+                    SQL_確認樣品單明細表清單1()
840
+                    da.SelectCommand.CommandTimeout = 900 : da.Fill(ds8) : 中繼_dgv.DataSource = ds8.Tables(0) : conn.Close()
841
+                    For ii As Integer = 0 To 中繼_dgv.Rows.Count - 1
842
+                        If ii < 10 Then : 樣品單流水號變數3 = 樣品單流水號變數2 & "1" & "0" & ii + 1
843
+                        ElseIf ii > 9 Then : 樣品單流水號變數3 = 樣品單流水號變數2 & "1" & ii + 1 : End If
844
+                        PA19 = 中繼_dgv.Rows(ii).Cells("內容").Value.ToString : PA20 = 中繼_dgv.Rows(ii).Cells("廠商").Value.ToString
845
+                        PA21 = 中繼_dgv.Rows(ii).Cells("細項").Value.ToString
846
+                        SQL_新增確認樣品單控制表暫存檔2() : conn.Close()
847
+                        新增面料 = ii + 1
848
+                    Next
840 849
 
841
-                        中繼_dgv.DataSource = Nothing : ds8.Clear()
842
-                        中繼_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
843
-                        中繼_dgv.ColumnHeadersHeight = 25 : 中繼_dgv.AllowUserToAddRows = False
844
-                        PA = 顏色_dgv.Rows(i).Cells("顏色").Value.ToString
845
-                        SQL_確認樣品單明細表清單2()
846
-                        da.SelectCommand.CommandTimeout = 900 : da.Fill(ds8) : 中繼_dgv.DataSource = ds8.Tables(0) : conn.Close()
847
-                        For ii As Integer = 0 To 中繼_dgv.Rows.Count - 1
848
-                            If ii < 10 Then : 樣品單流水號變數3 = 樣品單流水號變數2 & "2" & "0" & ii + 1
849
-                            ElseIf ii > 9 Then : 樣品單流水號變數3 = 樣品單流水號變數2 & "2" & ii + 1 : End If
850
-                            PA19 = 中繼_dgv.Rows(ii).Cells("內容").Value.ToString : PA20 = 中繼_dgv.Rows(ii).Cells("廠商").Value.ToString
851
-                            PA21 = 中繼_dgv.Rows(ii).Cells("細項").Value.ToString
852
-                            SQL_新增確認樣品單控制表暫存檔3() : conn.Close()
853
-                            新增內裏 = ii + 1
854
-                        Next
850
+                    中繼_dgv.DataSource = Nothing : ds8.Clear()
851
+                    中繼_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
852
+                    中繼_dgv.ColumnHeadersHeight = 25 : 中繼_dgv.AllowUserToAddRows = False
853
+                    PA = 顏色_dgv.Rows(i).Cells("顏色").Value.ToString
854
+                    SQL_確認樣品單明細表清單2()
855
+                    da.SelectCommand.CommandTimeout = 900 : da.Fill(ds8) : 中繼_dgv.DataSource = ds8.Tables(0) : conn.Close()
856
+                    For ii As Integer = 0 To 中繼_dgv.Rows.Count - 1
857
+                        If ii < 10 Then : 樣品單流水號變數3 = 樣品單流水號變數2 & "2" & "0" & ii + 1
858
+                        ElseIf ii > 9 Then : 樣品單流水號變數3 = 樣品單流水號變數2 & "2" & ii + 1 : End If
859
+                        PA19 = 中繼_dgv.Rows(ii).Cells("內容").Value.ToString : PA20 = 中繼_dgv.Rows(ii).Cells("廠商").Value.ToString
860
+                        PA21 = 中繼_dgv.Rows(ii).Cells("細項").Value.ToString
861
+                        SQL_新增確認樣品單控制表暫存檔3() : conn.Close()
862
+                        新增內裏 = ii + 1
863
+                    Next
855 864
 
856
-                        中繼_dgv.DataSource = Nothing : ds8.Clear()
857
-                        中繼_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
858
-                        中繼_dgv.ColumnHeadersHeight = 25 : 中繼_dgv.AllowUserToAddRows = False
859
-                        PA = 顏色_dgv.Rows(i).Cells("顏色").Value.ToString
860
-                        SQL_確認樣品單明細表清單3()
861
-                        da.SelectCommand.CommandTimeout = 900 : da.Fill(ds8) : 中繼_dgv.DataSource = ds8.Tables(0) : conn.Close()
862
-                        For ii As Integer = 0 To 中繼_dgv.Rows.Count - 1
863
-                            If ii < 10 Then : 樣品單流水號變數3 = 樣品單流水號變數2 & "3" & "0" & ii + 1
864
-                            ElseIf ii > 9 Then : 樣品單流水號變數3 = 樣品單流水號變數2 & "3" & ii + 1 : End If
865
-                            PA19 = 中繼_dgv.Rows(ii).Cells("內容").Value.ToString : PA20 = 中繼_dgv.Rows(ii).Cells("廠商").Value.ToString
866
-                            PA21 = 中繼_dgv.Rows(ii).Cells("細項").Value.ToString
867
-                            SQL_新增確認樣品單明細表暫存檔() : conn.Close()
868
-                            新增底部 = ii + 1
869
-                        Next
865
+                    中繼_dgv.DataSource = Nothing : ds8.Clear()
866
+                    中繼_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
867
+                    中繼_dgv.ColumnHeadersHeight = 25 : 中繼_dgv.AllowUserToAddRows = False
868
+                    PA = 顏色_dgv.Rows(i).Cells("顏色").Value.ToString
869
+                    SQL_確認樣品單明細表清單3()
870
+                    da.SelectCommand.CommandTimeout = 900 : da.Fill(ds8) : 中繼_dgv.DataSource = ds8.Tables(0) : conn.Close()
871
+                    For ii As Integer = 0 To 中繼_dgv.Rows.Count - 1
872
+                        If ii < 10 Then : 樣品單流水號變數3 = 樣品單流水號變數2 & "3" & "0" & ii + 1
873
+                        ElseIf ii > 9 Then : 樣品單流水號變數3 = 樣品單流水號變數2 & "3" & ii + 1 : End If
874
+                        PA19 = 中繼_dgv.Rows(ii).Cells("內容").Value.ToString : PA20 = 中繼_dgv.Rows(ii).Cells("廠商").Value.ToString
875
+                        PA21 = 中繼_dgv.Rows(ii).Cells("細項").Value.ToString
876
+                        SQL_新增確認樣品單明細表暫存檔() : conn.Close()
877
+                        新增底部 = ii + 1
878
+                    Next
870 879
 
871
-                        中繼_dgv.DataSource = Nothing : ds8.Clear()
872
-                        中繼_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
873
-                        中繼_dgv.ColumnHeadersHeight = 25 : 中繼_dgv.AllowUserToAddRows = False
874
-                        PA = 顏色_dgv.Rows(i).Cells("顏色").Value.ToString
875
-                        SQL_確認樣品單明細表清單4()
876
-                        da.SelectCommand.CommandTimeout = 900 : da.Fill(ds8) : 中繼_dgv.DataSource = ds8.Tables(0) : conn.Close()
877
-                        For ii As Integer = 0 To 中繼_dgv.Rows.Count - 1
878
-                            If ii < 10 Then : 樣品單流水號變數3 = 樣品單流水號變數2 & "4" & "0" & ii + 1
879
-                            ElseIf ii > 9 Then : 樣品單流水號變數3 = 樣品單流水號變數2 & "4" & ii + 1 : End If
880
-                            PA19 = 中繼_dgv.Rows(ii).Cells("內容").Value.ToString : PA20 = 中繼_dgv.Rows(ii).Cells("廠商").Value.ToString
881
-                            PA21 = 中繼_dgv.Rows(ii).Cells("細項").Value.ToString
882
-                            SQL_新增確認樣品單明細表暫存檔3() : conn.Close()
883
-                            新增飾物 = ii + 1
884
-                        Next
880
+                    中繼_dgv.DataSource = Nothing : ds8.Clear()
881
+                    中繼_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
882
+                    中繼_dgv.ColumnHeadersHeight = 25 : 中繼_dgv.AllowUserToAddRows = False
883
+                    PA = 顏色_dgv.Rows(i).Cells("顏色").Value.ToString
884
+                    SQL_確認樣品單明細表清單4()
885
+                    da.SelectCommand.CommandTimeout = 900 : da.Fill(ds8) : 中繼_dgv.DataSource = ds8.Tables(0) : conn.Close()
886
+                    For ii As Integer = 0 To 中繼_dgv.Rows.Count - 1
887
+                        If ii < 10 Then : 樣品單流水號變數3 = 樣品單流水號變數2 & "4" & "0" & ii + 1
888
+                        ElseIf ii > 9 Then : 樣品單流水號變數3 = 樣品單流水號變數2 & "4" & ii + 1 : End If
889
+                        PA19 = 中繼_dgv.Rows(ii).Cells("內容").Value.ToString : PA20 = 中繼_dgv.Rows(ii).Cells("廠商").Value.ToString
890
+                        PA21 = 中繼_dgv.Rows(ii).Cells("細項").Value.ToString
891
+                        SQL_新增確認樣品單明細表暫存檔3() : conn.Close()
892
+                        新增飾物 = ii + 1
885 893
                     Next
886
-                    樣品單號_tb.Text = 樣品單流水號變數1 : 暫存模式 = True
887
-                End If
888
-            End If : Set_再次導入清單() : MsgBox("新增準備完成")
889
-        Catch ex As Exception : MsgBox(ex.Message) : End Try
894
+                Next
895
+                樣品單號_tb.Text = 樣品單流水號變數1 : 暫存模式 = True
896
+            End If
897
+        End If : Set_再次導入清單() : MsgBox("新增準備完成")
890 898
     End Sub
891 899
     Private Sub 明細暫存檔寫入()
892
-        Try
893
-            Dim ii As Integer = 0
894
-            If 暫存模式 = True Then : PA22 = 中繼_dgv.Rows(ii).Cells("樣品流水號二").Value.ToString : SQL_新增確認樣品單明細表暫存檔4() : conn.Close()
895
-            ElseIf 暫存模式 = False Then : PA22 = 中繼_dgv.Rows(ii).Cells("樣品流水號二").Value.ToString : SQL_新增確認樣品單明細表暫存檔5() : conn.Close() : End If
896
-        Catch ex As Exception : MsgBox(ex.Message) : End Try
900
+        Dim ii As Integer = 0
901
+        If 暫存模式 = True Then : PA22 = 中繼_dgv.Rows(ii).Cells("樣品流水號二").Value.ToString : SQL_新增確認樣品單明細表暫存檔4() : conn.Close()
902
+        ElseIf 暫存模式 = False Then : PA22 = 中繼_dgv.Rows(ii).Cells("樣品流水號二").Value.ToString : SQL_新增確認樣品單明細表暫存檔5() : conn.Close() : End If
897 903
     End Sub
898 904
     Private Sub 新增面料_bt_Click(sender As Object, e As EventArgs) Handles 新增面料_bt.Click
899 905
         編輯模式存檔()
@@ -1261,6 +1267,13 @@ Public Class 中文樣品單
1261 1267
                     SQL_修改確認樣品單控制表1() : conn.Close()
1262 1268
                 Next i
1263 1269
             End If
1270
+            If 面料1_dgv.Rows.Count > 0 Then
1271
+                For i = 0 To 面料1_dgv.Rows.Count - 1
1272
+                    PA = 面料1_dgv.Rows(i).Cells("細項").Value.ToString : PA1 = 面料1_dgv.Rows(i).Cells("內容").Value.ToString
1273
+                    SQL_確認樣品單敘述欄_確認() : If dr.Read Then : SQL_確認樣品單敘述欄_修改() : Else : SQL_確認樣品單敘述欄_新增() : End If
1274
+                Next i
1275
+            End If
1276
+
1264 1277
             If 內裡_dgv.Rows.Count > 0 Then
1265 1278
                 For i = 0 To 內裡_dgv.Rows.Count - 1
1266 1279
                     PA = 內裡_dgv.Rows(i).Cells("Item_N").Value.ToString : PA1 = 內裡_dgv.Rows(i).Cells("內容").Value.ToString
@@ -1269,6 +1282,13 @@ Public Class 中文樣品單
1269 1282
                     SQL_修改確認樣品單明細表1() : conn.Close()
1270 1283
                 Next i
1271 1284
             End If
1285
+            If 內裡1_dgv.Rows.Count > 0 Then
1286
+                For i = 0 To 內裡1_dgv.Rows.Count - 1
1287
+                    PA = 內裡1_dgv.Rows(i).Cells("細項").Value.ToString : PA1 = 內裡1_dgv.Rows(i).Cells("內容").Value.ToString
1288
+                    SQL_確認樣品單敘述欄_確認() : If dr.Read Then : SQL_確認樣品單敘述欄_修改() : Else : SQL_確認樣品單敘述欄_新增() : End If
1289
+                Next i
1290
+            End If
1291
+
1272 1292
             If 底部_dgv.Rows.Count > 0 Then
1273 1293
                 For i = 0 To 底部_dgv.Rows.Count - 1
1274 1294
                     PA = 底部_dgv.Rows(i).Cells("Item_N").Value.ToString : PA1 = 底部_dgv.Rows(i).Cells("內容").Value.ToString
@@ -1277,15 +1297,29 @@ Public Class 中文樣品單
1277 1297
                     SQL_修改確認樣品單明細表2() : conn.Close()
1278 1298
                 Next i
1279 1299
             End If
1300
+            If 底部1_dgv.Rows.Count > 0 Then
1301
+                For i = 0 To 底部1_dgv.Rows.Count - 1
1302
+                    PA = 底部1_dgv.Rows(i).Cells("細項").Value.ToString : PA1 = 底部1_dgv.Rows(i).Cells("內容").Value.ToString
1303
+                    SQL_確認樣品單敘述欄_確認() : If dr.Read Then : SQL_確認樣品單敘述欄_修改() : Else : SQL_確認樣品單敘述欄_新增() : End If
1304
+                Next i
1305
+            End If
1306
+
1280 1307
             If 飾物_dgv.Rows.Count > 0 Then
1281 1308
                 For i = 0 To 飾物_dgv.Rows.Count - 1
1282 1309
                     PA = 飾物_dgv.Rows(i).Cells("Item_N").Value.ToString : PA1 = 飾物_dgv.Rows(i).Cells("內容").Value.ToString
1283 1310
                     PA2 = 飾物_dgv.Rows(i).Cells("Factory").Value.ToString : PA3 = 飾物_dgv.Rows(i).Cells("樣品流水號二").Value.ToString
1284 1311
                     PA4 = 飾物_dgv.Rows(i).Cells("樣品流水號三").Value.ToString : PA5 = 飾物_dgv.Rows(i).Cells("樣品流水號三").Value.ToString
1285 1312
                     PA6 = 飾物_dgv.Rows(i).Cells("樣品流水號").Value.ToString
1286
-                    SQL_修改確認樣品單明細表3() : conn.Close()
1313
+                    SQL_修改確認樣品單明細表3() : conn.Close() : PA5 = 飾物_dgv.Rows(i).Cells("樣品流水號").Value.ToString
1287 1314
                 Next i
1288 1315
             End If
1316
+            If 飾物1_dgv.Rows.Count > 0 Then
1317
+                For i = 0 To 飾物1_dgv.Rows.Count - 1
1318
+                    PA = 飾物1_dgv.Rows(i).Cells("細項").Value.ToString : PA1 = 飾物1_dgv.Rows(i).Cells("內容").Value.ToString
1319
+                    SQL_確認樣品單敘述欄_確認() : If dr.Read Then : SQL_確認樣品單敘述欄_修改() : Else : SQL_確認樣品單敘述欄_新增() : End If
1320
+                Next i
1321
+            End If
1322
+
1289 1323
             排序(0) = "ORDER BY 確認樣品單控制表.顏色, 確認樣品單明細表.細項" : 排序(1) = "ORDER BY 確認樣品單控制表暫存檔.顏色, 確認樣品單明細表暫存檔.細項"
1290 1324
             面料顏色排序_bt.Enabled = False : 面料項次排序_bt.Enabled = True : 內裏顏色排序_tb.Enabled = False : 內裏項次排序_tb.Enabled = True
1291 1325
             底部顏色排序_bt.Enabled = False : 底部項次排序_bt.Enabled = True : 飾物顏色排序_bt.Enabled = False : 飾物項次排序_bt.Enabled = True

+ 99
- 73
TENDEN-MES-SYS/樣品訂單管理/系統列印介面/列印_中文樣品單.Designer.vb Parādīt failu

@@ -22,19 +22,20 @@ Partial Class 列印_中文樣品單
22 22
     '請勿使用程式碼編輯器進行修改。
23 23
     <System.Diagnostics.DebuggerStepThrough()>
24 24
     Private  Sub InitializeComponent()
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()
25 29
         Dim DataGridViewCellStyle5 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
26
-        Dim DataGridViewCellStyle6 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
27
-        Dim DataGridViewCellStyle7 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
28
-        Dim DataGridViewCellStyle8 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
29 30
         Me.PictureBox3 = New System.Windows.Forms.PictureBox()
30
-        Me.DataGridView3 = New System.Windows.Forms.DataGridView()
31
-        Me.DataGridView1 = New System.Windows.Forms.DataGridView()
32
-        Me.DataGridView2 = New System.Windows.Forms.DataGridView()
31
+        Me.樣品單明細表_dgv = New System.Windows.Forms.DataGridView()
32
+        Me.樣品單抬頭_dgv = New System.Windows.Forms.DataGridView()
33
+        Me.樣品單控制表_dgv = New System.Windows.Forms.DataGridView()
33 34
         Me.PictureBox1 = New System.Windows.Forms.PictureBox()
34 35
         Me.PictureBox2 = New System.Windows.Forms.PictureBox()
35 36
         Me.取消列印_bt = New System.Windows.Forms.Button()
36 37
         Me.確認列印_bt = New System.Windows.Forms.Button()
37
-        Me.DataGridView4 = New System.Windows.Forms.DataGridView()
38
+        Me.明細表分頁_dgv = New System.Windows.Forms.DataGridView()
38 39
         Me.PictureBox4 = New System.Windows.Forms.PictureBox()
39 40
         Me.PictureBox5 = New System.Windows.Forms.PictureBox()
40 41
         Me.大底貼標_ch = New System.Windows.Forms.CheckBox()
@@ -42,17 +43,19 @@ Partial Class 列印_中文樣品單
42 43
         Me.后套里内腰印刷_ch = New System.Windows.Forms.CheckBox()
43 44
         Me.中繼_dgv = New System.Windows.Forms.DataGridView()
44 45
         Me.圖片2_pb = New System.Windows.Forms.PictureBox()
46
+        Me.敘述欄_dgv = New System.Windows.Forms.DataGridView()
45 47
         CType(Me.PictureBox3, System.ComponentModel.ISupportInitialize).BeginInit()
46
-        CType(Me.DataGridView3, System.ComponentModel.ISupportInitialize).BeginInit()
47
-        CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).BeginInit()
48
-        CType(Me.DataGridView2, System.ComponentModel.ISupportInitialize).BeginInit()
48
+        CType(Me.樣品單明細表_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
49
+        CType(Me.樣品單抬頭_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
50
+        CType(Me.樣品單控制表_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
49 51
         CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
50 52
         CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).BeginInit()
51
-        CType(Me.DataGridView4, System.ComponentModel.ISupportInitialize).BeginInit()
53
+        CType(Me.明細表分頁_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
52 54
         CType(Me.PictureBox4, System.ComponentModel.ISupportInitialize).BeginInit()
53 55
         CType(Me.PictureBox5, System.ComponentModel.ISupportInitialize).BeginInit()
54 56
         CType(Me.中繼_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
55 57
         CType(Me.圖片2_pb, System.ComponentModel.ISupportInitialize).BeginInit()
58
+        CType(Me.敘述欄_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
56 59
         Me.SuspendLayout()
57 60
         '
58 61
         'PictureBox3
@@ -66,44 +69,44 @@ Partial Class 列印_中文樣品單
66 69
         Me.PictureBox3.TabIndex = 381
67 70
         Me.PictureBox3.TabStop = False
68 71
         '
69
-        'DataGridView3
70
-        '
71
-        DataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
72
-        Me.DataGridView3.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle5
73
-        Me.DataGridView3.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
74
-        Me.DataGridView3.Location = New System.Drawing.Point(14, 310)
75
-        Me.DataGridView3.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
76
-        Me.DataGridView3.Name = "DataGridView3"
77
-        Me.DataGridView3.RowHeadersWidth = 5
78
-        Me.DataGridView3.RowTemplate.Height = 24
79
-        Me.DataGridView3.Size = New System.Drawing.Size(753, 139)
80
-        Me.DataGridView3.TabIndex = 382
81
-        '
82
-        'DataGridView1
83
-        '
84
-        DataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
85
-        Me.DataGridView1.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle6
86
-        Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
87
-        Me.DataGridView1.Location = New System.Drawing.Point(14, 16)
88
-        Me.DataGridView1.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
89
-        Me.DataGridView1.Name = "DataGridView1"
90
-        Me.DataGridView1.RowHeadersWidth = 5
91
-        Me.DataGridView1.RowTemplate.Height = 24
92
-        Me.DataGridView1.Size = New System.Drawing.Size(753, 139)
93
-        Me.DataGridView1.TabIndex = 383
94
-        '
95
-        'DataGridView2
96
-        '
97
-        DataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
98
-        Me.DataGridView2.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle7
99
-        Me.DataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
100
-        Me.DataGridView2.Location = New System.Drawing.Point(14, 163)
101
-        Me.DataGridView2.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
102
-        Me.DataGridView2.Name = "DataGridView2"
103
-        Me.DataGridView2.RowHeadersWidth = 5
104
-        Me.DataGridView2.RowTemplate.Height = 24
105
-        Me.DataGridView2.Size = New System.Drawing.Size(753, 139)
106
-        Me.DataGridView2.TabIndex = 384
72
+        '樣品單明細表_dgv
73
+        '
74
+        DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
75
+        Me.樣品單明細表_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
76
+        Me.樣品單明細表_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
77
+        Me.樣品單明細表_dgv.Location = New System.Drawing.Point(14, 310)
78
+        Me.樣品單明細表_dgv.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
79
+        Me.樣品單明細表_dgv.Name = "樣品單明細表_dgv"
80
+        Me.樣品單明細表_dgv.RowHeadersWidth = 5
81
+        Me.樣品單明細表_dgv.RowTemplate.Height = 24
82
+        Me.樣品單明細表_dgv.Size = New System.Drawing.Size(753, 139)
83
+        Me.樣品單明細表_dgv.TabIndex = 382
84
+        '
85
+        '樣品單抬頭_dgv
86
+        '
87
+        DataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
88
+        Me.樣品單抬頭_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2
89
+        Me.樣品單抬頭_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
90
+        Me.樣品單抬頭_dgv.Location = New System.Drawing.Point(14, 16)
91
+        Me.樣品單抬頭_dgv.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
92
+        Me.樣品單抬頭_dgv.Name = "樣品單抬頭_dgv"
93
+        Me.樣品單抬頭_dgv.RowHeadersWidth = 5
94
+        Me.樣品單抬頭_dgv.RowTemplate.Height = 24
95
+        Me.樣品單抬頭_dgv.Size = New System.Drawing.Size(753, 139)
96
+        Me.樣品單抬頭_dgv.TabIndex = 383
97
+        '
98
+        '樣品單控制表_dgv
99
+        '
100
+        DataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
101
+        Me.樣品單控制表_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
102
+        Me.樣品單控制表_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
103
+        Me.樣品單控制表_dgv.Location = New System.Drawing.Point(14, 163)
104
+        Me.樣品單控制表_dgv.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
105
+        Me.樣品單控制表_dgv.Name = "樣品單控制表_dgv"
106
+        Me.樣品單控制表_dgv.RowHeadersWidth = 5
107
+        Me.樣品單控制表_dgv.RowTemplate.Height = 24
108
+        Me.樣品單控制表_dgv.Size = New System.Drawing.Size(753, 139)
109
+        Me.樣品單控制表_dgv.TabIndex = 384
107 110
         '
108 111
         'PictureBox1
109 112
         '
@@ -149,18 +152,18 @@ Partial Class 列印_中文樣品單
149 152
         Me.確認列印_bt.Text = "確認列印"
150 153
         Me.確認列印_bt.UseVisualStyleBackColor = True
151 154
         '
152
-        'DataGridView4
155
+        '明細表分頁_dgv
153 156
         '
154
-        DataGridViewCellStyle8.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
155
-        Me.DataGridView4.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle8
156
-        Me.DataGridView4.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
157
-        Me.DataGridView4.Location = New System.Drawing.Point(14, 457)
158
-        Me.DataGridView4.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
159
-        Me.DataGridView4.Name = "DataGridView4"
160
-        Me.DataGridView4.RowHeadersWidth = 5
161
-        Me.DataGridView4.RowTemplate.Height = 24
162
-        Me.DataGridView4.Size = New System.Drawing.Size(753, 139)
163
-        Me.DataGridView4.TabIndex = 389
157
+        DataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
158
+        Me.明細表分頁_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle4
159
+        Me.明細表分頁_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
160
+        Me.明細表分頁_dgv.Location = New System.Drawing.Point(14, 457)
161
+        Me.明細表分頁_dgv.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
162
+        Me.明細表分頁_dgv.Name = "明細表分頁_dgv"
163
+        Me.明細表分頁_dgv.RowHeadersWidth = 5
164
+        Me.明細表分頁_dgv.RowTemplate.Height = 24
165
+        Me.明細表分頁_dgv.Size = New System.Drawing.Size(753, 139)
166
+        Me.明細表分頁_dgv.TabIndex = 389
164 167
         '
165 168
         'PictureBox4
166 169
         '
@@ -237,11 +240,32 @@ Partial Class 列印_中文樣品單
237 240
         Me.圖片2_pb.TabIndex = 396
238 241
         Me.圖片2_pb.TabStop = False
239 242
         '
243
+        '敘述欄_dgv
244
+        '
245
+        Me.敘述欄_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
246
+        Me.敘述欄_dgv.BackgroundColor = System.Drawing.Color.White
247
+        Me.敘述欄_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
248
+        DataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
249
+        DataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Window
250
+        DataGridViewCellStyle5.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
251
+        DataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.ControlText
252
+        DataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight
253
+        DataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText
254
+        DataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
255
+        Me.敘述欄_dgv.DefaultCellStyle = DataGridViewCellStyle5
256
+        Me.敘述欄_dgv.Location = New System.Drawing.Point(1075, 16)
257
+        Me.敘述欄_dgv.Name = "敘述欄_dgv"
258
+        Me.敘述欄_dgv.RowHeadersWidth = 5
259
+        Me.敘述欄_dgv.RowTemplate.Height = 24
260
+        Me.敘述欄_dgv.Size = New System.Drawing.Size(262, 580)
261
+        Me.敘述欄_dgv.TabIndex = 420
262
+        '
240 263
         '列印_中文樣品單
241 264
         '
242 265
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
243 266
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
244
-        Me.ClientSize = New System.Drawing.Size(284, 97)
267
+        Me.ClientSize = New System.Drawing.Size(284, 101)
268
+        Me.Controls.Add(Me.敘述欄_dgv)
245 269
         Me.Controls.Add(Me.圖片2_pb)
246 270
         Me.Controls.Add(Me.中繼_dgv)
247 271
         Me.Controls.Add(Me.后套里内腰印刷_ch)
@@ -249,14 +273,14 @@ Partial Class 列印_中文樣品單
249 273
         Me.Controls.Add(Me.內裏印刷_ch)
250 274
         Me.Controls.Add(Me.PictureBox5)
251 275
         Me.Controls.Add(Me.PictureBox4)
252
-        Me.Controls.Add(Me.DataGridView4)
276
+        Me.Controls.Add(Me.明細表分頁_dgv)
253 277
         Me.Controls.Add(Me.取消列印_bt)
254 278
         Me.Controls.Add(Me.確認列印_bt)
255 279
         Me.Controls.Add(Me.PictureBox2)
256 280
         Me.Controls.Add(Me.PictureBox1)
257
-        Me.Controls.Add(Me.DataGridView2)
258
-        Me.Controls.Add(Me.DataGridView1)
259
-        Me.Controls.Add(Me.DataGridView3)
281
+        Me.Controls.Add(Me.樣品單控制表_dgv)
282
+        Me.Controls.Add(Me.樣品單抬頭_dgv)
283
+        Me.Controls.Add(Me.樣品單明細表_dgv)
260 284
         Me.Controls.Add(Me.PictureBox3)
261 285
         Me.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
262 286
         Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
@@ -264,30 +288,31 @@ Partial Class 列印_中文樣品單
264 288
         Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
265 289
         Me.Text = "確認樣品中文樣品單列印"
266 290
         CType(Me.PictureBox3, System.ComponentModel.ISupportInitialize).EndInit()
267
-        CType(Me.DataGridView3, System.ComponentModel.ISupportInitialize).EndInit()
268
-        CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).EndInit()
269
-        CType(Me.DataGridView2, System.ComponentModel.ISupportInitialize).EndInit()
291
+        CType(Me.樣品單明細表_dgv, System.ComponentModel.ISupportInitialize).EndInit()
292
+        CType(Me.樣品單抬頭_dgv, System.ComponentModel.ISupportInitialize).EndInit()
293
+        CType(Me.樣品單控制表_dgv, System.ComponentModel.ISupportInitialize).EndInit()
270 294
         CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
271 295
         CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).EndInit()
272
-        CType(Me.DataGridView4, System.ComponentModel.ISupportInitialize).EndInit()
296
+        CType(Me.明細表分頁_dgv, System.ComponentModel.ISupportInitialize).EndInit()
273 297
         CType(Me.PictureBox4, System.ComponentModel.ISupportInitialize).EndInit()
274 298
         CType(Me.PictureBox5, System.ComponentModel.ISupportInitialize).EndInit()
275 299
         CType(Me.中繼_dgv, System.ComponentModel.ISupportInitialize).EndInit()
276 300
         CType(Me.圖片2_pb, System.ComponentModel.ISupportInitialize).EndInit()
301
+        CType(Me.敘述欄_dgv, System.ComponentModel.ISupportInitialize).EndInit()
277 302
         Me.ResumeLayout(False)
278 303
         Me.PerformLayout()
279 304
 
280 305
     End Sub
281 306
 
282 307
     Friend WithEvents PictureBox3 As PictureBox
283
-    Friend WithEvents DataGridView3 As DataGridView
284
-    Friend WithEvents DataGridView1 As DataGridView
285
-    Friend WithEvents DataGridView2 As DataGridView
308
+    Friend WithEvents 樣品單明細表_dgv As DataGridView
309
+    Friend WithEvents 樣品單抬頭_dgv As DataGridView
310
+    Friend WithEvents 樣品單控制表_dgv As DataGridView
286 311
     Friend WithEvents PictureBox1 As PictureBox
287 312
     Friend WithEvents PictureBox2 As PictureBox
288 313
     Friend WithEvents 取消列印_bt As Button
289 314
     Friend WithEvents 確認列印_bt As Button
290
-    Friend WithEvents DataGridView4 As DataGridView
315
+    Friend WithEvents 明細表分頁_dgv As DataGridView
291 316
     Friend WithEvents PictureBox4 As PictureBox
292 317
     Friend WithEvents PictureBox5 As PictureBox
293 318
     Friend WithEvents 大底貼標_ch As CheckBox
@@ -295,4 +320,5 @@ Partial Class 列印_中文樣品單
295 320
     Friend WithEvents 后套里内腰印刷_ch As CheckBox
296 321
     Friend WithEvents 中繼_dgv As DataGridView
297 322
     Friend WithEvents 圖片2_pb As PictureBox
323
+    Friend WithEvents 敘述欄_dgv As DataGridView
298 324
 End Class

+ 189
- 246
TENDEN-MES-SYS/樣品訂單管理/系統列印介面/列印_中文樣品單.vb Parādīt failu

@@ -10,7 +10,7 @@ Imports Microsoft.Office.Interop.Excel.XlThemeColor
10 10
 Imports Microsoft.Office.Interop.Excel.XlWindowState
11 11
 Imports Microsoft.Office.Interop.Excel
12 12
 Public Class 列印_中文樣品單
13
-    ReadOnly ds1 As New DataSet : ReadOnly ds2 As New DataSet : ReadOnly ds3 As New DataSet : ReadOnly ds4 As New DataSet
13
+    ReadOnly ds1, ds2, ds3, ds4, ds12 As New DataSet
14 14
     Dim xlApp As Application
15 15
     Dim xlBook As Workbook
16 16
     Dim xlSheet As Worksheet
@@ -20,116 +20,96 @@ Public Class 列印_中文樣品單
20 20
     Dim 位置11 As String : Dim 攔寬 As Single
21 21
     Dim 第一頁 As Boolean : Dim 第二頁 As Boolean : Dim 第三頁 As Boolean : Dim 分頁計數 As Integer = 0 : Dim 分頁計數1 As Integer = 0
22 22
     Dim DGVX As Integer
23
+
24
+    Private Sub Set_訂單清單4()
25
+        敘述欄_dgv.DataSource = Nothing : ds12.Clear()
26
+        敘述欄_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
27
+        敘述欄_dgv.ColumnHeadersHeight = 25 : 敘述欄_dgv.AllowUserToAddRows = False : 敘述欄_dgv.RowTemplate.Height = 45
28
+        SQL_列印_中文樣品單_敘述攔()
29
+        da.SelectCommand.CommandTimeout = 900 : da.Fill(ds12) : 敘述欄_dgv.DataSource = ds12.Tables(0) : conn.Close()
30
+        敘述欄_dgv.Columns(0).FillWeight = 80 : 敘述欄_dgv.Columns(1).FillWeight = 200
31
+    End Sub
23 32
     Private Sub Set_訂單清單1()
24 33
         Try
25
-            DataGridView1.DataSource = Nothing : ds1.Clear()
26
-            DataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
27
-            DataGridView1.ColumnHeadersHeight = 25
28
-            DataGridView1.AllowUserToAddRows = False
34
+            樣品單抬頭_dgv.DataSource = Nothing : ds1.Clear()
35
+            樣品單抬頭_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
36
+            樣品單抬頭_dgv.ColumnHeadersHeight = 25 : 樣品單抬頭_dgv.AllowUserToAddRows = False
29 37
             SQL_列印_中文樣品單()
30
-            da.SelectCommand.CommandTimeout = 900 : da.Fill(ds1) : DataGridView1.DataSource = ds1.Tables(0) : conn.Close()
31
-        Catch ex As Exception
32
-            MsgBox(ex.Message)
33
-        End Try
34
-
38
+            da.SelectCommand.CommandTimeout = 900 : da.Fill(ds1) : 樣品單抬頭_dgv.DataSource = ds1.Tables(0) : conn.Close()
39
+        Catch ex As Exception : MsgBox(ex.Message) : End Try
35 40
     End Sub
36 41
     Private Sub Set_訂單清單2()
37 42
         Try
38
-            DataGridView2.DataSource = Nothing : ds2.Clear()
39
-            DataGridView2.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
40
-            DataGridView2.ColumnHeadersHeight = 25
41
-            DataGridView2.AllowUserToAddRows = False
43
+            樣品單控制表_dgv.DataSource = Nothing : ds2.Clear()
44
+            樣品單控制表_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
45
+            樣品單控制表_dgv.ColumnHeadersHeight = 25 : 樣品單控制表_dgv.AllowUserToAddRows = False
42 46
             SQL_列印_中文樣品單1()
43
-            da.SelectCommand.CommandTimeout = 900 : da.Fill(ds2) : DataGridView2.DataSource = ds2.Tables(0) : conn.Close()
44
-        Catch ex As Exception
45
-            MsgBox(ex.Message)
46
-        End Try
47
+            da.SelectCommand.CommandTimeout = 900 : da.Fill(ds2) : 樣品單控制表_dgv.DataSource = ds2.Tables(0) : conn.Close()
48
+        Catch ex As Exception : MsgBox(ex.Message) : End Try
47 49
     End Sub
48 50
     Private Sub Set_訂單清單3()
49 51
         Try
50
-            DataGridView3.DataSource = Nothing : ds3.Clear()
51
-            DataGridView3.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
52
-            DataGridView3.ColumnHeadersHeight = 25
53
-            DataGridView3.AllowUserToAddRows = False
52
+            樣品單明細表_dgv.DataSource = Nothing : ds3.Clear()
53
+            樣品單明細表_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
54
+            樣品單明細表_dgv.ColumnHeadersHeight = 25 : 樣品單明細表_dgv.AllowUserToAddRows = False
54 55
             SQL_列印_中文樣品單2()
55
-            da.SelectCommand.CommandTimeout = 900 : da.Fill(ds3) : DataGridView3.DataSource = ds3.Tables(0) : conn.Close()
56
-        Catch ex As Exception
57
-            MsgBox(ex.Message)
58
-        End Try
56
+            da.SelectCommand.CommandTimeout = 900 : da.Fill(ds3) : 樣品單明細表_dgv.DataSource = ds3.Tables(0) : conn.Close()
57
+        Catch ex As Exception : MsgBox(ex.Message) : End Try
59 58
     End Sub
60 59
     Private Sub Set_DGV4載入前設定()
61 60
         Try
62
-            DataGridView4.DataSource = Nothing : ds4.Clear()
63
-            DataGridView4.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
64
-            DataGridView4.ColumnHeadersHeight = 25
65
-            DataGridView4.AllowUserToAddRows = False
61
+            明細表分頁_dgv.DataSource = Nothing : ds4.Clear()
62
+            明細表分頁_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
63
+            明細表分頁_dgv.ColumnHeadersHeight = 25 : 明細表分頁_dgv.AllowUserToAddRows = False
66 64
             ConnOpen()
67
-        Catch ex As Exception
68
-            MsgBox(ex.Message)
69
-        End Try
65
+        Catch ex As Exception : MsgBox(ex.Message) : End Try
70 66
     End Sub
71 67
     Private Sub Set_DGV4載入後設定()
72
-        CmdSet_For_DGV() : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds4) : DataGridView4.DataSource = ds4.Tables(0) : conn.Close()
68
+        CmdSet_For_DGV() : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds4) : 明細表分頁_dgv.DataSource = ds4.Tables(0) : conn.Close()
73 69
     End Sub
74 70
     Private Sub Set_產地標圖片導入()
75 71
         Try
76
-            PA = DataGridView1.Rows(0).Cells("中文樣品單產地標").Value
77
-            SQL_中文樣品單批量列印清單導入圖片()
72
+            PA = 樣品單抬頭_dgv.Rows(0).Cells("中文樣品單產地標").Value : SQL_中文樣品單批量列印清單導入圖片()
78 73
             While dr.Read() = True
79 74
                 Dim unused As Byte() = New Byte(-1) {}
80 75
                 Dim bytes As Byte() = DirectCast(dr.Item("圖片"), Byte())
81 76
                 Dim oStream As New MemoryStream(bytes)
82 77
                 PictureBox1.Image = Bitmap.FromStream(oStream)
83
-            End While
84
-            conn.Close()
85
-        Catch ex As Exception
86
-            MsgBox(ex.Message)
87
-        End Try
78
+            End While : conn.Close()
79
+        Catch ex As Exception : MsgBox(ex.Message) : End Try
88 80
     End Sub
89 81
     Private Sub Set_設計圖圖片導入()
90 82
         Try
91
-            PA = DataGridView1.Rows(0).Cells("中文樣品單鞋圖").Value
92
-            SQL_中文樣品單批量列印清單導入圖片()
83
+            PA = 樣品單抬頭_dgv.Rows(0).Cells("中文樣品單鞋圖").Value : SQL_中文樣品單批量列印清單導入圖片()
93 84
             While dr.Read() = True
94 85
                 Dim unused As Byte() = New Byte(-1) {}
95 86
                 Dim bytes As Byte() = DirectCast(dr.Item("圖片"), Byte())
96 87
                 Dim oStream As New MemoryStream(bytes)
97 88
                 PictureBox2.Image = Bitmap.FromStream(oStream)
98
-            End While
99
-            conn.Close()
100
-        Catch ex As Exception
101
-            MsgBox(ex.Message)
102
-        End Try
89
+            End While : conn.Close()
90
+        Catch ex As Exception : MsgBox(ex.Message) : End Try
103 91
     End Sub
104 92
     Private Sub Set_中底LOGO導入()
105 93
         Try
106
-            PA = DataGridView1.Rows(0).Cells("中文樣品單中底LOGO").Value
107
-            SQL_中文樣品單批量列印清單導入圖片()
94
+            PA = 樣品單抬頭_dgv.Rows(0).Cells("中文樣品單中底LOGO").Value : SQL_中文樣品單批量列印清單導入圖片()
108 95
             While dr.Read() = True
109 96
                 Dim unused As Byte() = New Byte(-1) {}
110 97
                 Dim bytes As Byte() = DirectCast(dr.Item("圖片"), Byte())
111 98
                 Dim oStream As New MemoryStream(bytes)
112 99
                 PictureBox4.Image = Bitmap.FromStream(oStream)
113
-            End While
114
-            conn.Close()
115
-        Catch ex As Exception
116
-            MsgBox(ex.Message)
117
-        End Try
100
+            End While : conn.Close()
101
+        Catch ex As Exception : MsgBox(ex.Message) : End Try
118 102
     End Sub
119 103
     Private Sub Set_其他LOGO導入()
120 104
         Try
121
-            PA = DataGridView1.Rows(0).Cells("中文樣品單其他LOGO").Value
122
-            SQL_中文樣品單批量列印清單導入圖片()
105
+            PA = 樣品單抬頭_dgv.Rows(0).Cells("中文樣品單其他LOGO").Value : SQL_中文樣品單批量列印清單導入圖片()
123 106
             While dr.Read() = True
124 107
                 Dim unused As Byte() = New Byte(-1) {}
125 108
                 Dim bytes As Byte() = DirectCast(dr.Item("圖片"), Byte())
126 109
                 Dim oStream As New MemoryStream(bytes)
127 110
                 PictureBox5.Image = Bitmap.FromStream(oStream)
128
-            End While
129
-            conn.Close()
130
-        Catch ex As Exception
131
-            MsgBox(ex.Message)
132
-        End Try
111
+            End While : conn.Close()
112
+        Catch ex As Exception : MsgBox(ex.Message) : End Try
133 113
     End Sub
134 114
     Private Sub Set_圖片2()
135 115
         Dim ds6 As New DataSet
@@ -152,22 +132,17 @@ Public Class 列印_中文樣品單
152 132
     End Sub
153 133
     Private Sub 列印_中文樣品單_Load(sender As Object, e As EventArgs) Handles MyBase.Load
154 134
         Try
155
-            Set_圖片2()
156
-            FormBorderStyle = FormBorderStyle.SizableToolWindow : ControlBox = False
157
-            SQL_列印_中文樣品單讀取()
135
+            Set_圖片2() : FormBorderStyle = FormBorderStyle.SizableToolWindow : ControlBox = False : SQL_列印_中文樣品單讀取()
158 136
             While dr.Read() = True
159 137
                 Dim unused As Byte() = New Byte(-1) {}
160 138
                 Dim bytes As Byte() = DirectCast(dr.Item("圖片"), Byte())
161 139
                 Dim oStream As New MemoryStream(bytes)
162 140
                 PictureBox3.Image = Bitmap.FromStream(oStream)
163
-            End While
164
-            conn.Close()
165
-            Set_訂單清單1() : Set_訂單清單2() : Set_訂單清單3() : Set_產地標圖片導入() : Set_設計圖圖片導入() : Set_中底LOGO導入() : Set_其他LOGO導入()
166
-            DataGridView1.Visible = False : DataGridView2.Visible = False : DataGridView3.Visible = False : DataGridView4.Visible = False
141
+            End While : conn.Close()
142
+            Set_訂單清單1() : Set_訂單清單2() : Set_訂單清單3() : Set_產地標圖片導入() : Set_設計圖圖片導入() : Set_中底LOGO導入() : Set_其他LOGO導入() : Set_訂單清單4()
143
+            樣品單抬頭_dgv.Visible = False : 樣品單控制表_dgv.Visible = False : 樣品單明細表_dgv.Visible = False : 明細表分頁_dgv.Visible = False
167 144
             PictureBox1.Visible = False : PictureBox2.Visible = False : PictureBox3.Visible = False : PictureBox4.Visible = False : PictureBox5.Visible = False
168
-        Catch ex As Exception
169
-            MsgBox(ex.Message)
170
-        End Try
145
+        Catch ex As Exception : MsgBox(ex.Message) : End Try
171 146
     End Sub
172 147
     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles 取消列印_bt.Click
173 148
         列印用SQL = "" : Me.Close()
@@ -184,46 +159,44 @@ Public Class 列印_中文樣品單
184 159
             ElseIf 開發部門 = True And 確認部門 = False Then
185 160
                 xlSheet.Cells(2, 1) = "                                           " & QA & " SPEC"
186 161
             End If
187
-            xlSheet.Cells(2, 7) = "DEVELOPER : " & DataGridView1.Rows(0).Cells("DEVELOPER").Value
188
-            xlSheet.Cells(3, 1) = "品牌" : xlSheet.Cells(3, 2) = DataGridView1.Rows(0).Cells("品牌").Value
189
-            xlSheet.Cells(4, 1) = "季節" : xlSheet.Cells(4, 2) = DataGridView1.Rows(0).Cells("季節").Value
190
-            xlSheet.Cells(5, 1) = "工廠" : xlSheet.Cells(5, 2) = DataGridView1.Rows(0).Cells("工廠").Value
191
-            xlSheet.Cells(6, 1) = "楦頭#" : xlSheet.Cells(6, 2) = DataGridView1.Rows(0).Cells("楦頭").Value
192
-            xlSheet.Cells(7, 1) = "CONSTRUCTION" : xlSheet.Cells(7, 2) = DataGridView1.Rows(0).Cells("Construction").Value
193
-            xlSheet.Cells(8, 1) = "型體名字" : xlSheet.Cells(8, 2) = DataGridView1.Rows(0).Cells("型體名").Value
194
-            xlSheet.Cells(9, 1) = "型體號碼" : xlSheet.Cells(9, 2) = DataGridView1.Rows(0).Cells("型體號碼").Value
162
+            xlSheet.Cells(2, 7) = "DEVELOPER : " & 樣品單抬頭_dgv.Rows(0).Cells("DEVELOPER").Value
163
+            xlSheet.Cells(3, 1) = "品牌" : xlSheet.Cells(3, 2) = 樣品單抬頭_dgv.Rows(0).Cells("品牌").Value
164
+            xlSheet.Cells(4, 1) = "季節" : xlSheet.Cells(4, 2) = 樣品單抬頭_dgv.Rows(0).Cells("季節").Value
165
+            xlSheet.Cells(5, 1) = "工廠" : xlSheet.Cells(5, 2) = 樣品單抬頭_dgv.Rows(0).Cells("工廠").Value
166
+            xlSheet.Cells(6, 1) = "楦頭#" : xlSheet.Cells(6, 2) = 樣品單抬頭_dgv.Rows(0).Cells("楦頭").Value
167
+            xlSheet.Cells(7, 1) = "CONSTRUCTION" : xlSheet.Cells(7, 2) = 樣品單抬頭_dgv.Rows(0).Cells("Construction").Value
168
+            xlSheet.Cells(8, 1) = "型體名字" : xlSheet.Cells(8, 2) = 樣品單抬頭_dgv.Rows(0).Cells("型體名").Value
169
+            xlSheet.Cells(9, 1) = "型體號碼" : xlSheet.Cells(9, 2) = 樣品單抬頭_dgv.Rows(0).Cells("型體號碼").Value
195 170
             xlSheet.Cells(11, 1) = "顏色(COLOR DESCRIPTION)" : xlSheet.Cells(12, 1) = "訂單顏色(COLOR CODE)"
196 171
             xlSheet.Cells(13, 1) = "項目編號(ITEM NUMBER)" : xlSheet.Cells(14, 1) = "数量:双(PAIRS)"
197 172
 
198 173
             xlSheet.Cells(3, 4) = "新型體" : xlSheet.Cells(3, 5) = "舊型體"
199
-            xlSheet.Cells(3, 6) = "舊形體季別:" & DataGridView1.Rows(0).Cells("舊型體季別").Value
200
-            xlSheet.Cells(3, 7) = "日期:" & DataGridView1.Rows(0).Cells("日期").Value
201
-            xlSheet.Cells(10, 1) = DataGridView1.Rows(0).Cells("貼標印刷分類").Value & " 
202
-" & DataGridView1.Rows(0).Cells("内里印刷").Value
174
+            xlSheet.Cells(3, 6) = "舊形體季別:" & 樣品單抬頭_dgv.Rows(0).Cells("舊型體季別").Value
175
+            xlSheet.Cells(3, 7) = "日期:" & 樣品單抬頭_dgv.Rows(0).Cells("日期").Value
176
+            xlSheet.Cells(10, 1) = 樣品單抬頭_dgv.Rows(0).Cells("貼標印刷分類").Value & " 
177
+" & 樣品單抬頭_dgv.Rows(0).Cells("内里印刷").Value
203 178
         Catch ex As Exception
204 179
             MsgBox(ex.Message)
205 180
         End Try
206 181
     End Sub
207 182
     Private Sub 循環列印2()
208 183
         Try
209
-            For i As Integer = 0 To DataGridView3.Rows.Count - 1
210
-                xlSheet.Cells(15 + 位置1, 2) = DataGridView3.Rows(i).Cells("細項").Value
184
+            For i As Integer = 0 To 樣品單明細表_dgv.Rows.Count - 1
185
+                xlSheet.Cells(15 + 位置1, 2) = 樣品單明細表_dgv.Rows(i).Cells("細項").Value
211 186
                 xlSheet.Cells(15 + 位置1 + 1, 2) = "廠商"
212 187
                 位置1 += 2
213
-                If DataGridView3.Rows(i).Cells("樣品流水號二").Value = 1 Then
188
+                If 樣品單明細表_dgv.Rows(i).Cells("樣品流水號二").Value = 1 Then
214 189
                     面料數 += 1
215
-                ElseIf DataGridView3.Rows(i).Cells("樣品流水號二").Value = 2 Then
190
+                ElseIf 樣品單明細表_dgv.Rows(i).Cells("樣品流水號二").Value = 2 Then
216 191
                     內裏數 += 1
217
-                ElseIf DataGridView3.Rows(i).Cells("樣品流水號二").Value = 3 Then
192
+                ElseIf 樣品單明細表_dgv.Rows(i).Cells("樣品流水號二").Value = 3 Then
218 193
                     底部數 += 1
219
-                ElseIf DataGridView3.Rows(i).Cells("樣品流水號二").Value = 4 Then
194
+                ElseIf 樣品單明細表_dgv.Rows(i).Cells("樣品流水號二").Value = 4 Then
220 195
                     飾物數 += 1
221 196
                 End If
222 197
             Next
223 198
             位置3 = 15 + (面料數 * 2) + (內裏數 * 2) + (底部數 * 2) + (飾物數 * 2)
224
-        Catch ex As Exception
225
-            MsgBox(ex.Message)
226
-        End Try
199
+        Catch ex As Exception : MsgBox(ex.Message) : End Try
227 200
     End Sub
228 201
     Private Sub 循環列印3()
229 202
         Try
@@ -235,25 +208,14 @@ Public Class 列印_中文樣品單
235 208
             位置8 = 14 + (面料數 * 2) + (內裏數 * 2) + (底部數 * 2) + (飾物數 * 2)
236 209
             xlSheet.Cells(位置8 + 1, 1) = "備註 : "
237 210
             xlSheet.Cells(位置8 + 2, 1) = "FINISH : "
238
-        Catch ex As Exception
239
-            MsgBox(ex.Message)
240
-        End Try
211
+        Catch ex As Exception : MsgBox(ex.Message) : End Try
241 212
     End Sub
242 213
     Private Sub Button11_Click(sender As Object, e As EventArgs) Handles 確認列印_bt.Click
243 214
         Try
244
-            If 內裏印刷_ch.Checked = False And 大底貼標_ch.Checked = False And 后套里内腰印刷_ch.Checked = False Then
245
-                MsgBox("請選擇上面的選項,最少要選擇一個!!")
246
-            Else
247
-                ConnOpen()
248
-                PA8 = DataGridView1.Rows(0).Cells("樣品流水號").Value
249
-                If 內裏印刷_ch.Checked = True Then
250
-                    SQL_列印內裏印刷()
251
-                ElseIf 大底貼標_ch.Checked = True Then
252
-                    SQL_列印內裏印刷1()
253
-                ElseIf 后套里内腰印刷_ch.Checked = True Then
254
-                    SQL_列印內裏印刷2()
255
-                End If
256
-                CmdSet_For_dr() : conn.Close()
215
+            If 內裏印刷_ch.Checked = False And 大底貼標_ch.Checked = False And 后套里内腰印刷_ch.Checked = False Then : MsgBox("請選擇上面的選項,最少要選擇一個!!") : Else
216
+                ConnOpen() : PA8 = 樣品單抬頭_dgv.Rows(0).Cells("樣品流水號").Value
217
+                If 內裏印刷_ch.Checked = True Then : SQL_列印內裏印刷() : ElseIf 大底貼標_ch.Checked = True Then : SQL_列印內裏印刷1()
218
+                ElseIf 后套里内腰印刷_ch.Checked = True Then : SQL_列印內裏印刷2() : End If : CmdSet_For_dr() : conn.Close()
257 219
                 Set_訂單清單1()
258 220
 
259 221
                 xlApp = CType(CreateObject("Excel.Application"), Application)
@@ -264,83 +226,68 @@ Public Class 列印_中文樣品單
264 226
 
265 227
                 '--------------------計算樣品備註圖片分頁---------------------------------------------------------------------------------
266 228
                 Dim 分頁數量, 圖片尾數, 圖片總數 As Integer
267
-                If 中繼_dgv.Rows.Count > 0 Then
268
-                    圖片總數 = 中繼_dgv.Rows.Count : 圖片尾數 = 中繼_dgv.Rows.Count
229
+                If 中繼_dgv.Rows.Count > 0 Then : 圖片總數 = 中繼_dgv.Rows.Count : 圖片尾數 = 中繼_dgv.Rows.Count
269 230
                     For i As Integer = 1 To 10
270
-                        If 中繼_dgv.Rows.Count <= 4 Then
271
-                            分頁數量 = 1
272
-                        Else
273
-                            If 圖片尾數 <= 4 Then
274
-                                分頁數量 += 1 : Exit For
275
-                            Else
276
-                                分頁數量 += 1
277
-                                圖片尾數 = 圖片尾數 - 4
278
-                            End If
231
+                        If 中繼_dgv.Rows.Count <= 4 Then : 分頁數量 = 1 : Else
232
+                            If 圖片尾數 <= 4 Then : 分頁數量 += 1 : Exit For : Else : 分頁數量 += 1 : 圖片尾數 = 圖片尾數 - 4 : End If
279 233
                         End If
280 234
                     Next
281 235
                     '--------------------樣品單圖片列印-------------------------------------------------------------------------------------------
282 236
                     Dim SSD, DDS, FFD As Integer
283
-                    For i As Integer = 1 To 分頁數量
284
-                        xlSheet = NewMethod(xlBook)
237
+                    For i As Integer = 1 To 分頁數量 : xlSheet = NewMethod(xlBook)
285 238
                         xlApp.Sheets(1).Name = "Note Picture " & i : II(xlApp, xlSheet)
286 239
                         For ii As Integer = 0 To 中繼_dgv.Rows.Count - 1
287
-                            DGVX = SSD : 圖片清單讀取()
288
-                            SSD += 1 : DDS += 1
289
-                            If DDS = 1 Then
290
-                                HH1(xlApp, xlSheet) : FFD += 1 : If FFD = 中繼_dgv.Rows.Count Then : Exit For : End If
291
-                            ElseIf DDS = 2 Then
292
-                                HH2(xlApp, xlSheet) : FFD += 1 : If FFD = 中繼_dgv.Rows.Count Then : Exit For : End If
293
-                            ElseIf DDS = 3 Then
294
-                                HH3(xlApp, xlSheet) : FFD += 1 : If FFD = 中繼_dgv.Rows.Count Then : Exit For : End If
295
-                            ElseIf DDS = 4 Then
296
-                                HH4(xlApp, xlSheet) : DDS = 0 : FFD += 1 : Exit For
297
-                            End If
298
-                        Next
299
-                        If FFD = 中繼_dgv.Rows.Count Then : Exit For : End If
240
+                            DGVX = SSD : 圖片清單讀取() : SSD += 1 : DDS += 1
241
+                            If DDS = 1 Then : HH1(xlApp, xlSheet) : FFD += 1 : If FFD = 中繼_dgv.Rows.Count Then : Exit For : End If
242
+                            ElseIf DDS = 2 Then : HH2(xlApp, xlSheet) : FFD += 1 : If FFD = 中繼_dgv.Rows.Count Then : Exit For : End If
243
+                            ElseIf DDS = 3 Then : HH3(xlApp, xlSheet) : FFD += 1 : If FFD = 中繼_dgv.Rows.Count Then : Exit For : End If
244
+                            ElseIf DDS = 4 Then : HH4(xlApp, xlSheet) : DDS = 0 : FFD += 1 : Exit For : End If
245
+                        Next : If FFD = 中繼_dgv.Rows.Count Then : Exit For : End If
300 246
                     Next
301 247
                 End If
302 248
 
303 249
                 '--------------------計算樣品單分頁---------------------------------------------------------------------------------------
304
-                If DataGridView2.Rows.Count > 10 Then
305
-                    分頁計數 = 4 : 分頁計數1 = 9 : 第一頁 = True : 第二頁 = True : 第三頁 = True
306
-                ElseIf DataGridView2.Rows.Count > 5 Then
307
-                    分頁計數 = 4 : 分頁計數1 = DataGridView2.Rows.Count - 1 : 第一頁 = True : 第二頁 = True : 第三頁 = False
250
+                If 樣品單控制表_dgv.Rows.Count > 9 Then
251
+                    分頁計數 = 3 : 分頁計數1 = 7 : 第一頁 = True : 第二頁 = True : 第三頁 = True
252
+                ElseIf 樣品單控制表_dgv.Rows.Count > 4 Then
253
+                    分頁計數 = 3 : 分頁計數1 = 樣品單控制表_dgv.Rows.Count - 1 : 第一頁 = True : 第二頁 = True : 第三頁 = False
308 254
                 Else
309
-                    分頁計數 = DataGridView2.Rows.Count - 1 : 第一頁 = True : 第二頁 = False : 第三頁 = False
255
+                    分頁計數 = 樣品單控制表_dgv.Rows.Count - 1 : 第一頁 = True : 第二頁 = False : 第三頁 = False
310 256
                 End If
311 257
                 '--------------------樣品單列印-------------------------------------------------------------------------------------------
312 258
                 If 第一頁 = True Then
313 259
                     xlSheet = NewMethod(xlBook)
314 260
                     位置1 = 0 : 位置2 = 0 : 位置3 = 0 : 位置5 = 0 : 位置6 = 0 : 位置7 = 0 : 位置8 = 0 : 位置9 = 0 : 位置10 = 0
315 261
                     面料數 = 0 : 內裏數 = 0 : 底部數 = 0 : 飾物數 = 0
316
-                    xlApp.Sheets(1).Name = DataGridView1.Rows(0).Cells("型體號碼").Value & "第一頁"
262
+                    xlApp.Sheets(1).Name = 樣品單抬頭_dgv.Rows(0).Cells("型體號碼").Value & "第一頁"
317 263
                     xlBook.Activate()
318 264
                     xlSheet.Activate()
319 265
                     循環列印1()
320 266
                     For i As Integer = 0 To 分頁計數
321
-                        xlSheet.Cells(11, 3 + i) = DataGridView2.Rows(i).Cells("顏色").Value
322
-                        xlSheet.Cells(12, 3 + i) = DataGridView2.Rows(i).Cells("訂單顏色").Value
323
-                        xlSheet.Cells(13, 3 + i) = DataGridView2.Rows(i).Cells("ItemNumber").Value
324
-                        xlSheet.Cells(14, 3 + i) = Strings.Format(DataGridView2.Rows(i).Cells("數量1").Value, "#,##0.0") & "双"
325
-                    Next
326
-                    循環列印2()
267
+                        xlSheet.Cells(11, 4 + i) = 樣品單控制表_dgv.Rows(i).Cells("顏色").Value
268
+                        xlSheet.Cells(12, 4 + i) = 樣品單控制表_dgv.Rows(i).Cells("訂單顏色").Value
269
+                        xlSheet.Cells(13, 4 + i) = 樣品單控制表_dgv.Rows(i).Cells("ItemNumber").Value
270
+                        xlSheet.Cells(14, 4 + i) = Strings.Format(樣品單控制表_dgv.Rows(i).Cells("數量1").Value, "#,##0.0") & "双"
271
+                    Next : 循環列印2()
327 272
                     For i As Integer = 0 To 分頁計數
328
-                        Set_DGV4載入前設定()
329
-                        PA9 = DataGridView2.Rows(i).Cells("樣品流水號一").Value
330
-                        SQL_讀取列印分頁計數()
331
-                        Set_DGV4載入後設定()
273
+                        Set_DGV4載入前設定() : PA9 = 樣品單控制表_dgv.Rows(i).Cells("樣品流水號一").Value : SQL_讀取列印分頁計數() : Set_DGV4載入後設定()
332 274
                         位置2 = 0
333
-                        For ii As Integer = 0 To DataGridView4.Rows.Count - 1
334
-                            xlSheet.Cells(15 + 位置2, 3 + i) = DataGridView4.Rows(ii).Cells("內容").Value
335
-                            xlSheet.Cells(15 + 位置2 + 1, 3 + i) = DataGridView4.Rows(ii).Cells("廠商").Value
336
-                            EE(xlApp, xlSheet)
337
-                            位置2 += 2
275
+                        For ii As Integer = 0 To 明細表分頁_dgv.Rows.Count - 1
276
+                            xlSheet.Cells(15 + 位置2, 4 + i) = 明細表分頁_dgv.Rows(ii).Cells("內容").Value
277
+                            xlSheet.Cells(15 + 位置2 + 1, 4 + i) = 明細表分頁_dgv.Rows(ii).Cells("廠商").Value
278
+                            EE(xlApp, xlSheet) : 位置2 += 2
338 279
                         Next
339
-                    Next
340
-                    循環列印3()
280
+                    Next : 位置2 = 0
281
+                    For ii As Integer = 0 To 明細表分頁_dgv.Rows.Count - 1
282
+                        For iii As Integer = 0 To 敘述欄_dgv.Rows.Count - 1
283
+                            If 明細表分頁_dgv.Rows(ii).Cells("細項").Value.ToString = 敘述欄_dgv.Rows(iii).Cells("細項").Value.ToString Then
284
+                                xlSheet.Cells(15 + 位置2, 3) = 敘述欄_dgv.Rows(iii).Cells("內容").Value : Exit For
285
+                            End If
286
+                        Next : 位置2 += 2
287
+                    Next : 循環列印3()
341 288
                     For i As Integer = 0 To 分頁計數
342
-                        xlSheet.Cells(位置8 + 1, 3 + i) = DataGridView2.Rows(i).Cells("備註").Value
343
-                        xlSheet.Cells(位置8 + 2, 3 + i) = DataGridView2.Rows(i).Cells("FINISH").Value
289
+                        xlSheet.Cells(位置8 + 1, 4 + i) = 樣品單控制表_dgv.Rows(i).Cells("備註").Value
290
+                        xlSheet.Cells(位置8 + 2, 4 + i) = 樣品單控制表_dgv.Rows(i).Cells("FINISH").Value
344 291
                     Next
345 292
                     AA(xlApp, xlSheet) : BB(xlApp, xlSheet) : CC(xlApp, xlSheet) : DD(xlApp, xlSheet) : FF(xlApp, xlSheet) : GG(xlApp, xlSheet)
346 293
                 End If
@@ -349,34 +296,35 @@ Public Class 列印_中文樣品單
349 296
                     xlSheet = NewMethod(xlBook)
350 297
                     位置1 = 0 : 位置2 = 0 : 位置3 = 0 : 位置5 = 0 : 位置6 = 0 : 位置7 = 0 : 位置8 = 0 : 位置9 = 0 : 位置10 = 0
351 298
                     面料數 = 0 : 內裏數 = 0 : 底部數 = 0 : 飾物數 = 0
352
-                    xlApp.Sheets(1).Name = DataGridView1.Rows(0).Cells("型體號碼").Value & "第二頁"
299
+                    xlApp.Sheets(1).Name = 樣品單抬頭_dgv.Rows(0).Cells("型體號碼").Value & "第二頁"
353 300
                     xlBook.Activate()
354 301
                     xlSheet.Activate()
355 302
                     循環列印1()
356
-                    For i As Integer = 0 + 5 To 分頁計數1
357
-                        xlSheet.Cells(11, 3 + i - 5) = DataGridView2.Rows(i).Cells("顏色").Value
358
-                        xlSheet.Cells(12, 3 + i - 5) = DataGridView2.Rows(i).Cells("訂單顏色").Value
359
-                        xlSheet.Cells(13, 3 + i) = DataGridView2.Rows(i).Cells("ItemNumber").Value
360
-                        xlSheet.Cells(14, 3 + i - 5) = Strings.Format(DataGridView2.Rows(i).Cells("數量1").Value, "#,##0.0") & "双"
361
-                    Next
362
-                    循環列印2()
363
-                    For i As Integer = 0 + 5 To 分頁計數1
364
-                        Set_DGV4載入前設定()
365
-                        PA9 = DataGridView2.Rows(i).Cells("樣品流水號一").Value
366
-                        SQL_讀取列印分頁計數()
367
-                        Set_DGV4載入後設定()
303
+                    For i As Integer = 0 + 4 To 分頁計數1
304
+                        xlSheet.Cells(11, 4 + i - 4) = 樣品單控制表_dgv.Rows(i).Cells("顏色").Value
305
+                        xlSheet.Cells(12, 4 + i - 4) = 樣品單控制表_dgv.Rows(i).Cells("訂單顏色").Value
306
+                        xlSheet.Cells(13, 4 + i) = 樣品單控制表_dgv.Rows(i).Cells("ItemNumber").Value
307
+                        xlSheet.Cells(14, 4 + i - 4) = Strings.Format(樣品單控制表_dgv.Rows(i).Cells("數量1").Value, "#,##0.0") & "双"
308
+                    Next : 循環列印2()
309
+                    For i As Integer = 0 + 4 To 分頁計數1
310
+                        Set_DGV4載入前設定() : PA9 = 樣品單控制表_dgv.Rows(i).Cells("樣品流水號一").Value : SQL_讀取列印分頁計數() : Set_DGV4載入後設定()
368 311
                         位置2 = 0
369
-                        For ii As Integer = 0 To DataGridView4.Rows.Count - 1
370
-                            xlSheet.Cells(15 + 位置2, 3 + i - 5) = DataGridView4.Rows(ii).Cells("內容").Value
371
-                            xlSheet.Cells(15 + 位置2 + 1, 3 + i - 5) = DataGridView4.Rows(ii).Cells("廠商").Value
372
-                            EE(xlApp, xlSheet)
373
-                            位置2 += 2
312
+                        For ii As Integer = 0 To 明細表分頁_dgv.Rows.Count - 1
313
+                            xlSheet.Cells(15 + 位置2, 4 + i - 4) = 明細表分頁_dgv.Rows(ii).Cells("內容").Value
314
+                            xlSheet.Cells(15 + 位置2 + 1, 4 + i - 4) = 明細表分頁_dgv.Rows(ii).Cells("廠商").Value
315
+                            EE(xlApp, xlSheet) : 位置2 += 2
374 316
                         Next
375
-                    Next
376
-                    循環列印3()
377
-                    For i As Integer = 0 + 5 To 分頁計數1
378
-                        xlSheet.Cells(位置8 + 1, 3 + i - 5) = DataGridView2.Rows(i).Cells("備註").Value
379
-                        xlSheet.Cells(位置8 + 2, 3 + i - 5) = DataGridView2.Rows(i).Cells("FINISH").Value
317
+                    Next : 位置2 = 0
318
+                    For ii As Integer = 0 To 明細表分頁_dgv.Rows.Count - 1
319
+                        For iii As Integer = 0 To 敘述欄_dgv.Rows.Count - 1
320
+                            If 明細表分頁_dgv.Rows(ii).Cells("細項").Value.ToString = 敘述欄_dgv.Rows(iii).Cells("細項").Value.ToString Then
321
+                                xlSheet.Cells(15 + 位置2, 3) = 敘述欄_dgv.Rows(iii).Cells("內容").Value : Exit For
322
+                            End If
323
+                        Next : 位置2 += 2
324
+                    Next : 循環列印3()
325
+                    For i As Integer = 0 + 4 To 分頁計數1
326
+                        xlSheet.Cells(位置8 + 1, 4 + i - 4) = 樣品單控制表_dgv.Rows(i).Cells("備註").Value
327
+                        xlSheet.Cells(位置8 + 2, 4 + i - 4) = 樣品單控制表_dgv.Rows(i).Cells("FINISH").Value
380 328
                     Next
381 329
                     AA(xlApp, xlSheet) : BB(xlApp, xlSheet) : CC(xlApp, xlSheet) : DD(xlApp, xlSheet) : FF(xlApp, xlSheet) : GG(xlApp, xlSheet)
382 330
                 End If
@@ -385,56 +333,49 @@ Public Class 列印_中文樣品單
385 333
                     xlSheet = NewMethod(xlBook)
386 334
                     位置1 = 0 : 位置2 = 0 : 位置3 = 0 : 位置5 = 0 : 位置6 = 0 : 位置7 = 0 : 位置8 = 0 : 位置9 = 0 : 位置10 = 0
387 335
                     面料數 = 0 : 內裏數 = 0 : 底部數 = 0 : 飾物數 = 0
388
-                    xlApp.Sheets(1).Name = DataGridView1.Rows(0).Cells("型體號碼").Value & "第三頁"
336
+                    xlApp.Sheets(1).Name = 樣品單抬頭_dgv.Rows(0).Cells("型體號碼").Value & "第三頁"
389 337
                     xlBook.Activate()
390 338
                     xlSheet.Activate()
391 339
                     循環列印1()
392
-                    For i As Integer = 0 + 10 To DataGridView2.Rows.Count - 1
393
-                        xlSheet.Cells(11, 3 + i - 10) = DataGridView2.Rows(i).Cells("顏色").Value
394
-                        xlSheet.Cells(12, 3 + i - 10) = DataGridView2.Rows(i).Cells("訂單顏色").Value
395
-                        xlSheet.Cells(13, 3 + i) = DataGridView2.Rows(i).Cells("ItemNumber").Value
396
-                        xlSheet.Cells(14, 3 + i - 10) = Strings.Format(DataGridView2.Rows(i).Cells("數量1").Value, "#,##0.0") & "双"
397
-                    Next
398
-                    循環列印2()
399
-                    For i As Integer = 0 + 10 To DataGridView2.Rows.Count - 1
400
-                        Set_DGV4載入前設定()
401
-                        PA9 = DataGridView2.Rows(i).Cells("樣品流水號一").Value
402
-                        SQL_讀取列印分頁計數()
403
-
404
-                        Set_DGV4載入後設定()
340
+                    For i As Integer = 0 + 8 To 樣品單控制表_dgv.Rows.Count - 1
341
+                        xlSheet.Cells(11, 4 + i - 8) = 樣品單控制表_dgv.Rows(i).Cells("顏色").Value
342
+                        xlSheet.Cells(12, 4 + i - 8) = 樣品單控制表_dgv.Rows(i).Cells("訂單顏色").Value
343
+                        xlSheet.Cells(13, 4 + i) = 樣品單控制表_dgv.Rows(i).Cells("ItemNumber").Value
344
+                        xlSheet.Cells(14, 4 + i - 8) = Strings.Format(樣品單控制表_dgv.Rows(i).Cells("數量1").Value, "#,##0.0") & "双"
345
+                    Next : 循環列印2()
346
+                    For i As Integer = 0 + 8 To 樣品單控制表_dgv.Rows.Count - 1
347
+                        Set_DGV4載入前設定() : PA9 = 樣品單控制表_dgv.Rows(i).Cells("樣品流水號一").Value : SQL_讀取列印分頁計數() : Set_DGV4載入後設定()
405 348
                         位置2 = 0
406
-                        For ii As Integer = 0 To DataGridView4.Rows.Count - 1
407
-                            xlSheet.Cells(15 + 位置2, 3 + i - 10) = DataGridView4.Rows(ii).Cells("內容").Value
408
-                            xlSheet.Cells(15 + 位置2 + 1, 3 + i - 10) = DataGridView4.Rows(ii).Cells("廠商").Value
409
-                            EE(xlApp, xlSheet)
410
-                            位置2 += 2
349
+                        For ii As Integer = 0 To 明細表分頁_dgv.Rows.Count - 1
350
+                            xlSheet.Cells(15 + 位置2, 4 + i - 8) = 明細表分頁_dgv.Rows(ii).Cells("內容").Value
351
+                            xlSheet.Cells(15 + 位置2 + 1, 4 + i - 8) = 明細表分頁_dgv.Rows(ii).Cells("廠商").Value
352
+                            EE(xlApp, xlSheet) : 位置2 += 2
411 353
                         Next
412
-                    Next
413
-                    循環列印3()
414
-                    For i As Integer = 0 + 10 To DataGridView2.Rows.Count - 1
415
-                        xlSheet.Cells(位置8 + 1, 3 + i - 10) = DataGridView2.Rows(i).Cells("備註").Value
416
-                        xlSheet.Cells(位置8 + 2, 3 + i - 10) = DataGridView2.Rows(i).Cells("FINISH").Value
417
-                    Next
418
-                    AA(xlApp, xlSheet) : BB(xlApp, xlSheet) : CC(xlApp, xlSheet) : DD(xlApp, xlSheet) : FF(xlApp, xlSheet) : GG(xlApp, xlSheet)
354
+                    Next : 位置2 = 0
355
+                    For ii As Integer = 0 To 明細表分頁_dgv.Rows.Count - 1
356
+                        For iii As Integer = 0 To 敘述欄_dgv.Rows.Count - 1
357
+                            If 明細表分頁_dgv.Rows(ii).Cells("細項").Value.ToString = 敘述欄_dgv.Rows(iii).Cells("細項").Value.ToString Then
358
+                                xlSheet.Cells(15 + 位置2, 3) = 敘述欄_dgv.Rows(iii).Cells("內容").Value : Exit For
359
+                            End If
360
+                        Next : 位置2 += 2
361
+                    Next : 循環列印3()
362
+                    For i As Integer = 0 + 8 To 樣品單控制表_dgv.Rows.Count - 1
363
+                        xlSheet.Cells(位置8 + 1, 4 + i - 8) = 樣品單控制表_dgv.Rows(i).Cells("備註").Value
364
+                        xlSheet.Cells(位置8 + 2, 4 + i - 8) = 樣品單控制表_dgv.Rows(i).Cells("FINISH").Value
365
+                    Next : AA(xlApp, xlSheet) : BB(xlApp, xlSheet) : CC(xlApp, xlSheet) : DD(xlApp, xlSheet) : FF(xlApp, xlSheet) : GG(xlApp, xlSheet)
419 366
                 End If
420 367
 
421
-                If 第一頁 = True And 第二頁 = False And 第三頁 = False Then
422
-                    xlApp.Sheets(2 + 分頁數量).Delete
423
-                ElseIf 第一頁 = True And 第二頁 = True And 第三頁 = False Then
424
-                    xlApp.Sheets(3 + 分頁數量).Delete
425
-                ElseIf 第一頁 = True And 第二頁 = True And 第三頁 = True Then
426
-                    xlApp.Sheets(4 + 分頁數量).Delete
427
-                End If
368
+                If 第一頁 = True And 第二頁 = False And 第三頁 = False Then : xlApp.Sheets(2 + 分頁數量).Delete
369
+                ElseIf 第一頁 = True And 第二頁 = True And 第三頁 = False Then : xlApp.Sheets(3 + 分頁數量).Delete
370
+                ElseIf 第一頁 = True And 第二頁 = True And 第三頁 = True Then : xlApp.Sheets(4 + 分頁數量).Delete : End If
428 371
 
429 372
                 xlSheet.PageSetup.PrintArea = ""
430 373
                 xlApp.Cells.Select()
431 374
                 xlApp.Application.WindowState = xlMinimized
432 375
                 MsgBox("列印完成")
433 376
                 Me.Close()
434
-                End If
435
-        Catch ex As Exception
436
-            MsgBox(ex.Message)
437
-        End Try
377
+            End If
378
+        Catch ex As Exception : MsgBox(ex.Message) : End Try
438 379
     End Sub
439 380
     Private Sub AA(ByVal myExcel As Application, ByVal xlSheet As Worksheet)
440 381
         myExcel.ActiveWindow.DisplayGridlines = False
@@ -564,7 +505,7 @@ Public Class 列印_中文樣品單
564 505
         xlSheet.Range("A11:G14").Select() : With myExcel.Selection.Interior
565 506
             .Pattern = xlSolid : .PatternColorIndex = xlAutomatic : .ThemeColor = xlThemeColorDark1 : .TintAndShade = -0.249977111117893 : .PatternTintAndShade = 0 : End With
566 507
 
567
-        If DataGridView1.Rows(0).Cells("新舊形體").Value = True Then
508
+        If 樣品單抬頭_dgv.Rows(0).Cells("新舊形體").Value = True Then
568 509
             xlSheet.Range("D3").Select()
569 510
             With myExcel.Selection.Interior : .Pattern = xlSolid : .PatternColorIndex = xlAutomatic : .Color = 65535 : .TintAndShade = 0 : .PatternTintAndShade = 0 : End With
570 511
         Else
@@ -709,12 +650,27 @@ Public Class 列印_中文樣品單
709 650
         With myExcel.Selection.Font : .Name = "Microsoft YaHei UI" : .Size = 10 : .Strikethrough = False : .Superscript = False : .Subscript = False : .OutlineFont = False : .Shadow = False
710 651
             .Underline = xlUnderlineStyleNone : .ThemeColor = xlThemeColorLight1 : .TintAndShade = 0 : .ThemeFont = xlThemeFontNone : End With
711 652
 
653
+        xlSheet.Range("C11:C14").Select()
654
+        With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0
655
+            .AddIndent = False : .IndentLevel = 0 : .ReadingOrder = xlContext : .MergeCells = False : End With
656
+        myExcel.Selection.Merge : myExcel.ActiveCell.FormulaR1C1 = "材料敘述"
657
+
658
+        myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
659
+        With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
660
+        With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
661
+        With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
662
+        With myExcel.Selection.Borders(xlEdgeRight) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
663
+        myExcel.Selection.Borders(xlInsideVertical).LineStyle = xlNone : myExcel.Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
664
+
665
+        xlSheet.Range("C11:C14").Select()
666
+        With myExcel.Selection.Font : .Name = "微軟正黑體" : .Size = 18 : End With
667
+
712 668
         myExcel.Application.PrintCommunication = False
713 669
         With myExcel.ActiveSheet.PageSetup : .PrintTitleRows = "" : .PrintTitleColumns = "" : End With
714 670
         myExcel.Application.PrintCommunication = True : myExcel.ActiveSheet.PageSetup.PrintArea = "" : myExcel.Application.PrintCommunication = False
715 671
         With myExcel.ActiveSheet.PageSetup
716 672
             .LeftHeader = "" : .CenterHeader = "" : .RightHeader = "" : .LeftFooter = ""
717
-            .CenterFooter = "&""微軟正黑體,標準""&10製作人: " & DataGridView1.Rows(0).Cells("制表人").Value & " &D" : .RightFooter = "&""微軟正黑體,標準""&10 第 &P 頁"
673
+            .CenterFooter = "&""微軟正黑體,標準""&10製作人: " & 樣品單抬頭_dgv.Rows(0).Cells("制表人").Value & " &D" : .RightFooter = "&""微軟正黑體,標準""&10 第 &P 頁"
718 674
             .LeftMargin = myExcel.Application.InchesToPoints(0.236220472440945) : .RightMargin = myExcel.Application.InchesToPoints(0.236220472440945)
719 675
             .TopMargin = myExcel.Application.InchesToPoints(0.748031496062992) : .BottomMargin = myExcel.Application.InchesToPoints(0.748031496062992)
720 676
             .HeaderMargin = myExcel.Application.InchesToPoints(0.31496062992126) : .FooterMargin = myExcel.Application.InchesToPoints(0.31496062992126)
@@ -737,7 +693,7 @@ Public Class 列印_中文樣品單
737 693
         myExcel.Selection.ShapeRange.IncrementTop(5)
738 694
     End Sub
739 695
     Private Sub CC(ByVal myExcel As Application, ByVal xlSheet As Worksheet)
740
-        If DataGridView1.Rows(0).Cells("中文樣品單產地標").Value = "" Then
696
+        If 樣品單抬頭_dgv.Rows(0).Cells("中文樣品單產地標").Value = "" Then
741 697
         Else
742 698
             Clipboard.SetDataObject(PictureBox1.Image)
743 699
             xlSheet.Range("D4").Select()
@@ -754,7 +710,7 @@ Public Class 列印_中文樣品單
754 710
         End If
755 711
     End Sub
756 712
     Private Sub DD(ByVal myExcel As Application, ByVal xlSheet As Worksheet)
757
-        If DataGridView1.Rows(0).Cells("中文樣品單鞋圖").Value = "" Then
713
+        If 樣品單抬頭_dgv.Rows(0).Cells("中文樣品單鞋圖").Value = "" Then
758 714
         Else
759 715
             Clipboard.SetDataObject(PictureBox2.Image)
760 716
             xlSheet.Range("F4").Select()
@@ -765,7 +721,7 @@ Public Class 列印_中文樣品單
765 721
         End If
766 722
     End Sub
767 723
     Private Sub FF(ByVal myExcel As Application, ByVal xlSheet As Worksheet)
768
-        If DataGridView1.Rows(0).Cells("中文樣品單中底LOGO").Value = "" Then
724
+        If 樣品單抬頭_dgv.Rows(0).Cells("中文樣品單中底LOGO").Value = "" Then
769 725
         Else
770 726
             Clipboard.SetDataObject(PictureBox4.Image)
771 727
             xlSheet.Range("D8").Select()
@@ -776,7 +732,7 @@ Public Class 列印_中文樣品單
776 732
         End If
777 733
     End Sub
778 734
     Private Sub GG(ByVal myExcel As Application, ByVal xlSheet As Worksheet)
779
-        If DataGridView1.Rows(0).Cells("中文樣品單其他LOGO").Value = "" Then
735
+        If 樣品單抬頭_dgv.Rows(0).Cells("中文樣品單其他LOGO").Value = "" Then
780 736
         Else
781 737
             Clipboard.SetDataObject(PictureBox5.Image)
782 738
             xlSheet.Range("E8").Select()
@@ -840,26 +796,13 @@ Public Class 列印_中文樣品單
840 796
         myExcel.ActiveWindow.DisplayGridlines = False
841 797
         xlSheet.Range("A1").Select()
842 798
     End Sub
843
-    Private Sub CheckBox1_CheckedChanged(sender As Object, e As EventArgs) Handles 內裏印刷_ch.Click
844
-        Try
845
-            If 內裏印刷_ch.Checked = True Then
846
-                內裏印刷_ch.Checked = True : 大底貼標_ch.Checked = False
847
-            Else
848
-                內裏印刷_ch.Checked = False : 大底貼標_ch.Enabled = True
849
-            End If
850
-        Catch ex As Exception
851
-            MsgBox(ex.Message)
852
-        End Try
799
+    Private Sub 后套里内腰印刷_ch_CheckedChanged(sender As Object, e As EventArgs) Handles 后套里内腰印刷_ch.Click
800
+        內裏印刷_ch.Checked = False : 大底貼標_ch.Checked = False : 后套里内腰印刷_ch.Checked = True
853 801
     End Sub
854
-    Private Sub CheckBox2_CheckedChanged(sender As Object, e As EventArgs) Handles 大底貼標_ch.Click
855
-        Try
856
-            If 大底貼標_ch.Checked = True Then
857
-                內裏印刷_ch.Checked = False : 大底貼標_ch.Checked = True
858
-            Else
859
-                內裏印刷_ch.Checked = True : 大底貼標_ch.Enabled = False
860
-            End If
861
-        Catch ex As Exception
862
-            MsgBox(ex.Message)
863
-        End Try
802
+    Private Sub 內裏印刷_ch_CheckedChanged(sender As Object, e As EventArgs) Handles 內裏印刷_ch.Click
803
+        內裏印刷_ch.Checked = True : 大底貼標_ch.Checked = False : 后套里内腰印刷_ch.Checked = False
804
+    End Sub
805
+    Private Sub 大底貼標_ch_CheckedChanged(sender As Object, e As EventArgs) Handles 大底貼標_ch.Click
806
+        內裏印刷_ch.Checked = False : 大底貼標_ch.Checked = True : 后套里内腰印刷_ch.Checked = False
864 807
     End Sub
865 808
 End Class

Notiek ielāde…
Atcelt
Saglabāt