B70340 1 year ago
parent
commit
51300cf679
48 changed files with 1046 additions and 915 deletions
  1. BIN
      .vs/TENDEN-MES-SYS/FileContentIndex/28844961-24fb-4d5f-a801-97a4bec60874.vsidx
  2. BIN
      .vs/TENDEN-MES-SYS/FileContentIndex/3c189f26-99e1-47ae-a407-35435f60b9e9.vsidx
  3. BIN
      .vs/TENDEN-MES-SYS/FileContentIndex/401bc41e-60de-433c-9b2e-a3fbdf8e0113.vsidx
  4. BIN
      .vs/TENDEN-MES-SYS/FileContentIndex/91adbb6a-dbeb-4f01-9e99-93f809c3c675.vsidx
  5. BIN
      .vs/TENDEN-MES-SYS/FileContentIndex/b5b08675-32f3-4ea4-85d4-67bd14ef1497.vsidx
  6. BIN
      .vs/TENDEN-MES-SYS/FileContentIndex/f7e5260a-23c2-4cff-8ea3-6771fb0beae1.vsidx
  7. BIN
      .vs/TENDEN-MES-SYS/v17/.suo
  8. BIN
      .vs/TENDEN-MES-SYS/v17/HierarchyCache.v1.txt
  9. 29
    21
      TENDEN-MES-SYS/0、Module/SQL_圖片資料庫管理.vb
  10. 18
    10
      TENDEN-MES-SYS/0、Module/SQL_成本系統管理.vb
  11. 1
    1
      TENDEN-MES-SYS/0、Module/全域變數.vb
  12. 1
    1
      TENDEN-MES-SYS/2、成本系統管理/出貨銷帳明細表.Designer.vb
  13. 46
    25
      TENDEN-MES-SYS/2、成本系統管理/出貨銷帳明細表.vb
  14. 38
    7
      TENDEN-MES-SYS/2、成本系統管理/列印_訂單價格利潤表.Designer.vb
  15. 133
    124
      TENDEN-MES-SYS/2、成本系統管理/列印_訂單價格利潤表.vb
  16. 58
    58
      TENDEN-MES-SYS/4、量產訂單管理/量產訂單系統/訂單控制表.Designer.vb
  17. 15
    7
      TENDEN-MES-SYS/4、量產訂單管理/量產訂單系統/訂單控制表.vb
  18. 101
    41
      TENDEN-MES-SYS/4、量產訂單管理/量產訂單系統/量產訂單輸入.Designer.vb
  19. 73
    36
      TENDEN-MES-SYS/4、量產訂單管理/量產訂單系統/量產訂單輸入.vb
  20. 69
    61
      TENDEN-MES-SYS/6、圖片資料庫管理/驗貨報告系統/驗貨報告圖片導入資料庫.Designer.vb
  21. 39
    36
      TENDEN-MES-SYS/6、圖片資料庫管理/驗貨報告系統/驗貨報告圖片導入資料庫.vb
  22. 120
    42
      TENDEN-MES-SYS/6、圖片資料庫管理/驗貨報告系統/驗貨報告資料庫.Designer.vb
  23. 103
    54
      TENDEN-MES-SYS/6、圖片資料庫管理/驗貨報告系統/驗貨報告資料庫.vb
  24. 49
    262
      TENDEN-MES-SYS/8、樣品訂單管理/系統列印介面/列印_中文樣品單.vb
  25. 57
    56
      TENDEN-MES-SYS/9、資料庫系統管理/系統編碼原則.Designer.vb
  26. 4
    3
      TENDEN-MES-SYS/9、資料庫系統管理/系統編碼原則.vb
  27. 10
    24
      TENDEN-MES-SYS/LoginForm1vb.vb
  28. 10
    0
      TENDEN-MES-SYS/My Project/Resources.Designer.vb
  29. 45
    42
      TENDEN-MES-SYS/My Project/Resources.resx
  30. 15
    2
      TENDEN-MES-SYS/TENDEN_MES_SYS.vb
  31. 0
    0
      TENDEN-MES-SYS/bin/Debug/NOTAUTO.txt
  32. BIN
      TENDEN-MES-SYS/bin/Debug/TENDEN-ERP-SYS.exe
  33. BIN
      TENDEN-MES-SYS/bin/Debug/TENDEN-ERP-SYS.pdb
  34. 5
    0
      TENDEN-MES-SYS/bin/Debug/TENDEN-ERP-SYS.xml
  35. BIN
      TENDEN-MES-SYS/obj/Debug/DesignTimeResolveAssemblyReferences.cache
  36. BIN
      TENDEN-MES-SYS/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  37. BIN
      TENDEN-MES-SYS/obj/Debug/TENDEN-ERP-SYS.exe
  38. BIN
      TENDEN-MES-SYS/obj/Debug/TENDEN-ERP-SYS.pdb
  39. 5
    0
      TENDEN-MES-SYS/obj/Debug/TENDEN-ERP-SYS.xml
  40. BIN
      TENDEN-MES-SYS/obj/Debug/TempPE/My Project.Resources.Designer.vb.dll
  41. BIN
      TENDEN-MES-SYS/obj/Debug/天盾國際管理系統.Resources.resources
  42. BIN
      TENDEN-MES-SYS/obj/Debug/天盾系統.vbproj.AssemblyReference.cache
  43. 1
    1
      TENDEN-MES-SYS/obj/Debug/天盾系統.vbproj.CoreCompileInputs.cache
  44. 0
    1
      TENDEN-MES-SYS/obj/Debug/天盾系統.vbproj.FileListAbsolute.txt
  45. BIN
      TENDEN-MES-SYS/obj/Debug/天盾系統.vbproj.GenerateResource.cache
  46. 0
    0
      TENDEN-MES-SYS/obj/Debug/天盾系統.vbproj.SuggestedBindingRedirects.cache
  47. BIN
      TENDEN-MES-SYS/圖片/PDF.png
  48. 1
    0
      TENDEN-MES-SYS/天盾系統.vbproj

BIN
.vs/TENDEN-MES-SYS/FileContentIndex/28844961-24fb-4d5f-a801-97a4bec60874.vsidx View File


BIN
.vs/TENDEN-MES-SYS/FileContentIndex/3c189f26-99e1-47ae-a407-35435f60b9e9.vsidx View File


BIN
.vs/TENDEN-MES-SYS/FileContentIndex/401bc41e-60de-433c-9b2e-a3fbdf8e0113.vsidx View File


BIN
.vs/TENDEN-MES-SYS/FileContentIndex/91adbb6a-dbeb-4f01-9e99-93f809c3c675.vsidx View File


BIN
.vs/TENDEN-MES-SYS/FileContentIndex/b5b08675-32f3-4ea4-85d4-67bd14ef1497.vsidx View File


BIN
.vs/TENDEN-MES-SYS/FileContentIndex/f7e5260a-23c2-4cff-8ea3-6771fb0beae1.vsidx View File


BIN
.vs/TENDEN-MES-SYS/v17/.suo View File


BIN
.vs/TENDEN-MES-SYS/v17/HierarchyCache.v1.txt View File


+ 29
- 21
TENDEN-MES-SYS/0、Module/SQL_圖片資料庫管理.vb View File

@@ -22,11 +22,13 @@
22 22
         ConnOpen() : SQL1 = "SELECT  TOP (1) 圖片資料庫  FROM  圖片資料庫管理  WHERE  (是否可用 = 0)  ORDER BY  圖片資料庫" : CmdSet_For_dr()
23 23
     End Sub
24 24
     Friend Sub SQL_訂單清單()
25
-        SQL1 = "SELECT 訂單流水號, 年份季度, 客戶訂單號, 形體號, 顏色, 生產工廠, 裁斷時間, 針車時間, 成型時間, 驗貨時間, 驗貨報告圖片, 力威訂單號 FROM " & 訂單資料表(1) & " 
26
-                WHERE (CXL = 0 OR CXL IS NULL) AND (訂單數量 - 出貨數量 <> 0) AND (驗貨時間 LIKE '') ORDER BY   SUBSTRING(訂單流水號, 4, 6), 客戶訂單號, 形體號"
25
+        SQL1 = "SELECT    訂單流水號, 年份季度, 力威訂單號 AS 客戶訂單號, 形體號, 顏色, 楦型, 訂單數量, 備註, 訂單種類, 生產工廠, 裁斷時間, 針車時間, 
26
+                          成型時間, 驗貨時間, 驗貨報告圖片, 客戶訂單號 AS 力威訂單號, 資料流水號 FROM " & 訂單資料表(1) & " 
27
+                WHERE    (CXL = 0 OR CXL IS NULL) AND (訂單數量 - 出貨數量 <> 0) AND (驗貨報告圖片 LIKE '' OR 驗貨報告圖片 IS NULL OR 驗貨報告圖片2 LIKE '' OR 驗貨報告圖片2 IS NULL) 
28
+                ORDER BY  SUBSTRING(訂單流水號, 4, 6), 客戶訂單號, 形體號"
27 29
     End Sub
28 30
     Friend Sub SQL_訂單清單查詢()
29
-        SQL1 = "SELECT   訂單流水號, 年份季度, 客戶訂單號, 形體號, 顏色, 生產工廠, 裁斷時間, 針車時間, 成型時間, 驗貨時間, 驗貨報告圖片 FROM " & 訂單資料表(1) & " 
31
+        SQL1 = "SELECT   訂單流水號, 年份季度, 力威訂單號 AS 客戶訂單號, 形體號, 顏色, 楦型, 訂單數量, 備註, 訂單種類, 生產工廠, 裁斷時間, 針車時間, 成型時間, 驗貨時間, 驗貨報告圖片, 客戶訂單號 AS 力威訂單號 FROM " & 訂單資料表(1) & " 
30 32
                 WHERE   (CXL = 0 OR CXL IS NULL) AND (訂單數量 - 出貨數量 <> 0) AND (驗貨時間 LIKE '') AND (訂單流水號 LIKE '%" & PA & "%' OR 年份季度 LIKE '%" & PA & "%' OR 
31 33
                          客戶訂單號 LIKE '%" & PA & "%' OR 形體號 LIKE '%" & PA & "%' OR 生產工廠 LIKE '%" & PA & "%' OR 力威訂單號 LIKE '%" & PA & "%') 
32 34
                 ORDER BY SUBSTRING(訂單流水號, 4, 6), 客戶訂單號, 形體號"
@@ -38,39 +40,41 @@
38 40
     End Sub
39 41
     Friend Sub SQL_新增驗貨報告編號_測試()
40 42
         圖片庫 = PA1 : SQL_連線字串_圖片資料庫() : ConnOpen_工程圖庫SQL()
41
-        'SQL1 = "INSERT INTO 驗貨報告圖庫 (客戶訂單號, 型體名稱, 驗貨報告編號, 操作人, 驗貨報告) 
42
-        '                SELECT '" & 驗貨報告圖片導入資料庫.客戶訂單號_tb.Text & "','" & 驗貨報告圖片導入資料庫.型體名稱_tb.Text & "','" & 驗貨報告圖片導入資料庫.TextBox3.Text & "','" & gUserName & "', 
43
-        '                BULKCOLUMN FROM OPENROWSET ( BULK 'D:\FTP\TENDENZA\0004\" & 驗貨報告圖片導入資料庫.檔案名稱_tb.Text & "', SINGLE_BLOB) AS EMPLOYEEPICTURE"
44
-        SQL1 = "INSERT INTO 驗貨報告圖庫 (客戶訂單號, 型體名稱, 驗貨報告編號, 操作人, 驗貨報告) 
43
+        SQL1 = "INSERT INTO 驗貨報告圖庫 (客戶訂單號, 型體名稱, 驗貨報告編號, 操作人, 副檔名, 驗貨報告) 
45 44
                 SELECT N'" & 驗貨報告圖片導入資料庫.客戶訂單號_tb.Text & "','" & 驗貨報告圖片導入資料庫.型體名稱_tb.Text & "',
46
-                        '" & 驗貨報告圖片導入資料庫.TextBox3.Text & "','" & gUserName & "', @binary_file"
45
+                        '" & 驗貨報告圖片導入資料庫.TextBox3.Text & "','" & gUserName & "', '" & 驗貨報告圖片導入資料庫.副檔名_bt.Text & "', @binary_file"
47 46
         CmdSet_For_dr_pic()
48 47
     End Sub
49 48
     Friend Sub SQL_新增驗貨報告圖庫_正式()
50 49
         圖片庫 = PA1 : SQL_連線字串_圖片資料庫() : ConnOpen_工程圖庫SQL()
51
-        'SQL1 = "INSERT INTO 驗貨報告圖庫 (客戶訂單號, 型體名稱, 驗貨報告編號, 操作人, 驗貨報告) 
52
-        '                SELECT '" & 驗貨報告圖片導入資料庫.客戶訂單號_tb.Text & "','" & 驗貨報告圖片導入資料庫.型體名稱_tb.Text & "','" & 驗貨報告圖片導入資料庫.TextBox3.Text & "','" & gUserName & "', 
53
-        '                BULKCOLUMN FROM OPENROWSET ( BULK 'D:\TENDENZA\0004\" & 驗貨報告圖片導入資料庫.檔案名稱_tb.Text & "', SINGLE_BLOB) AS EMPLOYEEPICTURE"
54
-        SQL1 = "INSERT INTO 驗貨報告圖庫 (客戶訂單號, 型體名稱, 驗貨報告編號, 操作人, 驗貨報告) 
50
+        SQL1 = "INSERT INTO 驗貨報告圖庫 (客戶訂單號, 型體名稱, 驗貨報告編號, 操作人, 副檔名, 驗貨報告) 
55 51
                 SELECT N'" & 驗貨報告圖片導入資料庫.客戶訂單號_tb.Text & "','" & 驗貨報告圖片導入資料庫.型體名稱_tb.Text & "',
56
-                        '" & 驗貨報告圖片導入資料庫.TextBox3.Text & "','" & gUserName & "', @binary_file"
52
+                        '" & 驗貨報告圖片導入資料庫.TextBox3.Text & "','" & gUserName & "', '" & 驗貨報告圖片導入資料庫.副檔名_bt.Text & "', @binary_file"
57 53
         CmdSet_For_dr_pic()
58 54
     End Sub
59 55
     Friend Sub SQL_修改驗貨報告圖庫()
60 56
         ConnOpen()
61 57
         SQL1 = "UPDATE " & 訂單資料表(1) & " SET 驗貨時間 = '" & DTP & "', 驗貨報告圖片 = '" & 驗貨報告圖片導入資料庫.TextBox3.Text & "', 驗報圖庫 = '" & PA20 & "'
62
-                WHERE (訂單流水號 LIKE '" & 驗貨報告圖片導入資料庫.天盾訂單號_tb.Text & "' AND 客戶訂單號 = '" & 驗貨報告圖片導入資料庫.客戶訂單號_tb.Text & "' AND 
63
-                       形體號 = '" & 驗貨報告圖片導入資料庫.型體名稱_tb.Text & "')"
58
+                WHERE (訂單流水號 LIKE N'" & 驗貨報告圖片導入資料庫.天盾訂單號_tb.Text & "' AND 客戶訂單號 LIKE N'" & 驗貨報告圖片導入資料庫.客戶訂單號_tb.Text & "' AND 
59
+                       形體號 LIKE N'" & 驗貨報告圖片導入資料庫.型體名稱_tb.Text & "')"
60
+        CmdSet_For_dr()
61
+    End Sub
62
+    Friend Sub SQL_修改驗貨報告圖庫1()
63
+        ConnOpen()
64
+        SQL1 = "UPDATE " & 訂單資料表(1) & " SET 驗貨報告圖片2 = '" & 驗貨報告圖片導入資料庫.TextBox3.Text & "', 驗報圖庫2 = '" & PA20 & "'
65
+                WHERE (訂單流水號 LIKE N'" & 驗貨報告圖片導入資料庫.天盾訂單號_tb.Text & "' AND 客戶訂單號 LIKE N'" & 驗貨報告圖片導入資料庫.客戶訂單號_tb.Text & "' AND 
66
+                       形體號 LIKE N'" & 驗貨報告圖片導入資料庫.型體名稱_tb.Text & "')"
64 67
         CmdSet_For_dr()
65 68
     End Sub
66 69
     '------------------------------------------------驗貨報告資料庫-------------------------------------
67 70
     Friend Sub SQL_驗貨報告圖庫清單()
68
-        SQL1 = "SELECT     " & 訂單資料表(1) & ".訂單流水號, " & 訂單資料表(1) & ".年份季度, " & PA20 & ".dbo.驗貨報告圖庫.客戶訂單號, " & PA20 & ".dbo.驗貨報告圖庫.型體名稱, 
69
-                           " & 訂單資料表(1) & ".顏色,  " & PA20 & ".dbo.驗貨報告圖庫.驗貨報告編號 
70
-                FROM       " & PA20 & ".dbo.驗貨報告圖庫 INNER JOIN " & 訂單資料表(1) & " ON " & PA20 & ".dbo.驗貨報告圖庫.客戶訂單號 = " & 訂單資料表(1) & ".客戶訂單號 
71
-                GROUP BY   " & 訂單資料表(1) & ".訂單流水號, " & 訂單資料表(1) & ".年份季度, " & PA20 & ".dbo.驗貨報告圖庫.客戶訂單號, " & PA20 & ".dbo.驗貨報告圖庫.型體名稱, 
72
-                           " & 訂單資料表(1) & ".顏色, " & PA20 & ".dbo.驗貨報告圖庫.驗貨報告編號 
73
-                ORDER BY   " & PA20 & ".dbo.驗貨報告圖庫.客戶訂單號, " & PA20 & ".dbo.驗貨報告圖庫.型體名稱"
71
+        SQL1 = "SELECT DISTINCT 
72
+                           訂單流水號, 年份季度, 力威訂單號 AS 客戶訂單號, 形體號 AS 型體名稱, 顏色, 驗貨報告圖片 AS 驗貨報告編號, 
73
+                           驗報圖庫, 驗貨報告圖片2 AS 驗貨報告編號2,  驗報圖庫2
74
+                FROM      " & 訂單資料表(1) & "
75
+                WHERE      驗貨報告圖片 NOT LIKE '' AND 驗貨報告圖片 IS NOT NULL
76
+                GROUP BY   訂單流水號, 年份季度, 形體號, 顏色, 形體號, 力威訂單號, 驗貨報告圖片, 驗報圖庫, 驗貨報告圖片2, 驗報圖庫2
77
+                ORDER BY   客戶訂單號, 型體名稱"
74 78
     End Sub
75 79
     Friend Sub SQL_驗貨報告圖庫查詢()
76 80
         圖片庫 = PA1 : SQL_連線字串_圖片資料庫()
@@ -123,6 +127,10 @@
123 127
         圖片庫 = PA1 : SQL_連線字串_圖片資料庫()
124 128
         ConnOpen_工程圖庫SQL() : SQL1 = "SELECT TOP(1) 驗貨報告 FROM 驗貨報告圖庫 WHERE 驗貨報告編號 LIKE '" & PA2 & "'" : CmdSet_For_dr()
125 129
     End Sub
130
+    Friend Sub SQL_驗貨報告檔案確認()
131
+        圖片庫 = PA1 : SQL_連線字串_圖片資料庫()
132
+        ConnOpen_工程圖庫SQL() : SQL1 = "SELECT TOP(1) 副檔名 FROM 驗貨報告圖庫 WHERE 驗貨報告編號 LIKE '" & PA2 & "'" : CmdSet_For_dr()
133
+    End Sub
126 134
     '----------------------鞋型圖片導入資料庫---------------------------------------------------
127 135
     Friend Sub SQL_季節清單()
128 136
         SQL1 = "SELECT  年份季度  FROM  訂單控制表年份季度清單  ORDER BY  年份季度"

+ 18
- 10
TENDEN-MES-SYS/0、Module/SQL_成本系統管理.vb View File

@@ -71,7 +71,8 @@
71 71
                             " & 訂單資料表(6) & ".Quantity * " & 訂單資料表(6) & ".Tooling AS CollectedToolng, " & 訂單資料表(6) & ".年份, 
72 72
                             " & 訂單資料表(6) & ".利潤表流水號, " & 訂單資料表(1) & ".訂單數量 - " & 訂單資料表(6) & ".Quantity AS 驗證, 
73 73
                             STYLELIST.ItemNumber, " & 訂單資料表(6) & ".審核, " & 訂單資料表(1) & ".客戶訂單號, " & 訂單資料表(1) & ".ProductID, 
74
-                            " & 訂單資料表(0) & ".SalesOrder, " & 訂單資料表(0) & ".CustomerName, " & 訂單資料表(0) & ".最終運送
74
+                            " & 訂單資料表(0) & ".SalesOrder, " & 訂單資料表(0) & ".CustomerName, " & 訂單資料表(0) & ".最終運送, " & 訂單資料表(1) & ".工廠回復交期, 
75
+                            " & 訂單資料表(1) & ".TVW
75 76
                 FROM        " & 訂單資料表(1) & " LEFT OUTER JOIN
76 77
                             " & 訂單資料表(0) & " ON " & 訂單資料表(1) & ".訂單流水號 = " & 訂單資料表(0) & ".天盾流水號 LEFT OUTER JOIN
77 78
                             " & 訂單資料表(2) & " ON " & 訂單資料表(1) & ".顏色 = " & 訂單資料表(2) & ".Colorway AND 
@@ -92,7 +93,8 @@
92 93
                             " & 訂單資料表(6) & ".EXWsaving, " & 訂單資料表(6) & ".Quantity * " & 訂單資料表(6) & ".Tooling, 
93 94
                             " & 訂單資料表(6) & ".年份, " & 訂單資料表(6) & ".利潤表流水號, " & 訂單資料表(1) & ".訂單數量 - " & 訂單資料表(6) & ".Quantity, 
94 95
                             STYLELIST.ItemNumber, " & 訂單資料表(6) & ".審核, " & 訂單資料表(1) & ".客戶訂單號, " & 訂單資料表(1) & ".ProductID, 
95
-                            " & 訂單資料表(0) & ".SalesOrder, " & 訂單資料表(0) & ".CustomerName, " & 訂單資料表(0) & ".最終運送, " & 訂單資料表(6) & ".FTY廠價
96
+                            " & 訂單資料表(0) & ".SalesOrder, " & 訂單資料表(0) & ".CustomerName, " & 訂單資料表(0) & ".最終運送, " & 訂單資料表(6) & ".FTY廠價, 
97
+                            " & 訂單資料表(1) & ".工廠回復交期, " & 訂單資料表(1) & ".TVW
96 98
                 ORDER BY    " & 訂單資料表(1) & ".訂單流水號 DESC"
97 99
     End Sub
98 100
     '----------------------------------訂單價格利潤明細表--------------------------------------------------------------
@@ -571,6 +573,9 @@
571 573
     Friend Sub SQL_季節_下拉()
572 574
         ConnOpen() : SQL1 = "SELECT 年份季度 FROM 訂單控制表年份季度清單 ORDER BY 年份季度 DESC" : CmdSet_For_dr()
573 575
     End Sub
576
+    Friend Sub SQL_Vendor()
577
+        ConnOpen() : SQL1 = "SELECT  VendorReference  FROM  訂單明細表抬頭_HP  GROUP BY  VendorReference  ORDER BY  VendorReference" : CmdSet_For_dr()
578
+    End Sub
574 579
     Friend Sub SQL_Shipto_下拉()
575 580
         ConnOpen()
576 581
         SQL1 = "SELECT  CustomerName, DeliveryAddress  FROM  訂單明細表抬頭_HP  GROUP BY  CustomerName, DeliveryAddress  ORDER BY  CustomerName"
@@ -578,7 +583,7 @@
578 583
     End Sub
579 584
     Friend Sub SQL_訂單明細表讀取()
580 585
         ConnOpen()
581
-        SQL1 = "SELECT     天盾流水號, 客戶訂單號, ItemNumber, ProductName, ProductDescription, Color, DM, [5], [5.5], [6], [6.5], [7], [7.5], [8], 
586
+        SQL1 = "SELECT     天盾流水號, 客戶訂單號, ItemNumber AS Item, 裝箱 AS Item2, ProductName, ProductDescription, Color, DM, [5], [5.5], [6], [6.5], [7], [7.5], [8], 
582 587
                            [8.5], [9], [9.5], [10], [10.5], [11], [11.5], [12], [12.5], [13], [14], 
583 588
                            [5] + [5.5] + [6] + [6.5] + [7] + [7.5] + [8] + [8.5] + [9] + [9.5] + [10] + [10.5] + [11] + [11.5] + [12] + [12.5] + [13] + [14] AS TOTAL
584 589
                 FROM       " & 訂單資料表(5) & "
@@ -593,7 +598,7 @@
593 598
                                          CFMSPEC,              CFMSAMPLE,                   TRIAL1,            TRIAL2,           TRIAL3,                TRIAL4,             包裝確認時間, 
594 599
                                         貼標時間,               裁斷時間,                 針車時間,          成型時間,         驗貨時間,            實際離廠日,               資料流水號, 
595 600
                                         明細建檔,                GOODBOX,                  LEATHER,          LEA_Note,         出貨數量,   PO_S_Date AS 接單日, Requested_XF AS 需求日期, 
596
-                          Confirm_XF AS 確認日期, Revised_XF AS 修訂日期, 工廠回復交期 AS 工廠交期, Special_Packaging,          Remarks,                出貨地,                      TVW, 
601
+                          Confirm_XF AS 確認日期, Revised_XF AS 修訂日期, 工廠回復交期 AS 工廠交期, Special_Packaging,          Remarks,                出貨地,         TVW AS [STYLE #], 
597 602
                                           楦頭號,                   材質,                 七號模具,      TRIAL1 AS T1,     TRIAL2 AS T2, 長期試穿 AS WEAR_TEST,         CFMSAMPLE AS CFM, 
598 603
                                     TRIAL3 AS T3,           TRIAL4 AS T4,          CFMSPEC AS TEST,              面料,             副料,                  中底,                     鞋墊, 
599 604
                                             大底,                     跟,     包裝確認時間 AS 包裝,  裁斷時間 AS 裁斷, 針車時間 AS 針車,      成型時間 AS 成型,         驗貨時間 AS 驗貨, 
@@ -654,22 +659,25 @@
654 659
         ConnOpen()
655 660
         SQL1 = "UPDATE " & 訂單資料表(1) & " SET 年份季度 = N'" & PA3 & "', 客戶訂單號 = N'" & PA1 & "', 形體號 = N'" & PA4 & "', 顏色 = N'" & PA5 & "', 楦型 = N'" & PA6 & "', 
656 661
                                                  訂單數量 = N'" & PA16 & "', 客戶交期 = N'" & PA7 & "', 生產工廠 = N'" & PA8 & "', 訂單種類 = N'" & PA9 & "', 工廠回復交期 = N'" & PA10 & "', 
657
-                                                 PO_S_Date = N'" & PA7 & "', Requested_XF = N'" & PA7 & "', Confirm_XF = N'" & PA7 & "', 力威訂單號 = N'" & PA11 & "' 
662
+                                                 PO_S_Date = N'" & PA7 & "', Requested_XF = N'" & PA7 & "', Confirm_XF = N'" & PA7 & "', 力威訂單號 = N'" & PA11 & "',TVW =  N'" & PA35 & "' 
658 663
                 WHERE 資料流水號 LIKE N'" & PA13 & "'"
659 664
         CmdSet_For_dr()
660 665
     End Sub
661 666
     Friend Sub SQL_Item_下拉()
662
-        ConnOpen() : SQL1 = "SELECT  ItemNumber  FROM  訂單明細表_HP  GROUP BY   ItemNumber  ORDER BY  ItemNumber" : CmdSet_For_dr()
667
+        ConnOpen() : SQL1 = "SELECT  ItemNumber  FROM  " & 訂單資料表(5) & "  GROUP BY   ItemNumber  ORDER BY  ItemNumber" : CmdSet_For_dr()
668
+    End Sub
669
+    Friend Sub SQL_Item2_下拉()
670
+        ConnOpen() : SQL1 = "SELECT  裝箱  FROM  " & 訂單資料表(5) & "  GROUP BY   裝箱  ORDER BY  裝箱" : CmdSet_For_dr()
663 671
     End Sub
664 672
     Friend Sub SQL_ProductDescription_下拉()
665
-        ConnOpen() : SQL1 = "SELECT  ProductDescription  FROM  訂單明細表_HP  GROUP BY   ProductDescription  ORDER BY  ProductDescription" : CmdSet_For_dr()
673
+        ConnOpen() : SQL1 = "SELECT  ProductDescription  FROM  " & 訂單資料表(5) & "  GROUP BY   ProductDescription  ORDER BY  ProductDescription" : CmdSet_For_dr()
666 674
     End Sub
667 675
     Friend Sub SQL_訂單明細表新增()
668 676
         ConnOpen()
669 677
         SQL1 = "INSERT INTO " & 訂單資料表(5) & " (天盾流水號, 客戶訂單號, ItemNumber, ProductName, ProductDescription, Color, DM, [5], [5.5], [6], [6.5], [7], [7.5], [8], [8.5], [9], 
670
-                                                   [9.5], [10], [10.5], [11], [11.5], [12], [12.5], [13], [14], 資料流水號) 
678
+                                                   [9.5], [10], [10.5], [11], [11.5], [12], [12.5], [13], [14], 資料流水號, 裝箱) 
671 679
                 VALUES ('" & PA2 & "','" & PA1 & "','" & PA12 & "', '" & PA4 & "','" & PA14 & "','" & PA5 & "','" & PA6 & "','0','0','0','0','0','0','0','0','0','0','0',
672
-                        '0','0','0','0','0','0','0','" & PA13 & "')"
680
+                        '0','0','0','0','0','0','0','" & PA13 & "', '" & PA15 & "')"
673 681
         CmdSet_For_dr()
674 682
     End Sub
675 683
     Friend Sub SQL_訂單明細表修改()
@@ -677,7 +685,7 @@
677 685
         SQL1 = "UPDATE " & 訂單資料表(5) & " SET 客戶訂單號 = N'" & PA1 & "', ItemNumber = N'" & PA12 & "', ProductName = N'" & PA4 & "', ProductDescription = N'" & PA14 & "', 
678 686
                 Color = N'" & PA5 & "', DM = N'" & PA6 & "', [5] = N'" & PA17 & "', [5.5] = N'" & PA18 & "', [6] = N'" & PA19 & "', [6.5] = N'" & PA20 & "', [7] = N'" & PA21 & "', 
679 687
                 [7.5] = N'" & PA22 & "', [8] = N'" & PA23 & "', [8.5] = N'" & PA24 & "', [9] = N'" & PA25 & "', [9.5] = N'" & PA26 & "', [10] = N'" & PA27 & "', [10.5] = N'" & PA28 & "', 
680
-                [11] = N'" & PA29 & "', [11.5] = N'" & PA30 & "', [12] = N'" & PA31 & "', [12.5] = N'" & PA32 & "', [13] = N'" & PA33 & "', [14] = N'" & PA34 & "' 
688
+                [11] = N'" & PA29 & "', [11.5] = N'" & PA30 & "', [12] = N'" & PA31 & "', [12.5] = N'" & PA32 & "', [13] = N'" & PA33 & "', [14] = N'" & PA34 & "', 裝箱 = N'" & PA & "'
681 689
                 WHERE 資料流水號 LIKE N'" & PA13 & "'"
682 690
         CmdSet_For_dr()
683 691
     End Sub

+ 1
- 1
TENDEN-MES-SYS/0、Module/全域變數.vb View File

@@ -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 = "2023112601"
6
+    Public 版本 As String = "2024012001"
7 7
     '----系統用全域變數-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
8 8
     Public 匯率 As Double
9 9
     '----系統用全域變數----------------------------------------------------------------------------------------------------------------------------------------------------------------------

+ 1
- 1
TENDEN-MES-SYS/2、成本系統管理/出貨銷帳明細表.Designer.vb View File

@@ -318,7 +318,7 @@ Partial Class 出貨銷帳明細表
318 318
         Me.視窗2_pl.Controls.Add(Me.新增資料_bt)
319 319
         Me.視窗2_pl.Controls.Add(Me.Label6)
320 320
         Me.視窗2_pl.Controls.Add(Me.CanceL2_bt)
321
-        Me.視窗2_pl.Location = New System.Drawing.Point(9, 335)
321
+        Me.視窗2_pl.Location = New System.Drawing.Point(19, 335)
322 322
         Me.視窗2_pl.Name = "視窗2_pl"
323 323
         Me.視窗2_pl.Size = New System.Drawing.Size(1545, 408)
324 324
         Me.視窗2_pl.TabIndex = 1403

+ 46
- 25
TENDEN-MES-SYS/2、成本系統管理/出貨銷帳明細表.vb View File

@@ -858,9 +858,11 @@ Public Class 出貨銷帳明細表
858 858
         PA = PO號_tb.Text : SQL_訂單流水號查詢()
859 859
         If dr.Read Then : PO號1_tb.Text = dr("訂單流水號").ToString : Else : PO號1_tb.Text = "" : End If
860 860
         lastFoundRowIndex = -1 : lastFoundColIndex = -1 : 查詢DGV中的關鍵字(利潤表_dgv, PO號_tb)
861
-        形體_tb.Text = 利潤表_dgv.Rows(NU1).Cells("形體號").Value.ToString
862
-        顏色_tb.Text = 利潤表_dgv.Rows(NU1).Cells("顏色").Value.ToString
863
-        楦型_tb.Text = 利潤表_dgv.Rows(NU1).Cells("楦型").Value.ToString
861
+        If NU1 < 利潤表_dgv.Rows.Count Then
862
+            形體_tb.Text = 利潤表_dgv.Rows(NU1).Cells("形體號").Value.ToString
863
+            顏色_tb.Text = 利潤表_dgv.Rows(NU1).Cells("顏色").Value.ToString
864
+            楦型_tb.Text = 利潤表_dgv.Rows(NU1).Cells("楦型").Value.ToString
865
+        End If
864 866
         lastFoundRowIndex = -1 : lastFoundColIndex = -1 : 查詢DGV中的關鍵字(控制表_dgv, PO號_tb)
865 867
         If PO號1_tb.Text = "" Then
866 868
             lastFoundRowIndex = -1 : lastFoundColIndex = -1 : 查詢DGV中的關鍵字(訂單明細表_dgv, PO號_tb)
@@ -875,9 +877,11 @@ Public Class 出貨銷帳明細表
875 877
         PA = PO號_tb.Text : SQL_訂單流水號查詢()
876 878
         If dr.Read Then : PO號1_tb.Text = dr("訂單流水號").ToString : Else : PO號1_tb.Text = "" : End If
877 879
         lastFoundRowIndex = -1 : lastFoundColIndex = -1 : 查詢DGV中的關鍵字(利潤表_dgv, PO號_tb)
878
-        形體_tb.Text = 利潤表_dgv.Rows(NU1).Cells("形體號").Value.ToString
879
-        顏色_tb.Text = 利潤表_dgv.Rows(NU1).Cells("顏色").Value.ToString
880
-        楦型_tb.Text = 利潤表_dgv.Rows(NU1).Cells("楦型").Value.ToString
880
+        If NU1 < 利潤表_dgv.Rows.Count Then
881
+            形體_tb.Text = 利潤表_dgv.Rows(NU1).Cells("形體號").Value.ToString
882
+            顏色_tb.Text = 利潤表_dgv.Rows(NU1).Cells("顏色").Value.ToString
883
+            楦型_tb.Text = 利潤表_dgv.Rows(NU1).Cells("楦型").Value.ToString
884
+        End If
881 885
         lastFoundRowIndex = -1 : lastFoundColIndex = -1 : 查詢DGV中的關鍵字(控制表_dgv, PO號_tb)
882 886
         If PO號1_tb.Text = "" Then
883 887
             lastFoundRowIndex = -1 : lastFoundColIndex = -1 : 查詢DGV中的關鍵字(訂單明細表_dgv, PO號_tb)
@@ -1051,39 +1055,56 @@ Public Class 出貨銷帳明細表
1051 1055
                         控制表_dgv.Rows(0).Cells("FTY_Payment_Date").Value = xlSheet.Cells(I + 2, 12).value
1052 1056
                         控制表_dgv.Rows(0).Cells("Remark").Value = xlSheet.Cells(I + 2, 13).value
1053 1057
                     End If
1054
-                    Dim 新資料 As Boolean = True : Dim SX1, SX2 As Integer
1058
+                    Dim 新資料 As Boolean = True : Dim SX1, SX2 As Double
1055 1059
                     For II As Integer = 0 To 銷帳_dgv.Rows.Count - 1
1056
-                        If 銷帳_dgv(40, I).Value = True Then : Else
1060
+                        If 銷帳_dgv(40, II).Value = True Then : Else
1057 1061
                             If 控制表_dgv.Rows(0).Cells("INV").Value.ToString.Replace(" ", "") = 銷帳_dgv.Rows(II).Cells("INV").Value.ToString.Replace(" ", "") And
1058 1062
                             控制表_dgv.Rows(0).Cells("訂單號").Value.ToString.Replace(" ", "") = 銷帳_dgv.Rows(II).Cells("訂單號").Value.ToString.Replace(" ", "") Then
1059 1063
                                 If CInt(控制表_dgv.Rows(0).Cells("訂單數").Value.ToString) = CInt(銷帳_dgv.Rows(II).Cells("訂單數").Value.ToString) Then
1060 1064
                                     If CInt(控制表_dgv.Rows(0).Cells("出貨數量").Value.ToString) = CInt(銷帳_dgv.Rows(II).Cells("出貨數量").Value.ToString) Then
1061 1065
                                         '-------------舊資料比對差異--------------------------------------------------------------------------------------
1062
-                                        新資料 = False : 銷帳_dgv(40, I).Value = True
1063
-                                        SX1 = CInt(控制表_dgv.Rows(0).Cells("FTY_PRICE").Value.ToString) : SX2 = CInt(銷帳_dgv.Rows(II).Cells("FTY_PRICE").Value.ToString)
1066
+                                        新資料 = False : 銷帳_dgv(40, II).Value = True
1067
+                                        SX1 = CDbl(控制表_dgv.Rows(0).Cells("FTY_PRICE").Value.ToString) : SX2 = CDbl(銷帳_dgv.Rows(II).Cells("FTY_PRICE").Value.ToString)
1064 1068
                                         If SX1 <> SX2 Then
1065 1069
                                             銷帳_dgv(38, II).Value = True : 差異數 += 1
1066
-                                            For III As Integer = 2 To 10 : 銷帳_dgv.Rows(II).Cells(III).Style.BackColor = Color.LightPink : Next
1067
-                                            For III As Integer = 13 To 21 : 銷帳_dgv.Rows(II).Cells(III).Style.BackColor = Color.LightPink : Next
1068
-                                            For III As Integer = 22 To 27 : 銷帳_dgv.Rows(II).Cells(III).Style.BackColor = Color.LightPink : Next
1069
-                                            For III As Integer = 28 To 36 : 銷帳_dgv.Rows(II).Cells(III).Style.BackColor = Color.LightPink : Next
1070
+                                            If 銷帳_dgv.Rows(II).Cells("已確認").Value = True Then
1071
+                                                For III As Integer = 2 To 10 : 銷帳_dgv.Rows(II).Cells(III).Style.BackColor = Color.LightPink : Next
1072
+                                                For III As Integer = 13 To 21 : 銷帳_dgv.Rows(II).Cells(III).Style.BackColor = Color.LightPink : Next
1073
+                                                For III As Integer = 22 To 27 : 銷帳_dgv.Rows(II).Cells(III).Style.BackColor = Color.LightPink : Next
1074
+                                                For III As Integer = 28 To 36 : 銷帳_dgv.Rows(II).Cells(III).Style.BackColor = Color.LightPink : Next
1075
+                                            Else
1076
+                                                銷帳_dgv.Rows(II).Cells("FTY_PRICE").Value = SX1
1077
+                                            End If
1070 1078
                                         End If
1071
-                                        SX1 = CInt(控制表_dgv.Rows(0).Cells("扣關稅or後廠價").Value.ToString) : SX2 = CInt(銷帳_dgv.Rows(II).Cells("扣關稅or後廠價").Value.ToString)
1079
+                                        SX1 = CDbl(控制表_dgv.Rows(0).Cells("扣關稅or後廠價").Value.ToString) : SX2 = CDbl(銷帳_dgv.Rows(II).Cells("扣關稅or後廠價").Value.ToString)
1072 1080
                                         If SX1 <> SX2 Then
1073 1081
                                             銷帳_dgv(38, II).Value = True : 差異數 += 1
1074
-                                            For III As Integer = 2 To 10 : 銷帳_dgv.Rows(II).Cells(III).Style.BackColor = Color.LightPink : Next
1075
-                                            For III As Integer = 13 To 21 : 銷帳_dgv.Rows(II).Cells(III).Style.BackColor = Color.LightPink : Next
1076
-                                            For III As Integer = 22 To 27 : 銷帳_dgv.Rows(II).Cells(III).Style.BackColor = Color.LightPink : Next
1077
-                                            For III As Integer = 28 To 36 : 銷帳_dgv.Rows(II).Cells(III).Style.BackColor = Color.LightPink : Next
1082
+                                            If 銷帳_dgv.Rows(II).Cells("已確認").Value = True Then
1083
+                                                For III As Integer = 2 To 10 : 銷帳_dgv.Rows(II).Cells(III).Style.BackColor = Color.LightPink : Next
1084
+                                                For III As Integer = 13 To 21 : 銷帳_dgv.Rows(II).Cells(III).Style.BackColor = Color.LightPink : Next
1085
+                                                For III As Integer = 22 To 27 : 銷帳_dgv.Rows(II).Cells(III).Style.BackColor = Color.LightPink : Next
1086
+                                                For III As Integer = 28 To 36 : 銷帳_dgv.Rows(II).Cells(III).Style.BackColor = Color.LightPink : Next
1087
+                                            Else
1088
+                                                銷帳_dgv.Rows(II).Cells("扣關稅or後廠價").Value = SX1
1089
+                                            End If
1078 1090
                                         End If
1079
-                                        SX1 = CInt(控制表_dgv.Rows(0).Cells("CUST_Price").Value.ToString) : SX2 = CInt(銷帳_dgv.Rows(II).Cells("CUST_Price").Value.ToString)
1091
+                                        SX1 = CDbl(控制表_dgv.Rows(0).Cells("CUST_Price").Value.ToString) : SX2 = CDbl(銷帳_dgv.Rows(II).Cells("CUST_Price").Value.ToString)
1080 1092
                                         If SX1 <> SX2 Then
1081 1093
                                             銷帳_dgv(38, II).Value = True : 差異數 += 1
1082
-                                            For III As Integer = 2 To 10 : 銷帳_dgv.Rows(II).Cells(III).Style.BackColor = Color.LightPink : Next
1083
-                                            For III As Integer = 13 To 21 : 銷帳_dgv.Rows(II).Cells(III).Style.BackColor = Color.LightPink : Next
1084
-                                            For III As Integer = 22 To 27 : 銷帳_dgv.Rows(II).Cells(III).Style.BackColor = Color.LightPink : Next
1085
-                                            For III As Integer = 28 To 36 : 銷帳_dgv.Rows(II).Cells(III).Style.BackColor = Color.LightPink : Next
1086
-                                        End If : Exit For
1094
+                                            If 銷帳_dgv.Rows(II).Cells("已確認").Value = True Then
1095
+                                                For III As Integer = 2 To 10 : 銷帳_dgv.Rows(II).Cells(III).Style.BackColor = Color.LightPink : Next
1096
+                                                For III As Integer = 13 To 21 : 銷帳_dgv.Rows(II).Cells(III).Style.BackColor = Color.LightPink : Next
1097
+                                                For III As Integer = 22 To 27 : 銷帳_dgv.Rows(II).Cells(III).Style.BackColor = Color.LightPink : Next
1098
+                                                For III As Integer = 28 To 36 : 銷帳_dgv.Rows(II).Cells(III).Style.BackColor = Color.LightPink : Next
1099
+                                            Else
1100
+                                                銷帳_dgv.Rows(II).Cells("CUST_Price").Value = SX1
1101
+                                            End If
1102
+                                        End If
1103
+                                        '銷帳_dgv.Rows(II).Cells("EX_FTY_DATE").Value = 控制表_dgv.Rows(0).Cells("EX_FTY_DATE").Value
1104
+                                        銷帳_dgv.Rows(II).Cells("Maturity_Date").Value = 控制表_dgv.Rows(0).Cells("Maturity_Date").Value
1105
+                                        銷帳_dgv.Rows(II).Cells("FTY_Payment_Date").Value = 控制表_dgv.Rows(0).Cells("FTY_Payment_Date").Value
1106
+                                        銷帳_dgv.Rows(II).Cells("Remark").Value = 控制表_dgv.Rows(0).Cells("Remark").Value
1107
+                                        Exit For
1087 1108
                                     End If
1088 1109
                                 End If
1089 1110
                             End If

+ 38
- 7
TENDEN-MES-SYS/2、成本系統管理/列印_訂單價格利潤表.Designer.vb View File

@@ -22,10 +22,12 @@ 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()
25
+        Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
26 26
         Me.取消列印_bt = New System.Windows.Forms.Button()
27 27
         Me.確認列印_bt = New System.Windows.Forms.Button()
28 28
         Me.利潤表_dgv = New System.Windows.Forms.DataGridView()
29
+        Me.CB_1 = New System.Windows.Forms.CheckBox()
30
+        Me.CB_2 = New System.Windows.Forms.CheckBox()
29 31
         CType(Me.利潤表_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
30 32
         Me.SuspendLayout()
31 33
         '
@@ -33,7 +35,7 @@ Partial Class 列印_訂單價格利潤表
33 35
         '
34 36
         Me.取消列印_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
35 37
         Me.取消列印_bt.ForeColor = System.Drawing.Color.Red
36
-        Me.取消列印_bt.Location = New System.Drawing.Point(128, 12)
38
+        Me.取消列印_bt.Location = New System.Drawing.Point(128, 36)
37 39
         Me.取消列印_bt.Name = "取消列印_bt"
38 40
         Me.取消列印_bt.Size = New System.Drawing.Size(110, 54)
39 41
         Me.取消列印_bt.TabIndex = 314
@@ -44,7 +46,7 @@ Partial Class 列印_訂單價格利潤表
44 46
         '
45 47
         Me.確認列印_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
46 48
         Me.確認列印_bt.ForeColor = System.Drawing.Color.Blue
47
-        Me.確認列印_bt.Location = New System.Drawing.Point(12, 12)
49
+        Me.確認列印_bt.Location = New System.Drawing.Point(12, 36)
48 50
         Me.確認列印_bt.Name = "確認列印_bt"
49 51
         Me.確認列印_bt.Size = New System.Drawing.Size(110, 54)
50 52
         Me.確認列印_bt.TabIndex = 313
@@ -53,36 +55,65 @@ Partial Class 列印_訂單價格利潤表
53 55
         '
54 56
         '利潤表_dgv
55 57
         '
56
-        DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
57
-        Me.利潤表_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
58
+        DataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
59
+        Me.利潤表_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle4
58 60
         Me.利潤表_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
59
-        Me.利潤表_dgv.Location = New System.Drawing.Point(12, 12)
61
+        Me.利潤表_dgv.Location = New System.Drawing.Point(12, 114)
60 62
         Me.利潤表_dgv.Name = "利潤表_dgv"
61 63
         Me.利潤表_dgv.RowHeadersWidth = 5
62 64
         Me.利潤表_dgv.RowTemplate.Height = 24
63 65
         Me.利潤表_dgv.Size = New System.Drawing.Size(775, 143)
64 66
         Me.利潤表_dgv.TabIndex = 312
65 67
         '
68
+        'CB_1
69
+        '
70
+        Me.CB_1.AutoSize = True
71
+        Me.CB_1.Checked = True
72
+        Me.CB_1.CheckState = System.Windows.Forms.CheckState.Checked
73
+        Me.CB_1.Location = New System.Drawing.Point(12, 10)
74
+        Me.CB_1.Name = "CB_1"
75
+        Me.CB_1.Size = New System.Drawing.Size(107, 20)
76
+        Me.CB_1.TabIndex = 315
77
+        Me.CB_1.Text = "顯示 FTY DATE"
78
+        Me.CB_1.UseVisualStyleBackColor = True
79
+        '
80
+        'CB_2
81
+        '
82
+        Me.CB_2.AutoSize = True
83
+        Me.CB_2.Location = New System.Drawing.Point(128, 10)
84
+        Me.CB_2.Name = "CB_2"
85
+        Me.CB_2.Size = New System.Drawing.Size(111, 20)
86
+        Me.CB_2.TabIndex = 316
87
+        Me.CB_2.Text = "顯示 Product Id"
88
+        Me.CB_2.UseVisualStyleBackColor = True
89
+        '
66 90
         '列印_訂單價格利潤表
67 91
         '
68 92
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
69 93
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
70
-        Me.ClientSize = New System.Drawing.Size(250, 73)
94
+        Me.ClientSize = New System.Drawing.Size(250, 95)
95
+        Me.Controls.Add(Me.CB_2)
96
+        Me.Controls.Add(Me.CB_1)
71 97
         Me.Controls.Add(Me.取消列印_bt)
72 98
         Me.Controls.Add(Me.確認列印_bt)
73 99
         Me.Controls.Add(Me.利潤表_dgv)
74 100
         Me.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
75 101
         Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
102
+        Me.MaximizeBox = False
103
+        Me.MinimizeBox = False
76 104
         Me.Name = "列印_訂單價格利潤表"
77 105
         Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
78 106
         Me.Text = "訂單價格利潤表列印"
79 107
         CType(Me.利潤表_dgv, System.ComponentModel.ISupportInitialize).EndInit()
80 108
         Me.ResumeLayout(False)
109
+        Me.PerformLayout()
81 110
 
82 111
     End Sub
83 112
 
84 113
     Friend WithEvents 取消列印_bt As Button
85 114
     Friend WithEvents 確認列印_bt As Button
86 115
     Friend WithEvents 利潤表_dgv As DataGridView
116
+    Friend WithEvents CB_1 As CheckBox
117
+    Friend WithEvents CB_2 As CheckBox
87 118
 End Class
88 119
 

+ 133
- 124
TENDEN-MES-SYS/2、成本系統管理/列印_訂單價格利潤表.vb View File

@@ -45,99 +45,102 @@ Public Class 列印_訂單價格利潤表
45 45
 
46 46
         xlSheet.Cells(3, 1) = "Tendenza Po#"
47 47
         xlSheet.Cells(3, 2) = "Season"
48
-        xlSheet.Cells(3, 3) = "力威 Po#"
48
+        xlSheet.Cells(3, 3) = "Po#"
49 49
         xlSheet.Cells(3, 4) = "Style"
50
-        xlSheet.Cells(3, 5) = "CLR"
51
-        xlSheet.Cells(3, 6) = "Product Id"
50
+        xlSheet.Cells(3, 5) = "Style #"
51
+        xlSheet.Cells(3, 6) = "CLR"
52
+        If CB_1.Checked = True Then : xlSheet.Cells(3, 7) = "FTY DATE" : Else : xlSheet.Cells(3, 7) = "Product Id" : End If
52 53
 
53
-        xlSheet.Cells(3, 7) = "DM"
54
-        xlSheet.Cells(3, 8) = "PRS"
55
-        xlSheet.Cells(3, 9) = "X/F Date"
56
-        xlSheet.Cells(3, 10) = "Price"
57
-        xlSheet.Cells(3, 11) = "Amount"
58
-        xlSheet.Cells(3, 12) = "Remark"
59
-        xlSheet.Cells(3, 13) = "Factory"
60
-        xlSheet.Cells(3, 14) = "DIV"
61
-        xlSheet.Cells(3, 15) = "FTY Price"
62
-        xlSheet.Cells(3, 16) = "Commission TTL"
63
-        xlSheet.Cells(3, 17) = "Commission Darren"
64
-        xlSheet.Cells(3, 18) = "Commission Tendenza"
65
-        xlSheet.Cells(3, 19) = "%"
66
-        xlSheet.Cells(3, 20) = "Basic Price(+)"
67
-        xlSheet.Cells(3, 21) = "PG/MOQ (+)"
68
-        xlSheet.Cells(3, 22) = "Foot form/ PET form(+)"
69
-        xlSheet.Cells(3, 23) = "Tooling (+)"
70
-        xlSheet.Cells(3, 24) = "Rubber Band(+)"
71
-        xlSheet.Cells(3, 25) = "J.HOOK (+)"
72
-        xlSheet.Cells(3, 26) = "Water Resistant(+)"
73
-        xlSheet.Cells(3, 27) = "16% VAT(+)"
74
-        xlSheet.Cells(3, 28) = "EXW Saving(-)"
75
-        xlSheet.Cells(3, 29) = "TTL Collected Toolng"
76
-        xlSheet.Cells(3, 30) = "Exchange"
77
-        xlSheet.Cells(1, 7) = "Total-PRS"
78
-        xlSheet.Cells(1, 11) = "Total-Amount"
79
-        xlSheet.Cells(1, 15) = "Total-Commission-TTL"
80
-        xlSheet.Cells(1, 17) = "Total-Commission-Darren"
81
-        xlSheet.Cells(1, 18) = "Total-Commission-Tendenza"
82
-        xlSheet.Cells(1, 29) = "Total-TTL Collected Toolng"
83
-        xlSheet.Cells(2, 7) = "=SUBTOTAL(9,H4:H$99999)"
84
-        xlSheet.Cells(2, 11) = "=SUBTOTAL(9,K4:K$99999)"
85
-        xlSheet.Cells(2, 15) = "=SUBTOTAL(9,P4:P$99999)"
86
-        xlSheet.Cells(2, 17) = "=SUBTOTAL(9,Q4:Q$99999)"
87
-        xlSheet.Cells(2, 18) = "=SUBTOTAL(9,R4:R$99999)"
88
-        xlSheet.Cells(2, 29) = "=SUBTOTAL(9,AC4:AC$99999)"
89
-        xlSheet.Cells(3, 31) = "ItemNumber"
90
-        xlSheet.Cells(3, 32) = "審核"
91
-        xlSheet.Cells(3, 33) = "Vionic Po#"
92
-        xlSheet.Cells(3, 34) = "Ship Mode"
93
-        xlSheet.Cells(3, 35) = "Company code"
94
-        xlSheet.Cells(3, 36) = "Final Customer Ship To"
54
+        xlSheet.Cells(3, 8) = "DM"
55
+        xlSheet.Cells(3, 9) = "PRS"
56
+        xlSheet.Cells(3, 10) = "X/F Date"
57
+        xlSheet.Cells(3, 11) = "Price"
58
+        xlSheet.Cells(3, 12) = "Amount"
59
+        xlSheet.Cells(3, 13) = "Remark"
60
+        xlSheet.Cells(3, 14) = "Factory"
61
+        xlSheet.Cells(3, 15) = "DIV"
62
+        xlSheet.Cells(3, 16) = "FTY Price"
63
+        xlSheet.Cells(3, 17) = "Commission TTL"
64
+        xlSheet.Cells(3, 18) = "Commission Darren"
65
+        xlSheet.Cells(3, 19) = "Commission Tendenza"
66
+        xlSheet.Cells(3, 20) = "%"
67
+        xlSheet.Cells(3, 21) = "Basic Price(+)"
68
+        xlSheet.Cells(3, 22) = "PG/MOQ (+)"
69
+        xlSheet.Cells(3, 23) = "Foot form/ PET form(+)"
70
+        xlSheet.Cells(3, 24) = "Tooling (+)"
71
+        xlSheet.Cells(3, 25) = "Rubber Band(+)"
72
+        xlSheet.Cells(3, 26) = "J.HOOK (+)"
73
+        xlSheet.Cells(3, 27) = "Water Resistant(+)"
74
+        xlSheet.Cells(3, 28) = "16% VAT(+)"
75
+        xlSheet.Cells(3, 29) = "EXW Saving(-)"
76
+        xlSheet.Cells(3, 30) = "TTL Collected Toolng"
77
+        xlSheet.Cells(3, 31) = "Exchange"
78
+        xlSheet.Cells(1, 8) = "Total-PRS"
79
+        xlSheet.Cells(1, 12) = "Total-Amount"
80
+        xlSheet.Cells(1, 16) = "Total-Commission-TTL"
81
+        xlSheet.Cells(1, 18) = "Total-Commission-Darren"
82
+        xlSheet.Cells(1, 19) = "Total-Commission-Tendenza"
83
+        xlSheet.Cells(1, 30) = "Total-TTL Collected Toolng"
84
+        xlSheet.Cells(2, 8) = "=SUBTOTAL(9,M4:H$99999)"
85
+        xlSheet.Cells(2, 12) = "=SUBTOTAL(9,L4:K$99999)"
86
+        xlSheet.Cells(2, 16) = "=SUBTOTAL(9,Q4:P$99999)"
87
+        xlSheet.Cells(2, 18) = "=SUBTOTAL(9,R4:Q$99999)"
88
+        xlSheet.Cells(2, 19) = "=SUBTOTAL(9,S4:R$99999)"
89
+        xlSheet.Cells(2, 30) = "=SUBTOTAL(9,AD4:AC$99999)"
90
+        xlSheet.Cells(3, 32) = "ItemNumber"
91
+        xlSheet.Cells(3, 33) = "審核"
92
+        xlSheet.Cells(3, 34) = "Vionic Po#"
93
+        xlSheet.Cells(3, 35) = "Ship Mode"
94
+        xlSheet.Cells(3, 36) = "Company code"
95
+        xlSheet.Cells(3, 37) = "Final Customer Ship To"
95 96
         AA(xlApp, xlSheet)
96 97
         For i As Integer = 0 To 利潤表_dgv.Rows.Count - 1
97 98
             xlSheet.Cells(i + 4, 1) = 利潤表_dgv.Rows(i).Cells("訂單流水號").Value
98 99
             xlSheet.Cells(i + 4, 2) = 利潤表_dgv.Rows(i).Cells("年份季度").Value
99 100
             xlSheet.Cells(i + 4, 3) = 利潤表_dgv.Rows(i).Cells("力威訂單號").Value
100 101
             xlSheet.Cells(i + 4, 4) = 利潤表_dgv.Rows(i).Cells("形體號").Value
101
-            xlSheet.Cells(i + 4, 5) = 利潤表_dgv.Rows(i).Cells("顏色").Value
102
-            xlSheet.Cells(i + 4, 6) = 利潤表_dgv.Rows(i).Cells("ProductID").Value
102
+            xlSheet.Cells(i + 4, 5) = 利潤表_dgv.Rows(i).Cells("TVW").Value
103
+            xlSheet.Cells(i + 4, 6) = 利潤表_dgv.Rows(i).Cells("顏色").Value
104
+            If CB_1.Checked = True Then : xlSheet.Cells(i + 4, 7) = 利潤表_dgv.Rows(i).Cells("工廠回復交期").Value
105
+            Else : xlSheet.Cells(i + 4, 7) = 利潤表_dgv.Rows(i).Cells("ProductID").Value : End If
103 106
 
104
-            xlSheet.Cells(i + 4, 7) = 利潤表_dgv.Rows(i).Cells("楦型").Value
105
-            xlSheet.Cells(i + 4, 8) = 利潤表_dgv.Rows(i).Cells("數量").Value
106
-            xlSheet.Cells(i + 4, 9) = 利潤表_dgv.Rows(i).Cells("客戶交期").Value
107
-            xlSheet.Cells(i + 4, 10) = "=T" & i + 4 & "+U" & i + 4 & "+V" & i + 4 & "+W" & i + 4 & "+X" & i + 4 & "+Y" & i + 4 & "+Z" & i + 4 & "+AA" & i + 4 & "/AD" & i + 4 & "-AB" & i + 4
108
-            xlSheet.Cells(i + 4, 11) = "=H" & i + 4 & "*J" & i + 4 & ""
109
-            xlSheet.Cells(i + 4, 12) = 利潤表_dgv.Rows(i).Cells("備註").Value
110
-            xlSheet.Cells(i + 4, 13) = 利潤表_dgv.Rows(i).Cells("工廠").Value
111
-            xlSheet.Cells(i + 4, 14) = 利潤表_dgv.Rows(i).Cells("訂單種類").Value
107
+            xlSheet.Cells(i + 4, 8) = 利潤表_dgv.Rows(i).Cells("楦型").Value
108
+            xlSheet.Cells(i + 4, 9) = 利潤表_dgv.Rows(i).Cells("數量").Value
109
+            xlSheet.Cells(i + 4, 10) = 利潤表_dgv.Rows(i).Cells("客戶交期").Value
110
+            xlSheet.Cells(i + 4, 11) = "=U" & i + 4 & "+V" & i + 4 & "+W" & i + 4 & "+X" & i + 4 & "+Y" & i + 4 & "+Z" & i + 4 & "+AA" & i + 4 & "+AB" & i + 4 & "/AE" & i + 4 & "-AC" & i + 4
111
+            xlSheet.Cells(i + 4, 12) = "=I" & i + 4 & "*K" & i + 4 & ""
112
+            xlSheet.Cells(i + 4, 13) = 利潤表_dgv.Rows(i).Cells("備註").Value
113
+            xlSheet.Cells(i + 4, 14) = 利潤表_dgv.Rows(i).Cells("工廠").Value
114
+            xlSheet.Cells(i + 4, 15) = 利潤表_dgv.Rows(i).Cells("訂單種類").Value
112 115
             If BL1 = True Then
113
-                xlSheet.Cells(i + 4, 15) = 利潤表_dgv.Rows(i).Cells("FTY_2").Value
114
-                xlSheet.Cells(i + 4, 16) = "=K" & i + 4 & "-(H" & i + 4 & "*O" & i + 4 & ")"
115
-                xlSheet.Cells(i + 4, 17) = "=(K" & i + 4 & "-(H" & i + 4 & "*O" & i + 4 & "))/2"
116
-                xlSheet.Cells(i + 4, 18) = "=(K" & i + 4 & "-(H" & i + 4 & "*O" & i + 4 & "))/2"
116
+                xlSheet.Cells(i + 4, 16) = 利潤表_dgv.Rows(i).Cells("FTY_2").Value
117
+                xlSheet.Cells(i + 4, 17) = "=L" & i + 4 & "-(I" & i + 4 & "*P" & i + 4 & ")"
118
+                xlSheet.Cells(i + 4, 18) = "=(L" & i + 4 & "-(I" & i + 4 & "*P" & i + 4 & "))/2"
119
+                xlSheet.Cells(i + 4, 19) = "=(L" & i + 4 & "-(I" & i + 4 & "*P" & i + 4 & "))/2"
117 120
             Else
118
-                xlSheet.Cells(i + 4, 15) = 利潤表_dgv.Rows(i).Cells("FTY_1").Value
119
-                xlSheet.Cells(i + 4, 16) = "=K" & i + 4 & "-(H" & i + 4 & "*O" & i + 4 & ")"
120
-                xlSheet.Cells(i + 4, 17) = "0"
121
+                xlSheet.Cells(i + 4, 16) = 利潤表_dgv.Rows(i).Cells("FTY_1").Value
122
+                xlSheet.Cells(i + 4, 17) = "=L" & i + 4 & "-(I" & i + 4 & "*P" & i + 4 & ")"
121 123
                 xlSheet.Cells(i + 4, 18) = "0"
124
+                xlSheet.Cells(i + 4, 19) = "0"
122 125
             End If
123
-            xlSheet.Cells(i + 4, 19) = "=IF(K" & i + 4 & "=0,0,(K" & i + 4 & "-H" & i + 4 & "*O" & i + 4 & ")/K" & i + 4 & ")"
124
-            xlSheet.Cells(i + 4, 20) = 利潤表_dgv.Rows(i).Cells("BasicPrice").Value
125
-            xlSheet.Cells(i + 4, 21) = 利潤表_dgv.Rows(i).Cells("Polybag").Value
126
-            xlSheet.Cells(i + 4, 22) = 利潤表_dgv.Rows(i).Cells("FOOTorPET").Value
127
-            xlSheet.Cells(i + 4, 23) = 利潤表_dgv.Rows(i).Cells("Tooling").Value
128
-            xlSheet.Cells(i + 4, 24) = 利潤表_dgv.Rows(i).Cells("RubberBand").Value
129
-            xlSheet.Cells(i + 4, 25) = 利潤表_dgv.Rows(i).Cells("JHOOK").Value
130
-            xlSheet.Cells(i + 4, 26) = 利潤表_dgv.Rows(i).Cells("WaterResistant").Value
131
-            xlSheet.Cells(i + 4, 27) = 利潤表_dgv.Rows(i).Cells("P16VAT").Value
132
-            xlSheet.Cells(i + 4, 28) = 利潤表_dgv.Rows(i).Cells("EXWsaving").Value
133
-            xlSheet.Cells(i + 4, 29) = "=W" & i + 4 & "*H" & i + 4 & ""
134
-            xlSheet.Cells(i + 4, 30) = 利潤表_dgv.Rows(i).Cells("Exchange").Value
135
-            xlSheet.Cells(i + 4, 31) = 利潤表_dgv.Rows(i).Cells("ItemNumber").Value
136
-            xlSheet.Cells(i + 4, 32) = 利潤表_dgv.Rows(i).Cells("審核").Value
137
-            xlSheet.Cells(i + 4, 33) = 利潤表_dgv.Rows(i).Cells("客戶訂單號").Value
138
-            xlSheet.Cells(i + 4, 34) = 利潤表_dgv.Rows(i).Cells("SalesOrder").Value
139
-            xlSheet.Cells(i + 4, 35) = 利潤表_dgv.Rows(i).Cells("CustomerName").Value
140
-            xlSheet.Cells(i + 4, 36) = 利潤表_dgv.Rows(i).Cells("最終運送").Value
126
+            xlSheet.Cells(i + 4, 20) = "=IF(L" & i + 4 & "=0,0,(L" & i + 4 & "-I" & i + 4 & "*P" & i + 4 & ")/L" & i + 4 & ")"
127
+            xlSheet.Cells(i + 4, 21) = 利潤表_dgv.Rows(i).Cells("BasicPrice").Value
128
+            xlSheet.Cells(i + 4, 22) = 利潤表_dgv.Rows(i).Cells("Polybag").Value
129
+            xlSheet.Cells(i + 4, 23) = 利潤表_dgv.Rows(i).Cells("FOOTorPET").Value
130
+            xlSheet.Cells(i + 4, 24) = 利潤表_dgv.Rows(i).Cells("Tooling").Value
131
+            xlSheet.Cells(i + 4, 25) = 利潤表_dgv.Rows(i).Cells("RubberBand").Value
132
+            xlSheet.Cells(i + 4, 26) = 利潤表_dgv.Rows(i).Cells("JHOOK").Value
133
+            xlSheet.Cells(i + 4, 27) = 利潤表_dgv.Rows(i).Cells("WaterResistant").Value
134
+            xlSheet.Cells(i + 4, 28) = 利潤表_dgv.Rows(i).Cells("P16VAT").Value
135
+            xlSheet.Cells(i + 4, 29) = 利潤表_dgv.Rows(i).Cells("EXWsaving").Value
136
+            xlSheet.Cells(i + 4, 30) = "=X" & i + 4 & "*I" & i + 4 & ""
137
+            xlSheet.Cells(i + 4, 31) = 利潤表_dgv.Rows(i).Cells("Exchange").Value
138
+            xlSheet.Cells(i + 4, 32) = 利潤表_dgv.Rows(i).Cells("ItemNumber").Value
139
+            xlSheet.Cells(i + 4, 33) = 利潤表_dgv.Rows(i).Cells("審核").Value
140
+            xlSheet.Cells(i + 4, 34) = 利潤表_dgv.Rows(i).Cells("客戶訂單號").Value
141
+            xlSheet.Cells(i + 4, 35) = 利潤表_dgv.Rows(i).Cells("SalesOrder").Value
142
+            xlSheet.Cells(i + 4, 36) = 利潤表_dgv.Rows(i).Cells("CustomerName").Value
143
+            xlSheet.Cells(i + 4, 37) = 利潤表_dgv.Rows(i).Cells("最終運送").Value
141 144
             With xlApp.Selection
142 145
                 .Font.Bold = True
143 146
             End With
@@ -163,24 +166,24 @@ Public Class 列印_訂單價格利潤表
163 166
         Dim 位置1 As String
164 167
         xlSheet.Columns("A:A").Select : myExcel.Selection.ColumnWidth = 11 : xlSheet.Columns("B:B").Select : myExcel.Selection.ColumnWidth = 8
165 168
         xlSheet.Columns("C:C").Select : myExcel.Selection.ColumnWidth = 13 : xlSheet.Columns("D:D").Select : myExcel.Selection.ColumnWidth = 9
166
-        xlSheet.Columns("E:E").Select : myExcel.Selection.ColumnWidth = 8 : xlSheet.Columns("F:F").Select : myExcel.Selection.ColumnWidth = 13
169
+        xlSheet.Columns("E:F").Select : myExcel.Selection.ColumnWidth = 8 : xlSheet.Columns("G:G").Select : myExcel.Selection.ColumnWidth = 13
167 170
 
168
-        xlSheet.Columns("G:G").Select : myExcel.Selection.ColumnWidth = 5
169
-        xlSheet.Columns("H:H").Select : myExcel.Selection.ColumnWidth = 6 : xlSheet.Columns("I:I").Select : myExcel.Selection.ColumnWidth = 9
170
-        xlSheet.Columns("J:J").Select : myExcel.Selection.ColumnWidth = 5.5 : xlSheet.Columns("K:K").Select : myExcel.Selection.ColumnWidth = 11
171
-        xlSheet.Columns("L:L").Select : myExcel.Selection.ColumnWidth = 6.5 : xlSheet.Columns("M:M").Select : myExcel.Selection.ColumnWidth = 10
172
-        xlSheet.Columns("N:N").Select : myExcel.Selection.ColumnWidth = 6 : xlSheet.Columns("O:O").Select : myExcel.Selection.ColumnWidth = 11
173
-        xlSheet.Columns("P:P").Select : myExcel.Selection.ColumnWidth = 14 : xlSheet.Columns("Q:Q").Select : myExcel.Selection.ColumnWidth = 11
174
-        xlSheet.Columns("R:R").Select : myExcel.Selection.ColumnWidth = 11 : xlSheet.Columns("S:S").Select : myExcel.Selection.ColumnWidth = 6.5
175
-        xlSheet.Columns("T:T").Select : myExcel.Selection.ColumnWidth = 7 : xlSheet.Columns("U:U").Select : myExcel.Selection.ColumnWidth = 7
176
-        xlSheet.Columns("V:V").Select : myExcel.Selection.ColumnWidth = 7 : xlSheet.Columns("W:W").Select : myExcel.Selection.ColumnWidth = 6
177
-        xlSheet.Columns("X:X").Select : myExcel.Selection.ColumnWidth = 6 : xlSheet.Columns("Y:Y").Select : myExcel.Selection.ColumnWidth = 6.5
178
-        xlSheet.Columns("Z:Z").Select : myExcel.Selection.ColumnWidth = 5 : xlSheet.Columns("AA:AA").Select : myExcel.Selection.ColumnWidth = 5
179
-        xlSheet.Columns("AB:AB").Select : myExcel.Selection.ColumnWidth = 9 : xlSheet.Columns("AC:AC").Select : myExcel.Selection.ColumnWidth = 8
180
-        xlSheet.Columns("AD:AD").Select : myExcel.Selection.ColumnWidth = 11 : xlSheet.Columns("AE:AE").Select : myExcel.Selection.ColumnWidth = 11
181
-        xlSheet.Columns("AF:AF").Select : myExcel.Selection.ColumnWidth = 13 : xlSheet.Columns("AG:AG").Select : myExcel.Selection.ColumnWidth = 13
182
-        xlSheet.Columns("AH:AH").Select : myExcel.Selection.ColumnWidth = 14 : xlSheet.Columns("AI:AI").Select : myExcel.Selection.ColumnWidth = 8
183
-        xlSheet.Columns("AJ:AJ").Select : myExcel.Selection.ColumnWidth = 75
171
+        xlSheet.Columns("H:H").Select : myExcel.Selection.ColumnWidth = 5
172
+        xlSheet.Columns("I:I").Select : myExcel.Selection.ColumnWidth = 6 : xlSheet.Columns("J:J").Select : myExcel.Selection.ColumnWidth = 9
173
+        xlSheet.Columns("K:K").Select : myExcel.Selection.ColumnWidth = 5.5 : xlSheet.Columns("L:L").Select : myExcel.Selection.ColumnWidth = 11
174
+        xlSheet.Columns("M:M").Select : myExcel.Selection.ColumnWidth = 6.5 : xlSheet.Columns("N:N").Select : myExcel.Selection.ColumnWidth = 10
175
+        xlSheet.Columns("O:O").Select : myExcel.Selection.ColumnWidth = 6 : xlSheet.Columns("P:P").Select : myExcel.Selection.ColumnWidth = 11
176
+        xlSheet.Columns("Q:Q").Select : myExcel.Selection.ColumnWidth = 14 : xlSheet.Columns("R:E").Select : myExcel.Selection.ColumnWidth = 11
177
+        xlSheet.Columns("S:S").Select : myExcel.Selection.ColumnWidth = 11 : xlSheet.Columns("T:T").Select : myExcel.Selection.ColumnWidth = 6.5
178
+        xlSheet.Columns("U:U").Select : myExcel.Selection.ColumnWidth = 7 : xlSheet.Columns("V:V").Select : myExcel.Selection.ColumnWidth = 7
179
+        xlSheet.Columns("W:W").Select : myExcel.Selection.ColumnWidth = 7 : xlSheet.Columns("X:X").Select : myExcel.Selection.ColumnWidth = 6
180
+        xlSheet.Columns("Y:Y").Select : myExcel.Selection.ColumnWidth = 6 : xlSheet.Columns("Z:Z").Select : myExcel.Selection.ColumnWidth = 6.5
181
+        xlSheet.Columns("AA:AA").Select : myExcel.Selection.ColumnWidth = 5 : xlSheet.Columns("AB:AB").Select : myExcel.Selection.ColumnWidth = 5
182
+        xlSheet.Columns("AC:AC").Select : myExcel.Selection.ColumnWidth = 9 : xlSheet.Columns("AD:AD").Select : myExcel.Selection.ColumnWidth = 8
183
+        xlSheet.Columns("AE:AE").Select : myExcel.Selection.ColumnWidth = 11 : xlSheet.Columns("AF:AF").Select : myExcel.Selection.ColumnWidth = 11
184
+        xlSheet.Columns("AG:AG").Select : myExcel.Selection.ColumnWidth = 13 : xlSheet.Columns("AH:AH").Select : myExcel.Selection.ColumnWidth = 13
185
+        xlSheet.Columns("AI:AI").Select : myExcel.Selection.ColumnWidth = 14 : xlSheet.Columns("AJ:AJ").Select : myExcel.Selection.ColumnWidth = 8
186
+        xlSheet.Columns("AK:AK").Select : myExcel.Selection.ColumnWidth = 75
184 187
 
185 188
 
186 189
         xlSheet.Cells.Select()
@@ -211,63 +214,63 @@ Public Class 列印_訂單價格利潤表
211 214
             .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False
212 215
         End With
213 216
         xlSheet.Columns("A:A").Select
214
-        xlSheet.Columns("H:H").Select : myExcel.Selection.NumberFormatLocal = "#,##0_ ;[紅色]-#,##0 "
215
-        xlSheet.Columns("I:I").Select : myExcel.Selection.NumberFormatLocal = "yyyy/mm/dd"
216
-        xlSheet.Columns("J:K").Select : myExcel.Selection.NumberFormatLocal = "#,##0.00_ ;[紅色]-#,##0.00 "
217
-        xlSheet.Columns("O:R").Select : myExcel.Selection.NumberFormatLocal = "#,##0.00_ ;[紅色]-#,##0.00 "
218
-        xlSheet.Range("G2:H2").Select() : myExcel.Selection.NumberFormatLocal = "#,##0_ ;[紅色]-#,##0 "
219
-        xlSheet.Columns("S:S").Select : myExcel.Selection.NumberFormatLocal = "0.00%"
217
+        xlSheet.Columns("I:I").Select : myExcel.Selection.NumberFormatLocal = "#,##0_ ;[紅色]-#,##0 "
218
+        xlSheet.Columns("J:J").Select : myExcel.Selection.NumberFormatLocal = "yyyy/mm/dd"
219
+        xlSheet.Columns("K:L").Select : myExcel.Selection.NumberFormatLocal = "#,##0.00_ ;[紅色]-#,##0.00 "
220
+        xlSheet.Columns("P:S").Select : myExcel.Selection.NumberFormatLocal = "#,##0.00_ ;[紅色]-#,##0.00 "
221
+        xlSheet.Range("H2:I2").Select() : myExcel.Selection.NumberFormatLocal = "#,##0_ ;[紅色]-#,##0 "
222
+        xlSheet.Columns("T:T").Select : myExcel.Selection.NumberFormatLocal = "0.00%"
220 223
         myExcel.ActiveWindow.ScrollColumn = 2 : myExcel.ActiveWindow.ScrollColumn = 3 : myExcel.ActiveWindow.ScrollColumn = 4
221
-        xlSheet.Columns("T:AC").Select : myExcel.Selection.NumberFormatLocal = "_-* #,##0.00_-;-* #,##0.00_-;_-* ""-""??_-;_-@_-"
224
+        xlSheet.Columns("U:AD").Select : myExcel.Selection.NumberFormatLocal = "_-* #,##0.00_-;-* #,##0.00_-;_-* ""-""??_-;_-@_-"
222 225
         myExcel.ActiveWindow.ScrollColumn = 3 : myExcel.ActiveWindow.ScrollColumn = 2 : myExcel.ActiveWindow.ScrollColumn = 1
223 226
         xlSheet.Rows("4:4").Select : myExcel.ActiveWindow.FreezePanes = True
224
-        xlSheet.Range("H6").Select()
227
+        xlSheet.Range("I6").Select()
225 228
 
226
-        xlSheet.Range("A1:E2").Select() : With myExcel.Selection
229
+        xlSheet.Range("A1:F2").Select() : With myExcel.Selection
227 230
             .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0 : .ShrinkToFit = False
228 231
             .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
229
-        xlSheet.Range("G1:H1").Select() : With myExcel.Selection
232
+        xlSheet.Range("H1:I1").Select() : With myExcel.Selection
230 233
             .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0 : .ShrinkToFit = False
231 234
             .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
232
-        xlSheet.Range("G2:H2").Select() : With myExcel.Selection
235
+        xlSheet.Range("H2:I2").Select() : With myExcel.Selection
233 236
             .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0 : .ShrinkToFit = False
234 237
             .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
235
-        xlSheet.Range("I1:J2").Select() : With myExcel.Selection
238
+        xlSheet.Range("J1:K2").Select() : With myExcel.Selection
236 239
             .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0 : .ShrinkToFit = False
237 240
             .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
238
-        xlSheet.Range("L1:N2").Select() : With myExcel.Selection
241
+        xlSheet.Range("M1:O2").Select() : With myExcel.Selection
239 242
             .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0 : .ShrinkToFit = False
240 243
             .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
241
-        xlSheet.Range("O1:P1").Select() : With myExcel.Selection
244
+        xlSheet.Range("P1:Q1").Select() : With myExcel.Selection
242 245
             .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0 : .ShrinkToFit = False
243 246
             .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
244
-        xlSheet.Range("O2:P2").Select() : With myExcel.Selection
247
+        xlSheet.Range("P2:Q2").Select() : With myExcel.Selection
245 248
             .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0 : .ShrinkToFit = False
246 249
             .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
247
-        xlSheet.Range("R1:S1").Select() : With myExcel.Selection
250
+        xlSheet.Range("S1:T1").Select() : With myExcel.Selection
248 251
             .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0 : .ShrinkToFit = False
249 252
             .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
250
-        xlSheet.Range("R2:S2").Select() : With myExcel.Selection
253
+        xlSheet.Range("S2:T2").Select() : With myExcel.Selection
251 254
             .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0 : .ShrinkToFit = False
252 255
             .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
253
-        xlSheet.Range("T1:AA2").Select() : With myExcel.Selection
256
+        xlSheet.Range("U1:AB2").Select() : With myExcel.Selection
254 257
             .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0 : .ShrinkToFit = False
255 258
             .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
256
-        xlSheet.Range("AB1:AC1").Select() : With myExcel.Selection
259
+        xlSheet.Range("AC1:AD1").Select() : With myExcel.Selection
257 260
             .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0 : .ShrinkToFit = False
258 261
             .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
259
-        xlSheet.Range("AB2:AC2").Select() : With myExcel.Selection
262
+        xlSheet.Range("AC2:AD2").Select() : With myExcel.Selection
260 263
             .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0 : .ShrinkToFit = False
261 264
             .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
262 265
 
263
-        xlSheet.Range("A1:N3").Select() : With myExcel.Selection.Interior
266
+        xlSheet.Range("A1:O3").Select() : With myExcel.Selection.Interior
264 267
             .Pattern = xlSolid : .PatternColorIndex = xlAutomatic : .ThemeColor = xlThemeColorDark2 : .TintAndShade = -0.0999786370433668 : .PatternTintAndShade = 0 : End With
265
-        xlSheet.Range("O1:S3").Select() : With myExcel.Selection.Interior
268
+        xlSheet.Range("O1:T3").Select() : With myExcel.Selection.Interior
266 269
             .Pattern = xlSolid : .PatternColorIndex = xlAutomatic : .Color = 65535 : .TintAndShade = 0 : .PatternTintAndShade = 0 : End With
267
-        xlSheet.Range("T1:AC3").Select() : With myExcel.Selection.Interior
270
+        xlSheet.Range("U1:AD3").Select() : With myExcel.Selection.Interior
268 271
             .Pattern = xlSolid : .PatternColorIndex = xlAutomatic : .ThemeColor = xlThemeColorAccent6 : .TintAndShade = 0.399975585192419 : .PatternTintAndShade = 0 : End With
269 272
 
270
-        xlSheet.Range("A1:AJ3").Select() : myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
273
+        xlSheet.Range("A1:AK3").Select() : myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
271 274
         With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
272 275
         With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
273 276
         With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
@@ -281,7 +284,7 @@ Public Class 列印_訂單價格利潤表
281 284
         For M = 4 To 利潤表_dgv.Rows.Count + 2
282 285
             M += 1
283 286
         Next M
284
-        位置1 = "A4:AJ" & M
287
+        位置1 = "A4:AK" & M
285 288
         xlSheet.Range(位置1).Select() : myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
286 289
         With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
287 290
         With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
@@ -290,15 +293,21 @@ Public Class 列印_訂單價格利潤表
290 293
         With myExcel.Selection.Borders(xlInsideVertical) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlHairline : End With
291 294
         With myExcel.Selection.Borders(xlInsideHorizontal) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlHairline : End With
292 295
 
293
-        xlSheet.Range("AE1:AP2").Select()
296
+        xlSheet.Range("AF1:AQ2").Select()
294 297
         With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
295 298
             .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False
296 299
         End With : myExcel.Selection.Merge
297 300
 
298
-        xlSheet.Range("AJ4:AJ" & M).Select()
301
+        xlSheet.Range("AK4:AK" & M).Select()
299 302
         With myExcel.Selection : .HorizontalAlignment = xlGeneral : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
300 303
             .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With
301 304
 
302 305
         myExcel.ActiveWindow.DisplayGridlines = False
303 306
     End Sub
307
+    Private Sub CB_1_CheckedChanged(sender As Object, e As EventArgs) Handles CB_1.Click
308
+        CB_1.Checked = True : CB_2.Checked = False
309
+    End Sub
310
+    Private Sub CB_2_CheckedChanged(sender As Object, e As EventArgs) Handles CB_2.Click
311
+        CB_1.Checked = False : CB_2.Checked = True
312
+    End Sub
304 313
 End Class

+ 58
- 58
TENDEN-MES-SYS/4、量產訂單管理/量產訂單系統/訂單控制表.Designer.vb View File

@@ -148,9 +148,6 @@ Partial Class 訂單控制表
148 148
         Me.順時鐘90度旋轉_bt = New System.Windows.Forms.Button()
149 149
         Me.第九頁_bt = New System.Windows.Forms.Button()
150 150
         Me.第十頁_bt = New System.Windows.Forms.Button()
151
-        Me.列印明細_bt = New System.Windows.Forms.Button()
152
-        Me.驗貨報告_pb = New System.Windows.Forms.PictureBox()
153
-        Me.PictureBox1 = New System.Windows.Forms.PictureBox()
154 151
         Me.資料庫選擇2_bt = New System.Windows.Forms.Button()
155 152
         Me.資料庫選擇1_bt = New System.Windows.Forms.Button()
156 153
         Me.Label21 = New System.Windows.Forms.Label()
@@ -254,7 +251,6 @@ Partial Class 訂單控制表
254 251
         Me.Panel2 = New System.Windows.Forms.Panel()
255 252
         Me.Label51 = New System.Windows.Forms.Label()
256 253
         Me.Panel3 = New System.Windows.Forms.Panel()
257
-        Me.包裝資料_pb = New System.Windows.Forms.PictureBox()
258 254
         Me.CanceL3_bt = New System.Windows.Forms.Button()
259 255
         Me.TVW_tb = New System.Windows.Forms.TextBox()
260 256
         Me.Panel1 = New System.Windows.Forms.Panel()
@@ -262,14 +258,16 @@ Partial Class 訂單控制表
262 258
         Me.Label52 = New System.Windows.Forms.Label()
263 259
         Me.訂單拆分_bt = New System.Windows.Forms.Button()
264 260
         Me.資料庫選擇3_bt = New System.Windows.Forms.Button()
265
-        Me.開啟明細_bt = New System.Windows.Forms.Button()
266 261
         Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
262
+        Me.開啟明細_bt = New System.Windows.Forms.Button()
263
+        Me.列印明細_bt = New System.Windows.Forms.Button()
264
+        Me.驗貨報告_pb = New System.Windows.Forms.PictureBox()
265
+        Me.PictureBox1 = New System.Windows.Forms.PictureBox()
266
+        Me.包裝資料_pb = New System.Windows.Forms.PictureBox()
267 267
         CType(Me.控制表_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
268 268
         Me.GroupBox1.SuspendLayout()
269 269
         Me.GroupBox2.SuspendLayout()
270 270
         CType(Me.計算_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
271
-        CType(Me.驗貨報告_pb, System.ComponentModel.ISupportInitialize).BeginInit()
272
-        CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
273 271
         CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).BeginInit()
274 272
         Me.SplitContainer1.Panel1.SuspendLayout()
275 273
         Me.SplitContainer1.Panel2.SuspendLayout()
@@ -281,9 +279,11 @@ Partial Class 訂單控制表
281 279
         Me.資訊_gb.SuspendLayout()
282 280
         Me.Panel2.SuspendLayout()
283 281
         Me.Panel3.SuspendLayout()
284
-        CType(Me.包裝資料_pb, System.ComponentModel.ISupportInitialize).BeginInit()
285 282
         Me.Panel1.SuspendLayout()
286 283
         CType(Me.表頭_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
284
+        CType(Me.驗貨報告_pb, System.ComponentModel.ISupportInitialize).BeginInit()
285
+        CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
286
+        CType(Me.包裝資料_pb, System.ComponentModel.ISupportInitialize).BeginInit()
287 287
         Me.SuspendLayout()
288 288
         '
289 289
         '控制表_dgv
@@ -1401,37 +1401,6 @@ Partial Class 訂單控制表
1401 1401
         Me.第十頁_bt.Text = "第十頁"
1402 1402
         Me.第十頁_bt.UseVisualStyleBackColor = True
1403 1403
         '
1404
-        '列印明細_bt
1405
-        '
1406
-        Me.列印明細_bt.BackgroundImage = Global.天盾國際管理系統.My.Resources.Resources.print
1407
-        Me.列印明細_bt.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
1408
-        Me.列印明細_bt.ForeColor = System.Drawing.Color.Olive
1409
-        Me.列印明細_bt.Location = New System.Drawing.Point(1007, 87)
1410
-        Me.列印明細_bt.Name = "列印明細_bt"
1411
-        Me.列印明細_bt.Size = New System.Drawing.Size(46, 27)
1412
-        Me.列印明細_bt.TabIndex = 516
1413
-        Me.列印明細_bt.UseVisualStyleBackColor = True
1414
-        '
1415
-        '驗貨報告_pb
1416
-        '
1417
-        Me.驗貨報告_pb.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
1418
-        Me.驗貨報告_pb.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
1419
-        Me.驗貨報告_pb.Location = New System.Drawing.Point(1712, 35)
1420
-        Me.驗貨報告_pb.Name = "驗貨報告_pb"
1421
-        Me.驗貨報告_pb.Size = New System.Drawing.Size(190, 208)
1422
-        Me.驗貨報告_pb.TabIndex = 501
1423
-        Me.驗貨報告_pb.TabStop = False
1424
-        '
1425
-        'PictureBox1
1426
-        '
1427
-        Me.PictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
1428
-        Me.PictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
1429
-        Me.PictureBox1.Location = New System.Drawing.Point(1411, 3)
1430
-        Me.PictureBox1.Name = "PictureBox1"
1431
-        Me.PictureBox1.Size = New System.Drawing.Size(297, 165)
1432
-        Me.PictureBox1.TabIndex = 500
1433
-        Me.PictureBox1.TabStop = False
1434
-        '
1435 1404
         '資料庫選擇2_bt
1436 1405
         '
1437 1406
         Me.資料庫選擇2_bt.Location = New System.Drawing.Point(1842, 2)
@@ -2443,17 +2412,6 @@ Partial Class 訂單控制表
2443 2412
         Me.Panel3.Size = New System.Drawing.Size(1180, 363)
2444 2413
         Me.Panel3.TabIndex = 1376
2445 2414
         '
2446
-        '包裝資料_pb
2447
-        '
2448
-        Me.包裝資料_pb.BackColor = System.Drawing.Color.White
2449
-        Me.包裝資料_pb.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
2450
-        Me.包裝資料_pb.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
2451
-        Me.包裝資料_pb.Location = New System.Drawing.Point(-1, -1)
2452
-        Me.包裝資料_pb.Name = "包裝資料_pb"
2453
-        Me.包裝資料_pb.Size = New System.Drawing.Size(1179, 362)
2454
-        Me.包裝資料_pb.TabIndex = 1660
2455
-        Me.包裝資料_pb.TabStop = False
2456
-        '
2457 2415
         'CanceL3_bt
2458 2416
         '
2459 2417
         Me.CanceL3_bt.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
@@ -2530,6 +2488,13 @@ Partial Class 訂單控制表
2530 2488
         Me.資料庫選擇3_bt.Text = "HP"
2531 2489
         Me.資料庫選擇3_bt.UseVisualStyleBackColor = True
2532 2490
         '
2491
+        'ToolTip1
2492
+        '
2493
+        Me.ToolTip1.AutoPopDelay = 10000
2494
+        Me.ToolTip1.InitialDelay = 500
2495
+        Me.ToolTip1.IsBalloon = True
2496
+        Me.ToolTip1.ReshowDelay = 100
2497
+        '
2533 2498
         '開啟明細_bt
2534 2499
         '
2535 2500
         Me.開啟明細_bt.BackgroundImage = Global.天盾國際管理系統.My.Resources.Resources.tests
@@ -2541,12 +2506,47 @@ Partial Class 訂單控制表
2541 2506
         Me.開啟明細_bt.TabIndex = 1669
2542 2507
         Me.開啟明細_bt.UseVisualStyleBackColor = True
2543 2508
         '
2544
-        'ToolTip1
2509
+        '列印明細_bt
2545 2510
         '
2546
-        Me.ToolTip1.AutoPopDelay = 10000
2547
-        Me.ToolTip1.InitialDelay = 500
2548
-        Me.ToolTip1.IsBalloon = True
2549
-        Me.ToolTip1.ReshowDelay = 100
2511
+        Me.列印明細_bt.BackgroundImage = Global.天盾國際管理系統.My.Resources.Resources.print
2512
+        Me.列印明細_bt.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
2513
+        Me.列印明細_bt.ForeColor = System.Drawing.Color.Olive
2514
+        Me.列印明細_bt.Location = New System.Drawing.Point(1007, 87)
2515
+        Me.列印明細_bt.Name = "列印明細_bt"
2516
+        Me.列印明細_bt.Size = New System.Drawing.Size(46, 27)
2517
+        Me.列印明細_bt.TabIndex = 516
2518
+        Me.列印明細_bt.UseVisualStyleBackColor = True
2519
+        '
2520
+        '驗貨報告_pb
2521
+        '
2522
+        Me.驗貨報告_pb.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
2523
+        Me.驗貨報告_pb.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
2524
+        Me.驗貨報告_pb.Location = New System.Drawing.Point(1712, 35)
2525
+        Me.驗貨報告_pb.Name = "驗貨報告_pb"
2526
+        Me.驗貨報告_pb.Size = New System.Drawing.Size(190, 208)
2527
+        Me.驗貨報告_pb.TabIndex = 501
2528
+        Me.驗貨報告_pb.TabStop = False
2529
+        '
2530
+        'PictureBox1
2531
+        '
2532
+        Me.PictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
2533
+        Me.PictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
2534
+        Me.PictureBox1.Location = New System.Drawing.Point(1411, 3)
2535
+        Me.PictureBox1.Name = "PictureBox1"
2536
+        Me.PictureBox1.Size = New System.Drawing.Size(297, 165)
2537
+        Me.PictureBox1.TabIndex = 500
2538
+        Me.PictureBox1.TabStop = False
2539
+        '
2540
+        '包裝資料_pb
2541
+        '
2542
+        Me.包裝資料_pb.BackColor = System.Drawing.Color.White
2543
+        Me.包裝資料_pb.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
2544
+        Me.包裝資料_pb.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
2545
+        Me.包裝資料_pb.Location = New System.Drawing.Point(-1, -1)
2546
+        Me.包裝資料_pb.Name = "包裝資料_pb"
2547
+        Me.包裝資料_pb.Size = New System.Drawing.Size(1179, 362)
2548
+        Me.包裝資料_pb.TabIndex = 1660
2549
+        Me.包裝資料_pb.TabStop = False
2550 2550
         '
2551 2551
         '訂單控制表
2552 2552
         '
@@ -2712,8 +2712,6 @@ Partial Class 訂單控制表
2712 2712
         Me.GroupBox2.ResumeLayout(False)
2713 2713
         Me.GroupBox2.PerformLayout()
2714 2714
         CType(Me.計算_dgv, System.ComponentModel.ISupportInitialize).EndInit()
2715
-        CType(Me.驗貨報告_pb, System.ComponentModel.ISupportInitialize).EndInit()
2716
-        CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
2717 2715
         Me.SplitContainer1.Panel1.ResumeLayout(False)
2718 2716
         Me.SplitContainer1.Panel2.ResumeLayout(False)
2719 2717
         CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).EndInit()
@@ -2727,10 +2725,12 @@ Partial Class 訂單控制表
2727 2725
         Me.Panel2.ResumeLayout(False)
2728 2726
         Me.Panel2.PerformLayout()
2729 2727
         Me.Panel3.ResumeLayout(False)
2730
-        CType(Me.包裝資料_pb, System.ComponentModel.ISupportInitialize).EndInit()
2731 2728
         Me.Panel1.ResumeLayout(False)
2732 2729
         Me.Panel1.PerformLayout()
2733 2730
         CType(Me.表頭_dgv, System.ComponentModel.ISupportInitialize).EndInit()
2731
+        CType(Me.驗貨報告_pb, System.ComponentModel.ISupportInitialize).EndInit()
2732
+        CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
2733
+        CType(Me.包裝資料_pb, System.ComponentModel.ISupportInitialize).EndInit()
2734 2734
         Me.ResumeLayout(False)
2735 2735
         Me.PerformLayout()
2736 2736
 

+ 15
- 7
TENDEN-MES-SYS/4、量產訂單管理/量產訂單系統/訂單控制表.vb View File

@@ -724,7 +724,7 @@ Public Class 訂單控制表
724 724
         明細表_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
725 725
         明細表_dgv.ColumnHeadersHeight = 25 : 明細表_dgv.AllowUserToAddRows = False
726 726
         ConnOpen()
727
-        SQL1 = "SELECT      " & 訂單資料表(5) & ".天盾流水號, " & 訂單資料表(5) & ".客戶訂單號, " & 訂單資料表(5) & ".ItemNumber, " & 訂單資料表(5) & ".ProductName, 
727
+        SQL1 = "SELECT  DISTINCT " & 訂單資料表(5) & ".天盾流水號, " & 訂單資料表(5) & ".客戶訂單號, " & 訂單資料表(5) & ".ItemNumber, " & 訂單資料表(5) & ".ProductName, 
728 728
                             " & 訂單資料表(5) & ".ProductDescription, " & 訂單資料表(5) & ".Color, " & 訂單資料表(5) & ".DM, " & 訂單資料表(5) & ".[5], " & 訂單資料表(5) & ".[5.5], 
729 729
                             " & 訂單資料表(5) & ".[6], " & 訂單資料表(5) & ".[6.5], " & 訂單資料表(5) & ".[7], " & 訂單資料表(5) & ".[7.5], " & 訂單資料表(5) & ".[8], " & 訂單資料表(5) & ".[8.5], 
730 730
                             " & 訂單資料表(5) & ".[9], " & 訂單資料表(5) & ".[9.5], " & 訂單資料表(5) & ".[10], " & 訂單資料表(5) & ".[10.5], " & 訂單資料表(5) & ".[11], " & 訂單資料表(5) & ".[11.5], 
@@ -1004,15 +1004,23 @@ Public Class 訂單控制表
1004 1004
                     End If
1005 1005
                 End If
1006 1006
                 conn.Close() : PictureBox1.SizeMode = 4
1007
+
1007 1008
                 '------------驗貨報告讀取--------------------------------------------------------------------------------------------
1008 1009
                 PA1 = 控制表_dgv("驗報圖庫", e.RowIndex).Value.ToString : PA2 = 控制表_dgv("驗貨報告圖片", e.RowIndex).Value.ToString
1009
-                If 控制表_dgv("驗報圖庫", e.RowIndex).Value.ToString = "" Then : 驗貨報告_pb.Image = Nothing : Else
1010
-                    SQL_訂單驗貨報告圖片讀取() : 驗貨報告_pb.Image = Nothing
1011
-                    While dr.Read() = True
1012
-                        Dim unused As Byte() = New Byte(-1) {} : Dim bytes As Byte() = DirectCast(dr.Item("驗貨報告"), Byte())
1013
-                        Dim oStream As New MemoryStream(bytes) : 驗貨報告_pb.Image = Bitmap.FromStream(oStream)
1014
-                    End While : conn.Close() : 驗貨報告_pb.SizeMode = 4
1010
+                If 控制表_dgv("驗報圖庫", e.RowIndex).Value.ToString = "" Then : 驗貨報告_pb.Image = Nothing : Else : Dim 檔案 As String
1011
+                    SQL_驗貨報告檔案確認()
1012
+                    If dr.Read Then : If dr("副檔名").ToString = "PDF" Then : 檔案 = "PDF" : Else : 檔案 = "圖片" : End If : Else : 檔案 = "圖片" : End If
1013
+                    If 檔案 = "圖片" Then
1014
+                        SQL_訂單驗貨報告圖片讀取() : 驗貨報告_pb.Image = Nothing
1015
+                        While dr.Read() = True
1016
+                            Dim unused As Byte() = New Byte(-1) {} : Dim bytes As Byte() = DirectCast(dr.Item("驗貨報告"), Byte())
1017
+                            Dim oStream As New MemoryStream(bytes) : 驗貨報告_pb.Image = Bitmap.FromStream(oStream)
1018
+                        End While : conn.Close() : 驗貨報告_pb.SizeMode = 4
1019
+                    Else
1020
+                        驗貨報告_pb.Image = My.Resources.Resources.PDF
1021
+                    End If
1015 1022
                 End If : 圖片傳遞 = 驗貨報告_pb.Image
1023
+
1016 1024
                 驗貨報告 = 控制表_dgv("驗貨報告圖片", e.RowIndex).Value.ToString : PB(0) = 控制表_dgv("訂單流水號", e.RowIndex).Value.ToString
1017 1025
                 PB(1) = 控制表_dgv("年份季度", e.RowIndex).Value.ToString : PB(2) = 控制表_dgv("客戶訂單號", e.RowIndex).Value.ToString : PB(4) = 控制表_dgv("形體號", e.RowIndex).Value.ToString
1018 1026
                 PB(5) = 控制表_dgv("顏色", e.RowIndex).Value.ToString : PB(6) = 控制表_dgv("楦型", e.RowIndex).Value.ToString : DN(0) = 控制表_dgv("訂單數量", e.RowIndex).Value.ToString

+ 101
- 41
TENDEN-MES-SYS/4、量產訂單管理/量產訂單系統/量產訂單輸入.Designer.vb View File

@@ -22,10 +22,10 @@ Partial Class 量產訂單輸入
22 22
     '請勿使用程式碼編輯器進行修改。
23 23
     <System.Diagnostics.DebuggerStepThrough()>
24 24
     Private Sub InitializeComponent()
25
-        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()
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 29
         Me.資料庫選擇3_bt = New System.Windows.Forms.Button()
30 30
         Me.資料庫選擇2_bt = New System.Windows.Forms.Button()
31 31
         Me.資料庫選擇1_bt = New System.Windows.Forms.Button()
@@ -34,6 +34,9 @@ Partial Class 量產訂單輸入
34 34
         Me.天盾訂單號_tb = New System.Windows.Forms.TextBox()
35 35
         Me.Label5 = New System.Windows.Forms.Label()
36 36
         Me.Panel1 = New System.Windows.Forms.Panel()
37
+        Me.Vendor_Cb = New System.Windows.Forms.ComboBox()
38
+        Me.清空2_bt = New System.Windows.Forms.Button()
39
+        Me.清空1_bt = New System.Windows.Forms.Button()
37 40
         Me.DIV_cb = New System.Windows.Forms.ComboBox()
38 41
         Me.ADD6_bt = New System.Windows.Forms.Button()
39 42
         Me.Label27 = New System.Windows.Forms.Label()
@@ -72,7 +75,6 @@ Partial Class 量產訂單輸入
72 75
         Me.Label15 = New System.Windows.Forms.Label()
73 76
         Me.Label14 = New System.Windows.Forms.Label()
74 77
         Me.日期2_dtp = New System.Windows.Forms.DateTimePicker()
75
-        Me.Vendor_tb = New System.Windows.Forms.TextBox()
76 78
         Me.Label13 = New System.Windows.Forms.Label()
77 79
         Me.新增清單5_bt = New System.Windows.Forms.Button()
78 80
         Me.新增清單4_bt = New System.Windows.Forms.Button()
@@ -139,6 +141,9 @@ Partial Class 量產訂單輸入
139 141
         Me.刪除單筆_bt = New System.Windows.Forms.Button()
140 142
         Me.新增訂單明細_bt = New System.Windows.Forms.Button()
141 143
         Me.比對關鍵字_bt = New System.Windows.Forms.Button()
144
+        Me.Label30 = New System.Windows.Forms.Label()
145
+        Me.STYLE_N_tb = New System.Windows.Forms.TextBox()
146
+        Me.Item2_cb = New System.Windows.Forms.ComboBox()
142 147
         CType(Me.訂單流水號_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
143 148
         Me.Panel1.SuspendLayout()
144 149
         Me.Panel2.SuspendLayout()
@@ -180,19 +185,19 @@ Partial Class 量產訂單輸入
180 185
         '
181 186
         '訂單流水號_dgv
182 187
         '
183
-        DataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
184
-        Me.訂單流水號_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle5
188
+        DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
189
+        Me.訂單流水號_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
185 190
         Me.訂單流水號_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
186 191
             Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
187 192
         Me.訂單流水號_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
188 193
         Me.訂單流水號_dgv.BackgroundColor = System.Drawing.Color.White
189
-        DataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Control
190
-        DataGridViewCellStyle6.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
191
-        DataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText
192
-        DataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight
193
-        DataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText
194
-        DataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
195
-        Me.訂單流水號_dgv.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle6
194
+        DataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control
195
+        DataGridViewCellStyle2.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
196
+        DataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText
197
+        DataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight
198
+        DataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText
199
+        DataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
200
+        Me.訂單流水號_dgv.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle2
196 201
         Me.訂單流水號_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
197 202
         Me.訂單流水號_dgv.Location = New System.Drawing.Point(2, 64)
198 203
         Me.訂單流水號_dgv.Name = "訂單流水號_dgv"
@@ -232,6 +237,9 @@ Partial Class 量產訂單輸入
232 237
         Me.Panel1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
233 238
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
234 239
         Me.Panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
240
+        Me.Panel1.Controls.Add(Me.Vendor_Cb)
241
+        Me.Panel1.Controls.Add(Me.清空2_bt)
242
+        Me.Panel1.Controls.Add(Me.清空1_bt)
235 243
         Me.Panel1.Controls.Add(Me.DIV_cb)
236 244
         Me.Panel1.Controls.Add(Me.ADD6_bt)
237 245
         Me.Panel1.Controls.Add(Me.Label27)
@@ -270,7 +278,6 @@ Partial Class 量產訂單輸入
270 278
         Me.Panel1.Controls.Add(Me.Label15)
271 279
         Me.Panel1.Controls.Add(Me.Label14)
272 280
         Me.Panel1.Controls.Add(Me.日期2_dtp)
273
-        Me.Panel1.Controls.Add(Me.Vendor_tb)
274 281
         Me.Panel1.Controls.Add(Me.Label13)
275 282
         Me.Panel1.Controls.Add(Me.新增清單5_bt)
276 283
         Me.Panel1.Controls.Add(Me.新增清單4_bt)
@@ -300,6 +307,34 @@ Partial Class 量產訂單輸入
300 307
         Me.Panel1.Size = New System.Drawing.Size(1701, 232)
301 308
         Me.Panel1.TabIndex = 1380
302 309
         '
310
+        'Vendor_Cb
311
+        '
312
+        Me.Vendor_Cb.FormattingEnabled = True
313
+        Me.Vendor_Cb.Location = New System.Drawing.Point(94, 128)
314
+        Me.Vendor_Cb.Name = "Vendor_Cb"
315
+        Me.Vendor_Cb.Size = New System.Drawing.Size(152, 24)
316
+        Me.Vendor_Cb.TabIndex = 1460
317
+        '
318
+        '清空2_bt
319
+        '
320
+        Me.清空2_bt.ForeColor = System.Drawing.Color.Black
321
+        Me.清空2_bt.Location = New System.Drawing.Point(603, 30)
322
+        Me.清空2_bt.Name = "清空2_bt"
323
+        Me.清空2_bt.Size = New System.Drawing.Size(41, 22)
324
+        Me.清空2_bt.TabIndex = 1446
325
+        Me.清空2_bt.Text = "清空"
326
+        Me.清空2_bt.UseVisualStyleBackColor = True
327
+        '
328
+        '清空1_bt
329
+        '
330
+        Me.清空1_bt.ForeColor = System.Drawing.Color.Black
331
+        Me.清空1_bt.Location = New System.Drawing.Point(604, 5)
332
+        Me.清空1_bt.Name = "清空1_bt"
333
+        Me.清空1_bt.Size = New System.Drawing.Size(41, 22)
334
+        Me.清空1_bt.TabIndex = 1445
335
+        Me.清空1_bt.Text = "清空"
336
+        Me.清空1_bt.UseVisualStyleBackColor = True
337
+        '
303 338
         'DIV_cb
304 339
         '
305 340
         Me.DIV_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
@@ -534,7 +569,7 @@ Partial Class 量產訂單輸入
534 569
         Me.日期4_dtp.Format = System.Windows.Forms.DateTimePickerFormat.Custom
535 570
         Me.日期4_dtp.Location = New System.Drawing.Point(499, 4)
536 571
         Me.日期4_dtp.Name = "日期4_dtp"
537
-        Me.日期4_dtp.Size = New System.Drawing.Size(145, 23)
572
+        Me.日期4_dtp.Size = New System.Drawing.Size(102, 23)
538 573
         Me.日期4_dtp.TabIndex = 1416
539 574
         '
540 575
         '日期_dtp
@@ -605,7 +640,7 @@ Partial Class 量產訂單輸入
605 640
         Me.日期3_dtp.Format = System.Windows.Forms.DateTimePickerFormat.Custom
606 641
         Me.日期3_dtp.Location = New System.Drawing.Point(499, 29)
607 642
         Me.日期3_dtp.Name = "日期3_dtp"
608
-        Me.日期3_dtp.Size = New System.Drawing.Size(145, 23)
643
+        Me.日期3_dtp.Size = New System.Drawing.Size(102, 23)
609 644
         Me.日期3_dtp.TabIndex = 1405
610 645
         '
611 646
         'DeliveryAddress_lb
@@ -656,14 +691,6 @@ Partial Class 量產訂單輸入
656 691
         Me.日期2_dtp.Size = New System.Drawing.Size(88, 23)
657 692
         Me.日期2_dtp.TabIndex = 1399
658 693
         '
659
-        'Vendor_tb
660
-        '
661
-        Me.Vendor_tb.ForeColor = System.Drawing.Color.Black
662
-        Me.Vendor_tb.Location = New System.Drawing.Point(94, 128)
663
-        Me.Vendor_tb.Name = "Vendor_tb"
664
-        Me.Vendor_tb.Size = New System.Drawing.Size(152, 23)
665
-        Me.Vendor_tb.TabIndex = 1398
666
-        '
667 694
         'Label13
668 695
         '
669 696
         Me.Label13.AutoSize = True
@@ -825,11 +852,11 @@ Partial Class 量產訂單輸入
825 852
         'Label4
826 853
         '
827 854
         Me.Label4.AutoSize = True
828
-        Me.Label4.Location = New System.Drawing.Point(222, 7)
855
+        Me.Label4.Location = New System.Drawing.Point(213, 7)
829 856
         Me.Label4.Name = "Label4"
830
-        Me.Label4.Size = New System.Drawing.Size(82, 16)
857
+        Me.Label4.Size = New System.Drawing.Size(91, 16)
831 858
         Me.Label4.TabIndex = 1415
832
-        Me.Label4.Text = "Created Date"
859
+        Me.Label4.Text = "Customer Date"
833 860
         '
834 861
         '總案件_tb
835 862
         '
@@ -921,8 +948,8 @@ Partial Class 量產訂單輸入
921 948
         '
922 949
         '明細表_dgv
923 950
         '
924
-        DataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
925
-        Me.明細表_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle7
951
+        DataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
952
+        Me.明細表_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
926 953
         Me.明細表_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
927 954
             Or System.Windows.Forms.AnchorStyles.Left) _
928 955
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
@@ -938,8 +965,8 @@ Partial Class 量產訂單輸入
938 965
         '
939 966
         '控制表_dgv
940 967
         '
941
-        DataGridViewCellStyle8.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
942
-        Me.控制表_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle8
968
+        DataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
969
+        Me.控制表_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle4
943 970
         Me.控制表_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
944 971
             Or System.Windows.Forms.AnchorStyles.Left) _
945 972
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
@@ -1207,15 +1234,15 @@ Partial Class 量產訂單輸入
1207 1234
         'Item_cb
1208 1235
         '
1209 1236
         Me.Item_cb.FormattingEnabled = True
1210
-        Me.Item_cb.Location = New System.Drawing.Point(1163, 236)
1237
+        Me.Item_cb.Location = New System.Drawing.Point(1241, 236)
1211 1238
         Me.Item_cb.Name = "Item_cb"
1212
-        Me.Item_cb.Size = New System.Drawing.Size(113, 24)
1239
+        Me.Item_cb.Size = New System.Drawing.Size(61, 24)
1213 1240
         Me.Item_cb.TabIndex = 1459
1214 1241
         '
1215 1242
         'Label28
1216 1243
         '
1217 1244
         Me.Label28.AutoSize = True
1218
-        Me.Label28.Location = New System.Drawing.Point(1129, 240)
1245
+        Me.Label28.Location = New System.Drawing.Point(1207, 241)
1219 1246
         Me.Label28.Name = "Label28"
1220 1247
         Me.Label28.Size = New System.Drawing.Size(32, 16)
1221 1248
         Me.Label28.TabIndex = 1458
@@ -1224,7 +1251,7 @@ Partial Class 量產訂單輸入
1224 1251
         'PD_cb
1225 1252
         '
1226 1253
         Me.PD_cb.FormattingEnabled = True
1227
-        Me.PD_cb.Location = New System.Drawing.Point(998, 261)
1254
+        Me.PD_cb.Location = New System.Drawing.Point(1085, 261)
1228 1255
         Me.PD_cb.Name = "PD_cb"
1229 1256
         Me.PD_cb.Size = New System.Drawing.Size(278, 24)
1230 1257
         Me.PD_cb.TabIndex = 1461
@@ -1232,7 +1259,7 @@ Partial Class 量產訂單輸入
1232 1259
         'Label29
1233 1260
         '
1234 1261
         Me.Label29.AutoSize = True
1235
-        Me.Label29.Location = New System.Drawing.Point(999, 241)
1262
+        Me.Label29.Location = New System.Drawing.Point(1082, 241)
1236 1263
         Me.Label29.Name = "Label29"
1237 1264
         Me.Label29.Size = New System.Drawing.Size(118, 16)
1238 1265
         Me.Label29.TabIndex = 1460
@@ -1252,7 +1279,7 @@ Partial Class 量產訂單輸入
1252 1279
         Me.帶入資料_bt.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
1253 1280
         Me.帶入資料_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
1254 1281
         Me.帶入資料_bt.ForeColor = System.Drawing.Color.Blue
1255
-        Me.帶入資料_bt.Location = New System.Drawing.Point(1334, 235)
1282
+        Me.帶入資料_bt.Location = New System.Drawing.Point(1421, 235)
1256 1283
         Me.帶入資料_bt.Name = "帶入資料_bt"
1257 1284
         Me.帶入資料_bt.Size = New System.Drawing.Size(50, 50)
1258 1285
         Me.帶入資料_bt.TabIndex = 1463
@@ -1286,7 +1313,7 @@ Partial Class 量產訂單輸入
1286 1313
         Me.刪除單筆_bt.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
1287 1314
         Me.刪除單筆_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
1288 1315
         Me.刪除單筆_bt.ForeColor = System.Drawing.Color.Blue
1289
-        Me.刪除單筆_bt.Location = New System.Drawing.Point(1390, 235)
1316
+        Me.刪除單筆_bt.Location = New System.Drawing.Point(1477, 235)
1290 1317
         Me.刪除單筆_bt.Name = "刪除單筆_bt"
1291 1318
         Me.刪除單筆_bt.Size = New System.Drawing.Size(50, 50)
1292 1319
         Me.刪除單筆_bt.TabIndex = 1443
@@ -1298,7 +1325,7 @@ Partial Class 量產訂單輸入
1298 1325
         Me.新增訂單明細_bt.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
1299 1326
         Me.新增訂單明細_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
1300 1327
         Me.新增訂單明細_bt.ForeColor = System.Drawing.Color.Blue
1301
-        Me.新增訂單明細_bt.Location = New System.Drawing.Point(1278, 235)
1328
+        Me.新增訂單明細_bt.Location = New System.Drawing.Point(1365, 235)
1302 1329
         Me.新增訂單明細_bt.Name = "新增訂單明細_bt"
1303 1330
         Me.新增訂單明細_bt.Size = New System.Drawing.Size(50, 50)
1304 1331
         Me.新增訂單明細_bt.TabIndex = 1442
@@ -1316,11 +1343,39 @@ Partial Class 量產訂單輸入
1316 1343
         Me.比對關鍵字_bt.TabIndex = 1377
1317 1344
         Me.比對關鍵字_bt.UseVisualStyleBackColor = True
1318 1345
         '
1346
+        'Label30
1347
+        '
1348
+        Me.Label30.AutoSize = True
1349
+        Me.Label30.Location = New System.Drawing.Point(1004, 240)
1350
+        Me.Label30.Name = "Label30"
1351
+        Me.Label30.Size = New System.Drawing.Size(52, 16)
1352
+        Me.Label30.TabIndex = 1464
1353
+        Me.Label30.Text = "STYLE #"
1354
+        '
1355
+        'STYLE_N_tb
1356
+        '
1357
+        Me.STYLE_N_tb.ForeColor = System.Drawing.Color.Black
1358
+        Me.STYLE_N_tb.Location = New System.Drawing.Point(1002, 262)
1359
+        Me.STYLE_N_tb.Name = "STYLE_N_tb"
1360
+        Me.STYLE_N_tb.Size = New System.Drawing.Size(79, 23)
1361
+        Me.STYLE_N_tb.TabIndex = 1465
1362
+        '
1363
+        'Item2_cb
1364
+        '
1365
+        Me.Item2_cb.FormattingEnabled = True
1366
+        Me.Item2_cb.Location = New System.Drawing.Point(1302, 236)
1367
+        Me.Item2_cb.Name = "Item2_cb"
1368
+        Me.Item2_cb.Size = New System.Drawing.Size(61, 24)
1369
+        Me.Item2_cb.TabIndex = 1466
1370
+        '
1319 1371
         '量產訂單輸入
1320 1372
         '
1321 1373
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
1322 1374
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
1323 1375
         Me.ClientSize = New System.Drawing.Size(1914, 966)
1376
+        Me.Controls.Add(Me.Item2_cb)
1377
+        Me.Controls.Add(Me.STYLE_N_tb)
1378
+        Me.Controls.Add(Me.Label30)
1324 1379
         Me.Controls.Add(Me.帶入資料_bt)
1325 1380
         Me.Controls.Add(Me.資料流水號_tb)
1326 1381
         Me.Controls.Add(Me.PD_cb)
@@ -1402,7 +1457,6 @@ Partial Class 量產訂單輸入
1402 1457
     Friend WithEvents Label9 As Label
1403 1458
     Friend WithEvents Label12 As Label
1404 1459
     Friend WithEvents Label10 As Label
1405
-    Friend WithEvents Vendor_tb As TextBox
1406 1460
     Friend WithEvents Label13 As Label
1407 1461
     Friend WithEvents Label14 As Label
1408 1462
     Friend WithEvents 日期2_dtp As DateTimePicker
@@ -1487,4 +1541,10 @@ Partial Class 量產訂單輸入
1487 1541
     Friend WithEvents Label29 As Label
1488 1542
     Friend WithEvents 資料流水號_tb As TextBox
1489 1543
     Friend WithEvents 帶入資料_bt As Button
1544
+    Friend WithEvents 清空2_bt As Button
1545
+    Friend WithEvents 清空1_bt As Button
1546
+    Friend WithEvents Label30 As Label
1547
+    Friend WithEvents STYLE_N_tb As TextBox
1548
+    Friend WithEvents Vendor_Cb As ComboBox
1549
+    Friend WithEvents Item2_cb As ComboBox
1490 1550
 End Class

+ 73
- 36
TENDEN-MES-SYS/4、量產訂單管理/量產訂單系統/量產訂單輸入.vb View File

@@ -61,7 +61,7 @@ Public Class 量產訂單輸入
61 61
         End If
62 62
         For i As Integer = 14 To 28 : 控制表_dgv.Columns(i).Visible = False : Next : 控制表_dgv.Columns(29).Visible = True : 控制表_dgv.Columns(78).Visible = False
63 63
         For i As Integer = 30 To 63 : 控制表_dgv.Columns(i).Visible = False : Next : For i As Integer = 68 To 77 : 控制表_dgv.Columns(i).Visible = False : Next
64
-        For i As Integer = 0 To 控制表_dgv.Rows.Count - 1 : 控制表_dgv("選擇", i).Value = False : Next
64
+        For i As Integer = 0 To 控制表_dgv.Rows.Count - 1 : 控制表_dgv("選擇", i).Value = False : Next : 控制表_dgv.Columns(42).Visible = True
65 65
     End Sub
66 66
     Private Sub Set_控制表_dgv_插入勾選控件清單()
67 67
         Dim Col As New DataGridViewCheckBoxColumn With {
@@ -81,31 +81,32 @@ Public Class 量產訂單輸入
81 81
         da.Fill(ds2) : 明細表_dgv.DataSource = ds2.Tables(0) : conn.Close()
82 82
 
83 83
         明細表_dgv.EditMode = DataGridViewEditMode.EditOnEnter
84
-        明細表_dgv.Columns(0).Visible = False : 明細表_dgv.Columns(1).Visible = False
85
-        明細表_dgv.Columns(2).FillWeight = 90 : 明細表_dgv.Columns(3).FillWeight = 90 : 明細表_dgv.Columns(4).FillWeight = 190 : 明細表_dgv.Columns(5).FillWeight = 80
86
-        明細表_dgv.Columns(6).FillWeight = 70
87
-        For i As Integer = 7 To 25 : 明細表_dgv.Columns(i).FillWeight = 40 : Next
88
-        For i As Integer = 2 To 25 : 明細表_dgv.Columns(i).DefaultCellStyle.Format = "#,##0" : 明細表_dgv.Columns(i).ReadOnly = False : Next
89
-        明細表_dgv.Columns(25).FillWeight = 60 : 明細表_dgv.Columns(25).ReadOnly = True : 明細表_dgv.Columns(3).ReadOnly = True : 明細表_dgv.Columns(5).ReadOnly = True
90
-        明細表_dgv.Columns(6).ReadOnly = True
84
+        明細表_dgv.Columns("天盾流水號").Visible = False : 明細表_dgv.Columns("客戶訂單號").Visible = False : 明細表_dgv.Columns("Item2").FillWeight = 45
85
+        明細表_dgv.Columns("Item").FillWeight = 45 : 明細表_dgv.Columns("ProductName").FillWeight = 90 : 明細表_dgv.Columns("ProductDescription").FillWeight = 190
86
+        明細表_dgv.Columns("Color").FillWeight = 80 : 明細表_dgv.Columns("DM").FillWeight = 70
87
+        For i As Integer = 8 To 26 : 明細表_dgv.Columns(i).FillWeight = 40 : Next
88
+        For i As Integer = 2 To 26 : 明細表_dgv.Columns(i).DefaultCellStyle.Format = "#,##0" : 明細表_dgv.Columns(i).ReadOnly = False : Next
89
+        明細表_dgv.Columns(26).FillWeight = 60 : 明細表_dgv.Columns(26).ReadOnly = True : 明細表_dgv.Columns(4).ReadOnly = True : 明細表_dgv.Columns(6).ReadOnly = True
90
+        明細表_dgv.Columns(7).ReadOnly = True
91 91
 
92 92
         If 明細表_dgv.Rows.Count > 0 Then
93 93
             If PP1 <> "" Then : PP1 = "" : C2下拉表單資料載入() : End If : If PP2 <> "" Then : PP2 = "" : C3下拉表單資料載入() : End If
94 94
             資料流水號_tb.Text = 控制表_dgv.Rows(0).Cells("資料流水號").Value.ToString : 季_cb.Text = 控制表_dgv.Rows(0).Cells("年份季度").Value.ToString
95 95
             風格_cb.Text = 控制表_dgv.Rows(0).Cells("形體號").Value.ToString : 顏色_cb.Text = 控制表_dgv.Rows(0).Cells("顏色").Value.ToString
96
-            DM_cb.Text = 控制表_dgv.Rows(0).Cells("楦型").Value.ToString : Item_cb.Text = 明細表_dgv.Rows(0).Cells("ItemNumber").Value.ToString
96
+            DM_cb.Text = 控制表_dgv.Rows(0).Cells("楦型").Value.ToString : Item_cb.Text = 明細表_dgv.Rows(0).Cells("Item").Value.ToString
97 97
             PD_cb.Text = 明細表_dgv.Rows(0).Cells("ProductDescription").Value.ToString : DIV_cb.Text = 控制表_dgv.Rows(0).Cells("訂單種類").Value.ToString
98
+            Item2_cb.Text = 明細表_dgv.Rows(0).Cells("Item2").Value.ToString
98 99
         End If
99 100
     End Sub
100 101
     Private Sub 下拉表單資料載入()
101 102
         SQL_DeliveryTerms_下拉() : DT_cb.Items.Clear() : While (dr.Read()) : DT_cb.Items.Add(dr("DeliveryTerms")) : End While
102 103
         SQL_FROMPORT() : 客戶資料2_cb.Items.Clear() : While (dr.Read()) : 客戶資料2_cb.Items.Add(dr("FROMPORT")) : End While : conn.Close()
103
-        SQL_TOPORT() : 客戶資料3_cb.Items.Clear() : While (dr.Read()) : 客戶資料3_cb.Items.Add(dr("TOPORT")) : End While : conn.Close()
104
+        SQL_TOPORT() : 客戶資料3_cb.Items.Clear() : 客戶資料3_cb.Items.Add("") : While (dr.Read()) : 客戶資料3_cb.Items.Add(dr("TOPORT")) : End While : conn.Close()
104 105
         SQL_SalesOrder_下拉() : SalesOrder_cb.Items.Clear() : While (dr.Read()) : SalesOrder_cb.Items.Add(dr("SalesOrder")) : End While : conn.Close()
105 106
         SQL_下拉客戶資料() : 客戶名稱_cb.Items.Clear() : While (dr.Read()) : 客戶名稱_cb.Items.Add(dr("客戶名稱")) : End While : conn.Close()
106 107
         SQL_工廠簡稱_下拉() : FTY_cb.Items.Clear() : While (dr.Read()) : FTY_cb.Items.Add(dr("工廠簡稱")) : End While : conn.Close()
107 108
         SQL_季節_下拉() : 季_cb.Items.Clear() : While (dr.Read()) : 季_cb.Items.Add(dr("年份季度")) : End While
108
-
109
+        SQL_Vendor() : Vendor_Cb.Items.Clear() : While (dr.Read()) : Vendor_Cb.Items.Add(dr("VendorReference")) : End While
109 110
         SQL_工廠編號_下拉() : 工廠編號_cb.Items.Clear() : 地址1_cb.Items.Clear()
110 111
         While (dr.Read()) : 工廠編號_cb.Items.Add(dr("工廠編號")) : 地址1_cb.Items.Add(dr("工廠地址")) : End While : conn.Close()
111 112
         SQL_代理編號_下拉() : 代理編號_cb.Items.Clear() : 訂貨代理_cb.Items.Clear()
@@ -115,6 +116,7 @@ Public Class 量產訂單輸入
115 116
     End Sub
116 117
     Private Sub C1下拉表單資料載入()
117 118
         SQL_Item_下拉() : Item_cb.Items.Clear() : While (dr.Read()) : Item_cb.Items.Add(dr("ItemNumber")) : End While
119
+        SQL_Item2_下拉() : Item2_cb.Items.Clear() : While (dr.Read()) : Item2_cb.Items.Add(dr("裝箱")) : End While
118 120
     End Sub
119 121
     Private Sub C2下拉表單資料載入()
120 122
         ConnOpen()
@@ -151,6 +153,8 @@ Public Class 量產訂單輸入
151 153
         訂單資料庫選擇.ShowDialog()
152 154
     End Sub
153 155
     Private Sub 量產訂單輸入_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown
156
+        日期4_dtp.Format = DateTimePickerFormat.Custom : 日期4_dtp.CustomFormat = " "
157
+        日期3_dtp.Format = DateTimePickerFormat.Custom : 日期3_dtp.CustomFormat = " "
154 158
         BB(0) = False : BB(1) = True : BB(2) = True : BB(3) = True : BB(4) = True : BB(5) = True : BB(6) = True : BB(7) = True : BB(8) = True : BB(9) = True
155 159
         C1下拉表單資料載入() : C2下拉表單資料載入() : C3下拉表單資料載入() : C4下拉表單資料載入() : C5下拉表單資料載入() : C6下拉表單資料載入()
156 160
         下拉表單資料載入() : Set_已建檔清單()
@@ -161,12 +165,12 @@ Public Class 量產訂單輸入
161 165
             客戶訂單號_tb.Text = 訂單流水號_dgv.Rows(e.RowIndex).Cells("客戶訂單號_1").Value.ToString : MOD_tb.Text = 訂單流水號_dgv.Rows(e.RowIndex).Cells("ModeOfDelivery").Value.ToString
162 166
             DT_cb.Text = 訂單流水號_dgv.Rows(e.RowIndex).Cells("DeliveryTerms").Value.ToString : 日期1_dtp.Value = 訂單流水號_dgv.Rows(e.RowIndex).Cells("OrgShipDate").Value.ToString
163 167
             客戶資料2_cb.Text = 訂單流水號_dgv.Rows(e.RowIndex).Cells("FromPort").Value.ToString : 客戶資料3_cb.Text = 訂單流水號_dgv.Rows(e.RowIndex).Cells("ToPort").Value.ToString
164
-            SC_tb.Text = 訂單流水號_dgv.Rows(e.RowIndex).Cells("ShippingCarrier").Value.ToString : Vendor_tb.Text = 訂單流水號_dgv.Rows(e.RowIndex).Cells("VendorReference").Value.ToString
168
+            SC_tb.Text = 訂單流水號_dgv.Rows(e.RowIndex).Cells("ShippingCarrier").Value.ToString : Vendor_Cb.Text = 訂單流水號_dgv.Rows(e.RowIndex).Cells("VendorReference").Value.ToString
165 169
             ShiptoN_cb.Text = 訂單流水號_dgv.Rows(e.RowIndex).Cells("CustomerName").Value.ToString : 入單型態_tb.Text = 訂單流水號_dgv.Rows(e.RowIndex).Cells("入單型態").Value.ToString
166 170
             客戶地址_bt.Text = 訂單流水號_dgv.Rows(e.RowIndex).Cells("DeliveryAddress").Value.ToString : SalesOrder_cb.Text = 訂單流水號_dgv.Rows(e.RowIndex).Cells("SalesOrder").Value.ToString
167
-            日期3_dtp.Value = 訂單流水號_dgv.Rows(e.RowIndex).Cells("ShipDate").Value.ToString : 日期5_dtp.Value = 訂單流水號_dgv.Rows(e.RowIndex).Cells("下單日").Value.ToString
171
+            日期5_dtp.Value = 訂單流水號_dgv.Rows(e.RowIndex).Cells("下單日").Value.ToString : 客戶名稱_cb.Text = 訂單流水號_dgv.Rows(e.RowIndex).Cells("Brand").Value.ToString
168 172
             日期6_dtp.Value = 訂單流水號_dgv.Rows(e.RowIndex).Cells("交期").Value.ToString : 日期_dtp.Value = 訂單流水號_dgv.Rows(e.RowIndex).Cells("CreatedDate").Value.ToString
169
-            日期4_dtp.Value = 訂單流水號_dgv.Rows(e.RowIndex).Cells("ETADate").Value.ToString : 客戶名稱_cb.Text = 訂單流水號_dgv.Rows(e.RowIndex).Cells("Brand").Value.ToString
173
+
170 174
             力威訂單號_tb.Text = 訂單流水號_dgv.Rows(e.RowIndex).Cells("CustomerRequisition").Value.ToString : 地址1_tb.Text = 訂單流水號_dgv.Rows(e.RowIndex).Cells("工廠地址").Value.ToString
171 175
             代理編號_cb.Text = 訂單流水號_dgv.Rows(e.RowIndex).Cells("代理編號").Value.ToString : 訂貨代理_tb.Text = 訂單流水號_dgv.Rows(e.RowIndex).Cells("訂貨代理").Value.ToString
172 176
             總雙數_tb.Text = 訂單流水號_dgv.Rows(e.RowIndex).Cells("總雙數").Value.ToString : 總案件_tb.Text = 訂單流水號_dgv.Rows(e.RowIndex).Cells("總案件數").Value.ToString
@@ -177,6 +181,13 @@ Public Class 量產訂單輸入
177 181
                 日期2_dtp.Value = 訂單流水號_dgv.Rows(e.RowIndex).Cells("ModifiedDate").Value.ToString
178 182
             Else : 日期2_dtp.Text = Today() : End If : Set_訂單清單() : Set_訂單明細()
179 183
             總雙數_tb.Text = Strings.Format(CDbl(總雙數_tb.Text), "#,##0") : 總案件_tb.Text = Strings.Format(CDbl(總案件_tb.Text), "#,##0")
184
+
185
+            If 訂單流水號_dgv.Rows(e.RowIndex).Cells("ShipDate").Value.ToString = "" Or 訂單流水號_dgv.Rows(e.RowIndex).Cells("ShipDate").Value.ToString = " " Then
186
+                日期3_dtp.Format = DateTimePickerFormat.Custom : 日期3_dtp.CustomFormat = " "
187
+            Else : 日期3_dtp.Format = DateTimePickerFormat.Short : 日期3_dtp.Value = 訂單流水號_dgv.Rows(e.RowIndex).Cells("ShipDate").Value.ToString : End If
188
+            If 訂單流水號_dgv.Rows(e.RowIndex).Cells("ETADate").Value.ToString = "" Or 訂單流水號_dgv.Rows(e.RowIndex).Cells("ETADate").Value.ToString = " " Then
189
+                日期4_dtp.Format = DateTimePickerFormat.Custom : 日期4_dtp.CustomFormat = " "
190
+            Else : 日期4_dtp.Format = DateTimePickerFormat.Short : 日期4_dtp.Value = 訂單流水號_dgv.Rows(e.RowIndex).Cells("ETADate").Value.ToString : End If
180 191
         End If
181 192
     End Sub
182 193
     Private Sub 控制表_dgv_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 控制表_dgv.CellClick
@@ -184,8 +195,9 @@ Public Class 量產訂單輸入
184 195
             If PP1 <> "" Then : PP1 = "" : C2下拉表單資料載入() : End If : If PP2 <> "" Then : PP2 = "" : C3下拉表單資料載入() : End If
185 196
             資料流水號_tb.Text = 控制表_dgv.Rows(e.RowIndex).Cells("資料流水號").Value.ToString : 季_cb.Text = 控制表_dgv.Rows(e.RowIndex).Cells("年份季度").Value.ToString
186 197
             風格_cb.Text = 控制表_dgv.Rows(e.RowIndex).Cells("形體號").Value.ToString : 顏色_cb.Text = 控制表_dgv.Rows(e.RowIndex).Cells("顏色").Value.ToString
187
-            DM_cb.Text = 控制表_dgv.Rows(e.RowIndex).Cells("楦型").Value.ToString : Item_cb.Text = 明細表_dgv.Rows(e.RowIndex).Cells("ItemNumber").Value.ToString
198
+            DM_cb.Text = 控制表_dgv.Rows(e.RowIndex).Cells("楦型").Value.ToString : Item_cb.Text = 明細表_dgv.Rows(e.RowIndex).Cells("Item").Value.ToString
188 199
             PD_cb.Text = 明細表_dgv.Rows(e.RowIndex).Cells("ProductDescription").Value.ToString : DIV_cb.Text = 控制表_dgv.Rows(e.RowIndex).Cells("訂單種類").Value.ToString
200
+            Item2_cb.Text = 明細表_dgv.Rows(e.RowIndex).Cells("Item2").Value.ToString
189 201
         End If
190 202
     End Sub
191 203
     Private Sub 明細表_dgv_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 明細表_dgv.CellClick
@@ -193,8 +205,9 @@ Public Class 量產訂單輸入
193 205
             If PP1 <> "" Then : PP1 = "" : C2下拉表單資料載入() : End If : If PP2 <> "" Then : PP2 = "" : C3下拉表單資料載入() : End If
194 206
             資料流水號_tb.Text = 控制表_dgv.Rows(e.RowIndex).Cells("資料流水號").Value.ToString : 季_cb.Text = 控制表_dgv.Rows(e.RowIndex).Cells("年份季度").Value.ToString
195 207
             風格_cb.Text = 控制表_dgv.Rows(e.RowIndex).Cells("形體號").Value.ToString : 顏色_cb.Text = 控制表_dgv.Rows(e.RowIndex).Cells("顏色").Value.ToString
196
-            DM_cb.Text = 控制表_dgv.Rows(e.RowIndex).Cells("楦型").Value.ToString : Item_cb.Text = 明細表_dgv.Rows(e.RowIndex).Cells("ItemNumber").Value.ToString
208
+            DM_cb.Text = 控制表_dgv.Rows(e.RowIndex).Cells("楦型").Value.ToString : Item_cb.Text = 明細表_dgv.Rows(e.RowIndex).Cells("Item").Value.ToString
197 209
             PD_cb.Text = 明細表_dgv.Rows(e.RowIndex).Cells("ProductDescription").Value.ToString : DIV_cb.Text = 控制表_dgv.Rows(e.RowIndex).Cells("訂單種類").Value.ToString
210
+            Item2_cb.Text = 明細表_dgv.Rows(e.RowIndex).Cells("Item2").Value.ToString
198 211
         End If
199 212
     End Sub
200 213
     Private Sub 明細表_dgv_CellEndEdit(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 明細表_dgv.CellEndEdit
@@ -256,7 +269,19 @@ Public Class 量產訂單輸入
256 269
         ElseIf BB(0) = True And BB(1) = True And BB(2) = True And BB(3) = True And BB(4) = True And BB(5) = True And BB(6) = True And BB(7) = True And BB(8) = True And BB(9) = False Then
257 270
             '-----------第10頁-------------------------------------------------------------------------------------------------------------------------------------------------------------
258 271
             For i As Integer = 8 To 71 : 控制表_dgv.Columns(i).Visible = False : Next : For i As Integer = 72 To 77 : 控制表_dgv.Columns(i).Visible = True : Next
259
-        End If
272
+        End If : 控制表_dgv.Columns(42).Visible = True
273
+    End Sub
274
+    Private Sub 日期4_dtp_ValueChanged(sender As Object, e As EventArgs) Handles 日期4_dtp.MouseDown
275
+        日期4_dtp.Format = DateTimePickerFormat.Short
276
+    End Sub
277
+    Private Sub 日期3_dtp_ValueChanged(sender As Object, e As EventArgs) Handles 日期3_dtp.MouseDown
278
+        日期3_dtp.Format = DateTimePickerFormat.Short
279
+    End Sub
280
+    Private Sub 清空1_bt_Click(sender As Object, e As EventArgs) Handles 清空1_bt.Click
281
+        日期4_dtp.Format = DateTimePickerFormat.Custom : 日期4_dtp.CustomFormat = " "
282
+    End Sub
283
+    Private Sub 清空2_bt_Click(sender As Object, e As EventArgs) Handles 清空2_bt.Click
284
+        日期3_dtp.Format = DateTimePickerFormat.Custom : 日期3_dtp.CustomFormat = " "
260 285
     End Sub
261 286
     Private Sub 第一頁_bt_Click(sender As Object, e As EventArgs) Handles 第一頁_bt.Click
262 287
         第一頁_bt.Enabled = False : 第二頁_bt.Enabled = True : 第三頁_bt.Enabled = True : 第四頁_bt.Enabled = True : 第五頁_bt.Enabled = True : 第六頁_bt.Enabled = True
@@ -375,10 +400,12 @@ Public Class 量產訂單輸入
375 400
         ElseIf NUM1 > 9999 And NUM1 < 100000 Then : 流水 = 標頭 & "0" & NUM1 : ElseIf NUM1 > 99999 And NUM1 < 1000000 Then : 流水 = 標頭 & "" & NUM1
376 401
         ElseIf NUM1 > 9999999 Then : MessageBox.Show("超出流水號數量,請聯繫系統管理員") : Exit Sub : End If
377 402
         天盾訂單號_tb.Text = 流水 : 工廠編號_cb.Text = "" : 客戶訂單號_tb.Text = "" : MOD_tb.Text = "" : DT_cb.Text = "" : 客戶資料2_cb.Text = "" : 客戶資料3_cb.Text = ""
378
-        SC_tb.Text = "" : Vendor_tb.Text = "" : ShiptoN_cb.Text = "" : 入單型態_tb.Text = "" : 客戶地址_bt.Text = "" : SalesOrder_cb.Text = ""
403
+        SC_tb.Text = "" : Vendor_Cb.Text = "" : ShiptoN_cb.Text = "" : 入單型態_tb.Text = "" : 客戶地址_bt.Text = "" : SalesOrder_cb.Text = ""
379 404
         力威訂單號_tb.Text = "" : 地址1_tb.Text = "" : 代理編號_cb.Text = "" : 訂貨代理_tb.Text = "" : 總雙數_tb.Text = "" : 總案件_tb.Text = "0"
380
-        FTY_cb.Text = "" : 最終運送_tb.Text = "" : 日期_dtp.Value = Today() : 日期1_dtp.Value = Today() : 日期2_dtp.Text = Today() : 日期3_dtp.Value = Today()
381
-        日期4_dtp.Value = Today() : 日期5_dtp.Value = Today() : 日期6_dtp.Value = Today() : 入單型態_tb.Text = "2"
405
+        FTY_cb.Text = "" : 最終運送_tb.Text = "" : 日期_dtp.Value = Today() : 日期1_dtp.Value = Today() : 日期2_dtp.Text = Today()
406
+        日期3_dtp.Format = DateTimePickerFormat.Custom : 日期3_dtp.CustomFormat = " "
407
+        日期4_dtp.Format = DateTimePickerFormat.Custom : 日期4_dtp.CustomFormat = " "
408
+        日期5_dtp.Value = Today() : 日期6_dtp.Value = Today() : 入單型態_tb.Text = "2"
382 409
         If 訂單資料表(0) = "訂單明細表抬頭" Then : 客戶名稱_cb.Text = "" : 公司_tb.Text = ""
383 410
         ElseIf 訂單資料表(0) = "訂單明細表抬頭_DRS" Then : 客戶名稱_cb.Text = "" : 公司_tb.Text = ""
384 411
         ElseIf 訂單資料表(0) = "訂單明細表抬頭_HP" Then : 客戶名稱_cb.Text = "Hush Puppies"
@@ -389,22 +416,26 @@ Public Class 量產訂單輸入
389 416
         End If : Set_訂單清單() : Set_訂單明細()
390 417
 
391 418
         PA1 = 客戶訂單號_tb.Text : PA2 = 天盾訂單號_tb.Text : PA3 = MOD_tb.Text : PA4 = DT_cb.Text : PA5 = Strings.Format(日期1_dtp.Value, "yyyy/MM/dd") : PA6 = 客戶資料2_cb.Text
392
-        PA7 = 客戶資料3_cb.Text : PA8 = SC_tb.Text : PA9 = Vendor_tb.Text : PA10 = Strings.Format(日期2_dtp.Value, "yyyy/MM/dd") : PA11 = ShiptoN_cb.Text
393
-        PA12 = Strings.Format(日期3_dtp.Value, "yyyy/MM/dd") : PA13 = SalesOrder_cb.Text : PA14 = 客戶地址_bt.Text : PA15 = Strings.Format(日期5_dtp.Value, "yyyy/MM/dd")
394
-        PA16 = Strings.Format(日期6_dtp.Value, "yyyy/MM/dd") : PA17 = Strings.Format(日期4_dtp.Value, "yyyy/MM/dd") : PA18 = Strings.Format(日期_dtp.Value, "yyyy/MM/dd")
419
+        PA7 = 客戶資料3_cb.Text : PA8 = SC_tb.Text : PA9 = Vendor_Cb.Text : PA10 = Strings.Format(日期2_dtp.Value, "yyyy/MM/dd") : PA11 = ShiptoN_cb.Text
420
+        PA13 = SalesOrder_cb.Text : PA14 = 客戶地址_bt.Text : PA15 = Strings.Format(日期5_dtp.Value, "yyyy/MM/dd")
421
+        PA16 = Strings.Format(日期6_dtp.Value, "yyyy/MM/dd") : PA18 = Strings.Format(日期_dtp.Value, "yyyy/MM/dd")
395 422
         PA19 = 客戶名稱_cb.Text : PA20 = 力威訂單號_tb.Text : PA21 = 工廠編號_cb.Text : PA22 = 地址1_tb.Text : PA23 = 代理編號_cb.Text : PA24 = 訂貨代理_tb.Text
396
-        PA25 = 總雙數_tb.Text : PA26 = 總案件_tb.Text : PA27 = 公司_tb.Text : PA28 = FTY_cb.Text : PA29 = 最終運送_tb.Text : PA30 = 入單型態_tb.Text : SQL_訂單抬頭新增()
397
-        Set_已建檔清單()
423
+        PA25 = 總雙數_tb.Text : PA26 = 總案件_tb.Text : PA27 = 公司_tb.Text : PA28 = FTY_cb.Text : PA29 = 最終運送_tb.Text : PA30 = 入單型態_tb.Text
424
+        If 日期3_dtp.Text = "" Or 日期3_dtp.Text = " " Then : PA12 = 日期3_dtp.Text : Else : PA12 = Strings.Format(日期3_dtp.Value, "yyyy/MM/dd") : End If
425
+        If 日期4_dtp.Text = "" Or 日期4_dtp.Text = " " Then : PA17 = 日期4_dtp.Text : Else : PA17 = Strings.Format(日期4_dtp.Value, "yyyy/MM/dd") : End If
426
+        SQL_訂單抬頭新增() : Set_已建檔清單()
398 427
     End Sub
399 428
     Private Sub 存檔_tb_Click(sender As Object, e As EventArgs) Handles 存檔_tb.Click
400 429
         訂單流水號_dgv.Enabled = True
401 430
         PA1 = 客戶訂單號_tb.Text : PA2 = 天盾訂單號_tb.Text : PA3 = MOD_tb.Text : PA4 = DT_cb.Text : PA5 = Strings.Format(日期1_dtp.Value, "yyyy/MM/dd") : PA6 = 客戶資料2_cb.Text
402
-        PA7 = 客戶資料3_cb.Text : PA8 = SC_tb.Text : PA9 = Vendor_tb.Text : PA10 = Strings.Format(日期2_dtp.Value, "yyyy/MM/dd") : PA11 = ShiptoN_cb.Text
403
-        PA12 = Strings.Format(日期3_dtp.Value, "yyyy/MM/dd") : PA13 = SalesOrder_cb.Text : PA14 = 客戶地址_bt.Text : PA15 = Strings.Format(日期5_dtp.Value, "yyyy/MM/dd")
404
-        PA16 = Strings.Format(日期6_dtp.Value, "yyyy/MM/dd") : PA17 = Strings.Format(日期4_dtp.Value, "yyyy/MM/dd") : PA18 = Strings.Format(日期_dtp.Value, "yyyy/MM/dd")
431
+        PA7 = 客戶資料3_cb.Text : PA8 = SC_tb.Text : PA9 = Vendor_Cb.Text : PA10 = Strings.Format(日期2_dtp.Value, "yyyy/MM/dd") : PA11 = ShiptoN_cb.Text
432
+        PA13 = SalesOrder_cb.Text : PA14 = 客戶地址_bt.Text : PA15 = Strings.Format(日期5_dtp.Value, "yyyy/MM/dd")
433
+        PA16 = Strings.Format(日期6_dtp.Value, "yyyy/MM/dd") : PA18 = Strings.Format(日期_dtp.Value, "yyyy/MM/dd")
405 434
         PA19 = 客戶名稱_cb.Text : PA20 = 力威訂單號_tb.Text : PA21 = 工廠編號_cb.Text : PA22 = 地址1_tb.Text : PA23 = 代理編號_cb.Text : PA24 = 訂貨代理_tb.Text
406 435
         PA25 = 總雙數_tb.Text : PA26 = 總案件_tb.Text : PA27 = 公司_tb.Text : PA28 = FTY_cb.Text : PA29 = 最終運送_tb.Text : PA30 = 入單型態_tb.Text
407 436
         PA31 = Strings.Left(Strings.Format(日期_dtp.Value, "yyyy/MM/dd"), 4)
437
+        If 日期3_dtp.Text = "" Or 日期3_dtp.Text = " " Then : PA12 = 日期3_dtp.Text : Else : PA12 = Strings.Format(日期3_dtp.Value, "yyyy/MM/dd") : End If
438
+        If 日期4_dtp.Text = "" Or 日期4_dtp.Text = " " Then : PA17 = 日期4_dtp.Text : Else : PA17 = Strings.Format(日期4_dtp.Value, "yyyy/MM/dd") : End If
408 439
         C1下拉表單資料載入() : C5下拉表單資料載入() : SQL_訂單抬頭修改() : Set_已建檔清單() : 存檔() : MessageBox.Show("存檔完成!!")
409 440
     End Sub
410 441
     Private Sub 存檔()
@@ -412,9 +443,9 @@ Public Class 量產訂單輸入
412 443
         PA7 = Strings.Format(日期_dtp.Value, "yyyy/MM/dd") : PA10 = Strings.Format(日期6_dtp.Value, "yyyy/MM/dd")
413 444
         For i As Integer = 0 To 控制表_dgv.Rows.Count - 1
414 445
             PA5 = 控制表_dgv.Rows(i).Cells("顏色").Value.ToString : PA6 = 控制表_dgv.Rows(i).Cells("楦型").Value.ToString : PA16 = 控制表_dgv.Rows(i).Cells("訂單數量").Value.ToString
415
-            PA13 = 控制表_dgv.Rows(i).Cells("資料流水號").Value.ToString
416
-
417
-            PA12 = 明細表_dgv.Rows(i).Cells("ItemNumber").Value.ToString() : PA14 = 明細表_dgv.Rows(i).Cells("ProductDescription").Value.ToString()
446
+            PA13 = 控制表_dgv.Rows(i).Cells("資料流水號").Value.ToString : PA35 = 控制表_dgv.Rows(i).Cells("STYLE #").Value.ToString
447
+            PA = 明細表_dgv.Rows(i).Cells("Item2").Value.ToString()
448
+            PA12 = 明細表_dgv.Rows(i).Cells("Item").Value.ToString() : PA14 = 明細表_dgv.Rows(i).Cells("ProductDescription").Value.ToString()
418 449
             PA17 = 明細表_dgv.Rows(i).Cells("5").Value.ToString() : PA18 = 明細表_dgv.Rows(i).Cells("5.5").Value.ToString() : PA19 = 明細表_dgv.Rows(i).Cells("6").Value.ToString()
419 450
             PA20 = 明細表_dgv.Rows(i).Cells("6.5").Value.ToString() : PA21 = 明細表_dgv.Rows(i).Cells("7").Value.ToString() : PA22 = 明細表_dgv.Rows(i).Cells("7.5").Value.ToString()
420 451
             PA23 = 明細表_dgv.Rows(i).Cells("8").Value.ToString() : PA24 = 明細表_dgv.Rows(i).Cells("8.5").Value.ToString() : PA25 = 明細表_dgv.Rows(i).Cells("9").Value.ToString()
@@ -430,10 +461,12 @@ Public Class 量產訂單輸入
430 461
             訂單流水號_dgv.Enabled = True
431 462
             PA2 = 天盾訂單號_tb.Text : SQL_訂單抬頭刪除() : Set_已建檔清單()
432 463
             天盾訂單號_tb.Text = "" : 工廠編號_cb.Text = "" : 客戶訂單號_tb.Text = "" : MOD_tb.Text = "" : DT_cb.Text = "" : 客戶資料2_cb.Text = "" : 客戶資料3_cb.Text = ""
433
-            SC_tb.Text = "" : Vendor_tb.Text = "" : ShiptoN_cb.Text = "" : 入單型態_tb.Text = "" : 客戶地址_bt.Text = "" : SalesOrder_cb.Text = ""
464
+            SC_tb.Text = "" : Vendor_Cb.Text = "" : ShiptoN_cb.Text = "" : 入單型態_tb.Text = "" : 客戶地址_bt.Text = "" : SalesOrder_cb.Text = ""
434 465
             力威訂單號_tb.Text = "" : 地址1_tb.Text = "" : 代理編號_cb.Text = "" : 訂貨代理_tb.Text = "" : 總雙數_tb.Text = "" : 總案件_tb.Text = ""
435
-            FTY_cb.Text = "" : 最終運送_tb.Text = "" : 日期_dtp.Value = Today() : 日期1_dtp.Value = Today() : 日期2_dtp.Text = Today() : 日期3_dtp.Value = Today()
436
-            日期4_dtp.Value = Today() : 日期5_dtp.Value = Today() : 日期6_dtp.Value = Today() : 入單型態_tb.Text = "2"
466
+            FTY_cb.Text = "" : 最終運送_tb.Text = "" : 日期_dtp.Value = Today() : 日期1_dtp.Value = Today() : 日期2_dtp.Text = Today()
467
+            日期3_dtp.Format = DateTimePickerFormat.Custom : 日期3_dtp.CustomFormat = " "
468
+            日期4_dtp.Format = DateTimePickerFormat.Custom : 日期4_dtp.CustomFormat = " "
469
+            日期5_dtp.Value = Today() : 日期6_dtp.Value = Today() : 入單型態_tb.Text = "2"
437 470
             If 訂單資料表(0) = "訂單明細表抬頭" Then : 客戶名稱_cb.Text = "" : 公司_tb.Text = ""
438 471
             ElseIf 訂單資料表(0) = "訂單明細表抬頭_DRS" Then : 客戶名稱_cb.Text = "" : 公司_tb.Text = ""
439 472
             ElseIf 訂單資料表(0) = "訂單明細表抬頭_HP" Then : 客戶名稱_cb.Text = "Hush Puppies"
@@ -471,7 +504,7 @@ Public Class 量產訂單輸入
471 504
                                                 PA6 = DM_cb.Text : PA7 = Strings.Format(日期_dtp.Value, "yyyy/MM/dd") : PA8 = FTY_cb.Text : PA9 = DIV_cb.Text
472 505
                                                 PA10 = Strings.Format(日期6_dtp.Value, "yyyy/MM/dd") : PA11 = 力威訂單號_tb.Text : SQL_訂單控制表新增()
473 506
                                                 '-----------新增訂單明細表--------------------------------------------------------------------------------------------
474
-                                                PA12 = Item_cb.Text : PA14 = PD_cb.Text : SQL_訂單明細表新增()
507
+                                                PA12 = Item_cb.Text : PA15 = Item2_cb.Text : PA14 = PD_cb.Text : SQL_訂單明細表新增()
475 508
                                                 '-----------新增訂單成本利潤表----------------------------------------------------------------------------------------
476 509
                                                 PA15 = Strings.Left(Strings.Format(日期_dtp.Value, "yyyy/MM/dd"), 4)
477 510
                                                 SQL_查詢訂單成本利潤表流水號()
@@ -496,7 +529,8 @@ Public Class 量產訂單輸入
496 529
             If 資料流水號_tb.Text = 控制表_dgv.Rows(i).Cells("資料流水號").Value.ToString() Then
497 530
                 控制表_dgv.Rows(i).Cells("顏色").Value = 顏色_cb.Text
498 531
                 控制表_dgv.Rows(i).Cells("楦型").Value = DM_cb.Text
499
-                明細表_dgv.Rows(i).Cells("ItemNumber").Value = Item_cb.Text
532
+                明細表_dgv.Rows(i).Cells("Item").Value = Item_cb.Text
533
+                明細表_dgv.Rows(i).Cells("Item2").Value = Item2_cb.Text
500 534
                 明細表_dgv.Rows(i).Cells("ProductDescription").Value = PD_cb.Text
501 535
                 明細表_dgv.Rows(i).Cells("Color").Value = 顏色_cb.Text
502 536
                 明細表_dgv.Rows(i).Cells("DM").Value = DM_cb.Text
@@ -547,4 +581,7 @@ Public Class 量產訂單輸入
547 581
             End If
548 582
         End If
549 583
     End Sub
584
+    Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles STYLE_N_tb.TextChanged
585
+        For i As Integer = 0 To 控制表_dgv.Rows.Count - 1 : 控制表_dgv.Rows(i).Cells("STYLE #").Value = STYLE_N_tb.Text : Next
586
+    End Sub
550 587
 End Class

+ 69
- 61
TENDEN-MES-SYS/6、圖片資料庫管理/驗貨報告系統/驗貨報告圖片導入資料庫.Designer.vb View File

@@ -22,8 +22,7 @@ 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
-        Me.WebBrowser1 = New System.Windows.Forms.WebBrowser()
25
+        Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
27 26
         Me.訂單清單_dgv = New System.Windows.Forms.DataGridView()
28 27
         Me.型體名稱_lb = New System.Windows.Forms.Label()
29 28
         Me.客戶訂單號_lb = New System.Windows.Forms.Label()
@@ -40,8 +39,6 @@ Partial Class 驗貨報告圖片導入資料庫
40 39
         Me.TextBox7 = New System.Windows.Forms.TextBox()
41 40
         Me.Label4 = New System.Windows.Forms.Label()
42 41
         Me.讀取料夾路徑_bt = New System.Windows.Forms.Button()
43
-        Me.伺服器FTP文件夾_lb = New System.Windows.Forms.Label()
44
-        Me.Label7 = New System.Windows.Forms.Label()
45 42
         Me.FolderBrowserDialog1 = New System.Windows.Forms.FolderBrowserDialog()
46 43
         Me.Label5 = New System.Windows.Forms.Label()
47 44
         Me.Label8 = New System.Windows.Forms.Label()
@@ -53,29 +50,24 @@ Partial Class 驗貨報告圖片導入資料庫
53 50
         Me.字體大小調整_lb = New System.Windows.Forms.Label()
54 51
         Me.資料庫選擇3_bt = New System.Windows.Forms.Button()
55 52
         Me.TextBox1 = New System.Windows.Forms.TextBox()
53
+        Me.Panel1 = New System.Windows.Forms.Panel()
54
+        Me.副檔名_bt = New System.Windows.Forms.TextBox()
55
+        Me.資料流水號_tb = New System.Windows.Forms.TextBox()
56
+        Me.確認儲存1_bt = New System.Windows.Forms.Button()
56 57
         CType(Me.訂單清單_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
57 58
         CType(Me.字體_NUD, System.ComponentModel.ISupportInitialize).BeginInit()
59
+        Me.Panel1.SuspendLayout()
58 60
         Me.SuspendLayout()
59 61
         '
60
-        'WebBrowser1
61
-        '
62
-        Me.WebBrowser1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
63
-        Me.WebBrowser1.Location = New System.Drawing.Point(567, 337)
64
-        Me.WebBrowser1.MinimumSize = New System.Drawing.Size(20, 20)
65
-        Me.WebBrowser1.Name = "WebBrowser1"
66
-        Me.WebBrowser1.Size = New System.Drawing.Size(341, 107)
67
-        Me.WebBrowser1.TabIndex = 521
68
-        Me.WebBrowser1.Url = New System.Uri("", System.UriKind.Relative)
69
-        Me.WebBrowser1.Visible = False
70
-        '
71 62
         '訂單清單_dgv
72 63
         '
73
-        DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
74
-        Me.訂單清單_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
64
+        DataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
65
+        Me.訂單清單_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
75 66
         Me.訂單清單_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
76 67
             Or System.Windows.Forms.AnchorStyles.Left) _
77 68
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
78 69
         Me.訂單清單_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
70
+        Me.訂單清單_dgv.BackgroundColor = System.Drawing.Color.White
79 71
         Me.訂單清單_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
80 72
         Me.訂單清單_dgv.Location = New System.Drawing.Point(356, 79)
81 73
         Me.訂單清單_dgv.Name = "訂單清單_dgv"
@@ -121,7 +113,7 @@ Partial Class 驗貨報告圖片導入資料庫
121 113
         '查詢_bt
122 114
         '
123 115
         Me.查詢_bt.ForeColor = System.Drawing.Color.Black
124
-        Me.查詢_bt.Location = New System.Drawing.Point(795, 41)
116
+        Me.查詢_bt.Location = New System.Drawing.Point(795, 42)
125 117
         Me.查詢_bt.Name = "查詢_bt"
126 118
         Me.查詢_bt.Size = New System.Drawing.Size(149, 35)
127 119
         Me.查詢_bt.TabIndex = 532
@@ -153,11 +145,11 @@ Partial Class 驗貨報告圖片導入資料庫
153 145
         '
154 146
         Me.確認儲存_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
155 147
         Me.確認儲存_bt.ForeColor = System.Drawing.Color.Blue
156
-        Me.確認儲存_bt.Location = New System.Drawing.Point(452, 3)
148
+        Me.確認儲存_bt.Location = New System.Drawing.Point(449, 1)
157 149
         Me.確認儲存_bt.Name = "確認儲存_bt"
158
-        Me.確認儲存_bt.Size = New System.Drawing.Size(107, 52)
150
+        Me.確認儲存_bt.Size = New System.Drawing.Size(89, 52)
159 151
         Me.確認儲存_bt.TabIndex = 535
160
-        Me.確認儲存_bt.Text = "確認儲存"
152
+        Me.確認儲存_bt.Text = "確認儲存" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "驗貨報告(舊)"
161 153
         Me.確認儲存_bt.UseVisualStyleBackColor = True
162 154
         '
163 155
         '驗貨日期_dtp
@@ -181,7 +173,7 @@ Partial Class 驗貨報告圖片導入資料庫
181 173
         '
182 174
         Me.TextBox3.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
183 175
         Me.TextBox3.ForeColor = System.Drawing.Color.Black
184
-        Me.TextBox3.Location = New System.Drawing.Point(899, 267)
176
+        Me.TextBox3.Location = New System.Drawing.Point(21, 41)
185 177
         Me.TextBox3.Name = "TextBox3"
186 178
         Me.TextBox3.Size = New System.Drawing.Size(149, 23)
187 179
         Me.TextBox3.TabIndex = 538
@@ -203,7 +195,7 @@ Partial Class 驗貨報告圖片導入資料庫
203 195
         Me.TextBox7.AllowDrop = True
204 196
         Me.TextBox7.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
205 197
         Me.TextBox7.ForeColor = System.Drawing.Color.Black
206
-        Me.TextBox7.Location = New System.Drawing.Point(899, 238)
198
+        Me.TextBox7.Location = New System.Drawing.Point(21, 12)
207 199
         Me.TextBox7.Multiline = True
208 200
         Me.TextBox7.Name = "TextBox7"
209 201
         Me.TextBox7.Size = New System.Drawing.Size(149, 23)
@@ -231,31 +223,6 @@ Partial Class 驗貨報告圖片導入資料庫
231 223
         Me.讀取料夾路徑_bt.Text = "讀取料夾路徑"
232 224
         Me.讀取料夾路徑_bt.UseVisualStyleBackColor = True
233 225
         '
234
-        '伺服器FTP文件夾_lb
235
-        '
236
-        Me.伺服器FTP文件夾_lb.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
237
-        Me.伺服器FTP文件夾_lb.AutoSize = True
238
-        Me.伺服器FTP文件夾_lb.Font = New System.Drawing.Font("微軟正黑體", 14.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
239
-        Me.伺服器FTP文件夾_lb.Location = New System.Drawing.Point(564, 310)
240
-        Me.伺服器FTP文件夾_lb.Name = "伺服器FTP文件夾_lb"
241
-        Me.伺服器FTP文件夾_lb.Size = New System.Drawing.Size(156, 24)
242
-        Me.伺服器FTP文件夾_lb.TabIndex = 567
243
-        Me.伺服器FTP文件夾_lb.Text = "伺服器FTP文件夾"
244
-        Me.伺服器FTP文件夾_lb.Visible = False
245
-        '
246
-        'Label7
247
-        '
248
-        Me.Label7.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
249
-        Me.Label7.AutoSize = True
250
-        Me.Label7.Font = New System.Drawing.Font("微軟正黑體", 21.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
251
-        Me.Label7.ForeColor = System.Drawing.Color.Red
252
-        Me.Label7.Location = New System.Drawing.Point(919, 183)
253
-        Me.Label7.Name = "Label7"
254
-        Me.Label7.Size = New System.Drawing.Size(46, 37)
255
-        Me.Label7.TabIndex = 568
256
-        Me.Label7.Text = "↓"
257
-        Me.Label7.Visible = False
258
-        '
259 226
         'Label5
260 227
         '
261 228
         Me.Label5.AutoSize = True
@@ -270,7 +237,7 @@ Partial Class 驗貨報告圖片導入資料庫
270 237
         '
271 238
         Me.Label8.AutoSize = True
272 239
         Me.Label8.ForeColor = System.Drawing.Color.Blue
273
-        Me.Label8.Location = New System.Drawing.Point(565, 6)
240
+        Me.Label8.Location = New System.Drawing.Point(656, 6)
274 241
         Me.Label8.Name = "Label8"
275 242
         Me.Label8.Size = New System.Drawing.Size(223, 48)
276 243
         Me.Label8.TabIndex = 570
@@ -351,18 +318,62 @@ Partial Class 驗貨報告圖片導入資料庫
351 318
         '
352 319
         Me.TextBox1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
353 320
         Me.TextBox1.ForeColor = System.Drawing.Color.Black
354
-        Me.TextBox1.Location = New System.Drawing.Point(899, 296)
321
+        Me.TextBox1.Location = New System.Drawing.Point(21, 70)
355 322
         Me.TextBox1.Name = "TextBox1"
356 323
         Me.TextBox1.Size = New System.Drawing.Size(149, 23)
357 324
         Me.TextBox1.TabIndex = 1637
358 325
         Me.TextBox1.Visible = False
359 326
         '
327
+        'Panel1
328
+        '
329
+        Me.Panel1.Controls.Add(Me.副檔名_bt)
330
+        Me.Panel1.Controls.Add(Me.資料流水號_tb)
331
+        Me.Panel1.Controls.Add(Me.TextBox7)
332
+        Me.Panel1.Controls.Add(Me.TextBox1)
333
+        Me.Panel1.Controls.Add(Me.TextBox3)
334
+        Me.Panel1.Location = New System.Drawing.Point(389, 103)
335
+        Me.Panel1.Name = "Panel1"
336
+        Me.Panel1.Size = New System.Drawing.Size(189, 171)
337
+        Me.Panel1.TabIndex = 1638
338
+        '
339
+        '副檔名_bt
340
+        '
341
+        Me.副檔名_bt.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
342
+        Me.副檔名_bt.ForeColor = System.Drawing.Color.Black
343
+        Me.副檔名_bt.Location = New System.Drawing.Point(21, 128)
344
+        Me.副檔名_bt.Name = "副檔名_bt"
345
+        Me.副檔名_bt.Size = New System.Drawing.Size(149, 23)
346
+        Me.副檔名_bt.TabIndex = 1639
347
+        Me.副檔名_bt.Visible = False
348
+        '
349
+        '資料流水號_tb
350
+        '
351
+        Me.資料流水號_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
352
+        Me.資料流水號_tb.ForeColor = System.Drawing.Color.Black
353
+        Me.資料流水號_tb.Location = New System.Drawing.Point(21, 99)
354
+        Me.資料流水號_tb.Name = "資料流水號_tb"
355
+        Me.資料流水號_tb.Size = New System.Drawing.Size(149, 23)
356
+        Me.資料流水號_tb.TabIndex = 1638
357
+        Me.資料流水號_tb.Visible = False
358
+        '
359
+        '確認儲存1_bt
360
+        '
361
+        Me.確認儲存1_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
362
+        Me.確認儲存1_bt.ForeColor = System.Drawing.Color.Green
363
+        Me.確認儲存1_bt.Location = New System.Drawing.Point(540, 1)
364
+        Me.確認儲存1_bt.Name = "確認儲存1_bt"
365
+        Me.確認儲存1_bt.Size = New System.Drawing.Size(89, 52)
366
+        Me.確認儲存1_bt.TabIndex = 1639
367
+        Me.確認儲存1_bt.Text = "確認儲存" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "驗貨報告(新)"
368
+        Me.確認儲存1_bt.UseVisualStyleBackColor = True
369
+        '
360 370
         '驗貨報告圖片導入資料庫
361 371
         '
362 372
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
363 373
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
364 374
         Me.ClientSize = New System.Drawing.Size(1350, 701)
365
-        Me.Controls.Add(Me.TextBox1)
375
+        Me.Controls.Add(Me.確認儲存1_bt)
376
+        Me.Controls.Add(Me.Panel1)
366 377
         Me.Controls.Add(Me.資料庫選擇3_bt)
367 378
         Me.Controls.Add(Me.字體_NUD)
368 379
         Me.Controls.Add(Me.字體大小調整_lb)
@@ -371,13 +382,9 @@ Partial Class 驗貨報告圖片導入資料庫
371 382
         Me.Controls.Add(Me.查詢_bt)
372 383
         Me.Controls.Add(Me.天盾訂單號_tb)
373 384
         Me.Controls.Add(Me.天盾訂單號_lb)
374
-        Me.Controls.Add(Me.Label8)
375 385
         Me.Controls.Add(Me.Label5)
376
-        Me.Controls.Add(Me.伺服器FTP文件夾_lb)
377
-        Me.Controls.Add(Me.TextBox7)
378 386
         Me.Controls.Add(Me.Label4)
379 387
         Me.Controls.Add(Me.讀取料夾路徑_bt)
380
-        Me.Controls.Add(Me.TextBox3)
381 388
         Me.Controls.Add(Me.驗貨日期_lb)
382 389
         Me.Controls.Add(Me.驗貨日期_dtp)
383 390
         Me.Controls.Add(Me.確認儲存_bt)
@@ -386,23 +393,22 @@ Partial Class 驗貨報告圖片導入資料庫
386 393
         Me.Controls.Add(Me.客戶訂單號_tb)
387 394
         Me.Controls.Add(Me.型體名稱_lb)
388 395
         Me.Controls.Add(Me.客戶訂單號_lb)
389
-        Me.Controls.Add(Me.WebBrowser1)
390
-        Me.Controls.Add(Me.Label7)
391 396
         Me.Controls.Add(Me.檔案名稱_lb)
392 397
         Me.Controls.Add(Me.訂單清單_dgv)
393 398
         Me.Controls.Add(Me.WebBrowser2)
399
+        Me.Controls.Add(Me.Label8)
394 400
         Me.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
395 401
         Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
396 402
         Me.Name = "驗貨報告圖片導入資料庫"
397 403
         Me.Text = "驗貨報告圖片導入資料庫"
398 404
         CType(Me.訂單清單_dgv, System.ComponentModel.ISupportInitialize).EndInit()
399 405
         CType(Me.字體_NUD, System.ComponentModel.ISupportInitialize).EndInit()
406
+        Me.Panel1.ResumeLayout(False)
407
+        Me.Panel1.PerformLayout()
400 408
         Me.ResumeLayout(False)
401 409
         Me.PerformLayout()
402 410
 
403 411
     End Sub
404
-
405
-    Friend WithEvents WebBrowser1 As WebBrowser
406 412
     Friend WithEvents 訂單清單_dgv As DataGridView
407 413
     Friend WithEvents 型體名稱_lb As Label
408 414
     Friend WithEvents 客戶訂單號_lb As Label
@@ -419,8 +425,6 @@ Partial Class 驗貨報告圖片導入資料庫
419 425
     Friend WithEvents TextBox7 As TextBox
420 426
     Friend WithEvents Label4 As Label
421 427
     Friend WithEvents 讀取料夾路徑_bt As Button
422
-    Friend WithEvents 伺服器FTP文件夾_lb As Label
423
-    Friend WithEvents Label7 As Label
424 428
     Friend WithEvents FolderBrowserDialog1 As FolderBrowserDialog
425 429
     Friend WithEvents Label5 As Label
426 430
     Friend WithEvents Label8 As Label
@@ -432,5 +436,9 @@ Partial Class 驗貨報告圖片導入資料庫
432 436
     Friend WithEvents 字體大小調整_lb As Label
433 437
     Friend WithEvents 資料庫選擇3_bt As Button
434 438
     Friend WithEvents TextBox1 As TextBox
439
+    Friend WithEvents Panel1 As Panel
440
+    Friend WithEvents 資料流水號_tb As TextBox
441
+    Friend WithEvents 副檔名_bt As TextBox
442
+    Friend WithEvents 確認儲存1_bt As Button
435 443
 End Class
436 444
 

+ 39
- 36
TENDEN-MES-SYS/6、圖片資料庫管理/驗貨報告系統/驗貨報告圖片導入資料庫.vb View File

@@ -9,8 +9,8 @@ Public Class 驗貨報告圖片導入資料庫
9 9
         訂單清單_dgv.ColumnHeadersHeight = 25
10 10
         訂單清單_dgv.AllowUserToAddRows = False : ConnOpen()
11 11
     End Sub
12
-    Private  Sub Set_DGV1載入後設定()
13
-        CmdSet_For_DGV() :  : da.Fill(ds) : 訂單清單_dgv.DataSource = ds.Tables(0) : conn.Close()
12
+    Private Sub Set_DGV1載入後設定()
13
+        CmdSet_For_DGV() :: da.Fill(ds) : 訂單清單_dgv.DataSource = ds.Tables(0) : conn.Close()
14 14
     End Sub
15 15
     Private Sub Set_清單1()
16 16
         Set_DGV1載入前設定() : SQL_訂單清單() : Set_DGV1載入後設定()
@@ -18,11 +18,12 @@ Public Class 驗貨報告圖片導入資料庫
18 18
     Private Sub Set_grid1()
19 19
         訂單清單_dgv.Columns(0).FillWeight = 80 : 訂單清單_dgv.Columns(1).FillWeight = 70 : 訂單清單_dgv.Columns(2).FillWeight = 120 : 訂單清單_dgv.Columns(3).FillWeight = 140
20 20
         訂單清單_dgv.Columns(4).FillWeight = 100 : 訂單清單_dgv.Columns(5).FillWeight = 80 : 訂單清單_dgv.Columns(6).FillWeight = 100 : 訂單清單_dgv.Columns(7).FillWeight = 100
21
-        訂單清單_dgv.Columns(8).FillWeight = 100 : 訂單清單_dgv.Columns(9).Visible = False : 訂單清單_dgv.Columns(10).Visible = False
21
+        訂單清單_dgv.Columns(8).FillWeight = 100 : 訂單清單_dgv.Columns(9).Visible = False : 訂單清單_dgv.Columns(10).Visible = False : 訂單清單_dgv.Columns("資料流水號").Visible = False
22
+        訂單清單_dgv.Columns("訂單數量").DefaultCellStyle.Format = "#,##0" : 訂單清單_dgv.Columns("力威訂單號").Visible = False
22 23
     End Sub
23 24
     Private Sub 驗貨報告圖片導入資料庫_Load(sender As Object, e As EventArgs) Handles MyBase.Load
24 25
         Me.MdiParent = TENDEN_MES_SYS : Me.WindowState = 2 : Me.AutoScroll = True
25
-        訂單資料庫選擇.ShowDialog() : Target1 = Target & AA(3) & "/" : WebBrowser1.Url = New Uri(Target1)
26
+        訂單資料庫選擇.ShowDialog() : Target1 = Target & AA(3) & "/" : Panel1.SendToBack()
26 27
         Set_清單1() : Set_grid1()
27 28
         TextBox3.Visible = False : TextBox7.Visible = False
28 29
         If FolderBrowserDialog1.ShowDialog = DialogResult.OK Then : WebBrowser2.Navigate(FolderBrowserDialog1.SelectedPath) : End If
@@ -38,24 +39,41 @@ Public Class 驗貨報告圖片導入資料庫
38 39
     End Sub
39 40
     Private Sub 訂單清單_dgv_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 訂單清單_dgv.CellClick
40 41
         If e.RowIndex = -1 Then : Else
41
-            客戶訂單號_tb.Text = 訂單清單_dgv("客戶訂單號", e.RowIndex).Value.ToString : 型體名稱_tb.Text = 訂單清單_dgv("形體號", e.RowIndex).Value.ToString
42
-            天盾訂單號_tb.Text = 訂單清單_dgv("訂單流水號", e.RowIndex).Value.ToString
42
+            客戶訂單號_tb.Text = 訂單清單_dgv("力威訂單號", e.RowIndex).Value.ToString : 型體名稱_tb.Text = 訂單清單_dgv("形體號", e.RowIndex).Value.ToString
43
+            天盾訂單號_tb.Text = 訂單清單_dgv("訂單流水號", e.RowIndex).Value.ToString : 資料流水號_tb.Text = 訂單清單_dgv("資料流水號", e.RowIndex).Value.ToString
43 44
         End If
44 45
     End Sub
45 46
     Private Sub 查詢_bt_Click(sender As Object, e As EventArgs) Handles 查詢_bt.Click
46
-        PA = InputBox("請輸入要查詢的資料") : Set_DGV1載入前設定() : SQL_訂單清單查詢() : Set_DGV1載入後設定() : Set_grid1()
47
-        PA = ""
47
+        PA = InputBox("請輸入要查詢的資料") : Set_DGV1載入前設定() : SQL_訂單清單查詢() : Set_DGV1載入後設定() : Set_grid1() : PA = ""
48 48
     End Sub
49
-    Private  Sub Button11_Click(sender As Object, e As EventArgs) Handles 確認儲存_bt.Click
50
-        If 客戶訂單號_tb.Text = "" Or 型體名稱_tb.Text = "" Or 檔案名稱_tb.Text = "" Then
51
-            MsgBox("檔案名稱或資料不可空白")
52
-        Else
49
+    Private Sub Button11_Click(sender As Object, e As EventArgs) Handles 確認儲存_bt.Click
50
+        If 客戶訂單號_tb.Text = "" Or 型體名稱_tb.Text = "" Or 檔案名稱_tb.Text = "" Then : MsgBox("檔案名稱或資料不可空白") : Else
51
+            SQL_資料庫選擇() : If dr.Read() Then : PA1 = dr("圖片資料庫").ToString : PA20 = PA1 : End If
52
+            SQL_查詢最後一筆驗貨報告編號()
53
+            If dr.Read() Then : TextBox3.Text = dr("驗貨報告編號").ToString : Else : TextBox3.Text = "0" : End If : conn.Close()
54
+            Dim NUM1 As Integer = Double.Parse(Strings.Right(TextBox3.Text, 8)) + 1
55
+            If NUM1 < 10 Then : TextBox3.Text = "IR" & "0000000" & NUM1
56
+            ElseIf NUM1 > 9 And NUM1 < 100 Then : TextBox3.Text = "IR" & "000000" & NUM1
57
+            ElseIf NUM1 > 99 And NUM1 < 1000 Then : TextBox3.Text = "IR" & "00000" & NUM1
58
+            ElseIf NUM1 > 999 And NUM1 < 10000 Then : TextBox3.Text = "IR" & "0000" & NUM1
59
+            ElseIf NUM1 > 9999 And NUM1 < 100000 Then : TextBox3.Text = "IR" & "000" & NUM1
60
+            ElseIf NUM1 > 99999 And NUM1 < 100000 Then : TextBox3.Text = "IR" & "00" & NUM1
61
+            ElseIf NUM1 > 999999 And NUM1 < 1000000 Then : TextBox3.Text = "IR" & "0" & NUM1
62
+            ElseIf NUM1 > 9999999 Then : TextBox3.Text = "IR" & NUM1 : End If
63
+
64
+            If Strings.Right(TextBox1.Text, 3) = "pdf" Or Strings.Right(TextBox1.Text, 3) = "PDF" Then : 副檔名_bt.Text = "PDF" : Else : 副檔名_bt.Text = "" : End If
65
+            PA49 = TextBox1.Text : SQL_新增驗貨報告圖庫_正式() : conn.Close()
66
+            DTP = Format(驗貨日期_dtp.Value, "yyyy/MM/dd") : SQL_修改驗貨報告圖庫() : conn.Close()
67
+            '----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
68
+            檔案名稱_tb.Text = "" : TextBox1.Text = "" : Set_清單1() : Set_grid1() : MsgBox("新增完成")
69
+        End If
70
+    End Sub
71
+    Private Sub 確認儲存1_bt_Click(sender As Object, e As EventArgs) Handles 確認儲存1_bt.Click
72
+        If 客戶訂單號_tb.Text = "" Or 型體名稱_tb.Text = "" Or 檔案名稱_tb.Text = "" Then : MsgBox("檔案名稱或資料不可空白") : Else
53 73
             SQL_資料庫選擇() : If dr.Read() Then : PA1 = dr("圖片資料庫").ToString : PA20 = PA1 : End If
54 74
             SQL_查詢最後一筆驗貨報告編號()
55
-            If dr.Read() Then : TextBox3.Text = dr("驗貨報告編號").ToString : Else : TextBox3.Text = "0" : End If
56
-            conn.Close()
57
-            Dim NUM1 As Integer
58
-            NUM1 = Double.Parse(Strings.Right(TextBox3.Text, 8)) + 1
75
+            If dr.Read() Then : TextBox3.Text = dr("驗貨報告編號").ToString : Else : TextBox3.Text = "0" : End If : conn.Close()
76
+            Dim NUM1 As Integer = Double.Parse(Strings.Right(TextBox3.Text, 8)) + 1
59 77
             If NUM1 < 10 Then : TextBox3.Text = "IR" & "0000000" & NUM1
60 78
             ElseIf NUM1 > 9 And NUM1 < 100 Then : TextBox3.Text = "IR" & "000000" & NUM1
61 79
             ElseIf NUM1 > 99 And NUM1 < 1000 Then : TextBox3.Text = "IR" & "00000" & NUM1
@@ -63,28 +81,13 @@ Public Class 驗貨報告圖片導入資料庫
63 81
             ElseIf NUM1 > 9999 And NUM1 < 100000 Then : TextBox3.Text = "IR" & "000" & NUM1
64 82
             ElseIf NUM1 > 99999 And NUM1 < 100000 Then : TextBox3.Text = "IR" & "00" & NUM1
65 83
             ElseIf NUM1 > 999999 And NUM1 < 1000000 Then : TextBox3.Text = "IR" & "0" & NUM1
66
-            ElseIf NUM1 > 9999999 Then : TextBox3.Text = "IR" & NUM1
67
-            End If
68
-            PA49 = TextBox1.Text
69
-            If Strings.Left(Target1, 18) = "ftp://106.1.48.106" Then : SQL_新增驗貨報告編號_測試()
70
-            Else : SQL_新增驗貨報告圖庫_正式() : End If : conn.Close()
84
+            ElseIf NUM1 > 9999999 Then : TextBox3.Text = "IR" & NUM1 : End If
71 85
 
72
-            DTP = Format(驗貨日期_dtp.Value, "yyyy/MM/dd")
73
-            SQL_修改驗貨報告圖庫() : conn.Close()
74
-            ''---FTP方式刪除檔案----------------------------------------------------------------------------------------------------------------------------------------------------------------------
75
-            'Dim frq As FtpWebRequest, frp As FtpWebResponse, fcr As NetworkCredential
76
-            'frq = CType(WebRequest.Create(New Uri(Target1 & 檔案名稱_tb.Text)), FtpWebRequest)
77
-            'fcr = New NetworkCredential(FTP帳號, FTP密碼)
78
-            'frq.Credentials = fcr
79
-            'frq.Method = WebRequestMethods.Ftp.DeleteFile
80
-            'frq.UseBinary = True
81
-            'frp = CType(frq.GetResponse, FtpWebResponse)
82
-            'frp.Close()
83
-            'WebBrowser1.Refresh()
86
+            If Strings.Right(TextBox1.Text, 3) = "pdf" Or Strings.Right(TextBox1.Text, 3) = "PDF" Then : 副檔名_bt.Text = "PDF" : Else : 副檔名_bt.Text = "" : End If
87
+            PA49 = TextBox1.Text : SQL_新增驗貨報告圖庫_正式() : conn.Close()
88
+            DTP = Format(驗貨日期_dtp.Value, "yyyy/MM/dd") : SQL_修改驗貨報告圖庫1() : conn.Close()
84 89
             '----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
85
-            客戶訂單號_tb.Text = "" : 型體名稱_tb.Text = "" : 檔案名稱_tb.Text = "" : TextBox1.Text = ""
86
-            Set_清單1() : Set_grid1()
87
-            MsgBox("新增完成")
90
+            檔案名稱_tb.Text = "" : TextBox1.Text = "" : Set_清單1() : Set_grid1() : MsgBox("新增完成")
88 91
         End If
89 92
     End Sub
90 93
     Private Sub 檔案名稱_tb_DragEnter(sender As Object, e As DragEventArgs) Handles 檔案名稱_tb.DragEnter

+ 120
- 42
TENDEN-MES-SYS/6、圖片資料庫管理/驗貨報告系統/驗貨報告資料庫.Designer.vb View File

@@ -22,10 +22,9 @@ 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()
25
+        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 27
         Me.驗貨報告圖庫_dgv = New System.Windows.Forms.DataGridView()
28
-        Me.驗貨報告_pb = New System.Windows.Forms.PictureBox()
29 28
         Me.驗貨報告編號_tb = New System.Windows.Forms.TextBox()
30 29
         Me.下載圖片_bt = New System.Windows.Forms.Button()
31 30
         Me.查詢_bt = New System.Windows.Forms.Button()
@@ -57,21 +56,30 @@ Partial Class 驗貨報告資料庫
57 56
         Me.資料庫選擇1_bt = New System.Windows.Forms.Button()
58 57
         Me.TabControl1 = New System.Windows.Forms.TabControl()
59 58
         Me.TabPage1 = New System.Windows.Forms.TabPage()
59
+        Me.Panel3 = New System.Windows.Forms.Panel()
60
+        Me.驗貨報告_wb = New System.Windows.Forms.WebBrowser()
61
+        Me.驗貨報告_pb = New System.Windows.Forms.PictureBox()
60 62
         Me.TabPage2 = New System.Windows.Forms.TabPage()
61 63
         Me.字體_NUD = New System.Windows.Forms.NumericUpDown()
62 64
         Me.字體大小調整_lb = New System.Windows.Forms.Label()
63 65
         Me.Panel1 = New System.Windows.Forms.Panel()
66
+        Me.圖庫_tb = New System.Windows.Forms.TextBox()
64 67
         Me.Label38 = New System.Windows.Forms.Label()
65 68
         Me.圖片資料庫管理_dgv = New System.Windows.Forms.DataGridView()
66 69
         Me.資料庫選擇3_bt = New System.Windows.Forms.Button()
70
+        Me.Panel2 = New System.Windows.Forms.Panel()
71
+        Me.新版_ch = New System.Windows.Forms.CheckBox()
72
+        Me.舊版_ch = New System.Windows.Forms.CheckBox()
67 73
         CType(Me.驗貨報告圖庫_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
68
-        CType(Me.驗貨報告_pb, System.ComponentModel.ISupportInitialize).BeginInit()
69 74
         Me.TabControl1.SuspendLayout()
70 75
         Me.TabPage1.SuspendLayout()
76
+        Me.Panel3.SuspendLayout()
77
+        CType(Me.驗貨報告_pb, System.ComponentModel.ISupportInitialize).BeginInit()
71 78
         Me.TabPage2.SuspendLayout()
72 79
         CType(Me.字體_NUD, System.ComponentModel.ISupportInitialize).BeginInit()
73 80
         Me.Panel1.SuspendLayout()
74 81
         CType(Me.圖片資料庫管理_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
82
+        Me.Panel2.SuspendLayout()
75 83
         Me.SuspendLayout()
76 84
         '
77 85
         '驗貨報告圖庫_dgv
@@ -79,6 +87,7 @@ Partial Class 驗貨報告資料庫
79 87
         Me.驗貨報告圖庫_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
80 88
             Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
81 89
         Me.驗貨報告圖庫_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
90
+        Me.驗貨報告圖庫_dgv.BackgroundColor = System.Drawing.Color.White
82 91
         Me.驗貨報告圖庫_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
83 92
         Me.驗貨報告圖庫_dgv.Location = New System.Drawing.Point(4, 33)
84 93
         Me.驗貨報告圖庫_dgv.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
@@ -88,21 +97,6 @@ Partial Class 驗貨報告資料庫
88 97
         Me.驗貨報告圖庫_dgv.Size = New System.Drawing.Size(615, 664)
89 98
         Me.驗貨報告圖庫_dgv.TabIndex = 4
90 99
         '
91
-        '驗貨報告_pb
92
-        '
93
-        Me.驗貨報告_pb.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
94
-            Or System.Windows.Forms.AnchorStyles.Left) _
95
-            Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
96
-        Me.驗貨報告_pb.BackgroundImage = Global.天盾國際管理系統.My.Resources.Resources._9572465
97
-        Me.驗貨報告_pb.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
98
-        Me.驗貨報告_pb.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
99
-        Me.驗貨報告_pb.Location = New System.Drawing.Point(6, 52)
100
-        Me.驗貨報告_pb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
101
-        Me.驗貨報告_pb.Name = "驗貨報告_pb"
102
-        Me.驗貨報告_pb.Size = New System.Drawing.Size(782, 606)
103
-        Me.驗貨報告_pb.TabIndex = 502
104
-        Me.驗貨報告_pb.TabStop = False
105
-        '
106 100
         '驗貨報告編號_tb
107 101
         '
108 102
         Me.驗貨報告編號_tb.Location = New System.Drawing.Point(321, 3)
@@ -147,7 +141,7 @@ Partial Class 驗貨報告資料庫
147 141
         '
148 142
         '客戶訂單號_tb
149 143
         '
150
-        Me.客戶訂單號_tb.Location = New System.Drawing.Point(555, 3)
144
+        Me.客戶訂單號_tb.Location = New System.Drawing.Point(321, 27)
151 145
         Me.客戶訂單號_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
152 146
         Me.客戶訂單號_tb.Name = "客戶訂單號_tb"
153 147
         Me.客戶訂單號_tb.Size = New System.Drawing.Size(115, 23)
@@ -155,7 +149,7 @@ Partial Class 驗貨報告資料庫
155 149
         '
156 150
         '型體名稱_tb
157 151
         '
158
-        Me.型體名稱_tb.Location = New System.Drawing.Point(672, 3)
152
+        Me.型體名稱_tb.Location = New System.Drawing.Point(438, 27)
159 153
         Me.型體名稱_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
160 154
         Me.型體名稱_tb.Name = "型體名稱_tb"
161 155
         Me.型體名稱_tb.Size = New System.Drawing.Size(115, 23)
@@ -163,7 +157,7 @@ Partial Class 驗貨報告資料庫
163 157
         '
164 158
         'TextBox5
165 159
         '
166
-        Me.TextBox5.Location = New System.Drawing.Point(243, 110)
160
+        Me.TextBox5.Location = New System.Drawing.Point(3, 146)
167 161
         Me.TextBox5.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
168 162
         Me.TextBox5.Name = "TextBox5"
169 163
         Me.TextBox5.Size = New System.Drawing.Size(115, 23)
@@ -399,14 +393,13 @@ Partial Class 驗貨報告資料庫
399 393
         Me.TabPage1.Controls.Add(Me.年份季度_tb)
400 394
         Me.TabPage1.Controls.Add(Me.客戶訂單號_tb)
401 395
         Me.TabPage1.Controls.Add(Me.型體名稱_tb)
402
-        Me.TabPage1.Controls.Add(Me.TextBox5)
403 396
         Me.TabPage1.Controls.Add(Me.順時鐘90度旋轉_bt)
404 397
         Me.TabPage1.Controls.Add(Me.逆時鐘90度旋轉_bt)
405 398
         Me.TabPage1.Controls.Add(Me.水平翻轉_bt)
406 399
         Me.TabPage1.Controls.Add(Me.垂直翻轉_bt)
407 400
         Me.TabPage1.Controls.Add(Me.放大_bt)
408 401
         Me.TabPage1.Controls.Add(Me.復原_bt)
409
-        Me.TabPage1.Controls.Add(Me.驗貨報告_pb)
402
+        Me.TabPage1.Controls.Add(Me.Panel3)
410 403
         Me.TabPage1.Location = New System.Drawing.Point(4, 28)
411 404
         Me.TabPage1.Name = "TabPage1"
412 405
         Me.TabPage1.Padding = New System.Windows.Forms.Padding(3)
@@ -415,6 +408,40 @@ Partial Class 驗貨報告資料庫
415 408
         Me.TabPage1.Text = "驗貨報告"
416 409
         Me.TabPage1.UseVisualStyleBackColor = True
417 410
         '
411
+        'Panel3
412
+        '
413
+        Me.Panel3.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
414
+            Or System.Windows.Forms.AnchorStyles.Left) _
415
+            Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
416
+        Me.Panel3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
417
+        Me.Panel3.Controls.Add(Me.驗貨報告_wb)
418
+        Me.Panel3.Controls.Add(Me.驗貨報告_pb)
419
+        Me.Panel3.Location = New System.Drawing.Point(2, 52)
420
+        Me.Panel3.Name = "Panel3"
421
+        Me.Panel3.Size = New System.Drawing.Size(786, 604)
422
+        Me.Panel3.TabIndex = 560
423
+        '
424
+        '驗貨報告_wb
425
+        '
426
+        Me.驗貨報告_wb.Dock = System.Windows.Forms.DockStyle.Fill
427
+        Me.驗貨報告_wb.Location = New System.Drawing.Point(0, 0)
428
+        Me.驗貨報告_wb.MinimumSize = New System.Drawing.Size(20, 20)
429
+        Me.驗貨報告_wb.Name = "驗貨報告_wb"
430
+        Me.驗貨報告_wb.Size = New System.Drawing.Size(784, 602)
431
+        Me.驗貨報告_wb.TabIndex = 559
432
+        '
433
+        '驗貨報告_pb
434
+        '
435
+        Me.驗貨報告_pb.BackColor = System.Drawing.Color.White
436
+        Me.驗貨報告_pb.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
437
+        Me.驗貨報告_pb.Dock = System.Windows.Forms.DockStyle.Fill
438
+        Me.驗貨報告_pb.Location = New System.Drawing.Point(0, 0)
439
+        Me.驗貨報告_pb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
440
+        Me.驗貨報告_pb.Name = "驗貨報告_pb"
441
+        Me.驗貨報告_pb.Size = New System.Drawing.Size(784, 602)
442
+        Me.驗貨報告_pb.TabIndex = 502
443
+        Me.驗貨報告_pb.TabStop = False
444
+        '
418 445
         'TabPage2
419 446
         '
420 447
         Me.TabPage2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
@@ -441,7 +468,7 @@ Partial Class 驗貨報告資料庫
441 468
         '
442 469
         Me.字體_NUD.DecimalPlaces = 1
443 470
         Me.字體_NUD.Increment = New Decimal(New Integer() {1, 0, 0, 65536})
444
-        Me.字體_NUD.Location = New System.Drawing.Point(580, 6)
471
+        Me.字體_NUD.Location = New System.Drawing.Point(159, 19)
445 472
         Me.字體_NUD.Maximum = New Decimal(New Integer() {18, 0, 0, 0})
446 473
         Me.字體_NUD.Minimum = New Decimal(New Integer() {6, 0, 0, 0})
447 474
         Me.字體_NUD.Name = "字體_NUD"
@@ -455,7 +482,7 @@ Partial Class 驗貨報告資料庫
455 482
         Me.字體大小調整_lb.Font = New System.Drawing.Font("微軟正黑體", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
456 483
         Me.字體大小調整_lb.ForeColor = System.Drawing.Color.Red
457 484
         Me.字體大小調整_lb.ImeMode = System.Windows.Forms.ImeMode.NoControl
458
-        Me.字體大小調整_lb.Location = New System.Drawing.Point(522, 9)
485
+        Me.字體大小調整_lb.Location = New System.Drawing.Point(101, 22)
459 486
         Me.字體大小調整_lb.Name = "字體大小調整_lb"
460 487
         Me.字體大小調整_lb.Size = New System.Drawing.Size(60, 17)
461 488
         Me.字體大小調整_lb.TabIndex = 1633
@@ -464,13 +491,23 @@ Partial Class 驗貨報告資料庫
464 491
         'Panel1
465 492
         '
466 493
         Me.Panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
494
+        Me.Panel1.Controls.Add(Me.圖庫_tb)
467 495
         Me.Panel1.Controls.Add(Me.Label38)
468 496
         Me.Panel1.Controls.Add(Me.圖片資料庫管理_dgv)
469
-        Me.Panel1.Location = New System.Drawing.Point(572, 164)
497
+        Me.Panel1.Controls.Add(Me.TextBox5)
498
+        Me.Panel1.Location = New System.Drawing.Point(213, 128)
470 499
         Me.Panel1.Name = "Panel1"
471 500
         Me.Panel1.Size = New System.Drawing.Size(205, 303)
472 501
         Me.Panel1.TabIndex = 1634
473 502
         '
503
+        '圖庫_tb
504
+        '
505
+        Me.圖庫_tb.Location = New System.Drawing.Point(3, 177)
506
+        Me.圖庫_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
507
+        Me.圖庫_tb.Name = "圖庫_tb"
508
+        Me.圖庫_tb.Size = New System.Drawing.Size(115, 23)
509
+        Me.圖庫_tb.TabIndex = 709
510
+        '
474 511
         'Label38
475 512
         '
476 513
         Me.Label38.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
@@ -484,27 +521,27 @@ Partial Class 驗貨報告資料庫
484 521
         '
485 522
         '圖片資料庫管理_dgv
486 523
         '
487
-        DataGridViewCellStyle1.BackColor = System.Drawing.Color.White
488
-        Me.圖片資料庫管理_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
524
+        DataGridViewCellStyle5.BackColor = System.Drawing.Color.White
525
+        Me.圖片資料庫管理_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle5
489 526
         Me.圖片資料庫管理_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
490 527
             Or System.Windows.Forms.AnchorStyles.Left) _
491 528
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
492 529
         Me.圖片資料庫管理_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
493 530
         Me.圖片資料庫管理_dgv.BackgroundColor = System.Drawing.Color.White
494
-        DataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
495
-        DataGridViewCellStyle2.BackColor = System.Drawing.Color.White
496
-        DataGridViewCellStyle2.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
497
-        DataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText
498
-        DataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight
499
-        DataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText
500
-        DataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
501
-        Me.圖片資料庫管理_dgv.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle2
531
+        DataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
532
+        DataGridViewCellStyle6.BackColor = System.Drawing.Color.White
533
+        DataGridViewCellStyle6.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
534
+        DataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText
535
+        DataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight
536
+        DataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText
537
+        DataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
538
+        Me.圖片資料庫管理_dgv.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle6
502 539
         Me.圖片資料庫管理_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
503 540
         Me.圖片資料庫管理_dgv.Location = New System.Drawing.Point(3, 29)
504 541
         Me.圖片資料庫管理_dgv.Name = "圖片資料庫管理_dgv"
505 542
         Me.圖片資料庫管理_dgv.RowHeadersWidth = 5
506 543
         Me.圖片資料庫管理_dgv.RowTemplate.Height = 24
507
-        Me.圖片資料庫管理_dgv.Size = New System.Drawing.Size(195, 269)
544
+        Me.圖片資料庫管理_dgv.Size = New System.Drawing.Size(195, 110)
508 545
         Me.圖片資料庫管理_dgv.TabIndex = 707
509 546
         '
510 547
         '資料庫選擇3_bt
@@ -516,35 +553,70 @@ Partial Class 驗貨報告資料庫
516 553
         Me.資料庫選擇3_bt.Text = "HP"
517 554
         Me.資料庫選擇3_bt.UseVisualStyleBackColor = True
518 555
         '
556
+        'Panel2
557
+        '
558
+        Me.Panel2.Controls.Add(Me.字體_NUD)
559
+        Me.Panel2.Controls.Add(Me.字體大小調整_lb)
560
+        Me.Panel2.Location = New System.Drawing.Point(257, 145)
561
+        Me.Panel2.Name = "Panel2"
562
+        Me.Panel2.Size = New System.Drawing.Size(200, 100)
563
+        Me.Panel2.TabIndex = 1637
564
+        '
565
+        '新版_ch
566
+        '
567
+        Me.新版_ch.AutoSize = True
568
+        Me.新版_ch.Location = New System.Drawing.Point(450, 7)
569
+        Me.新版_ch.Name = "新版_ch"
570
+        Me.新版_ch.Size = New System.Drawing.Size(50, 20)
571
+        Me.新版_ch.TabIndex = 1638
572
+        Me.新版_ch.Text = "新版"
573
+        Me.新版_ch.UseVisualStyleBackColor = True
574
+        '
575
+        '舊版_ch
576
+        '
577
+        Me.舊版_ch.AutoSize = True
578
+        Me.舊版_ch.Checked = True
579
+        Me.舊版_ch.CheckState = System.Windows.Forms.CheckState.Checked
580
+        Me.舊版_ch.Location = New System.Drawing.Point(506, 7)
581
+        Me.舊版_ch.Name = "舊版_ch"
582
+        Me.舊版_ch.Size = New System.Drawing.Size(50, 20)
583
+        Me.舊版_ch.TabIndex = 1639
584
+        Me.舊版_ch.Text = "舊版"
585
+        Me.舊版_ch.UseVisualStyleBackColor = True
586
+        '
519 587
         '驗貨報告資料庫
520 588
         '
521 589
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
522 590
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
523 591
         Me.ClientSize = New System.Drawing.Size(1422, 701)
592
+        Me.Controls.Add(Me.舊版_ch)
593
+        Me.Controls.Add(Me.新版_ch)
524 594
         Me.Controls.Add(Me.資料庫選擇3_bt)
525
-        Me.Controls.Add(Me.Panel1)
526
-        Me.Controls.Add(Me.字體_NUD)
527
-        Me.Controls.Add(Me.字體大小調整_lb)
528 595
         Me.Controls.Add(Me.Label1)
529 596
         Me.Controls.Add(Me.TabControl1)
530 597
         Me.Controls.Add(Me.資料庫選擇2_bt)
531 598
         Me.Controls.Add(Me.資料庫選擇1_bt)
532 599
         Me.Controls.Add(Me.驗貨報告圖庫_dgv)
600
+        Me.Controls.Add(Me.Panel2)
601
+        Me.Controls.Add(Me.Panel1)
533 602
         Me.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
534 603
         Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
535 604
         Me.Name = "驗貨報告資料庫"
536 605
         Me.Text = "驗貨報告資料庫"
537 606
         CType(Me.驗貨報告圖庫_dgv, System.ComponentModel.ISupportInitialize).EndInit()
538
-        CType(Me.驗貨報告_pb, System.ComponentModel.ISupportInitialize).EndInit()
539 607
         Me.TabControl1.ResumeLayout(False)
540 608
         Me.TabPage1.ResumeLayout(False)
541 609
         Me.TabPage1.PerformLayout()
610
+        Me.Panel3.ResumeLayout(False)
611
+        CType(Me.驗貨報告_pb, System.ComponentModel.ISupportInitialize).EndInit()
542 612
         Me.TabPage2.ResumeLayout(False)
543 613
         Me.TabPage2.PerformLayout()
544 614
         CType(Me.字體_NUD, System.ComponentModel.ISupportInitialize).EndInit()
545 615
         Me.Panel1.ResumeLayout(False)
546 616
         Me.Panel1.PerformLayout()
547 617
         CType(Me.圖片資料庫管理_dgv, System.ComponentModel.ISupportInitialize).EndInit()
618
+        Me.Panel2.ResumeLayout(False)
619
+        Me.Panel2.PerformLayout()
548 620
         Me.ResumeLayout(False)
549 621
         Me.PerformLayout()
550 622
 
@@ -590,4 +662,10 @@ Partial Class 驗貨報告資料庫
590 662
     Friend WithEvents Label38 As Label
591 663
     Friend WithEvents 圖片資料庫管理_dgv As DataGridView
592 664
     Friend WithEvents 資料庫選擇3_bt As Button
665
+    Friend WithEvents Panel2 As Panel
666
+    Friend WithEvents 驗貨報告_wb As WebBrowser
667
+    Friend WithEvents Panel3 As Panel
668
+    Friend WithEvents 圖庫_tb As TextBox
669
+    Friend WithEvents 新版_ch As CheckBox
670
+    Friend WithEvents 舊版_ch As CheckBox
593 671
 End Class

+ 103
- 54
TENDEN-MES-SYS/6、圖片資料庫管理/驗貨報告系統/驗貨報告資料庫.vb View File

@@ -23,57 +23,43 @@ Public Class 驗貨報告資料庫
23 23
         圖片資料庫管理_dgv.Columns(0).FillWeight = 100 : 圖片資料庫管理_dgv.Columns(1).Visible = False
24 24
     End Sub
25 25
     Private Sub Set_DGV1載入前設定()
26
-        Try
27
-            驗貨報告圖庫_dgv.DataSource = Nothing : ds.Clear()
28
-            驗貨報告圖庫_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
29
-            驗貨報告圖庫_dgv.ColumnHeadersHeight = 25 : 驗貨報告圖庫_dgv.AllowUserToAddRows = False : ConnOpen()
30
-        Catch ex As Exception
31
-            MsgBox(ex.Message)
32
-        End Try
26
+        驗貨報告圖庫_dgv.DataSource = Nothing : ds.Clear()
27
+        驗貨報告圖庫_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
28
+        驗貨報告圖庫_dgv.ColumnHeadersHeight = 25 : 驗貨報告圖庫_dgv.AllowUserToAddRows = False : ConnOpen()
33 29
     End Sub
34 30
     Private Sub Set_DGV1載入後設定()
35
-        CmdSet_For_DGV() :  : da.Fill(ds) : 驗貨報告圖庫_dgv.DataSource = ds.Tables(0) : conn.Close()
31
+        CmdSet_For_DGV() : da.Fill(ds) : 驗貨報告圖庫_dgv.DataSource = ds.Tables(0) : conn.Close()
32
+        驗貨報告圖庫_dgv.Columns(0).FillWeight = 80 : 驗貨報告圖庫_dgv.Columns(1).FillWeight = 80 : 驗貨報告圖庫_dgv.Columns(2).FillWeight = 130
33
+        驗貨報告圖庫_dgv.Columns(3).FillWeight = 150 : 驗貨報告圖庫_dgv.Columns(4).FillWeight = 70 : 驗貨報告圖庫_dgv.Columns(5).FillWeight = 80
34
+        驗貨報告圖庫_dgv.Columns("驗報圖庫").Visible = False : 驗貨報告圖庫_dgv.Columns("驗報圖庫2").Visible = False
36 35
     End Sub
37 36
     Private Sub Set_圖片清單()
38 37
         Set_DGV1載入前設定() : SQL_驗貨報告圖庫清單() : Set_DGV1載入後設定()
39 38
     End Sub
40
-    Private Sub Set_grid()
41
-        Try
42
-            驗貨報告圖庫_dgv.Columns(0).FillWeight = 80 : 驗貨報告圖庫_dgv.Columns(1).FillWeight = 80 : 驗貨報告圖庫_dgv.Columns(2).FillWeight = 130
43
-            驗貨報告圖庫_dgv.Columns(3).FillWeight = 150 : 驗貨報告圖庫_dgv.Columns(4).FillWeight = 70 : 驗貨報告圖庫_dgv.Columns(5).FillWeight = 80
44
-        Catch ex As Exception
45
-            MsgBox(ex.Message)
46
-        End Try
47
-    End Sub
48 39
     Private Sub 驗貨報告資料庫_Load(sender As Object, e As EventArgs) Handles MyBase.Load
49
-        Try
50
-            Me.MdiParent = TENDEN_MES_SYS : Me.WindowState = 2 : Me.AutoScroll = True
51
-            訂單資料庫選擇.ShowDialog() : Target1 = Target & AA(3) & "/" : WebBrowser1.Url = New Uri(Target1)
52
-            驗貨報告編號_tb.Enabled = False : 年份季度_tb.Enabled = False : 客戶訂單號_tb.Enabled = False : 型體名稱_tb.Enabled = False
53
-            TextBox5.Visible = False : TextBox7.Visible = False : Button24.Enabled = False
54
-            If CC(92) = True Then : Button24.Enabled = True : End If
55
-            If FolderBrowserDialog1.ShowDialog = DialogResult.OK Then : WebBrowser2.Navigate(FolderBrowserDialog1.SelectedPath) : End If
56
-            Set_工程圖片資料庫狀態()
57
-            If TENDEN_MES_SYS.Size.Width > 1440 And TENDEN_MES_SYS.Size.Height > 900 Then : 字體_NUD.Value = 9
58
-            ElseIf TENDEN_MES_SYS.Size.Width <= 1440 And TENDEN_MES_SYS.Size.Height <= 900 Then : 字體_NUD.Value = 7.6 : End If
59
-        Catch ex As Exception
60
-            MsgBox(ex.Message)
61
-        End Try
40
+        Me.MdiParent = TENDEN_MES_SYS : Me.WindowState = 2 : Me.AutoScroll = True
41
+        Target1 = Target & AA(3) & "/" : WebBrowser1.Url = New Uri(Target1)
42
+        驗貨報告編號_tb.Enabled = False : 年份季度_tb.Enabled = False : 客戶訂單號_tb.Enabled = False : 型體名稱_tb.Enabled = False
43
+        TextBox5.Visible = False : TextBox7.Visible = False : Button24.Enabled = False : Panel1.Visible = False
44
+        If CC(92) = True Then : Button24.Enabled = True : End If
45
+
46
+        WebBrowser2.Navigate(Environment.GetFolderPath(Environment.SpecialFolder.Desktop))
47
+        If TENDEN_MES_SYS.Size.Width > 1440 And TENDEN_MES_SYS.Size.Height > 900 Then : 字體_NUD.Value = 9
48
+        ElseIf TENDEN_MES_SYS.Size.Width <= 1440 And TENDEN_MES_SYS.Size.Height <= 900 Then : 字體_NUD.Value = 7.6 : End If
49
+    End Sub
50
+    Private Sub 驗貨報告資料庫_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown
51
+        Set_工程圖片資料庫狀態() : 訂單資料庫選擇.ShowDialog() : Set_圖片清單()
62 52
     End Sub
63 53
     Private Sub 驗貨報告資料庫_SizeChanged(sender As Object, e As EventArgs) Handles MyBase.SizeChanged
64
-        Try
65
-            If TENDEN_MES_SYS.Size.Width > 1440 And TENDEN_MES_SYS.Size.Height > 900 Then : 字體_NUD.Value = 9
66
-            ElseIf TENDEN_MES_SYS.Size.Width <= 1440 And TENDEN_MES_SYS.Size.Height <= 900 Then : 字體_NUD.Value = 7.6 : End If
67
-        Catch ex As Exception
68
-            MsgBox(ex.Message)
69
-        End Try
54
+        If TENDEN_MES_SYS.Size.Width > 1440 And TENDEN_MES_SYS.Size.Height > 900 Then : 字體_NUD.Value = 9
55
+        ElseIf TENDEN_MES_SYS.Size.Width <= 1440 And TENDEN_MES_SYS.Size.Height <= 900 Then : 字體_NUD.Value = 7.6 : End If
70 56
     End Sub
71 57
     Private Sub 字體_NUD_ValueChanged(sender As Object, e As EventArgs) Handles 字體_NUD.ValueChanged
72 58
         驗貨報告圖庫_dgv.RowsDefaultCellStyle.Font = New System.Drawing.Font("微軟正黑體", 字體_NUD.Value)
73 59
     End Sub
74 60
     Private Sub 圖片資料庫管理_dgv_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 圖片資料庫管理_dgv.CellClick
75 61
         If e.RowIndex = -1 Then : Else
76
-            PA20 = 圖片資料庫管理_dgv(0, e.RowIndex).Value.ToString : Set_圖片清單() : Set_grid() : Panel1.Visible = False
62
+            PA20 = 圖片資料庫管理_dgv(0, e.RowIndex).Value.ToString : Set_圖片清單()
77 63
         End If
78 64
     End Sub
79 65
     Private Sub 驗貨報告圖庫_dgv_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 驗貨報告圖庫_dgv.CellClick
@@ -81,19 +67,72 @@ Public Class 驗貨報告資料庫
81 67
             If e.RowIndex = -1 Then : Else
82 68
                 驗貨報告編號_tb.Text = 驗貨報告圖庫_dgv(5, e.RowIndex).Value.ToString : 年份季度_tb.Text = 驗貨報告圖庫_dgv(1, e.RowIndex).Value.ToString
83 69
                 客戶訂單號_tb.Text = 驗貨報告圖庫_dgv(2, e.RowIndex).Value.ToString : 型體名稱_tb.Text = 驗貨報告圖庫_dgv(3, e.RowIndex).Value.ToString
70
+                圖庫_tb.Text = 驗貨報告圖庫_dgv("驗報圖庫", e.RowIndex).Value.ToString
84 71
                 '------------驗貨報告讀取--------------------------------------------------------------------------------------------
85
-                PA1 = PA20 : PA2 = 驗貨報告圖庫_dgv("驗貨報告編號", e.RowIndex).Value.ToString
86
-                If 驗貨報告圖庫_dgv("驗貨報告編號", e.RowIndex).Value.ToString = "" Then : 驗貨報告_pb.Image = Nothing : Else
87
-                    SQL_驗貨報告() : 驗貨報告_pb.Image = Nothing
88
-                    While dr.Read() = True
89
-                        Dim unused As Byte() = New Byte(-1) {} : Dim bytes As Byte() = DirectCast(dr.Item("驗貨報告"), Byte())
90
-                        Dim oStream As New MemoryStream(bytes) : 驗貨報告_pb.Image = Bitmap.FromStream(oStream)
91
-                    End While : conn.Close() : 驗貨報告_pb.SizeMode = 4
92
-                End If : 圖片傳遞 = 驗貨報告_pb.Image
72
+                If 舊版_ch.Checked = True Then
73
+                    PA1 = 驗貨報告圖庫_dgv("驗報圖庫", e.RowIndex).Value.ToString : PA2 = 驗貨報告圖庫_dgv("驗貨報告編號", e.RowIndex).Value.ToString
74
+                    If 驗貨報告圖庫_dgv("驗貨報告編號", e.RowIndex).Value.ToString = "" Then : 驗貨報告_pb.Image = Nothing : Else : Dim 檔案 As String
75
+                        SQL_驗貨報告檔案確認()
76
+                        If dr.Read Then : If dr("副檔名").ToString = "PDF" Then : 檔案 = "PDF" : Else : 檔案 = "圖片" : End If : Else : 檔案 = "圖片" : End If
77
+
78
+                        If 檔案 = "圖片" Then
79
+                            驗貨報告_pb.BringToFront()
80
+                            SQL_驗貨報告() : 驗貨報告_pb.Image = Nothing
81
+                            While dr.Read() = True
82
+                                Dim unused As Byte() = New Byte(-1) {} : Dim bytes As Byte() = DirectCast(dr.Item("驗貨報告"), Byte())
83
+                                Dim oStream As New MemoryStream(bytes) : 驗貨報告_pb.Image = Bitmap.FromStream(oStream)
84
+                            End While : conn.Close() : 驗貨報告_pb.SizeMode = 4
85
+                        Else
86
+                            驗貨報告_wb.BringToFront()
87
+                            Dim desktopPath As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
88
+                            Dim sysPdfFolderPath As String = Path.Combine(desktopPath, "SYSPDF")                ' 判斷 SYSPDF 資料夾是否存在,如果不存在就新增
89
+                            If Not Directory.Exists(sysPdfFolderPath) Then : Directory.CreateDirectory(sysPdfFolderPath) : End If
90
+
91
+                            Dim ds1 As New DataSet
92
+                            PA1 = 驗貨報告圖庫_dgv("驗報圖庫", e.RowIndex).Value.ToString : SQL_驗貨報告圖庫3() : da.Fill(ds1) : conn.Close()
93
+                            If ds1.Tables(0).Rows.Count > 0 Then
94
+                                Dim imgData() As Byte : imgData = ds1.Tables(0).Rows(0).Item("驗貨報告") : Dim fs As FileStream
95
+                                fs = File.Create(desktopPath & "\SYSPDF\" & 驗貨報告圖庫_dgv("驗貨報告編號", e.RowIndex).Value.ToString & ".pdf", imgData.Length - 1)
96
+                                fs.Write(imgData, 0, imgData.Length - 1) : fs.Close()
97
+                            End If
98
+                            Dim pdfPath As String = Path.Combine(desktopPath & "\SYSPDF\" & 驗貨報告圖庫_dgv("驗貨報告編號", e.RowIndex).Value.ToString & ".pdf")
99
+                            驗貨報告_wb.Navigate(pdfPath)
100
+                        End If
101
+                    End If
102
+                Else
103
+                    PA1 = 驗貨報告圖庫_dgv("驗報圖庫2", e.RowIndex).Value.ToString : PA2 = 驗貨報告圖庫_dgv("驗貨報告編號2", e.RowIndex).Value.ToString
104
+                    If 驗貨報告圖庫_dgv("驗貨報告編號2", e.RowIndex).Value.ToString = "" Then : 驗貨報告_pb.Image = Nothing : Else : Dim 檔案 As String
105
+                        SQL_驗貨報告檔案確認()
106
+                        If dr.Read Then : If dr("副檔名").ToString = "PDF" Then : 檔案 = "PDF" : Else : 檔案 = "圖片" : End If : Else : 檔案 = "圖片" : End If
107
+
108
+                        If 檔案 = "圖片" Then
109
+                            驗貨報告_pb.BringToFront()
110
+                            SQL_驗貨報告() : 驗貨報告_pb.Image = Nothing
111
+                            While dr.Read() = True
112
+                                Dim unused As Byte() = New Byte(-1) {} : Dim bytes As Byte() = DirectCast(dr.Item("驗貨報告"), Byte())
113
+                                Dim oStream As New MemoryStream(bytes) : 驗貨報告_pb.Image = Bitmap.FromStream(oStream)
114
+                            End While : conn.Close() : 驗貨報告_pb.SizeMode = 4
115
+                        Else
116
+                            驗貨報告_wb.BringToFront()
117
+                            Dim desktopPath As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
118
+                            Dim sysPdfFolderPath As String = Path.Combine(desktopPath, "SYSPDF")                ' 判斷 SYSPDF 資料夾是否存在,如果不存在就新增
119
+                            If Not Directory.Exists(sysPdfFolderPath) Then : Directory.CreateDirectory(sysPdfFolderPath) : End If
120
+
121
+                            Dim ds1 As New DataSet
122
+                            PA1 = 驗貨報告圖庫_dgv("驗報圖庫2", e.RowIndex).Value.ToString : SQL_驗貨報告圖庫3() : da.Fill(ds1) : conn.Close()
123
+                            If ds1.Tables(0).Rows.Count > 0 Then
124
+                                Dim imgData() As Byte : imgData = ds1.Tables(0).Rows(0).Item("驗貨報告") : Dim fs As FileStream
125
+                                fs = File.Create(desktopPath & "\SYSPDF\" & 驗貨報告圖庫_dgv("驗貨報告編號2", e.RowIndex).Value.ToString & ".pdf", imgData.Length - 1)
126
+                                fs.Write(imgData, 0, imgData.Length - 1) : fs.Close()
127
+                            End If
128
+                            Dim pdfPath As String = Path.Combine(desktopPath & "\SYSPDF\" & 驗貨報告圖庫_dgv("驗貨報告編號2", e.RowIndex).Value.ToString & ".pdf")
129
+                            驗貨報告_wb.Navigate(pdfPath)
130
+                        End If
131
+                    End If
132
+                End If
133
+                圖片傳遞 = 驗貨報告_pb.Image
93 134
             End If
94
-        Catch ex As Exception
95
-            MsgBox(ex.Message)
96
-        End Try
135
+        Catch ex As Exception : End Try
97 136
     End Sub
98 137
     Private Sub 驗貨報告圖庫_dgv_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles 驗貨報告圖庫_dgv.RowPostPaint
99 138
         Dim linePen As New Pen(Color.Blue, 2)
@@ -111,7 +150,7 @@ Public Class 驗貨報告資料庫
111 150
     End Sub
112 151
     Private Sub 查詢_bt_Click(sender As Object, e As EventArgs) Handles 查詢_bt.Click
113 152
         Try
114
-            PA = InputBox("請輸入關鍵字") : Set_DGV1載入前設定() : SQL_驗貨報告圖庫查詢1() : Set_DGV1載入後設定() : Set_grid()
153
+            PA = InputBox("請輸入關鍵字") : Set_DGV1載入前設定() : SQL_驗貨報告圖庫查詢1() : Set_DGV1載入後設定()
115 154
         Catch ex As Exception : MsgBox(ex.Message) : End Try
116 155
     End Sub
117 156
     Private Sub Button3_Click(sender As Object, e As EventArgs) Handles 下載圖片_bt.Click
@@ -122,12 +161,18 @@ Public Class 驗貨報告資料庫
122 161
                 With SaveFileDialog1 : .Filter = "所有文件(*.*)|*.*" : End With
123 162
                 TT = "驗貨報告"
124 163
 
125
-                SaveFileDialog1.FileName = TT & "-" & 年份季度_tb.Text & "-" & 客戶訂單號_tb.Text & "-" & 型體名稱_tb.Text & ".jpg"
164
+                PA1 = 圖庫_tb.Text : PA2 = 驗貨報告編號_tb.Text : SQL_驗貨報告檔案確認() : Dim 檔案 As String
165
+                If dr.Read Then : If dr("副檔名").ToString = "PDF" Then : 檔案 = "PDF" : Else : 檔案 = "圖片" : End If : Else : 檔案 = "圖片" : End If
166
+                If 檔案 = "PDF" Then
167
+                    SaveFileDialog1.FileName = TT & "-" & 年份季度_tb.Text & "-" & 客戶訂單號_tb.Text & "-" & 型體名稱_tb.Text & ".pgf"
168
+                Else
169
+                    SaveFileDialog1.FileName = TT & "-" & 年份季度_tb.Text & "-" & 客戶訂單號_tb.Text & "-" & 型體名稱_tb.Text & ".jpg"
170
+                End If
126 171
 
127 172
                 SaveFileDialog1.ShowDialog() : TextBox5.Text = SaveFileDialog1.FileName : ds1.Clear()
128 173
                 '------------驗貨報告讀取--------------------------------------------------------------------------------------------
129
-                PA1 = PA20 : SQL_驗貨報告圖庫3()
130
-                 : da.Fill(ds1) : conn.Close()
174
+                PA1 = 圖庫_tb.Text : SQL_驗貨報告圖庫3()
175
+                da.Fill(ds1) : conn.Close()
131 176
                 If ds1.Tables(0).Rows.Count > 0 Then
132 177
                     Dim imgData() As Byte
133 178
                     imgData = ds1.Tables(0).Rows(0).Item("驗貨報告")
@@ -284,9 +329,7 @@ Public Class 驗貨報告資料庫
284 329
                     WebBrowser1.Refresh()
285 330
                     '----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
286 331
                     TextBox6.Text = ""
287
-
288
-                    MsgBox("修改完成")
289
-                    Set_圖片清單() : Set_grid()
332
+                    MsgBox("修改完成") : Set_圖片清單()
290 333
                 End If
291 334
             End If
292 335
         Catch ex As Exception
@@ -302,4 +345,10 @@ Public Class 驗貨報告資料庫
302 345
     Private Sub 資料庫選擇3_bt_Click(sender As Object, e As EventArgs) Handles 資料庫選擇3_bt.Click
303 346
         SQL_訂單資料表選擇_HP() : Set_圖片清單()
304 347
     End Sub
348
+    Private Sub 新版_ch_CheckedChanged(sender As Object, e As EventArgs) Handles 新版_ch.Click
349
+        舊版_ch.Checked = False : 新版_ch.Checked = True
350
+    End Sub
351
+    Private Sub 舊版_ch_CheckedChanged(sender As Object, e As EventArgs) Handles 舊版_ch.Click
352
+        舊版_ch.Checked = True : 新版_ch.Checked = False
353
+    End Sub
305 354
 End Class

+ 49
- 262
TENDEN-MES-SYS/8、樣品訂單管理/系統列印介面/列印_中文樣品單.vb View File

@@ -18,9 +18,8 @@ Public Class 列印_中文樣品單
18 18
     Dim 位置5 As Integer = 0 : Dim 位置6 As Integer = 0 : Dim 位置7 As Integer = 0 : Dim 位置8 As Integer = 0 : Dim 位置9 As Integer = 0 : Dim 位置10 As Integer = 0
19 19
     Dim 面料數 As Integer = 0 : Dim 內裏數 As Integer = 0 : Dim 底部數 As Integer = 0 : Dim 飾物數 As Integer = 0
20 20
     Dim 攔寬 As Single
21
-    Dim 第一頁, 第二頁, 第三頁, 第四頁, 第五頁 As Boolean
22
-    Dim 分頁計數 As Integer = 0 : Dim 分頁計數1 As Integer = 0 : Dim 分頁計數2 As Integer = 0 : Dim 分頁計數3 As Integer = 0 : Dim 分頁計數4 As Integer = 0
23
-    Dim DGVX As Integer
21
+    Dim 第一頁, 第二頁, 第三頁, 第四頁, 第五頁, 第六頁, 第七頁, 第八頁, 第九頁, 第十頁, 第十一頁, 第十二頁, 第十三頁, 第十四頁, 第十五頁 As Boolean
22
+    Dim DGVX, 位置, 頁數 As Integer
24 23
 
25 24
     Private Sub Set_訂單清單4()
26 25
         敘述欄_dgv.DataSource = Nothing : ds12.Clear()
@@ -168,8 +167,8 @@ Public Class 列印_中文樣品單
168 167
             xlSheet.Cells(7, 1) = "CONSTRUCTION" : xlSheet.Cells(7, 2) = 樣品單抬頭_dgv.Rows(0).Cells("Construction").Value
169 168
             xlSheet.Cells(8, 1) = "型體名字" : xlSheet.Cells(8, 2) = 樣品單抬頭_dgv.Rows(0).Cells("型體名").Value
170 169
             xlSheet.Cells(9, 1) = "型體號碼" : xlSheet.Cells(9, 2) = 樣品單抬頭_dgv.Rows(0).Cells("型體號碼").Value
171
-            xlSheet.Cells(11, 1) = "顏色(COLOR DESCRIPTION)" : xlSheet.Cells(12, 1) = "訂單顏色(COLOR CODE)"
172
-            xlSheet.Cells(13, 1) = "項目編號(ITEM NUMBER)" : xlSheet.Cells(14, 1) = "数量:双(PAIRS)"
170
+            xlSheet.Cells(11, 5) = "顏色(COLOR DESCRIPTION)" : xlSheet.Cells(12, 5) = "訂單顏色(COLOR CODE)"
171
+            xlSheet.Cells(13, 5) = "項目編號(ITEM NUMBER)" : xlSheet.Cells(14, 5) = "数量:双(PAIRS)"
173 172
 
174 173
             xlSheet.Cells(3, 4) = "新型體" : xlSheet.Cells(3, 5) = "舊型體"
175 174
             xlSheet.Cells(3, 6) = "舊形體季別:" & 樣品單抬頭_dgv.Rows(0).Cells("舊型體季別").Value
@@ -242,242 +241,36 @@ Public Class 列印_中文樣品單
242 241
                 End If
243 242
 
244 243
                 '--------------------計算樣品單分頁---------------------------------------------------------------------------------------
245
-                If 樣品單控制表_dgv.Rows.Count > 12 Then
246
-                    分頁計數 = 2 : 分頁計數1 = 5 : 分頁計數2 = 8 : 分頁計數3 = 11 : 分頁計數4 = 樣品單控制表_dgv.Rows.Count - 1
247
-                    第一頁 = True : 第二頁 = True : 第三頁 = True : 第四頁 = False : 第五頁 = True
248
-                ElseIf 樣品單控制表_dgv.Rows.Count > 9 Then
249
-                    分頁計數 = 2 : 分頁計數1 = 5 : 分頁計數2 = 8 : 分頁計數3 = 樣品單控制表_dgv.Rows.Count - 1
250
-                    第一頁 = True : 第二頁 = True : 第三頁 = True : 第四頁 = True : 第五頁 = False
251
-                ElseIf 樣品單控制表_dgv.Rows.Count > 6 Then
252
-                    分頁計數 = 2 : 分頁計數1 = 5 : 分頁計數2 = 樣品單控制表_dgv.Rows.Count - 1
253
-                    第一頁 = True : 第二頁 = True : 第三頁 = True : 第四頁 = False : 第五頁 = False
254
-                ElseIf 樣品單控制表_dgv.Rows.Count > 3 Then
255
-                    分頁計數 = 2 : 分頁計數1 = 樣品單控制表_dgv.Rows.Count - 1
256
-                    第一頁 = True : 第二頁 = True : 第三頁 = False : 第四頁 = False : 第五頁 = False
257
-                Else
258
-                    分頁計數 = 樣品單控制表_dgv.Rows.Count - 1
259
-                    第一頁 = True : 第二頁 = False : 第三頁 = False : 第四頁 = False : 第五頁 = False
260
-                End If
244
+                Dim colorCount As Integer = 樣品單控制表_dgv.Rows.Count : 分頁數量 += colorCount
245
+                If colorCount = 0 Then : MessageBox.Show("配色數量為0,系統沒有後續邏輯,修改單據資料!!") : End If
261 246
                 '--------------------樣品單列印-------------------------------------------------------------------------------------------
262
-                If 第一頁 = True Then
247
+                For i As Integer = 0 To 樣品單控制表_dgv.Rows.Count - 1
263 248
                     xlSheet = NewMethod(xlBook)
264 249
                     位置1 = 0 : 位置2 = 0 : 位置3 = 0 : 位置5 = 0 : 位置6 = 0 : 位置7 = 0 : 位置8 = 0 : 位置9 = 0 : 位置10 = 0
265 250
                     面料數 = 0 : 內裏數 = 0 : 底部數 = 0 : 飾物數 = 0
266
-                    xlApp.Sheets(1).Name = 樣品單抬頭_dgv.Rows(0).Cells("型體號碼").Value & "第一頁"
267
-                    xlBook.Activate()
268
-                    xlSheet.Activate()
269
-                    循環列印1()
270
-                    For i As Integer = 0 To 分頁計數
271
-                        xlSheet.Cells(11, 5 + i) = 樣品單控制表_dgv.Rows(i).Cells("顏色").Value
272
-                        xlSheet.Cells(12, 5 + i) = 樣品單控制表_dgv.Rows(i).Cells("訂單顏色").Value
273
-                        xlSheet.Cells(13, 5 + i) = 樣品單控制表_dgv.Rows(i).Cells("ItemNumber").Value
274
-                        xlSheet.Cells(14, 5 + i) = Strings.Format(樣品單控制表_dgv.Rows(i).Cells("數量1").Value, "#,##0.0") & "双"
275
-                    Next : 循環列印2()
276
-                    For i As Integer = 0 To 分頁計數
277
-                        Set_DGV4載入前設定() : PA9 = 樣品單控制表_dgv.Rows(i).Cells("樣品流水號一").Value : SQL_讀取列印分頁計數() : Set_DGV4載入後設定()
278
-                        位置2 = 0
279
-                        For ii As Integer = 0 To 明細表分頁_dgv.Rows.Count - 1
280
-                            If 明細表分頁_dgv.Rows(ii).Cells("廠商").Value = "" Then
281
-                                xlSheet.Cells(15 + 位置2, 5 + i) = 明細表分頁_dgv.Rows(ii).Cells("內容").Value
282
-                            Else
283
-                                If 5 + i = 5 Then : 位置A = "E" & (15 + 位置2)
284
-                                ElseIf 5 + i = 6 Then : 位置A = "F" & (15 + 位置2)
285
-                                ElseIf 5 + i = 7 Then : 位置A = "G" & (15 + 位置2) : End If
286
-                                A1 = 明細表分頁_dgv.Rows(ii).Cells("內容").Value
287
-                                A2 = 明細表分頁_dgv.Rows(ii).Cells("廠商").Value
288
-                                xlSheet.Cells(15 + 位置2, 5 + i) = A1 & " / " & A2 : JJ(xlApp, xlSheet)
289
-                                'xlSheet.Cells(15 + 位置2, 5 + i) = 明細表分頁_dgv.Rows(ii).Cells("內容").Value & " / " & 明細表分頁_dgv.Rows(ii).Cells("廠商").Value
290
-                            End If
291
-                            位置2 += 1
292
-                        Next
293
-                    Next : 位置2 = 0
294
-                    For ii As Integer = 0 To 明細表分頁_dgv.Rows.Count - 1
295
-                        For iii As Integer = 0 To 敘述欄_dgv.Rows.Count - 1
296
-                            If 明細表分頁_dgv.Rows(ii).Cells("細項").Value.ToString = 敘述欄_dgv.Rows(iii).Cells("細項").Value.ToString Then
297
-                                xlSheet.Cells(15 + 位置2, 3) = 敘述欄_dgv.Rows(iii).Cells("內容").Value : Exit For
298
-                            End If
299
-                        Next : 位置2 += 1
300
-                    Next : 循環列印3()
301
-                    For i As Integer = 0 To 分頁計數
302
-                        xlSheet.Cells(位置8 + 1, 5 + i) = 樣品單控制表_dgv.Rows(i).Cells("備註").Value
303
-                        xlSheet.Cells(位置8 + 2, 5 + i) = 樣品單控制表_dgv.Rows(i).Cells("FINISH").Value
304
-                    Next
305
-                    AA(xlApp, xlSheet) : BB(xlApp, xlSheet) : CC(xlApp, xlSheet) : DD(xlApp, xlSheet) : FF(xlApp, xlSheet) : GG(xlApp, xlSheet)
306
-                    位置2 = 0 : For ii As Integer = 0 To 明細表分頁_dgv.Rows.Count - 1 : HH(xlApp, xlSheet) : 位置2 += 1 : Next : HH(xlApp, xlSheet) : 位置2 += 1 : HH(xlApp, xlSheet)
307
-                End If
308
-
309
-                If 第二頁 = True Then
310
-                    xlSheet = NewMethod(xlBook)
311
-                    位置1 = 0 : 位置2 = 0 : 位置3 = 0 : 位置5 = 0 : 位置6 = 0 : 位置7 = 0 : 位置8 = 0 : 位置9 = 0 : 位置10 = 0
312
-                    面料數 = 0 : 內裏數 = 0 : 底部數 = 0 : 飾物數 = 0
313
-                    xlApp.Sheets(1).Name = 樣品單抬頭_dgv.Rows(0).Cells("型體號碼").Value & "第二頁"
314
-                    xlBook.Activate()
315
-                    xlSheet.Activate()
316
-                    循環列印1()
317
-                    For i As Integer = 0 + 3 To 分頁計數1
318
-                        xlSheet.Cells(11, 5 + i - 3) = 樣品單控制表_dgv.Rows(i).Cells("顏色").Value
319
-                        xlSheet.Cells(12, 5 + i - 3) = 樣品單控制表_dgv.Rows(i).Cells("訂單顏色").Value
320
-                        xlSheet.Cells(13, 5 + i) = 樣品單控制表_dgv.Rows(i).Cells("ItemNumber").Value
321
-                        xlSheet.Cells(14, 5 + i - 3) = Strings.Format(樣品單控制表_dgv.Rows(i).Cells("數量1").Value, "#,##0.0") & "双"
322
-                    Next : 循環列印2()
323
-                    For i As Integer = 0 + 3 To 分頁計數1
324
-                        Set_DGV4載入前設定() : PA9 = 樣品單控制表_dgv.Rows(i).Cells("樣品流水號一").Value : SQL_讀取列印分頁計數() : Set_DGV4載入後設定()
325
-                        位置2 = 0
326
-                        For ii As Integer = 0 To 明細表分頁_dgv.Rows.Count - 1
327
-                            If 明細表分頁_dgv.Rows(ii).Cells("廠商").Value = "" Then
328
-                                xlSheet.Cells(15 + 位置2, 5 + i - 3) = 明細表分頁_dgv.Rows(ii).Cells("內容").Value
329
-                            Else
330
-                                If 5 + i - 3 = 5 Then : 位置A = "E" & (15 + 位置2)
331
-                                ElseIf 5 + i - 3 = 6 Then : 位置A = "F" & (15 + 位置2)
332
-                                ElseIf 5 + i - 3 = 7 Then : 位置A = "G" & (15 + 位置2) : End If
333
-                                A1 = 明細表分頁_dgv.Rows(ii).Cells("內容").Value
334
-                                A2 = 明細表分頁_dgv.Rows(ii).Cells("廠商").Value
335
-                                xlSheet.Cells(15 + 位置2, 5 + i - 3) = A1 & " / " & A2 : JJ(xlApp, xlSheet)
336
-                                'xlSheet.Cells(15 + 位置2, 5 + i - 3) = 明細表分頁_dgv.Rows(ii).Cells("內容").Value & " / " & 明細表分頁_dgv.Rows(ii).Cells("廠商").Value
337
-                            End If
338
-                            位置2 += 1
339
-                        Next
340
-                    Next : 位置2 = 0
341
-                    For ii As Integer = 0 To 明細表分頁_dgv.Rows.Count - 1
342
-                        For iii As Integer = 0 To 敘述欄_dgv.Rows.Count - 1
343
-                            If 明細表分頁_dgv.Rows(ii).Cells("細項").Value.ToString = 敘述欄_dgv.Rows(iii).Cells("細項").Value.ToString Then
344
-                                xlSheet.Cells(15 + 位置2, 3) = 敘述欄_dgv.Rows(iii).Cells("內容").Value : Exit For
345
-                            End If
346
-                        Next : 位置2 += 1
347
-                    Next : 循環列印3()
348
-                    For i As Integer = 0 + 3 To 分頁計數1
349
-                        xlSheet.Cells(位置8 + 1, 5 + i - 3) = 樣品單控制表_dgv.Rows(i).Cells("備註").Value
350
-                        xlSheet.Cells(位置8 + 2, 5 + i - 3) = 樣品單控制表_dgv.Rows(i).Cells("FINISH").Value
351
-                    Next
352
-                    AA(xlApp, xlSheet) : BB(xlApp, xlSheet) : CC(xlApp, xlSheet) : DD(xlApp, xlSheet) : FF(xlApp, xlSheet) : GG(xlApp, xlSheet)
353
-                    位置2 = 0 : For ii As Integer = 0 To 明細表分頁_dgv.Rows.Count - 1 : HH(xlApp, xlSheet) : 位置2 += 1 : Next : HH(xlApp, xlSheet) : 位置2 += 1 : HH(xlApp, xlSheet)
354
-                End If
251
+                    xlApp.Sheets(1).Name = 樣品單抬頭_dgv.Rows(0).Cells("型體號碼").Value & "第 " & i + 1 & " 頁"
252
+                    xlBook.Activate() : xlSheet.Activate() : 循環列印1()
355 253
 
356
-                If 第三頁 = True Then
357
-                    xlSheet = NewMethod(xlBook)
358
-                    位置1 = 0 : 位置2 = 0 : 位置3 = 0 : 位置5 = 0 : 位置6 = 0 : 位置7 = 0 : 位置8 = 0 : 位置9 = 0 : 位置10 = 0
359
-                    面料數 = 0 : 內裏數 = 0 : 底部數 = 0 : 飾物數 = 0
360
-                    xlApp.Sheets(1).Name = 樣品單抬頭_dgv.Rows(0).Cells("型體號碼").Value & "第三頁"
361
-                    xlBook.Activate()
362
-                    xlSheet.Activate()
363
-                    循環列印1()
364
-                    For i As Integer = 0 + 6 To 分頁計數2
365
-                        xlSheet.Cells(11, 5 + i - 6) = 樣品單控制表_dgv.Rows(i).Cells("顏色").Value
366
-                        xlSheet.Cells(12, 5 + i - 6) = 樣品單控制表_dgv.Rows(i).Cells("訂單顏色").Value
367
-                        xlSheet.Cells(13, 5 + i) = 樣品單控制表_dgv.Rows(i).Cells("ItemNumber").Value
368
-                        xlSheet.Cells(14, 5 + i - 6) = Strings.Format(樣品單控制表_dgv.Rows(i).Cells("數量1").Value, "#,##0.0") & "双"
369
-                    Next : 循環列印2()
370
-                    For i As Integer = 0 + 6 To 分頁計數2
371
-                        Set_DGV4載入前設定() : PA9 = 樣品單控制表_dgv.Rows(i).Cells("樣品流水號一").Value : SQL_讀取列印分頁計數() : Set_DGV4載入後設定()
372
-                        位置2 = 0
373
-                        For ii As Integer = 0 To 明細表分頁_dgv.Rows.Count - 1
374
-                            If 明細表分頁_dgv.Rows(ii).Cells("廠商").Value = "" Then
375
-                                xlSheet.Cells(15 + 位置2, 5 + i - 6) = 明細表分頁_dgv.Rows(ii).Cells("內容").Value
376
-                            Else
377
-                                If 5 + i - 6 = 5 Then : 位置A = "E" & (15 + 位置2)
378
-                                ElseIf 5 + i - 6 = 6 Then : 位置A = "F" & (15 + 位置2)
379
-                                ElseIf 5 + i - 6 = 7 Then : 位置A = "G" & (15 + 位置2) : End If
380
-                                A1 = 明細表分頁_dgv.Rows(ii).Cells("內容").Value
381
-                                A2 = 明細表分頁_dgv.Rows(ii).Cells("廠商").Value
382
-                                xlSheet.Cells(15 + 位置2, 5 + i - 6) = A1 & " / " & A2 : JJ(xlApp, xlSheet)
383
-                                'xlSheet.Cells(15 + 位置2, 5 + i - 6) = 明細表分頁_dgv.Rows(ii).Cells("內容").Value & " / " & 明細表分頁_dgv.Rows(ii).Cells("廠商").Value
384
-                            End If
385
-                            位置2 += 1
386
-                        Next
387
-                    Next : 位置2 = 0
388
-                    For ii As Integer = 0 To 明細表分頁_dgv.Rows.Count - 1
389
-                        For iii As Integer = 0 To 敘述欄_dgv.Rows.Count - 1
390
-                            If 明細表分頁_dgv.Rows(ii).Cells("細項").Value.ToString = 敘述欄_dgv.Rows(iii).Cells("細項").Value.ToString Then
391
-                                xlSheet.Cells(15 + 位置2, 3) = 敘述欄_dgv.Rows(iii).Cells("內容").Value : Exit For
392
-                            End If
393
-                        Next : 位置2 += 1
394
-                    Next : 循環列印3()
395
-                    For i As Integer = 0 + 6 To 分頁計數2
396
-                        xlSheet.Cells(位置8 + 1, 5 + i - 6) = 樣品單控制表_dgv.Rows(i).Cells("備註").Value
397
-                        xlSheet.Cells(位置8 + 2, 5 + i - 6) = 樣品單控制表_dgv.Rows(i).Cells("FINISH").Value
398
-                    Next : AA(xlApp, xlSheet) : BB(xlApp, xlSheet) : CC(xlApp, xlSheet) : DD(xlApp, xlSheet) : FF(xlApp, xlSheet) : GG(xlApp, xlSheet)
399
-                    位置2 = 0 : For ii As Integer = 0 To 明細表分頁_dgv.Rows.Count - 1 : HH(xlApp, xlSheet) : 位置2 += 1 : Next : HH(xlApp, xlSheet) : 位置2 += 1 : HH(xlApp, xlSheet)
400
-                End If
254
+                    xlSheet.Cells(11, 6) = 樣品單控制表_dgv.Rows(i).Cells("顏色").Value
255
+                    xlSheet.Cells(12, 6) = 樣品單控制表_dgv.Rows(i).Cells("訂單顏色").Value
256
+                    xlSheet.Cells(13, 6) = 樣品單控制表_dgv.Rows(i).Cells("ItemNumber").Value
257
+                    xlSheet.Cells(14, 6) = Strings.Format(樣品單控制表_dgv.Rows(i).Cells("數量1").Value, "#,##0.0") & "双"
258
+                    循環列印2()
401 259
 
402
-                If 第四頁 = True Then
403
-                    xlSheet = NewMethod(xlBook)
404
-                    位置1 = 0 : 位置2 = 0 : 位置3 = 0 : 位置5 = 0 : 位置6 = 0 : 位置7 = 0 : 位置8 = 0 : 位置9 = 0 : 位置10 = 0
405
-                    面料數 = 0 : 內裏數 = 0 : 底部數 = 0 : 飾物數 = 0
406
-                    xlApp.Sheets(1).Name = 樣品單抬頭_dgv.Rows(0).Cells("型體號碼").Value & "第四頁"
407
-                    xlBook.Activate()
408
-                    xlSheet.Activate()
409
-                    循環列印1()
410
-                    For i As Integer = 0 + 9 To 分頁計數3
411
-                        xlSheet.Cells(11, 5 + i - 9) = 樣品單控制表_dgv.Rows(i).Cells("顏色").Value
412
-                        xlSheet.Cells(12, 5 + i - 9) = 樣品單控制表_dgv.Rows(i).Cells("訂單顏色").Value
413
-                        xlSheet.Cells(13, 5 + i) = 樣品單控制表_dgv.Rows(i).Cells("ItemNumber").Value
414
-                        xlSheet.Cells(14, 5 + i - 9) = Strings.Format(樣品單控制表_dgv.Rows(i).Cells("數量1").Value, "#,##0.0") & "双"
415
-                    Next : 循環列印2()
416
-                    For i As Integer = 0 + 9 To 分頁計數3
417
-                        Set_DGV4載入前設定() : PA9 = 樣品單控制表_dgv.Rows(i).Cells("樣品流水號一").Value : SQL_讀取列印分頁計數() : Set_DGV4載入後設定()
418
-                        位置2 = 0
419
-                        For ii As Integer = 0 To 明細表分頁_dgv.Rows.Count - 1
420
-                            If 明細表分頁_dgv.Rows(ii).Cells("廠商").Value = "" Then
421
-                                xlSheet.Cells(15 + 位置2, 5 + i - 9) = 明細表分頁_dgv.Rows(ii).Cells("內容").Value
422
-                            Else
423
-                                If 5 + i - 9 = 5 Then : 位置A = "E" & (15 + 位置2)
424
-                                ElseIf 5 + i - 9 = 6 Then : 位置A = "F" & (15 + 位置2)
425
-                                ElseIf 5 + i - 9 = 7 Then : 位置A = "G" & (15 + 位置2) : End If
426
-                                A1 = 明細表分頁_dgv.Rows(ii).Cells("內容").Value
427
-                                A2 = 明細表分頁_dgv.Rows(ii).Cells("廠商").Value
428
-                                xlSheet.Cells(15 + 位置2, 5 + i - 9) = A1 & " / " & A2 : JJ(xlApp, xlSheet)
429
-                                'xlSheet.Cells(15 + 位置2, 5 + i - 9) = 明細表分頁_dgv.Rows(ii).Cells("內容").Value & " / " & 明細表分頁_dgv.Rows(ii).Cells("廠商").Value
430
-                            End If
431
-                            位置2 += 1
432
-                        Next
433
-                    Next : 位置2 = 0
260
+                    Set_DGV4載入前設定() : PA9 = 樣品單控制表_dgv.Rows(i).Cells("樣品流水號一").Value : SQL_讀取列印分頁計數() : Set_DGV4載入後設定()
261
+                    位置2 = 0
434 262
                     For ii As Integer = 0 To 明細表分頁_dgv.Rows.Count - 1
435
-                        For iii As Integer = 0 To 敘述欄_dgv.Rows.Count - 1
436
-                            If 明細表分頁_dgv.Rows(ii).Cells("細項").Value.ToString = 敘述欄_dgv.Rows(iii).Cells("細項").Value.ToString Then
437
-                                xlSheet.Cells(15 + 位置2, 3) = 敘述欄_dgv.Rows(iii).Cells("內容").Value : Exit For
438
-                            End If
439
-                        Next : 位置2 += 1
440
-                    Next : 循環列印3()
441
-                    For i As Integer = 0 + 9 To 分頁計數3
442
-                        xlSheet.Cells(位置8 + 1, 5 + i - 9) = 樣品單控制表_dgv.Rows(i).Cells("備註").Value
443
-                        xlSheet.Cells(位置8 + 2, 5 + i - 9) = 樣品單控制表_dgv.Rows(i).Cells("FINISH").Value
263
+                        If 明細表分頁_dgv.Rows(ii).Cells("廠商").Value = "" Then
264
+                            xlSheet.Cells(15 + 位置2, 5) = 明細表分頁_dgv.Rows(ii).Cells("內容").Value
265
+                        Else
266
+                            位置A = "E" & (15 + 位置2)
267
+                            A1 = 明細表分頁_dgv.Rows(ii).Cells("內容").Value
268
+                            A2 = 明細表分頁_dgv.Rows(ii).Cells("廠商").Value
269
+                            xlSheet.Cells(15 + 位置2, 5) = A1 & " / " & A2 : JJ(xlApp, xlSheet)
270
+                        End If
271
+                        位置2 += 1
444 272
                     Next
445
-                    AA(xlApp, xlSheet) : BB(xlApp, xlSheet) : CC(xlApp, xlSheet) : DD(xlApp, xlSheet) : FF(xlApp, xlSheet) : GG(xlApp, xlSheet)
446
-                    位置2 = 0 : For ii As Integer = 0 To 明細表分頁_dgv.Rows.Count - 1 : HH(xlApp, xlSheet) : 位置2 += 1 : Next : HH(xlApp, xlSheet) : 位置2 += 1 : HH(xlApp, xlSheet)
447
-                End If
448
-
449
-                If 第五頁 = True Then
450
-                    xlSheet = NewMethod(xlBook)
451
-                    位置1 = 0 : 位置2 = 0 : 位置3 = 0 : 位置5 = 0 : 位置6 = 0 : 位置7 = 0 : 位置8 = 0 : 位置9 = 0 : 位置10 = 0
452
-                    面料數 = 0 : 內裏數 = 0 : 底部數 = 0 : 飾物數 = 0
453
-                    xlApp.Sheets(1).Name = 樣品單抬頭_dgv.Rows(0).Cells("型體號碼").Value & "第五頁"
454
-                    xlBook.Activate()
455
-                    xlSheet.Activate()
456
-                    循環列印1()
457
-                    For i As Integer = 0 + 12 To 樣品單控制表_dgv.Rows.Count - 1
458
-                        xlSheet.Cells(11, 5 + i - 12) = 樣品單控制表_dgv.Rows(i).Cells("顏色").Value
459
-                        xlSheet.Cells(12, 5 + i - 12) = 樣品單控制表_dgv.Rows(i).Cells("訂單顏色").Value
460
-                        xlSheet.Cells(13, 5 + i) = 樣品單控制表_dgv.Rows(i).Cells("ItemNumber").Value
461
-                        xlSheet.Cells(14, 5 + i - 12) = Strings.Format(樣品單控制表_dgv.Rows(i).Cells("數量1").Value, "#,##0.0") & "双"
462
-                    Next : 循環列印2()
463
-                    For i As Integer = 0 + 12 To 樣品單控制表_dgv.Rows.Count - 1
464
-                        Set_DGV4載入前設定() : PA9 = 樣品單控制表_dgv.Rows(i).Cells("樣品流水號一").Value : SQL_讀取列印分頁計數() : Set_DGV4載入後設定()
465
-                        位置2 = 0
466
-                        For ii As Integer = 0 To 明細表分頁_dgv.Rows.Count - 1
467
-                            If 明細表分頁_dgv.Rows(ii).Cells("廠商").Value = "" Then
468
-                                xlSheet.Cells(15 + 位置2, 5 + i - 12) = 明細表分頁_dgv.Rows(ii).Cells("內容").Value
469
-                            Else
470
-                                If 5 + i - 12 = 5 Then : 位置A = "E" & (15 + 位置2)
471
-                                ElseIf 5 + i - 12 = 6 Then : 位置A = "F" & (15 + 位置2)
472
-                                ElseIf 5 + i - 12 = 7 Then : 位置A = "G" & (15 + 位置2) : End If
473
-                                A1 = 明細表分頁_dgv.Rows(ii).Cells("內容").Value
474
-                                A2 = 明細表分頁_dgv.Rows(ii).Cells("廠商").Value
475
-                                xlSheet.Cells(15 + 位置2, 5 + i - 12) = A1 & " / " & A2 : JJ(xlApp, xlSheet)
476
-                                'xlSheet.Cells(15 + 位置2, 5 + i - 12) = 明細表分頁_dgv.Rows(ii).Cells("內容").Value & " / " & 明細表分頁_dgv.Rows(ii).Cells("廠商").Value
477
-                            End If
478
-                            位置2 += 1
479
-                        Next
480
-                    Next : 位置2 = 0
273
+                    位置2 = 0
481 274
                     For ii As Integer = 0 To 明細表分頁_dgv.Rows.Count - 1
482 275
                         For iii As Integer = 0 To 敘述欄_dgv.Rows.Count - 1
483 276
                             If 明細表分頁_dgv.Rows(ii).Cells("細項").Value.ToString = 敘述欄_dgv.Rows(iii).Cells("細項").Value.ToString Then
@@ -485,20 +278,12 @@ Public Class 列印_中文樣品單
485 278
                             End If
486 279
                         Next : 位置2 += 1
487 280
                     Next : 循環列印3()
488
-                    For i As Integer = 0 + 12 To 樣品單控制表_dgv.Rows.Count - 1
489
-                        xlSheet.Cells(位置8 + 1, 5 + i - 12) = 樣品單控制表_dgv.Rows(i).Cells("備註").Value
490
-                        xlSheet.Cells(位置8 + 2, 5 + i - 12) = 樣品單控制表_dgv.Rows(i).Cells("FINISH").Value
491
-                    Next : AA(xlApp, xlSheet) : BB(xlApp, xlSheet) : CC(xlApp, xlSheet) : DD(xlApp, xlSheet) : FF(xlApp, xlSheet) : GG(xlApp, xlSheet)
281
+                    xlSheet.Cells(位置8 + 1, 5) = 樣品單控制表_dgv.Rows(i).Cells("備註").Value
282
+                    xlSheet.Cells(位置8 + 2, 5) = 樣品單控制表_dgv.Rows(i).Cells("FINISH").Value
283
+                    AA(xlApp, xlSheet) : BB(xlApp, xlSheet) : CC(xlApp, xlSheet) : DD(xlApp, xlSheet) : FF(xlApp, xlSheet) : GG(xlApp, xlSheet)
492 284
                     位置2 = 0 : For ii As Integer = 0 To 明細表分頁_dgv.Rows.Count - 1 : HH(xlApp, xlSheet) : 位置2 += 1 : Next : HH(xlApp, xlSheet) : 位置2 += 1 : HH(xlApp, xlSheet)
493
-                End If
494
-
495
-                If 第一頁 = True And 第二頁 = False And 第三頁 = False And 第四頁 = False And 第五頁 = False Then : xlApp.Sheets(2 + 分頁數量).Delete
496
-                ElseIf 第一頁 = True And 第二頁 = True And 第三頁 = False And 第四頁 = False And 第五頁 = False Then : xlApp.Sheets(3 + 分頁數量).Delete
497
-                ElseIf 第一頁 = True And 第二頁 = True And 第三頁 = True And 第四頁 = False And 第五頁 = False Then : xlApp.Sheets(4 + 分頁數量).Delete
498
-                ElseIf 第一頁 = True And 第二頁 = True And 第三頁 = True And 第四頁 = True And 第五頁 = False Then : xlApp.Sheets(5 + 分頁數量).Delete
499
-                ElseIf 第一頁 = True And 第二頁 = True And 第三頁 = True And 第四頁 = True And 第五頁 = True Then : xlApp.Sheets(6 + 分頁數量).Delete
500
-                End If
501
-
285
+                Next
286
+                xlApp.Sheets(分頁數量 + 1).Delete
502 287
                 xlSheet.PageSetup.PrintArea = ""
503 288
                 xlApp.Cells.Select()
504 289
                 xlApp.Application.WindowState = xlMinimized
@@ -516,7 +301,7 @@ Public Class 列印_中文樣品單
516 301
         xlSheet.Rows("1:1").Select : myExcel.Selection.RowHeight = 60 : xlSheet.Rows("2:2").Select : myExcel.Selection.RowHeight = 17
517 302
         xlSheet.Rows("3:9").Select : myExcel.Selection.RowHeight = 26 : xlSheet.Rows("10:10").Select : myExcel.Selection.RowHeight = 80
518 303
 
519
-        xlSheet.Range("D1:E1").Select() : With myExcel.Selection
304
+        xlSheet.Range("C1:E1").Select() : With myExcel.Selection
520 305
             .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
521 306
             .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
522 307
         xlSheet.Range("A2:F2").Select() : With myExcel.Selection
@@ -555,18 +340,6 @@ Public Class 列印_中文樣品單
555 340
         xlSheet.Range("F4:G10").Select() : With myExcel.Selection
556 341
             .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
557 342
             .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
558
-        xlSheet.Range("A11:B11").Select() : With myExcel.Selection
559
-            .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
560
-            .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
561
-        xlSheet.Range("A12:B12").Select() : With myExcel.Selection
562
-            .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
563
-            .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
564
-        xlSheet.Range("A13:B13").Select() : With myExcel.Selection
565
-            .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
566
-            .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
567
-        xlSheet.Range("A14:B14").Select() : With myExcel.Selection
568
-            .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
569
-            .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
570 343
         xlSheet.Range("D3:E3").Select() : With myExcel.Selection
571 344
             .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
572 345
             .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With
@@ -663,7 +436,21 @@ Public Class 列印_中文樣品單
663 436
         With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
664 437
             .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With
665 438
 
439
+        For i As Integer = 11 To 14
440
+            xlSheet.Range("F" & i & ":G" & i).Select()
441
+            With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
442
+                .IndentLevel = 0 : .ShrinkToFit = True : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
443
+            With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
444
+                .ReadingOrder = xlContext : End With
445
+        Next
666 446
         位置8 = 14 + (面料數 * 1) + (內裏數 * 1) + (底部數 * 1) + (飾物數 * 1)
447
+        For i As Integer = 15 To 位置8 + 2
448
+            xlSheet.Range("E" & i & ":G" & i).Select()
449
+            With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
450
+                .IndentLevel = 0 : .ShrinkToFit = True : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
451
+            With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
452
+                .ReadingOrder = xlContext : End With
453
+        Next
667 454
         xlSheet.Rows("15:" & 位置8).Select : xlSheet.Rows("15:" & 位置8).EntireRow.AutoFit
668 455
         For i As Integer = 15 To 位置8
669 456
             xlSheet.Rows(i & ":" & i).Select
@@ -671,7 +458,7 @@ Public Class 列印_中文樣品單
671 458
             xlSheet.Rows(位置11).Select : myExcel.Selection.RowHeight = 攔寬 + 20
672 459
         Next
673 460
 
674
-        位置5 = 14 + (面料數 * 1) : 位置4 = "A14:G" & 位置5
461
+        位置5 = 14 + (面料數 * 1) : 位置4 = "A15:G" & 位置5
675 462
         xlSheet.Range(位置4).Select() : myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
676 463
         With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
677 464
         With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
@@ -780,7 +567,7 @@ Public Class 列印_中文樣品單
780 567
         With myExcel.Selection.Font : .Name = "Microsoft YaHei UI" : .Size = 10 : .Strikethrough = False : .Superscript = False : .Subscript = False : .OutlineFont = False : .Shadow = False
781 568
             .Underline = xlUnderlineStyleNone : .TintAndShade = 0 : .ThemeFont = xlThemeFontNone : End With
782 569
 
783
-        xlSheet.Range("C11:D14").Select()
570
+        xlSheet.Range("A11:D14").Select()
784 571
         With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0
785 572
             .AddIndent = False : .IndentLevel = 0 : .ReadingOrder = xlContext : .MergeCells = False : End With
786 573
         myExcel.Selection.Merge : myExcel.ActiveCell.FormulaR1C1 = "材料敘述"
@@ -832,7 +619,7 @@ Public Class 列印_中文樣品單
832 619
     End Sub
833 620
     Private Sub BB(ByVal myExcel As Application, ByVal xlSheet As Worksheet)
834 621
         Clipboard.SetDataObject(PictureBox3.Image) : xlSheet.Range("C1").Select() : myExcel.ActiveSheet.Pictures.Paste.Select : myExcel.Selection.ShapeRange.Height = 48
835
-        myExcel.Selection.ShapeRange.IncrementLeft(115) : myExcel.Selection.ShapeRange.IncrementTop(5)
622
+        myExcel.Selection.ShapeRange.IncrementLeft(0) : myExcel.Selection.ShapeRange.IncrementTop(5)
836 623
     End Sub
837 624
     Private Sub CC(ByVal myExcel As Application, ByVal xlSheet As Worksheet)
838 625
         If 樣品單抬頭_dgv.Rows(0).Cells("中文樣品單產地標").Value = "" Then : Else

+ 57
- 56
TENDEN-MES-SYS/9、資料庫系統管理/系統編碼原則.Designer.vb View File

@@ -22,12 +22,12 @@ 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()
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()
25
+        Dim DataGridViewCellStyle7 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
26
+        Dim DataGridViewCellStyle8 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
27
+        Dim DataGridViewCellStyle9 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
28
+        Dim DataGridViewCellStyle10 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
29
+        Dim DataGridViewCellStyle11 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
30
+        Dim DataGridViewCellStyle12 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
31 31
         Me.圖片資料庫管理修改_bt = New System.Windows.Forms.Button()
32 32
         Me.圖片資料庫名稱_lb = New System.Windows.Forms.Label()
33 33
         Me.圖片資料庫名稱_tb = New System.Windows.Forms.TextBox()
@@ -38,8 +38,8 @@ Partial Class 系統編碼原則
38 38
         Me.伺服器狀態_dgv = New System.Windows.Forms.DataGridView()
39 39
         Me.是否可用_ch = New System.Windows.Forms.CheckBox()
40 40
         Me.LOG檔截斷3_bt = New System.Windows.Forms.Button()
41
-        Me.Label3 = New System.Windows.Forms.Label()
42 41
         Me.資料庫清單1_dgv = New System.Windows.Forms.DataGridView()
42
+        Me.選擇_tb = New System.Windows.Forms.TextBox()
43 43
         CType(Me.圖片資料庫管理_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
44 44
         CType(Me.MAX_nud, System.ComponentModel.ISupportInitialize).BeginInit()
45 45
         CType(Me.伺服器狀態_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -61,7 +61,7 @@ Partial Class 系統編碼原則
61 61
         Me.圖片資料庫名稱_lb.BackColor = System.Drawing.SystemColors.Control
62 62
         Me.圖片資料庫名稱_lb.Location = New System.Drawing.Point(934, 5)
63 63
         Me.圖片資料庫名稱_lb.Name = "圖片資料庫名稱_lb"
64
-        Me.圖片資料庫名稱_lb.Size = New System.Drawing.Size(92, 16)
64
+        Me.圖片資料庫名稱_lb.Size = New System.Drawing.Size(91, 16)
65 65
         Me.圖片資料庫名稱_lb.TabIndex = 708
66 66
         Me.圖片資料庫名稱_lb.Text = "圖片資料庫名稱"
67 67
         '
@@ -76,18 +76,18 @@ Partial Class 系統編碼原則
76 76
         '
77 77
         '圖片資料庫管理_dgv
78 78
         '
79
-        DataGridViewCellStyle1.BackColor = System.Drawing.Color.White
80
-        Me.圖片資料庫管理_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
79
+        DataGridViewCellStyle7.BackColor = System.Drawing.Color.White
80
+        Me.圖片資料庫管理_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle7
81 81
         Me.圖片資料庫管理_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
82 82
         Me.圖片資料庫管理_dgv.BackgroundColor = System.Drawing.Color.White
83
-        DataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
84
-        DataGridViewCellStyle2.BackColor = System.Drawing.Color.White
85
-        DataGridViewCellStyle2.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
86
-        DataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText
87
-        DataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight
88
-        DataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText
89
-        DataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
90
-        Me.圖片資料庫管理_dgv.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle2
83
+        DataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
84
+        DataGridViewCellStyle8.BackColor = System.Drawing.Color.White
85
+        DataGridViewCellStyle8.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
86
+        DataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.WindowText
87
+        DataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight
88
+        DataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText
89
+        DataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
90
+        Me.圖片資料庫管理_dgv.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle8
91 91
         Me.圖片資料庫管理_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
92 92
         Me.圖片資料庫管理_dgv.Location = New System.Drawing.Point(936, 27)
93 93
         Me.圖片資料庫管理_dgv.Name = "圖片資料庫管理_dgv"
@@ -112,7 +112,7 @@ Partial Class 系統編碼原則
112 112
         Me.伺服器_lb.BackColor = System.Drawing.SystemColors.Control
113 113
         Me.伺服器_lb.Location = New System.Drawing.Point(536, 6)
114 114
         Me.伺服器_lb.Name = "伺服器_lb"
115
-        Me.伺服器_lb.Size = New System.Drawing.Size(230, 16)
115
+        Me.伺服器_lb.Size = New System.Drawing.Size(229, 16)
116 116
         Me.伺服器_lb.TabIndex = 704
117 117
         Me.伺服器_lb.Text = "伺服器中資料庫極限容量監控設定值 (MB)"
118 118
         '
@@ -129,18 +129,18 @@ Partial Class 系統編碼原則
129 129
         '
130 130
         '伺服器狀態_dgv
131 131
         '
132
-        DataGridViewCellStyle3.BackColor = System.Drawing.Color.White
133
-        Me.伺服器狀態_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
132
+        DataGridViewCellStyle9.BackColor = System.Drawing.Color.White
133
+        Me.伺服器狀態_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle9
134 134
         Me.伺服器狀態_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
135 135
         Me.伺服器狀態_dgv.BackgroundColor = System.Drawing.Color.White
136
-        DataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
137
-        DataGridViewCellStyle4.BackColor = System.Drawing.Color.White
138
-        DataGridViewCellStyle4.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
139
-        DataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText
140
-        DataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight
141
-        DataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText
142
-        DataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
143
-        Me.伺服器狀態_dgv.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle4
136
+        DataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
137
+        DataGridViewCellStyle10.BackColor = System.Drawing.Color.White
138
+        DataGridViewCellStyle10.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
139
+        DataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.WindowText
140
+        DataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight
141
+        DataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText
142
+        DataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
143
+        Me.伺服器狀態_dgv.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle10
144 144
         Me.伺服器狀態_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
145 145
         Me.伺服器狀態_dgv.Location = New System.Drawing.Point(6, 27)
146 146
         Me.伺服器狀態_dgv.Name = "伺服器狀態_dgv"
@@ -154,7 +154,7 @@ Partial Class 系統編碼原則
154 154
         Me.是否可用_ch.AutoSize = True
155 155
         Me.是否可用_ch.Location = New System.Drawing.Point(1246, 6)
156 156
         Me.是否可用_ch.Name = "是否可用_ch"
157
-        Me.是否可用_ch.Size = New System.Drawing.Size(75, 20)
157
+        Me.是否可用_ch.Size = New System.Drawing.Size(74, 20)
158 158
         Me.是否可用_ch.TabIndex = 709
159 159
         Me.是否可用_ch.Text = "是否鎖定"
160 160
         Me.是否可用_ch.UseVisualStyleBackColor = True
@@ -162,53 +162,54 @@ Partial Class 系統編碼原則
162 162
         'LOG檔截斷3_bt
163 163
         '
164 164
         Me.LOG檔截斷3_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
165
-        Me.LOG檔截斷3_bt.Location = New System.Drawing.Point(67, 332)
165
+        Me.LOG檔截斷3_bt.Location = New System.Drawing.Point(173, 332)
166 166
         Me.LOG檔截斷3_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
167 167
         Me.LOG檔截斷3_bt.Name = "LOG檔截斷3_bt"
168
-        Me.LOG檔截斷3_bt.Size = New System.Drawing.Size(123, 23)
168
+        Me.LOG檔截斷3_bt.Size = New System.Drawing.Size(80, 23)
169 169
         Me.LOG檔截斷3_bt.TabIndex = 1505
170 170
         Me.LOG檔截斷3_bt.Text = "LOG檔截斷"
171 171
         '
172
-        'Label3
173
-        '
174
-        Me.Label3.AutoSize = True
175
-        Me.Label3.BackColor = System.Drawing.SystemColors.Control
176
-        Me.Label3.Location = New System.Drawing.Point(9, 335)
177
-        Me.Label3.Name = "Label3"
178
-        Me.Label3.Size = New System.Drawing.Size(56, 16)
179
-        Me.Label3.TabIndex = 1504
180
-        Me.Label3.Text = "主伺服器"
181
-        '
182 172
         '資料庫清單1_dgv
183 173
         '
184
-        DataGridViewCellStyle5.BackColor = System.Drawing.Color.White
185
-        Me.資料庫清單1_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle5
174
+        DataGridViewCellStyle11.BackColor = System.Drawing.Color.White
175
+        Me.資料庫清單1_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle11
176
+        Me.資料庫清單1_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
177
+            Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
186 178
         Me.資料庫清單1_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
187 179
         Me.資料庫清單1_dgv.BackgroundColor = System.Drawing.Color.White
188
-        DataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
189
-        DataGridViewCellStyle6.BackColor = System.Drawing.Color.White
190
-        DataGridViewCellStyle6.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
191
-        DataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText
192
-        DataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight
193
-        DataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText
194
-        DataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
195
-        Me.資料庫清單1_dgv.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle6
180
+        DataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
181
+        DataGridViewCellStyle12.BackColor = System.Drawing.Color.White
182
+        DataGridViewCellStyle12.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
183
+        DataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.WindowText
184
+        DataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight
185
+        DataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.HighlightText
186
+        DataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
187
+        Me.資料庫清單1_dgv.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle12
196 188
         Me.資料庫清單1_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
197
-        Me.資料庫清單1_dgv.Location = New System.Drawing.Point(6, 357)
189
+        Me.資料庫清單1_dgv.Location = New System.Drawing.Point(6, 356)
198 190
         Me.資料庫清單1_dgv.Name = "資料庫清單1_dgv"
199 191
         Me.資料庫清單1_dgv.RowHeadersWidth = 5
200 192
         Me.資料庫清單1_dgv.RowTemplate.Height = 24
201
-        Me.資料庫清單1_dgv.Size = New System.Drawing.Size(184, 198)
193
+        Me.資料庫清單1_dgv.Size = New System.Drawing.Size(247, 346)
202 194
         Me.資料庫清單1_dgv.TabIndex = 1506
203 195
         '
196
+        '選擇_tb
197
+        '
198
+        Me.選擇_tb.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
199
+        Me.選擇_tb.Location = New System.Drawing.Point(7, 332)
200
+        Me.選擇_tb.Margin = New System.Windows.Forms.Padding(5)
201
+        Me.選擇_tb.Name = "選擇_tb"
202
+        Me.選擇_tb.Size = New System.Drawing.Size(164, 23)
203
+        Me.選擇_tb.TabIndex = 1507
204
+        '
204 205
         '系統編碼原則
205 206
         '
206 207
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
207 208
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
208 209
         Me.ClientSize = New System.Drawing.Size(1333, 706)
210
+        Me.Controls.Add(Me.選擇_tb)
209 211
         Me.Controls.Add(Me.資料庫清單1_dgv)
210 212
         Me.Controls.Add(Me.LOG檔截斷3_bt)
211
-        Me.Controls.Add(Me.Label3)
212 213
         Me.Controls.Add(Me.伺服器狀態_dgv)
213 214
         Me.Controls.Add(Me.圖片資料庫管理修改_bt)
214 215
         Me.Controls.Add(Me.圖片資料庫名稱_lb)
@@ -241,6 +242,6 @@ Partial Class 系統編碼原則
241 242
     Friend WithEvents 伺服器狀態_dgv As DataGridView
242 243
     Friend WithEvents 是否可用_ch As CheckBox
243 244
     Friend WithEvents LOG檔截斷3_bt As Button
244
-    Friend WithEvents Label3 As Label
245 245
     Friend WithEvents 資料庫清單1_dgv As DataGridView
246
+    Friend WithEvents 選擇_tb As TextBox
246 247
 End Class

+ 4
- 3
TENDEN-MES-SYS/9、資料庫系統管理/系統編碼原則.vb View File

@@ -62,6 +62,9 @@
62 62
             圖片資料庫名稱_tb.Text = 圖片資料庫管理_dgv(0, e.RowIndex).Value.ToString : 是否可用_ch.Checked = 圖片資料庫管理_dgv(1, e.RowIndex).Value
63 63
         End If
64 64
     End Sub
65
+    Private Sub 資料庫清單1_dgv_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 資料庫清單1_dgv.CellClick
66
+        If e.RowIndex = -1 Then : Else : 選擇_tb.Text = 資料庫清單1_dgv(0, e.RowIndex).Value.ToString : End If
67
+    End Sub
65 68
     Private Sub 伺服器狀態_dgv_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles 伺服器狀態_dgv.RowPostPaint
66 69
         Dim linePen As New Pen(Color.Blue, 2)
67 70
         If e.RowIndex = 伺服器狀態_dgv.Rows.Count - 1 Then
@@ -89,9 +92,7 @@
89 92
     End Sub
90 93
     Private Sub LOG檔截斷3_bt_Click(sender As Object, e As EventArgs) Handles LOG檔截斷3_bt.Click
91 94
         Try
92
-            For I As Integer = 0 To 資料庫清單1_dgv.Rows.Count - 1
93
-                PA = 資料庫清單1_dgv(0, I).Value.ToString : 圖片庫 = PA : SQL_連線字串_圖片資料庫() : SQL_主資料庫LOG檔案截斷()
94
-            Next
95
+            PA = 選擇_tb.Text : 圖片庫 = PA : SQL_連線字串_圖片資料庫() : SQL_主資料庫LOG檔案截斷()
95 96
             重新讀取_bt.PerformClick() : MsgBox("伺服器截斷完成!!!")
96 97
         Catch ex As Exception
97 98
             MsgBox(ex.Message)

+ 10
- 24
TENDEN-MES-SYS/LoginForm1vb.vb View File

@@ -1,8 +1,6 @@
1 1
 Option Explicit On
2
-Imports System.Data.SqlClient
3 2
 Imports System.IO
4 3
 Imports System.Text
5
-
6 4
 Public Class LoginForm1vb
7 5
     ' TODO: 插入程式碼,利用提供的使用者名稱和密碼執行自訂驗證 (請參閱 https://go.microsoft.com/fwlink/?LinkId=35339)。
8 6
     ' 如此便可將自訂主體附加到目前執行緒的主體,如下所示:    My.User.CurrentPrincipal = CustomPrincipal 其中 CustomPrincipal 是用來執行驗證的 IPrincipal 實作。
@@ -109,44 +107,32 @@ Public Class LoginForm1vb
109 107
         Target1 = Target & AA(0) & "/"
110 108
         WebBrowser3.Url = New Uri(Target1)
111 109
         Dim Str As String = Application.StartupPath
112
-        If File.Exists(Str + "\TENDEN-ERP-SYS - 2021092901.exe") Then
113
-            UPDATE_bt.PerformClick()
114
-        End If
115 110
         If Strings.Right(Label1.Text, 10) <> Strings.Right(Label2.Text, 10) Then
116
-            自動更新2()
111
+            自動更新()
117 112
         Else : End If
118 113
     End Sub
119 114
     <Obsolete>
120 115
     Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged
121 116
     End Sub
122
-    Private Sub 自動更新1()
123
-        Dim aa1 As MsgBoxResult
124
-        aa1 = MsgBox("系統版本號 與 資料庫版本號 對應不上,請開發人員注意是否有其他人員修改。並決定是否下載最新的執行檔?", MsgBoxStyle.OkCancel)
125
-        If aa1 = MsgBoxResult.Ok Then
126
-            UPDATE_bt.PerformClick()
127
-        Else
128
-            登入程序()
129
-        End If
130
-    End Sub
131
-    Private Sub 自動更新2()
132
-        Dim aa1 As MsgBoxResult
133
-        aa1 = MsgBox("系統版本號 與 資料庫版本號 對應不上,請下載最新的執行檔。", MsgBoxStyle.OkCancel)
134
-        If aa1 = MsgBoxResult.Ok Then
135
-            UPDATE_bt.PerformClick()
136
-        Else
137
-            MsgBox("操作不正確,請用手動方式下載更新。")
117
+    Private Sub 自動更新()
118
+        Dim Str As String = Application.StartupPath
119
+        If File.Exists(Str + "\NOTAUTO.txt") Then : Else
120
+            If ComboBox1.Text = "雲端伺服器" Then : Else
121
+                UPDATE_bt.PerformClick()
122
+            End If
138 123
         End If
139 124
     End Sub
140 125
     Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click
126
+        Dim Str As String = Application.StartupPath
141 127
         If UsernameTextBox.Text = "b70340" Or UsernameTextBox.Text = "B70340" Then
142 128
             If Strings.Right(Label1.Text, 10) <> Strings.Right(Label2.Text, 10) Then
143
-                自動更新1()
129
+                If File.Exists(Str + "\NOTAUTO.txt") Then : 登入程序() : Else : 自動更新() : End If
144 130
             Else
145 131
                 登入程序()
146 132
             End If
147 133
         Else
148 134
             If Strings.Right(Label1.Text, 10) <> Strings.Right(Label2.Text, 10) Then
149
-                自動更新2()
135
+                自動更新()
150 136
             Else
151 137
                 登入程序()
152 138
             End If

+ 10
- 0
TENDEN-MES-SYS/My Project/Resources.Designer.vb View File

@@ -430,6 +430,16 @@ Namespace My.Resources
430 430
             End Get
431 431
         End Property
432 432
         
433
+        '''<summary>
434
+        '''  查詢類型 System.Drawing.Bitmap 的當地語系化資源。
435
+        '''</summary>
436
+        Friend ReadOnly Property PDF() As System.Drawing.Bitmap
437
+            Get
438
+                Dim obj As Object = ResourceManager.GetObject("PDF", resourceCulture)
439
+                Return CType(obj,System.Drawing.Bitmap)
440
+            End Get
441
+        End Property
442
+        
433 443
         '''<summary>
434 444
         '''  查詢類型 System.Drawing.Bitmap 的當地語系化資源。
435 445
         '''</summary>

+ 45
- 42
TENDEN-MES-SYS/My Project/Resources.resx View File

@@ -121,12 +121,12 @@
121 121
   <data name="6295116897660148006" type="System.Resources.ResXFileRef, System.Windows.Forms">
122 122
     <value>..\圖片\6295116897660148006.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
123 123
   </data>
124
+  <data name="Add_Image" type="System.Resources.ResXFileRef, System.Windows.Forms">
125
+    <value>..\圖片\Add_Image.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
126
+  </data>
124 127
   <data name="ZOOM01" type="System.Resources.ResXFileRef, System.Windows.Forms">
125 128
     <value>..\圖片\ZOOM01.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
126 129
   </data>
127
-  <data name="SAVER" type="System.Resources.ResXFileRef, System.Windows.Forms">
128
-    <value>..\圖片\SAVER.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
129
-  </data>
130 130
   <data name="shoe" type="System.Resources.ResXFileRef, System.Windows.Forms">
131 131
     <value>..\圖片\shoe.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
132 132
   </data>
@@ -139,24 +139,30 @@
139 139
   <data name="9572467" type="System.Resources.ResXFileRef, System.Windows.Forms">
140 140
     <value>..\圖片\9572467.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
141 141
   </data>
142
+  <data name="Report" type="System.Resources.ResXFileRef, System.Windows.Forms">
143
+    <value>..\圖片\Report.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
144
+  </data>
142 145
   <data name="Abacus" type="System.Resources.ResXFileRef, System.Windows.Forms">
143 146
     <value>..\圖片\Abacus.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
144 147
   </data>
145
-  <data name="Shipping5" type="System.Resources.ResXFileRef, System.Windows.Forms">
146
-    <value>..\圖片\Shipping5.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
147
-  </data>
148 148
   <data name="Shoe (1)" type="System.Resources.ResXFileRef, System.Windows.Forms">
149 149
     <value>..\圖片\Shoe (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
150 150
   </data>
151 151
   <data name="1440X828" type="System.Resources.ResXFileRef, System.Windows.Forms">
152 152
     <value>..\圖片\1440X828.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
153 153
   </data>
154
-  <data name="renew" type="System.Resources.ResXFileRef, System.Windows.Forms">
155
-    <value>..\圖片\renew.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
154
+  <data name="check" type="System.Resources.ResXFileRef, System.Windows.Forms">
155
+    <value>..\圖片\check.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
156
+  </data>
157
+  <data name="1980X1010" type="System.Resources.ResXFileRef, System.Windows.Forms">
158
+    <value>..\圖片\1980X1010.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
156 159
   </data>
157 160
   <data name="1366X719" type="System.Resources.ResXFileRef, System.Windows.Forms">
158 161
     <value>..\圖片\1366X719.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
159 162
   </data>
163
+  <data name="Sendnow" type="System.Resources.ResXFileRef, System.Windows.Forms">
164
+    <value>..\圖片\Sendnow.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
165
+  </data>
160 166
   <data name="813f3d39b7439d9db10b59c3db4be4f" type="System.Resources.ResXFileRef, System.Windows.Forms">
161 167
     <value>..\圖片\813f3d39b7439d9db10b59c3db4be4f.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
162 168
   </data>
@@ -187,18 +193,12 @@
187 193
   <data name="card_ipod" type="System.Resources.ResXFileRef, System.Windows.Forms">
188 194
     <value>..\圖片\card_ipod.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
189 195
   </data>
190
-  <data name="Personnel" type="System.Resources.ResXFileRef, System.Windows.Forms">
191
-    <value>..\圖片\Personnel.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
192
-  </data>
193
-  <data name="00110102" type="System.Resources.ResXFileRef, System.Windows.Forms">
194
-    <value>..\圖片\00110102.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
196
+  <data name="SAVER" type="System.Resources.ResXFileRef, System.Windows.Forms">
197
+    <value>..\圖片\SAVER.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
195 198
   </data>
196 199
   <data name="Sys-Command" type="System.Resources.ResXFileRef, System.Windows.Forms">
197 200
     <value>..\圖片\Sys-Command.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
198 201
   </data>
199
-  <data name="Close" type="System.Resources.ResXFileRef, System.Windows.Forms">
200
-    <value>..\圖片\Close.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
201
-  </data>
202 202
   <data name="moving-and-packing-icon-set-03_brown" type="System.Resources.ResXFileRef, System.Windows.Forms">
203 203
     <value>..\圖片\moving-and-packing-icon-set-03_brown.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
204 204
   </data>
@@ -214,8 +214,11 @@
214 214
   <data name="add-2" type="System.Resources.ResXFileRef, System.Windows.Forms">
215 215
     <value>..\圖片\add-2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
216 216
   </data>
217
-  <data name="shoe_black" type="System.Resources.ResXFileRef, System.Windows.Forms">
218
-    <value>..\圖片\shoe_black.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
217
+  <data name="moving-and-packing-icon-set-03_blue" type="System.Resources.ResXFileRef, System.Windows.Forms">
218
+    <value>..\圖片\moving-and-packing-icon-set-03_blue.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
219
+  </data>
220
+  <data name="business-info" type="System.Resources.ResXFileRef, System.Windows.Forms">
221
+    <value>..\圖片\business-info.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
219 222
   </data>
220 223
   <data name="import" type="System.Resources.ResXFileRef, System.Windows.Forms">
221 224
     <value>..\圖片\import.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@@ -229,29 +232,26 @@
229 232
   <data name="下載" type="System.Resources.ResXFileRef, System.Windows.Forms">
230 233
     <value>..\圖片\下載.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
231 234
   </data>
232
-  <data name="check" type="System.Resources.ResXFileRef, System.Windows.Forms">
233
-    <value>..\圖片\check.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
235
+  <data name="renew" type="System.Resources.ResXFileRef, System.Windows.Forms">
236
+    <value>..\圖片\renew.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
237
+  </data>
238
+  <data name="Search" type="System.Resources.ResXFileRef, System.Windows.Forms">
239
+    <value>..\圖片\Search.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
234 240
   </data>
235 241
   <data name="ShoesInBox" type="System.Resources.ResXFileRef, System.Windows.Forms">
236 242
     <value>..\圖片\ShoesInBox.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
237 243
   </data>
238
-  <data name="Payment" type="System.Resources.ResXFileRef, System.Windows.Forms">
239
-    <value>..\圖片\Payment.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
240
-  </data>
241 244
   <data name="1280X956" type="System.Resources.ResXFileRef, System.Windows.Forms">
242 245
     <value>..\圖片\1280X956.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
243 246
   </data>
244
-  <data name="2019100601" type="System.Resources.ResXFileRef, System.Windows.Forms">
245
-    <value>..\圖片\2019100601.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
246
-  </data>
247
-  <data name="add-button" type="System.Resources.ResXFileRef, System.Windows.Forms">
248
-    <value>..\圖片\add-button.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
247
+  <data name="Close" type="System.Resources.ResXFileRef, System.Windows.Forms">
248
+    <value>..\圖片\Close.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
249 249
   </data>
250 250
   <data name="9572466" type="System.Resources.ResXFileRef, System.Windows.Forms">
251 251
     <value>..\圖片\9572466.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
252 252
   </data>
253
-  <data name="1980X1010" type="System.Resources.ResXFileRef, System.Windows.Forms">
254
-    <value>..\圖片\1980X1010.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
253
+  <data name="Payment" type="System.Resources.ResXFileRef, System.Windows.Forms">
254
+    <value>..\圖片\Payment.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
255 255
   </data>
256 256
   <data name="tests" type="System.Resources.ResXFileRef, System.Windows.Forms">
257 257
     <value>..\圖片\tests.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@@ -259,8 +259,8 @@
259 259
   <data name="SAVER2" type="System.Resources.ResXFileRef, System.Windows.Forms">
260 260
     <value>..\圖片\SAVER2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
261 261
   </data>
262
-  <data name="Search" type="System.Resources.ResXFileRef, System.Windows.Forms">
263
-    <value>..\圖片\Search.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
262
+  <data name="Shipping5" type="System.Resources.ResXFileRef, System.Windows.Forms">
263
+    <value>..\圖片\Shipping5.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
264 264
   </data>
265 265
   <data name="00110101" type="System.Resources.ResXFileRef, System.Windows.Forms">
266 266
     <value>..\圖片\00110101.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@@ -268,17 +268,20 @@
268 268
   <data name="basket_back" type="System.Resources.ResXFileRef, System.Windows.Forms">
269 269
     <value>..\圖片\basket_back.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
270 270
   </data>
271
-  <data name="Report" type="System.Resources.ResXFileRef, System.Windows.Forms">
272
-    <value>..\圖片\Report.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
271
+  <data name="add-button" type="System.Resources.ResXFileRef, System.Windows.Forms">
272
+    <value>..\圖片\add-button.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
273 273
   </data>
274
-  <data name="moving-and-packing-icon-set-03_blue" type="System.Resources.ResXFileRef, System.Windows.Forms">
275
-    <value>..\圖片\moving-and-packing-icon-set-03_blue.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
274
+  <data name="2019100601" type="System.Resources.ResXFileRef, System.Windows.Forms">
275
+    <value>..\圖片\2019100601.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
276 276
   </data>
277 277
   <data name="check-icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
278 278
     <value>..\圖片\check-icon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
279 279
   </data>
280
-  <data name="Add_Image" type="System.Resources.ResXFileRef, System.Windows.Forms">
281
-    <value>..\圖片\Add_Image.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
280
+  <data name="00110102" type="System.Resources.ResXFileRef, System.Windows.Forms">
281
+    <value>..\圖片\00110102.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
282
+  </data>
283
+  <data name="Personnel" type="System.Resources.ResXFileRef, System.Windows.Forms">
284
+    <value>..\圖片\Personnel.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
282 285
   </data>
283 286
   <data name="2020032001" type="System.Resources.ResXFileRef, System.Windows.Forms">
284 287
     <value>..\圖片\2020032001.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@@ -286,10 +289,10 @@
286 289
   <data name="pen" type="System.Resources.ResXFileRef, System.Windows.Forms">
287 290
     <value>..\圖片\pen.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
288 291
   </data>
289
-  <data name="business-info" type="System.Resources.ResXFileRef, System.Windows.Forms">
290
-    <value>..\圖片\business-info.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
292
+  <data name="shoe_black" type="System.Resources.ResXFileRef, System.Windows.Forms">
293
+    <value>..\圖片\shoe_black.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
291 294
   </data>
292
-  <data name="Sendnow" type="System.Resources.ResXFileRef, System.Windows.Forms">
293
-    <value>..\圖片\Sendnow.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
295
+  <data name="PDF" type="System.Resources.ResXFileRef, System.Windows.Forms">
296
+    <value>..\圖片\PDF.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
294 297
   </data>
295 298
 </root>

+ 15
- 2
TENDEN-MES-SYS/TENDEN_MES_SYS.vb View File

@@ -1,4 +1,6 @@
1
-Public Class TENDEN_MES_SYS
1
+Imports System.IO
2
+
3
+Public Class TENDEN_MES_SYS
2 4
     ReadOnly screenWidth = Screen.PrimaryScreen.Bounds.Width
3 5
     ReadOnly screenHeight = Screen.PrimaryScreen.Bounds.Height
4 6
     Private Sub ExitToolsStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles ExitToolStripMenuItem.Click
@@ -24,6 +26,7 @@
24 26
     End Sub
25 27
     Private ReadOnly m_ChildFormNumber As Integer
26 28
     Private Sub MDIParent1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
29
+        刪除SYSPDF()
27 30
         If gUserName = "李協叡" Then
28 31
             Me.Text = Me.Text & "  --  " & g_conn_type & "  --  " & gUserName & "  --  系統版本  : " & 版本 & " - " & 登入人IP
29 32
         Else
@@ -62,7 +65,17 @@
62 65
         Me.STYLE形體下單數量統計_tsm.Enabled = CC(91)
63 66
     End Sub
64 67
     Private Sub MDIParent1_Unload(sender As Object, e As EventArgs) Handles MyBase.Closing
65
-        LoginForm1vb.Close()
68
+        刪除SYSPDF() : LoginForm1vb.Close()
69
+    End Sub
70
+    Private Sub 刪除SYSPDF()
71
+        ' 檢查 SYSPDF 資料夾是否存在,如果存在就強制刪除
72
+        Dim desktopPath As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
73
+        Dim sysPdfFolderPath As String = Path.Combine(desktopPath, "SYSPDF")
74
+        If Directory.Exists(sysPdfFolderPath) Then
75
+            Try
76
+                Directory.Delete(sysPdfFolderPath, True) ' 第二個參數為 True 表示刪除資料夾及其所有子資料夾和檔案
77
+            Catch ex As Exception : End Try
78
+        End If
66 79
     End Sub
67 80
     Private Sub MDIParent1_Resize(sender As Object, e As EventArgs) Handles MyBase.Resize, MyBase.Resize
68 81
         If screenWidth = 1920 And screenHeight = 1080 Then : Me.BackgroundImage = My.Resources._1980X1010

.vs/TENDEN-MES-SYS/FileContentIndex/read.lock → TENDEN-MES-SYS/bin/Debug/NOTAUTO.txt View File


BIN
TENDEN-MES-SYS/bin/Debug/TENDEN-ERP-SYS.exe View File


BIN
TENDEN-MES-SYS/bin/Debug/TENDEN-ERP-SYS.pdb View File


+ 5
- 0
TENDEN-MES-SYS/bin/Debug/TENDEN-ERP-SYS.xml View File

@@ -207,6 +207,11 @@ TENDEN-ERP-SYS
207 207
   查詢類型 System.Drawing.Bitmap 的當地語系化資源。
208 208
 </summary>
209 209
 </member>
210
+<member name="P:天盾國際管理系統.My.Resources.Resources.PDF">
211
+<summary>
212
+  查詢類型 System.Drawing.Bitmap 的當地語系化資源。
213
+</summary>
214
+</member>
210 215
 <member name="P:天盾國際管理系統.My.Resources.Resources.pen">
211 216
 <summary>
212 217
   查詢類型 System.Drawing.Bitmap 的當地語系化資源。

BIN
TENDEN-MES-SYS/obj/Debug/DesignTimeResolveAssemblyReferences.cache View File


BIN
TENDEN-MES-SYS/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache View File


BIN
TENDEN-MES-SYS/obj/Debug/TENDEN-ERP-SYS.exe View File


BIN
TENDEN-MES-SYS/obj/Debug/TENDEN-ERP-SYS.pdb View File


+ 5
- 0
TENDEN-MES-SYS/obj/Debug/TENDEN-ERP-SYS.xml View File

@@ -207,6 +207,11 @@ TENDEN-ERP-SYS
207 207
   查詢類型 System.Drawing.Bitmap 的當地語系化資源。
208 208
 </summary>
209 209
 </member>
210
+<member name="P:天盾國際管理系統.My.Resources.Resources.PDF">
211
+<summary>
212
+  查詢類型 System.Drawing.Bitmap 的當地語系化資源。
213
+</summary>
214
+</member>
210 215
 <member name="P:天盾國際管理系統.My.Resources.Resources.pen">
211 216
 <summary>
212 217
   查詢類型 System.Drawing.Bitmap 的當地語系化資源。

BIN
TENDEN-MES-SYS/obj/Debug/TempPE/My Project.Resources.Designer.vb.dll View File


BIN
TENDEN-MES-SYS/obj/Debug/天盾國際管理系統.Resources.resources View File


BIN
TENDEN-MES-SYS/obj/Debug/天盾系統.vbproj.AssemblyReference.cache View File


+ 1
- 1
TENDEN-MES-SYS/obj/Debug/天盾系統.vbproj.CoreCompileInputs.cache View File

@@ -1 +1 @@
1
-1335c8ab621ce011c93b1a4140f0c075b3438e50
1
+aca4c6829544c17675e6825101dcd589d38819098f7f7f1b04c83b00a0b2d652

+ 0
- 1
TENDEN-MES-SYS/obj/Debug/天盾系統.vbproj.FileListAbsolute.txt View File

@@ -842,7 +842,6 @@ D:\工巧明\TENDEN\TENDEN-MES-SYS\TENDEN-MES-SYS\bin\Debug\WebActivatorEx.dll
842 842
 D:\工巧明\TENDEN\TENDEN-MES-SYS\TENDEN-MES-SYS\bin\Debug\Newtonsoft.Json.xml
843 843
 D:\工巧明\TENDEN\TENDEN-MES-SYS\TENDEN-MES-SYS\bin\Debug\Transformer.NET.xml
844 844
 D:\工巧明\TENDEN\TENDEN-MES-SYS\TENDEN-MES-SYS\obj\Debug\天盾系統.vbproj.AssemblyReference.cache
845
-D:\工巧明\TENDEN\TENDEN-MES-SYS\TENDEN-MES-SYS\obj\Debug\天盾系統.vbproj.SuggestedBindingRedirects.cache
846 845
 D:\工巧明\TENDEN\TENDEN-MES-SYS\TENDEN-MES-SYS\obj\Debug\天盾國際管理系統.出貨明細表1.resources
847 846
 D:\工巧明\TENDEN\TENDEN-MES-SYS\TENDEN-MES-SYS\obj\Debug\天盾國際管理系統.包裝資料圖片導入資料庫.resources
848 847
 D:\工巧明\TENDEN\TENDEN-MES-SYS\TENDEN-MES-SYS\obj\Debug\天盾國際管理系統.包裝資料圖片資料庫.resources

BIN
TENDEN-MES-SYS/obj/Debug/天盾系統.vbproj.GenerateResource.cache View File


+ 0
- 0
TENDEN-MES-SYS/obj/Debug/天盾系統.vbproj.SuggestedBindingRedirects.cache View File


BIN
TENDEN-MES-SYS/圖片/PDF.png View File


+ 1
- 0
TENDEN-MES-SYS/天盾系統.vbproj View File

@@ -1204,6 +1204,7 @@
1204 1204
   </ItemGroup>
1205 1205
   <ItemGroup>
1206 1206
     <Content Include="favicon-20181108114334167.ico" />
1207
+    <None Include="圖片\PDF.png" />
1207 1208
     <None Include="圖片\Sendnow.png" />
1208 1209
     <None Include="圖片\renew.png" />
1209 1210
     <None Include="圖片\add-button.png" />

Loading…
Cancel
Save