B70340 3 lat temu
rodzic
commit
7d57b535ad

BIN
.vs/GA-ERP-SYS/v16/.suo Wyświetl plik


+ 7
- 7
GA-ERP-SYS/GA-ERP-SYS.Designer.vb Wyświetl plik

@@ -156,7 +156,7 @@ Partial Class GA_ERP_SYS
156 156
         '
157 157
         Me.基本資料_tsm.Image = Global.GA_ERP_SYS.My.Resources.Resources.business_info
158 158
         Me.基本資料_tsm.Name = "基本資料_tsm"
159
-        Me.基本資料_tsm.Size = New System.Drawing.Size(180, 22)
159
+        Me.基本資料_tsm.Size = New System.Drawing.Size(122, 22)
160 160
         Me.基本資料_tsm.Text = "基本資料"
161 161
         '
162 162
         '報表系統管理ToolStripMenuItem
@@ -186,21 +186,21 @@ Partial Class GA_ERP_SYS
186 186
         '
187 187
         Me.流水帳自動導入_tsm.Image = Global.GA_ERP_SYS.My.Resources.Resources.pen
188 188
         Me.流水帳自動導入_tsm.Name = "流水帳自動導入_tsm"
189
-        Me.流水帳自動導入_tsm.Size = New System.Drawing.Size(180, 22)
189
+        Me.流水帳自動導入_tsm.Size = New System.Drawing.Size(158, 22)
190 190
         Me.流水帳自動導入_tsm.Text = "流水帳自動導入"
191 191
         '
192 192
         '流水帳手動輸入_tsm
193 193
         '
194 194
         Me.流水帳手動輸入_tsm.Image = Global.GA_ERP_SYS.My.Resources.Resources.pen
195 195
         Me.流水帳手動輸入_tsm.Name = "流水帳手動輸入_tsm"
196
-        Me.流水帳手動輸入_tsm.Size = New System.Drawing.Size(180, 22)
196
+        Me.流水帳手動輸入_tsm.Size = New System.Drawing.Size(158, 22)
197 197
         Me.流水帳手動輸入_tsm.Text = "流水帳手動輸入"
198 198
         '
199 199
         '商客資料導入_tsm
200 200
         '
201 201
         Me.商客資料導入_tsm.Image = Global.GA_ERP_SYS.My.Resources.Resources.pen
202 202
         Me.商客資料導入_tsm.Name = "商客資料導入_tsm"
203
-        Me.商客資料導入_tsm.Size = New System.Drawing.Size(180, 22)
203
+        Me.商客資料導入_tsm.Size = New System.Drawing.Size(158, 22)
204 204
         Me.商客資料導入_tsm.Text = "商客資料導入"
205 205
         '
206 206
         '資料庫系統管理_tsm
@@ -238,6 +238,7 @@ Partial Class GA_ERP_SYS
238 238
         Me.FTP_tsm.Name = "FTP_tsm"
239 239
         Me.FTP_tsm.Size = New System.Drawing.Size(194, 22)
240 240
         Me.FTP_tsm.Text = "FTP資料夾管理"
241
+        Me.FTP_tsm.Visible = False
241 242
         '
242 243
         '人員ID卡系統配置設定_tsm
243 244
         '
@@ -258,9 +259,8 @@ Partial Class GA_ERP_SYS
258 259
         'ToolStripStatusLabel
259 260
         '
260 261
         Me.ToolStripStatusLabel.Name = "ToolStripStatusLabel"
261
-        Me.ToolStripStatusLabel.Size = New System.Drawing.Size(336, 17)
262
-        Me.ToolStripStatusLabel.Text = "著作權 : GCM.LTD.C                                                                  " &
263
-    "       "
262
+        Me.ToolStripStatusLabel.Size = New System.Drawing.Size(266, 17)
263
+        Me.ToolStripStatusLabel.Text = "GA-SYS                                                                        "
264 264
         '
265 265
         'ToolStripStatusLabel1
266 266
         '

+ 1
- 1
GA-ERP-SYS/GA-ERP-SYS.vb Wyświetl plik

@@ -79,7 +79,7 @@ Public Class GA_ERP_SYS
79 79
         PA = "" : 人員ID卡系統配置設定.ShowDialog() : 人員ID卡系統配置設定.BringToFront()
80 80
     End Sub
81 81
     Private Sub 系統執行檔版本管理ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 系統執行檔版本管理_tsm.Click
82
-        PA = "" : 系統執行檔版本管理.Show() : 系統執行檔版本管理.BringToFront()
82
+        PA = "" : 系統執行檔版本管理.ShowDialog()
83 83
     End Sub
84 84
     Private Sub FTPToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles FTP_tsm.Click
85 85
         PA = "" : FTP資料夾管理.Show() : FTP資料夾管理.BringToFront()

+ 31
- 23
GA-ERP-SYS/LoginForm1.vb Wyświetl plik

@@ -33,27 +33,27 @@ Public Class LoginForm1
33 33
 
34 34
         Me.ActiveControl = 使用者帳號_cb
35 35
         '-----MAC碼與硬碟資料-------------------------------------------------------------------------------------------------------------------------------------------------------------
36
-        Dim Wmi As New Management.ManagementObjectSearcher("SELECT * FROM Win32_NetworkAdapterConfiguration")
37
-        For Each WmiObj As Management.ManagementObject In Wmi.Get
38
-            If CBool(WmiObj("IPEnabled")) Then
39
-                MACKK = WmiObj("MACAddress")
40
-            End If
41
-        Next
42
-        Dim cmicWmi As New Management.ManagementObjectSearcher("SELECT * FROM Win32_DiskDrive")
43
-        For Each cmicWmiObj As Management.ManagementObject In cmicWmi.Get
44
-            diskId = cmicWmiObj("size")             'diskId = cmicWmiObj("signature")
45
-            diskSerialNumber = cmicWmiObj("serialnumber")
46
-            diskModel = cmicWmiObj("Model")
47
-            Exit For
48
-        Next
36
+        'Dim Wmi As New Management.ManagementObjectSearcher("SELECT * FROM Win32_NetworkAdapterConfiguration")
37
+        'For Each WmiObj As Management.ManagementObject In Wmi.Get
38
+        '    If CBool(WmiObj("IPEnabled")) Then
39
+        '        MACKK = WmiObj("MACAddress")
40
+        '    End If
41
+        'Next
42
+        'Dim cmicWmi As New Management.ManagementObjectSearcher("SELECT * FROM Win32_DiskDrive")
43
+        'For Each cmicWmiObj As Management.ManagementObject In cmicWmi.Get
44
+        '    diskId = cmicWmiObj("size")             'diskId = cmicWmiObj("signature")
45
+        '    diskSerialNumber = cmicWmiObj("serialnumber")
46
+        '    diskModel = cmicWmiObj("Model")
47
+        '    Exit For
48
+        'Next
49 49
         '-----電腦綁定判斷-------------------------------------------------------------------------------------------------------------------------------------------------------------
50
-        PA1 = MACKK : PA2 = diskId : PA3 = diskSerialNumber : PA4 = diskModel
51
-        SQL_電腦綁定()
52
-        If dr.Read() Then
53
-            conn.Close()
54
-        Else
55
-            conn.Close() : MsgBox("該電腦沒有註冊,無法使用系統。") : Me.Close()
56
-        End If
50
+        'PA1 = MACKK : PA2 = diskId : PA3 = diskSerialNumber : PA4 = diskModel
51
+        'SQL_電腦綁定()
52
+        'If dr.Read() Then
53
+        '    conn.Close()
54
+        'Else
55
+        '    conn.Close() : MsgBox("該電腦沒有註冊,無法使用系統。") : Me.Close()
56
+        'End If
57 57
         Set_使用者清單()
58 58
     End Sub
59 59
     Private Sub 簡易登入_dgv_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles 簡易登入_dgv.CellClick
@@ -63,7 +63,7 @@ Public Class LoginForm1
63 63
     End Sub
64 64
     Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 伺服器區域_ch.SelectedIndexChanged
65 65
         '-----------------------確認登入伺服器位置-----------------------------------------------------------------------------------------------------------------------------------------
66
-        登入人IP = "180.177.181.162,5264" : 登入() : 確認_bt.Enabled = True : 取消_bt.Enabled = True : 刷卡登入_ch.Checked = True
66
+        登入人IP = "103.231.201.230,2433" : 登入() : 確認_bt.Enabled = True : 取消_bt.Enabled = True : 刷卡登入_ch.Checked = True
67 67
     End Sub
68 68
     Private Sub 登入()
69 69
         '-----------------------寫入連線字串-----------------------------------------------------------------------------------------------------------------------------------------------
@@ -89,8 +89,7 @@ Public Class LoginForm1
89 89
         登入程序()
90 90
     End Sub
91 91
     Private Sub 自動更新2()
92
-        Dim aa1 As MsgBoxResult
93
-        aa1 = MsgBox("系統版本號 與 資料庫版本號 對應不上,請下載最新的執行檔。", MsgBoxStyle.OkCancel)
92
+        Dim aa1 As MsgBoxResult = MsgBox("系統版本號 與 資料庫版本號 對應不上,請下載最新的執行檔。", MsgBoxStyle.OkCancel)
94 93
         If aa1 = MsgBoxResult.Ok Then
95 94
             更新下載_ch.Checked = True
96 95
             Me.Size = New Size(805, 279)
@@ -101,6 +100,15 @@ Public Class LoginForm1
101 100
             ElseIf screenWidth = 1600 And screenHeight = 900 Then
102 101
             End If
103 102
             Shell("explorer http://106.1.50.79:8080/ga-erp-sys/", vbNormalFocus)
103
+        Else
104
+            Me.Size = New Size(466, 279)
105
+            If screenWidth = 1920 And screenHeight = 1080 Then : Me.Location = New Point(727, 401)
106
+            ElseIf screenWidth = 1366 And screenHeight = 768 Then : Me.Location = New Point(450, 245)
107
+            ElseIf screenWidth = 1440 And screenHeight = 900 Then : Me.Location = New Point(487, 311)
108
+            ElseIf screenWidth = 1280 And screenHeight = 1024 Then : Me.Location = New Point(407, 373)
109
+            ElseIf screenWidth = 1600 And screenHeight = 900 Then : Me.Location = New Point(567, 311)
110
+            End If
111
+            簡易登入_dgv.Visible = False : 解鎖_bt.Visible = False
104 112
         End If
105 113
     End Sub
106 114
     Private Sub 登入程序()

+ 67
- 15
GA-ERP-SYS/Module/SQL_子系統管理.vb Wyświetl plik

@@ -14,31 +14,40 @@
14 14
     '-----------------------下行客戶--------------------------------------------------------------------
15 15
     Friend Sub SQL_基本資料_客戶下資料表()
16 16
         ConnOpen_子SQL()
17
-        SQL1 = "SELECT     商客基本資料表.商品, 下行客戶.網址, 下行客戶.帳號 AS 老闆帳號, 下行客戶.客戶下 AS 客戶帳號, 下行客戶.基數 AS 客戶名稱, 下行客戶.流水號
17
+        SQL1 = "SELECT     商客基本資料表.商品, 下行客戶.網址, 下行客戶.帳號 AS 老闆帳號, 下行客戶.客戶下 AS 客戶帳號, 下行客戶.客名 AS 客戶名稱, 下行客戶.流水號, 下行客戶.基數
18 18
                 FROM       下行客戶 LEFT OUTER JOIN
19 19
                            商客基本資料表 ON 下行客戶.網址 = 商客基本資料表.網址 AND 下行客戶.帳號 = 商客基本資料表.帳號
20
+                WHERE      下行客戶.客戶下 LIKE N'%" & PA & "%' " & PA9 & "
20 21
                 ORDER BY   商客基本資料表.商品, 下行客戶.帳號"
21 22
         CmdSet_For_DGV()
22 23
     End Sub
23 24
     Friend Sub SQL_系統編碼規則_客戶下重複查詢()
25
+        ConnOpen_子SQL()
24 26
         SQL1 = "SELECT 客戶下 FROM 下行客戶 
25 27
                 WHERE  客戶下 LIKE N'" & 基本資料.客戶下_tb.Text & "' AND 網址 LIKE N'" & 基本資料.網址3_tb.Text & "' AND 
26 28
                        帳號 LIKE N'" & 基本資料.帳號3_tb.Text & "' AND 基數 LIKE N'" & 基本資料.下行1_cb.Text & "'"
29
+        CmdSet_For_dr()
27 30
     End Sub
28 31
     Friend Sub SQL_系統編碼規則_客戶下新增()
29
-        SQL1 = "INSERT INTO 下行客戶 (客戶下, 網址, 帳號, 基數) 
30
-                VALUES (N'" & 基本資料.客戶下_tb.Text & "', N'" & 基本資料.網址3_tb.Text & "', N'" & 基本資料.帳號3_tb.Text & "', N'" & 基本資料.下行1_cb.Text & "')"
32
+        ConnOpen_子SQL()
33
+        SQL1 = "INSERT INTO 下行客戶 (客戶下, 網址, 帳號, 基數, 流水號, 客名) 
34
+                VALUES (N'" & 基本資料.客戶下_tb.Text & "', N'" & 基本資料.網址3_tb.Text & "', N'" & 基本資料.帳號3_tb.Text & "', 
35
+                        N'" & 基本資料.下行1_cb.Text & "', N'" & PA10 & "', N'" & 基本資料.下行1_cb.Text & "')"
36
+        CmdSet_For_dr()
31 37
     End Sub
32 38
     Friend Sub SQL_系統編碼規則_客戶下刪除()
33
-        SQL1 = "DELETE FROM 下行客戶  WHERE  客戶下 LIKE N'" & 基本資料.客戶下_tb.Text & "' AND 網址 LIKE N'" & 基本資料.網址3_tb.Text & "' AND 
34
-                       帳號 LIKE N'" & 基本資料.帳號3_tb.Text & "' AND 基數 LIKE N'" & 基本資料.下行1_cb.Text & "'"
39
+        ConnOpen_子SQL() : SQL1 = "DELETE FROM 下行客戶 WHERE 流水號 LIKE N'" & 基本資料.流水號_tb.Text & "'" : CmdSet_For_dr()
35 40
     End Sub
36 41
     Friend Sub SQL_系統編碼規則_客戶下修改()
37
-        SQL1 = "UPDATE 下行客戶 SET 客戶下 = N'" & PA & "', 網址 = N'" & PA1 & "', 帳號 = N'" & PA2 & "', 基數 = N'" & PA3 & "'
38
-                WHERE  客戶下 LIKE N'" & 基本資料.客戶下_tb.Text & "' AND 網址 LIKE N'" & 基本資料.網址3_tb.Text & "' AND 
39
-                       帳號 LIKE N'" & 基本資料.帳號3_tb.Text & "' AND 基數 LIKE N'" & 基本資料.下行1_cb.Text & "'"
42
+        SQL1 = "UPDATE 下行客戶 SET 客戶下 = N'" & PA & "', 網址 = N'" & PA1 & "', 帳號 = N'" & PA2 & "', 基數 = N'" & PA3 & "', 客名 = N'" & PA4 & "'
43
+                WHERE  流水號 LIKE N'" & 基本資料.流水號_tb.Text & "'"
40 44
     End Sub
41 45
     '--------------------------商客基本資料表------------------------------------------------------
46
+    Friend Sub SQL_商客資料表2()
47
+        ConnOpen_子SQL()
48
+        SQL1 = "SELECT 網址, 帳號, 密碼, 資料, 上繳源, 商品, 上行基數, 下行基數 FROM 商客基本資料表 WHERE 網址 LIKE N'%" & PA1 & "%' ORDER BY  商品, 上繳源, 帳號"
49
+        CmdSet_For_DGV()
50
+    End Sub
42 51
     Friend Sub SQL_商客資料表()
43 52
         ConnOpen_子SQL()
44 53
         SQL1 = "SELECT 網址, 帳號, 密碼, 資料, 上繳源, 商品, 上行基數, 下行基數 FROM 商客基本資料表 WHERE 網址 NOT LIKE N'' ORDER BY  商品, 上繳源, 帳號"
@@ -56,14 +65,21 @@
56 65
                                     N'" & 基本資料.上繳源_tb.Text & "', N'" & 基本資料.商品_cb.Text & "', N'" & 基本資料.上行_cb.Text & "', N'" & 基本資料.下行_cb.Text & "')"
57 66
     End Sub
58 67
     Friend Sub SQL_系統編碼規則_商客刪除()
68
+        ConnOpen_子SQL()
59 69
         SQL1 = "DELETE FROM 商客基本資料表 WHERE (帳號 LIKE N'" & 基本資料.帳號_tb.Text & "' AND  網址 LIKE N'" & 基本資料.網址_tb.Text & "')"
70
+        CmdSet_For_dr()
60 71
     End Sub
61 72
     Friend Sub SQL_系統編碼規則_商客修改()
62 73
         SQL1 = "UPDATE 商客基本資料表 SET 網址 = N'" & PA2 & "',上繳源 = N'" & PA3 & "', 資料 = N'" & PA8 & "', 商品 = N'" & PA9 & "',
63 74
                                           帳號 = N'" & PA4 & "', 密碼 = N'" & PA5 & "' ,上行基數 = N'" & PA6 & "' ,下行基數 = N'" & PA7 & "'                                    
64 75
                                   WHERE (帳號 LIKE N'" & 基本資料.帳號1_tb.Text & "' AND  網址 LIKE N'" & 基本資料.網址1_tb.Text & "')"
65 76
     End Sub
66
-
77
+    Friend Sub SQL_商品確認()
78
+        ConnOpen_子SQL() : SQL1 = "SELECT 商品 FROM 商品資料表 WHERE 商品 LIKE N'" & PA9 & "'" : CmdSet_For_dr()
79
+    End Sub
80
+    Friend Sub SQL_商品寫入()
81
+        ConnOpen_子SQL() : SQL1 = "INSERT INTO 商品資料表 (商品) VALUES (N'" & PA9 & "')" : CmdSet_For_dr()
82
+    End Sub
67 83
     '-----------------------------------下拉清單-------------------------------------------------------------------------------------------
68 84
     Friend Sub SQL_下拉商品清單讀取()
69 85
         ConnOpen_子SQL() : SQL1 = "SELECT 商品 FROM 商品資料表" : CmdSet_For_dr()
@@ -186,9 +202,6 @@
186 202
     Friend Sub SQL_LOG_刪除1()
187 203
         ConnOpen_子SQL() : SQL1 = "DELETE [LOG] WHERE 查詢區間 LIKE N'" & PA1 & "-" & PA2 & "'" : CmdSet_For_dr()
188 204
     End Sub
189
-    Friend Sub SQL_LOG_刪除2()
190
-        ConnOpen_子SQL() : SQL1 = "DELETE [LOG] WHERE 查詢區間 LIKE N'" & PA1 & "-" & PA2 & "' AND 狀態 LIKE N'無法取得資料'" : CmdSet_For_dr()
191
-    End Sub
192 205
     Friend Sub SQL_查詢日期資料()
193 206
         ConnOpen_子SQL() : SQL1 = "SELECT TOP (1) 開始, 結束 FROM 查詢時間" : CmdSet_For_dr()
194 207
     End Sub
@@ -291,6 +304,39 @@
291 304
                 ORDER BY    商客基本資料表.上繳源"
292 305
         CmdSet_For_DGV()
293 306
     End Sub
307
+    Friend Sub SQL_彙總查詢3()
308
+        ConnOpen_子SQL()
309
+        SQL1 = "SELECT  商品, 上繳源 AS 天帳, 上繳源 AS 地帳, 上繳源 AS 個人所得, 上繳源 AS 水差, 
310
+                        上繳源 AS 核帳, 上繳源
311
+                FROM    商客基本資料表
312
+                WHERE  (上繳源 LIKE N'" & 流水帳查詢.老闆_tb.Text & "')
313
+                GROUP BY   商品, 上繳源
314
+                ORDER BY   商品"
315
+        CmdSet_For_DGV()
316
+    End Sub
317
+    Friend Sub SQL_彙總查詢4()
318
+        ConnOpen_子SQL()
319
+        SQL1 = "SELECT     商客基本資料表.商品, 下行客戶.客名 AS 客戶, 下行客戶.客戶下 AS 帳號, 商客基本資料表.上繳源 AS 天帳, 
320
+                           商客基本資料表.上繳源 AS 地帳, 商客基本資料表.上繳源 AS 個人所得, 商客基本資料表.上繳源 AS 水差, 
321
+                           商客基本資料表.上繳源 AS 核帳, 商客基本資料表.上繳源
322
+                FROM       商客基本資料表 INNER JOIN
323
+                           下行客戶 ON 商客基本資料表.網址 = 下行客戶.網址 AND 商客基本資料表.帳號 = 下行客戶.帳號
324
+                WHERE     (商客基本資料表.上繳源 LIKE N'" & 流水帳查詢.老闆_tb.Text & "')
325
+                GROUP BY   商客基本資料表.商品, 商客基本資料表.上繳源, 下行客戶.客戶下, 下行客戶.客名
326
+                ORDER BY   商客基本資料表.商品"
327
+        CmdSet_For_DGV()
328
+    End Sub
329
+    Friend Sub SQL_彙總查詢5()
330
+        ConnOpen_子SQL()
331
+        SQL1 = "SELECT          商客基本資料表.商品, 下行客戶.客名 AS 應收, 下行客戶.客戶下 AS 客戶帳號, 下行客戶.基數, 下行客戶.網址, 下行客戶.帳號
332
+                FROM              下行客戶 INNER JOIN
333
+                            商客基本資料表 ON 下行客戶.網址 = 商客基本資料表.網址 AND 下行客戶.帳號 = 商客基本資料表.帳號
334
+                WHERE          (下行客戶.客名 LIKE  N'" & 流水帳查詢.客戶_tb.Text & "')
335
+                GROUP BY   下行客戶.客名, 商客基本資料表.商品, 下行客戶.客戶下, 下行客戶.網址, 下行客戶.帳號, 下行客戶.基數, 
336
+                            商客基本資料表.上繳源
337
+                ORDER BY   應收"
338
+        CmdSet_For_DGV()
339
+    End Sub
294 340
     Friend Sub SQL_流水帳_清除()
295 341
         ConnOpen_子SQL()
296 342
         SQL1 = "DELETE  流水帳 
@@ -308,15 +354,21 @@
308 354
         ConnOpen_子SQL() : SQL1 = "SELECT 商品 FROM 商客基本資料表 GROUP BY 商品 ORDER BY 商品" : CmdSet_For_dr()
309 355
     End Sub
310 356
     Friend Sub SQL_流水帳_客戶下新增()
311
-        ConnOpen_子SQL() : SQL1 = "INSERT INTO 下行客戶 (客戶下, 網址, 帳號, 基數, 流水號) VALUES (N'" & PA & "', N'" & PA1 & "', N'" & PA2 & "', N'" & PA4 & "', N'" & PA3 & "')" : CmdSet_For_dr()
357
+        ConnOpen_子SQL()
358
+        SQL1 = "INSERT INTO 下行客戶 (客戶下, 網址, 帳號, 基數, 流水號, 客名) 
359
+                VALUES (N'" & PA & "', N'" & PA1 & "', N'" & PA2 & "', N'', N'" & PA3 & "', N'')"
360
+        CmdSet_For_dr()
312 361
     End Sub
313 362
     Friend Sub SQL_流水帳_客戶下修改()
314 363
         ConnOpen_子SQL()
315
-        SQL1 = "UPDATE 下行客戶 SET 基數 = N'" & PA3 & "' WHERE (客戶下 LIKE N'" & PA & "' AND 網址 LIKE N'" & PA1 & "' AND 帳號 LIKE N'" & PA2 & "')"
364
+        SQL1 = "UPDATE 下行客戶 SET 客名 = N'" & PA3 & "' WHERE (客戶下 LIKE N'" & PA & "' AND 網址 LIKE N'" & PA1 & "' AND 帳號 LIKE N'" & PA2 & "')"
316 365
         CmdSet_For_dr()
317 366
     End Sub
318 367
     Friend Sub SQL_客戶下資料表()
319
-        ConnOpen_子SQL() : SQL1 = "SELECT 客戶下 AS 客戶帳號, 網址, 帳號, 基數 AS 客戶名稱 FROM 下行客戶" : CmdSet_For_DGV()
368
+        ConnOpen_子SQL() : SQL1 = "SELECT 客戶下 AS 客戶帳號, 網址, 帳號, 客名 AS 客戶名稱 FROM 下行客戶" : CmdSet_For_DGV()
369
+    End Sub
370
+    Friend Sub SQL_客戶下名稱()
371
+        ConnOpen_子SQL() : SQL1 = "SELECT 客名 AS 客戶 FROM 下行客戶 WHERE 客名 NOT LIKE '' AND 客名 IS NOT NULL GROUP BY 客名 ORDER BY 客名" : CmdSet_For_DGV()
320 372
     End Sub
321 373
     Friend Sub SQL_LOG查詢1()
322 374
         ConnOpen_子SQL()

+ 1
- 1
GA-ERP-SYS/Module/SQL_連線字串.vb Wyświetl plik

@@ -1,6 +1,6 @@
1 1
 Module SQL_連線字串
2 2
     Friend Sub SQL_連線字串_主SQL()
3
-        ConString = "Data Source=" & 登入人IP & ";Initial Catalog=GA-ERP-SYS;Persist Security Info=True;User ID=B70340;Password=0911274990;Max pool size = 200;Connection Timeout=0"
3
+        ConString = "Data Source=" & 登入人IP & ";Initial Catalog=GA-ERP-SYS;Persist Security Info=True;User ID=B70340;Password=Lee0911274990;Max pool size = 200;Connection Timeout=0"
4 4
     End Sub
5 5
     Friend Sub SQL_連線字串_子SQL()
6 6
         ConString1 = "Data Source=" & 登入人IP2 & ";Initial Catalog=" & 子SQL名稱 & ";Persist Security Info=True;User ID=" & 業務帳號 & ";Password=" & 業務密碼 & ";Max pool size = 200;Connection Timeout=0"

+ 1
- 1
GA-ERP-SYS/Module/全域變數.vb Wyświetl plik

@@ -7,7 +7,7 @@
7 7
     Public 子SQL名稱 As String : Public 子SQL名稱1 As String : Public 登入客戶 As String : Public 登入資料庫 As String : Public 業務名稱 As String
8 8
     Public 業務帳號 As String : Public 業務密碼 As String : Public 業務帳號1 As String : Public 業務密碼1 As String
9 9
     '----系統版本-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
10
-    Public 版本 As String = "2021061001"
10
+    Public 版本 As String = "2021071201"
11 11
     '----系統用全域變數-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
12 12
     '----系統閒置-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
13 13
     Public 判斷重登 As Boolean : Public 內外網 As Boolean : Public 重登確認 As Boolean : Public 主頁開啟 As Boolean

+ 2
- 2
GA-ERP-SYS/My Project/AssemblyInfo.vb Wyświetl plik

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
31 31
 ' 設為預設,如下所示:
32 32
 ' <Assembly: AssemblyVersion("1.0.*")>
33 33
 
34
-<Assembly: AssemblyVersion("1.0.0.1")>
35
-<Assembly: AssemblyFileVersion("1.0.0.1")>
34
+<Assembly: AssemblyVersion("1.1.0.1")>
35
+<Assembly: AssemblyFileVersion("1.1.0.1")>

BIN
GA-ERP-SYS/bin/Debug/2021061001.exe → GA-ERP-SYS/bin/Debug/2021071201.exe Wyświetl plik


BIN
GA-ERP-SYS/bin/Debug/GA-ERP-SYS.exe Wyświetl plik


BIN
GA-ERP-SYS/bin/Debug/GA-ERP-SYS.pdb Wyświetl plik


BIN
GA-ERP-SYS/bin/Debug/新增資料夾/2021061001.exe Wyświetl plik


BIN
GA-ERP-SYS/obj/Debug/GA-ERP-SYS.exe Wyświetl plik


BIN
GA-ERP-SYS/obj/Debug/GA-ERP-SYS.pdb Wyświetl plik


BIN
GA-ERP-SYS/obj/Debug/GA-ERP-SYS.vbproj.GenerateResource.cache Wyświetl plik


BIN
GA-ERP-SYS/obj/Debug/GA-ERP-SYS.vbprojAssemblyReference.cache Wyświetl plik


+ 204
- 48
GA-ERP-SYS/基本資料管理/基本資料.Designer.vb Wyświetl plik

@@ -34,6 +34,15 @@ Partial Class 基本資料
34 34
         Me.GroupBox3 = New System.Windows.Forms.GroupBox()
35 35
         Me.資料_dgv = New System.Windows.Forms.DataGridView()
36 36
         Me.GroupBox5 = New System.Windows.Forms.GroupBox()
37
+        Me.RadioButton3 = New System.Windows.Forms.RadioButton()
38
+        Me.RadioButton2 = New System.Windows.Forms.RadioButton()
39
+        Me.RadioButton1 = New System.Windows.Forms.RadioButton()
40
+        Me.搜索3_bt = New System.Windows.Forms.Button()
41
+        Me.流水號_tb = New System.Windows.Forms.TextBox()
42
+        Me.清除搜索1_bt = New System.Windows.Forms.Button()
43
+        Me.搜索1_bt = New System.Windows.Forms.Button()
44
+        Me.客戶名稱_tb = New System.Windows.Forms.TextBox()
45
+        Me.Label1 = New System.Windows.Forms.Label()
37 46
         Me.下行1_cb = New System.Windows.Forms.ComboBox()
38 47
         Me.Label29 = New System.Windows.Forms.Label()
39 48
         Me.網址3_tb = New System.Windows.Forms.TextBox()
@@ -47,6 +56,8 @@ Partial Class 基本資料
47 56
         Me.客戶下_dgv = New System.Windows.Forms.DataGridView()
48 57
         Me.Label25 = New System.Windows.Forms.Label()
49 58
         Me.GroupBox7 = New System.Windows.Forms.GroupBox()
59
+        Me.清除搜索2_bt = New System.Windows.Forms.Button()
60
+        Me.搜索2_bt = New System.Windows.Forms.Button()
50 61
         Me.下行_cb = New System.Windows.Forms.ComboBox()
51 62
         Me.上行_cb = New System.Windows.Forms.ComboBox()
52 63
         Me.Label24 = New System.Windows.Forms.Label()
@@ -167,6 +178,15 @@ Partial Class 基本資料
167 178
         '
168 179
         'GroupBox5
169 180
         '
181
+        Me.GroupBox5.Controls.Add(Me.RadioButton3)
182
+        Me.GroupBox5.Controls.Add(Me.RadioButton2)
183
+        Me.GroupBox5.Controls.Add(Me.RadioButton1)
184
+        Me.GroupBox5.Controls.Add(Me.搜索3_bt)
185
+        Me.GroupBox5.Controls.Add(Me.流水號_tb)
186
+        Me.GroupBox5.Controls.Add(Me.清除搜索1_bt)
187
+        Me.GroupBox5.Controls.Add(Me.搜索1_bt)
188
+        Me.GroupBox5.Controls.Add(Me.客戶名稱_tb)
189
+        Me.GroupBox5.Controls.Add(Me.Label1)
170 190
         Me.GroupBox5.Controls.Add(Me.下行1_cb)
171 191
         Me.GroupBox5.Controls.Add(Me.Label29)
172 192
         Me.GroupBox5.Controls.Add(Me.網址3_tb)
@@ -188,11 +208,109 @@ Partial Class 基本資料
188 208
         Me.GroupBox5.TabStop = False
189 209
         Me.GroupBox5.Text = "下行客戶"
190 210
         '
211
+        'RadioButton3
212
+        '
213
+        Me.RadioButton3.AutoSize = True
214
+        Me.RadioButton3.Location = New System.Drawing.Point(263, 97)
215
+        Me.RadioButton3.Name = "RadioButton3"
216
+        Me.RadioButton3.Size = New System.Drawing.Size(158, 20)
217
+        Me.RadioButton3.TabIndex = 1539
218
+        Me.RadioButton3.Text = "查詢沒有客戶名稱的資料"
219
+        Me.RadioButton3.UseVisualStyleBackColor = True
220
+        '
221
+        'RadioButton2
222
+        '
223
+        Me.RadioButton2.AutoSize = True
224
+        Me.RadioButton2.Location = New System.Drawing.Point(111, 97)
225
+        Me.RadioButton2.Name = "RadioButton2"
226
+        Me.RadioButton2.Size = New System.Drawing.Size(146, 20)
227
+        Me.RadioButton2.TabIndex = 1538
228
+        Me.RadioButton2.Text = "查詢有客戶名稱的資料" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10)
229
+        Me.RadioButton2.UseVisualStyleBackColor = True
230
+        '
231
+        'RadioButton1
232
+        '
233
+        Me.RadioButton1.AutoSize = True
234
+        Me.RadioButton1.Checked = True
235
+        Me.RadioButton1.Location = New System.Drawing.Point(7, 97)
236
+        Me.RadioButton1.Name = "RadioButton1"
237
+        Me.RadioButton1.Size = New System.Drawing.Size(98, 20)
238
+        Me.RadioButton1.TabIndex = 1537
239
+        Me.RadioButton1.TabStop = True
240
+        Me.RadioButton1.Text = "全部資料呈現"
241
+        Me.RadioButton1.UseVisualStyleBackColor = True
242
+        '
243
+        '搜索3_bt
244
+        '
245
+        Me.搜索3_bt.BackColor = System.Drawing.SystemColors.ControlLight
246
+        Me.搜索3_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
247
+        Me.搜索3_bt.ForeColor = System.Drawing.Color.Purple
248
+        Me.搜索3_bt.Location = New System.Drawing.Point(146, 69)
249
+        Me.搜索3_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
250
+        Me.搜索3_bt.Name = "搜索3_bt"
251
+        Me.搜索3_bt.Size = New System.Drawing.Size(136, 24)
252
+        Me.搜索3_bt.TabIndex = 1536
253
+        Me.搜索3_bt.Text = "使用網址搜索客商資料"
254
+        Me.搜索3_bt.UseVisualStyleBackColor = False
255
+        '
256
+        '流水號_tb
257
+        '
258
+        Me.流水號_tb.Location = New System.Drawing.Point(92, 273)
259
+        Me.流水號_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
260
+        Me.流水號_tb.Name = "流水號_tb"
261
+        Me.流水號_tb.Size = New System.Drawing.Size(110, 23)
262
+        Me.流水號_tb.TabIndex = 1535
263
+        Me.流水號_tb.Visible = False
264
+        '
265
+        '清除搜索1_bt
266
+        '
267
+        Me.清除搜索1_bt.BackColor = System.Drawing.SystemColors.ControlLight
268
+        Me.清除搜索1_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
269
+        Me.清除搜索1_bt.ForeColor = System.Drawing.Color.Purple
270
+        Me.清除搜索1_bt.Location = New System.Drawing.Point(285, 69)
271
+        Me.清除搜索1_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
272
+        Me.清除搜索1_bt.Name = "清除搜索1_bt"
273
+        Me.清除搜索1_bt.Size = New System.Drawing.Size(69, 24)
274
+        Me.清除搜索1_bt.TabIndex = 1534
275
+        Me.清除搜索1_bt.Text = "清除搜索"
276
+        Me.清除搜索1_bt.UseVisualStyleBackColor = False
277
+        '
278
+        '搜索1_bt
279
+        '
280
+        Me.搜索1_bt.BackColor = System.Drawing.SystemColors.ControlLight
281
+        Me.搜索1_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
282
+        Me.搜索1_bt.ForeColor = System.Drawing.Color.Purple
283
+        Me.搜索1_bt.Location = New System.Drawing.Point(6, 69)
284
+        Me.搜索1_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
285
+        Me.搜索1_bt.Name = "搜索1_bt"
286
+        Me.搜索1_bt.Size = New System.Drawing.Size(136, 24)
287
+        Me.搜索1_bt.TabIndex = 1533
288
+        Me.搜索1_bt.Text = "使用客戶帳號搜索資料"
289
+        Me.搜索1_bt.UseVisualStyleBackColor = False
290
+        '
291
+        '客戶名稱_tb
292
+        '
293
+        Me.客戶名稱_tb.Location = New System.Drawing.Point(266, 42)
294
+        Me.客戶名稱_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
295
+        Me.客戶名稱_tb.Name = "客戶名稱_tb"
296
+        Me.客戶名稱_tb.Size = New System.Drawing.Size(95, 23)
297
+        Me.客戶名稱_tb.TabIndex = 1532
298
+        '
299
+        'Label1
300
+        '
301
+        Me.Label1.AutoSize = True
302
+        Me.Label1.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
303
+        Me.Label1.Location = New System.Drawing.Point(208, 45)
304
+        Me.Label1.Name = "Label1"
305
+        Me.Label1.Size = New System.Drawing.Size(56, 16)
306
+        Me.Label1.TabIndex = 1531
307
+        Me.Label1.Text = "客戶名稱"
308
+        '
191 309
         '下行1_cb
192 310
         '
193 311
         Me.下行1_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
194 312
         Me.下行1_cb.FormattingEnabled = True
195
-        Me.下行1_cb.Location = New System.Drawing.Point(210, 40)
313
+        Me.下行1_cb.Location = New System.Drawing.Point(403, 42)
196 314
         Me.下行1_cb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
197 315
         Me.下行1_cb.Name = "下行1_cb"
198 316
         Me.下行1_cb.Size = New System.Drawing.Size(110, 24)
@@ -202,7 +320,7 @@ Partial Class 基本資料
202 320
         '
203 321
         Me.Label29.AutoSize = True
204 322
         Me.Label29.Font = New System.Drawing.Font("微軟正黑體", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
205
-        Me.Label29.Location = New System.Drawing.Point(176, 43)
323
+        Me.Label29.Location = New System.Drawing.Point(369, 45)
206 324
         Me.Label29.Name = "Label29"
207 325
         Me.Label29.Size = New System.Drawing.Size(34, 17)
208 326
         Me.Label29.TabIndex = 1529
@@ -210,7 +328,7 @@ Partial Class 基本資料
210 328
         '
211 329
         '網址3_tb
212 330
         '
213
-        Me.網址3_tb.Location = New System.Drawing.Point(210, 16)
331
+        Me.網址3_tb.Location = New System.Drawing.Point(242, 17)
214 332
         Me.網址3_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
215 333
         Me.網址3_tb.Name = "網址3_tb"
216 334
         Me.網址3_tb.Size = New System.Drawing.Size(271, 23)
@@ -218,7 +336,7 @@ Partial Class 基本資料
218 336
         '
219 337
         '帳號3_tb
220 338
         '
221
-        Me.帳號3_tb.Location = New System.Drawing.Point(41, 42)
339
+        Me.帳號3_tb.Location = New System.Drawing.Point(68, 17)
222 340
         Me.帳號3_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
223 341
         Me.帳號3_tb.Name = "帳號3_tb"
224 342
         Me.帳號3_tb.Size = New System.Drawing.Size(134, 23)
@@ -228,7 +346,7 @@ Partial Class 基本資料
228 346
         '
229 347
         Me.Label26.AutoSize = True
230 348
         Me.Label26.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
231
-        Me.Label26.Location = New System.Drawing.Point(178, 20)
349
+        Me.Label26.Location = New System.Drawing.Point(208, 20)
232 350
         Me.Label26.Name = "Label26"
233 351
         Me.Label26.Size = New System.Drawing.Size(32, 16)
234 352
         Me.Label26.TabIndex = 1523
@@ -238,7 +356,7 @@ Partial Class 基本資料
238 356
         '
239 357
         Me.客戶下刪除_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
240 358
         Me.客戶下刪除_bt.ForeColor = System.Drawing.Color.Red
241
-        Me.客戶下刪除_bt.Location = New System.Drawing.Point(429, 40)
359
+        Me.客戶下刪除_bt.Location = New System.Drawing.Point(463, 69)
242 360
         Me.客戶下刪除_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
243 361
         Me.客戶下刪除_bt.Name = "客戶下刪除_bt"
244 362
         Me.客戶下刪除_bt.Size = New System.Drawing.Size(52, 24)
@@ -248,7 +366,7 @@ Partial Class 基本資料
248 366
         '
249 367
         '客戶下_tb
250 368
         '
251
-        Me.客戶下_tb.Location = New System.Drawing.Point(41, 17)
369
+        Me.客戶下_tb.Location = New System.Drawing.Point(68, 42)
252 370
         Me.客戶下_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
253 371
         Me.客戶下_tb.Name = "客戶下_tb"
254 372
         Me.客戶下_tb.Size = New System.Drawing.Size(134, 23)
@@ -257,7 +375,7 @@ Partial Class 基本資料
257 375
         '客戶下修正_bt
258 376
         '
259 377
         Me.客戶下修正_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
260
-        Me.客戶下修正_bt.Location = New System.Drawing.Point(376, 40)
378
+        Me.客戶下修正_bt.Location = New System.Drawing.Point(410, 69)
261 379
         Me.客戶下修正_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
262 380
         Me.客戶下修正_bt.Name = "客戶下修正_bt"
263 381
         Me.客戶下修正_bt.Size = New System.Drawing.Size(52, 24)
@@ -269,18 +387,18 @@ Partial Class 基本資料
269 387
         '
270 388
         Me.Label6.AutoSize = True
271 389
         Me.Label6.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
272
-        Me.Label6.Location = New System.Drawing.Point(6, 24)
390
+        Me.Label6.Location = New System.Drawing.Point(10, 45)
273 391
         Me.Label6.Name = "Label6"
274
-        Me.Label6.Size = New System.Drawing.Size(32, 16)
392
+        Me.Label6.Size = New System.Drawing.Size(56, 16)
275 393
         Me.Label6.TabIndex = 1
276
-        Me.Label6.Text = "客戶"
394
+        Me.Label6.Text = "客戶帳號"
277 395
         '
278 396
         '客戶下新增_bt
279 397
         '
280 398
         Me.客戶下新增_bt.BackColor = System.Drawing.SystemColors.ControlLight
281 399
         Me.客戶下新增_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
282 400
         Me.客戶下新增_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
283
-        Me.客戶下新增_bt.Location = New System.Drawing.Point(323, 40)
401
+        Me.客戶下新增_bt.Location = New System.Drawing.Point(357, 69)
284 402
         Me.客戶下新增_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
285 403
         Me.客戶下新增_bt.Name = "客戶下新增_bt"
286 404
         Me.客戶下新增_bt.Size = New System.Drawing.Size(52, 24)
@@ -296,26 +414,28 @@ Partial Class 基本資料
296 414
             Or System.Windows.Forms.AnchorStyles.Left) _
297 415
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
298 416
         Me.客戶下_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
299
-        Me.客戶下_dgv.Location = New System.Drawing.Point(7, 67)
417
+        Me.客戶下_dgv.Location = New System.Drawing.Point(7, 122)
300 418
         Me.客戶下_dgv.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
301 419
         Me.客戶下_dgv.Name = "客戶下_dgv"
302 420
         Me.客戶下_dgv.RowHeadersWidth = 4
303 421
         Me.客戶下_dgv.RowTemplate.Height = 24
304
-        Me.客戶下_dgv.Size = New System.Drawing.Size(527, 885)
422
+        Me.客戶下_dgv.Size = New System.Drawing.Size(527, 830)
305 423
         Me.客戶下_dgv.TabIndex = 0
306 424
         '
307 425
         'Label25
308 426
         '
309 427
         Me.Label25.AutoSize = True
310 428
         Me.Label25.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
311
-        Me.Label25.Location = New System.Drawing.Point(5, 46)
429
+        Me.Label25.Location = New System.Drawing.Point(9, 20)
312 430
         Me.Label25.Name = "Label25"
313
-        Me.Label25.Size = New System.Drawing.Size(32, 16)
431
+        Me.Label25.Size = New System.Drawing.Size(56, 16)
314 432
         Me.Label25.TabIndex = 1522
315
-        Me.Label25.Text = "帳號"
433
+        Me.Label25.Text = "老闆帳號"
316 434
         '
317 435
         'GroupBox7
318 436
         '
437
+        Me.GroupBox7.Controls.Add(Me.清除搜索2_bt)
438
+        Me.GroupBox7.Controls.Add(Me.搜索2_bt)
319 439
         Me.GroupBox7.Controls.Add(Me.下行_cb)
320 440
         Me.GroupBox7.Controls.Add(Me.上行_cb)
321 441
         Me.GroupBox7.Controls.Add(Me.Label24)
@@ -347,11 +467,37 @@ Partial Class 基本資料
347 467
         Me.GroupBox7.TabStop = False
348 468
         Me.GroupBox7.Text = "商客基本資料表"
349 469
         '
470
+        '清除搜索2_bt
471
+        '
472
+        Me.清除搜索2_bt.BackColor = System.Drawing.SystemColors.ControlLight
473
+        Me.清除搜索2_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
474
+        Me.清除搜索2_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
475
+        Me.清除搜索2_bt.Location = New System.Drawing.Point(145, 69)
476
+        Me.清除搜索2_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
477
+        Me.清除搜索2_bt.Name = "清除搜索2_bt"
478
+        Me.清除搜索2_bt.Size = New System.Drawing.Size(69, 24)
479
+        Me.清除搜索2_bt.TabIndex = 1536
480
+        Me.清除搜索2_bt.Text = "清除搜索"
481
+        Me.清除搜索2_bt.UseVisualStyleBackColor = False
482
+        '
483
+        '搜索2_bt
484
+        '
485
+        Me.搜索2_bt.BackColor = System.Drawing.SystemColors.ControlLight
486
+        Me.搜索2_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
487
+        Me.搜索2_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
488
+        Me.搜索2_bt.Location = New System.Drawing.Point(7, 69)
489
+        Me.搜索2_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
490
+        Me.搜索2_bt.Name = "搜索2_bt"
491
+        Me.搜索2_bt.Size = New System.Drawing.Size(136, 24)
492
+        Me.搜索2_bt.TabIndex = 1535
493
+        Me.搜索2_bt.Text = "使用網址搜索資料"
494
+        Me.搜索2_bt.UseVisualStyleBackColor = False
495
+        '
350 496
         '下行_cb
351 497
         '
352 498
         Me.下行_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
353 499
         Me.下行_cb.FormattingEnabled = True
354
-        Me.下行_cb.Location = New System.Drawing.Point(476, 41)
500
+        Me.下行_cb.Location = New System.Drawing.Point(630, 43)
355 501
         Me.下行_cb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
356 502
         Me.下行_cb.Name = "下行_cb"
357 503
         Me.下行_cb.Size = New System.Drawing.Size(110, 24)
@@ -361,7 +507,7 @@ Partial Class 基本資料
361 507
         '
362 508
         Me.上行_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
363 509
         Me.上行_cb.FormattingEnabled = True
364
-        Me.上行_cb.Location = New System.Drawing.Point(476, 14)
510
+        Me.上行_cb.Location = New System.Drawing.Point(630, 16)
365 511
         Me.上行_cb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
366 512
         Me.上行_cb.Name = "上行_cb"
367 513
         Me.上行_cb.Size = New System.Drawing.Size(110, 24)
@@ -371,7 +517,7 @@ Partial Class 基本資料
371 517
         '
372 518
         Me.Label24.AutoSize = True
373 519
         Me.Label24.Font = New System.Drawing.Font("微軟正黑體", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
374
-        Me.Label24.Location = New System.Drawing.Point(418, 18)
520
+        Me.Label24.Location = New System.Drawing.Point(569, 20)
375 521
         Me.Label24.Name = "Label24"
376 522
         Me.Label24.Size = New System.Drawing.Size(60, 17)
377 523
         Me.Label24.TabIndex = 1524
@@ -381,7 +527,7 @@ Partial Class 基本資料
381 527
         '
382 528
         Me.Label22.AutoSize = True
383 529
         Me.Label22.Font = New System.Drawing.Font("微軟正黑體", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
384
-        Me.Label22.Location = New System.Drawing.Point(418, 43)
530
+        Me.Label22.Location = New System.Drawing.Point(569, 45)
385 531
         Me.Label22.Name = "Label22"
386 532
         Me.Label22.Size = New System.Drawing.Size(60, 17)
387 533
         Me.Label22.TabIndex = 1523
@@ -392,36 +538,36 @@ Partial Class 基本資料
392 538
         Me.網址1_tb.Location = New System.Drawing.Point(47, 273)
393 539
         Me.網址1_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
394 540
         Me.網址1_tb.Name = "網址1_tb"
395
-        Me.網址1_tb.Size = New System.Drawing.Size(47, 23)
541
+        Me.網址1_tb.Size = New System.Drawing.Size(110, 23)
396 542
         Me.網址1_tb.TabIndex = 1522
397 543
         Me.網址1_tb.Visible = False
398 544
         '
399 545
         '帳號1_tb
400 546
         '
401
-        Me.帳號1_tb.Location = New System.Drawing.Point(47, 311)
547
+        Me.帳號1_tb.Location = New System.Drawing.Point(47, 304)
402 548
         Me.帳號1_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
403 549
         Me.帳號1_tb.Name = "帳號1_tb"
404
-        Me.帳號1_tb.Size = New System.Drawing.Size(47, 23)
550
+        Me.帳號1_tb.Size = New System.Drawing.Size(110, 23)
405 551
         Me.帳號1_tb.TabIndex = 1521
406 552
         Me.帳號1_tb.Visible = False
407 553
         '
408 554
         '商客刪除_bt
409 555
         '
410 556
         Me.商客刪除_bt.ForeColor = System.Drawing.Color.Red
411
-        Me.商客刪除_bt.Location = New System.Drawing.Point(927, 12)
557
+        Me.商客刪除_bt.Location = New System.Drawing.Point(1021, 16)
412 558
         Me.商客刪除_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
413 559
         Me.商客刪除_bt.Name = "商客刪除_bt"
414
-        Me.商客刪除_bt.Size = New System.Drawing.Size(153, 25)
560
+        Me.商客刪除_bt.Size = New System.Drawing.Size(100, 77)
415 561
         Me.商客刪除_bt.TabIndex = 1511
416 562
         Me.商客刪除_bt.Text = "刪除"
417 563
         Me.商客刪除_bt.UseVisualStyleBackColor = True
418 564
         '
419 565
         '商客修正_bt
420 566
         '
421
-        Me.商客修正_bt.Location = New System.Drawing.Point(927, 40)
567
+        Me.商客修正_bt.Location = New System.Drawing.Point(918, 16)
422 568
         Me.商客修正_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
423 569
         Me.商客修正_bt.Name = "商客修正_bt"
424
-        Me.商客修正_bt.Size = New System.Drawing.Size(153, 25)
570
+        Me.商客修正_bt.Size = New System.Drawing.Size(100, 77)
425 571
         Me.商客修正_bt.TabIndex = 1510
426 572
         Me.商客修正_bt.Text = "修正"
427 573
         Me.商客修正_bt.UseVisualStyleBackColor = True
@@ -429,26 +575,26 @@ Partial Class 基本資料
429 575
         '商客新增_bt
430 576
         '
431 577
         Me.商客新增_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
432
-        Me.商客新增_bt.Location = New System.Drawing.Point(768, 41)
578
+        Me.商客新增_bt.Location = New System.Drawing.Point(815, 16)
433 579
         Me.商客新增_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
434 580
         Me.商客新增_bt.Name = "商客新增_bt"
435
-        Me.商客新增_bt.Size = New System.Drawing.Size(153, 25)
581
+        Me.商客新增_bt.Size = New System.Drawing.Size(100, 77)
436 582
         Me.商客新增_bt.TabIndex = 1509
437 583
         Me.商客新增_bt.Text = "新增"
438 584
         Me.商客新增_bt.UseVisualStyleBackColor = True
439 585
         '
440 586
         '網址_tb
441 587
         '
442
-        Me.網址_tb.Location = New System.Drawing.Point(48, 43)
588
+        Me.網址_tb.Location = New System.Drawing.Point(42, 18)
443 589
         Me.網址_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
444 590
         Me.網址_tb.Name = "網址_tb"
445
-        Me.網址_tb.Size = New System.Drawing.Size(366, 23)
591
+        Me.網址_tb.Size = New System.Drawing.Size(242, 23)
446 592
         Me.網址_tb.TabIndex = 1520
447 593
         '
448 594
         'Label9
449 595
         '
450 596
         Me.Label9.AutoSize = True
451
-        Me.Label9.Location = New System.Drawing.Point(211, 22)
597
+        Me.Label9.Location = New System.Drawing.Point(213, 47)
452 598
         Me.Label9.Name = "Label9"
453 599
         Me.Label9.Size = New System.Drawing.Size(32, 16)
454 600
         Me.Label9.TabIndex = 1514
@@ -458,7 +604,7 @@ Partial Class 基本資料
458 604
         '
459 605
         Me.資料_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
460 606
         Me.資料_cb.FormattingEnabled = True
461
-        Me.資料_cb.Location = New System.Drawing.Point(252, 16)
607
+        Me.資料_cb.Location = New System.Drawing.Point(247, 43)
462 608
         Me.資料_cb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
463 609
         Me.資料_cb.Name = "資料_cb"
464 610
         Me.資料_cb.Size = New System.Drawing.Size(160, 24)
@@ -467,7 +613,7 @@ Partial Class 基本資料
467 613
         'Label11
468 614
         '
469 615
         Me.Label11.AutoSize = True
470
-        Me.Label11.Location = New System.Drawing.Point(768, 18)
616
+        Me.Label11.Location = New System.Drawing.Point(413, 46)
471 617
         Me.Label11.Name = "Label11"
472 618
         Me.Label11.Size = New System.Drawing.Size(32, 16)
473 619
         Me.Label11.TabIndex = 1517
@@ -475,7 +621,7 @@ Partial Class 基本資料
475 621
         '
476 622
         '密碼_tb
477 623
         '
478
-        Me.密碼_tb.Location = New System.Drawing.Point(803, 14)
624
+        Me.密碼_tb.Location = New System.Drawing.Point(448, 43)
479 625
         Me.密碼_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
480 626
         Me.密碼_tb.Name = "密碼_tb"
481 627
         Me.密碼_tb.Size = New System.Drawing.Size(115, 23)
@@ -485,7 +631,7 @@ Partial Class 基本資料
485 631
         '
486 632
         Me.Label12.AutoSize = True
487 633
         Me.Label12.Font = New System.Drawing.Font("微軟正黑體", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
488
-        Me.Label12.Location = New System.Drawing.Point(589, 45)
634
+        Me.Label12.Location = New System.Drawing.Point(290, 21)
489 635
         Me.Label12.Name = "Label12"
490 636
         Me.Label12.Size = New System.Drawing.Size(47, 17)
491 637
         Me.Label12.TabIndex = 1518
@@ -495,7 +641,7 @@ Partial Class 基本資料
495 641
         '
496 642
         Me.Label10.AutoSize = True
497 643
         Me.Label10.Font = New System.Drawing.Font("微軟正黑體", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
498
-        Me.Label10.Location = New System.Drawing.Point(593, 17)
644
+        Me.Label10.Location = New System.Drawing.Point(413, 21)
499 645
         Me.Label10.Name = "Label10"
500 646
         Me.Label10.Size = New System.Drawing.Size(34, 17)
501 647
         Me.Label10.TabIndex = 1516
@@ -503,16 +649,16 @@ Partial Class 基本資料
503 649
         '
504 650
         '上繳源_tb
505 651
         '
506
-        Me.上繳源_tb.Location = New System.Drawing.Point(637, 42)
652
+        Me.上繳源_tb.Location = New System.Drawing.Point(338, 18)
507 653
         Me.上繳源_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
508 654
         Me.上繳源_tb.Name = "上繳源_tb"
509
-        Me.上繳源_tb.Size = New System.Drawing.Size(125, 23)
655
+        Me.上繳源_tb.Size = New System.Drawing.Size(69, 23)
510 656
         Me.上繳源_tb.TabIndex = 1517
511 657
         '
512 658
         'Label8
513 659
         '
514 660
         Me.Label8.AutoSize = True
515
-        Me.Label8.Location = New System.Drawing.Point(6, 22)
661
+        Me.Label8.Location = New System.Drawing.Point(8, 49)
516 662
         Me.Label8.Name = "Label8"
517 663
         Me.Label8.Size = New System.Drawing.Size(32, 16)
518 664
         Me.Label8.TabIndex = 1512
@@ -520,9 +666,8 @@ Partial Class 基本資料
520 666
         '
521 667
         '商品_cb
522 668
         '
523
-        Me.商品_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
524 669
         Me.商品_cb.FormattingEnabled = True
525
-        Me.商品_cb.Location = New System.Drawing.Point(47, 16)
670
+        Me.商品_cb.Location = New System.Drawing.Point(42, 43)
526 671
         Me.商品_cb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
527 672
         Me.商品_cb.Name = "商品_cb"
528 673
         Me.商品_cb.Size = New System.Drawing.Size(160, 24)
@@ -536,26 +681,26 @@ Partial Class 基本資料
536 681
             Or System.Windows.Forms.AnchorStyles.Left) _
537 682
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
538 683
         Me.商客_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
539
-        Me.商客_dgv.Location = New System.Drawing.Point(6, 69)
684
+        Me.商客_dgv.Location = New System.Drawing.Point(6, 96)
540 685
         Me.商客_dgv.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
541 686
         Me.商客_dgv.Name = "商客_dgv"
542 687
         Me.商客_dgv.RowHeadersWidth = 4
543 688
         Me.商客_dgv.RowTemplate.Height = 24
544
-        Me.商客_dgv.Size = New System.Drawing.Size(1115, 882)
689
+        Me.商客_dgv.Size = New System.Drawing.Size(1115, 855)
545 690
         Me.商客_dgv.TabIndex = 0
546 691
         '
547 692
         '帳號_tb
548 693
         '
549
-        Me.帳號_tb.Location = New System.Drawing.Point(637, 14)
694
+        Me.帳號_tb.Location = New System.Drawing.Point(448, 18)
550 695
         Me.帳號_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
551 696
         Me.帳號_tb.Name = "帳號_tb"
552
-        Me.帳號_tb.Size = New System.Drawing.Size(125, 23)
697
+        Me.帳號_tb.Size = New System.Drawing.Size(115, 23)
553 698
         Me.帳號_tb.TabIndex = 1515
554 699
         '
555 700
         'Label13
556 701
         '
557 702
         Me.Label13.AutoSize = True
558
-        Me.Label13.Location = New System.Drawing.Point(7, 47)
703
+        Me.Label13.Location = New System.Drawing.Point(8, 22)
559 704
         Me.Label13.Name = "Label13"
560 705
         Me.Label13.Size = New System.Drawing.Size(32, 16)
561 706
         Me.Label13.TabIndex = 1519
@@ -632,4 +777,15 @@ Partial Class 基本資料
632 777
     Friend WithEvents Label25 As Label
633 778
     Friend WithEvents 下行1_cb As ComboBox
634 779
     Friend WithEvents Label29 As Label
780
+    Friend WithEvents 客戶名稱_tb As TextBox
781
+    Friend WithEvents Label1 As Label
782
+    Friend WithEvents 搜索1_bt As Button
783
+    Friend WithEvents 清除搜索1_bt As Button
784
+    Friend WithEvents 清除搜索2_bt As Button
785
+    Friend WithEvents 搜索2_bt As Button
786
+    Friend WithEvents 流水號_tb As TextBox
787
+    Friend WithEvents 搜索3_bt As Button
788
+    Friend WithEvents RadioButton3 As RadioButton
789
+    Friend WithEvents RadioButton2 As RadioButton
790
+    Friend WithEvents RadioButton1 As RadioButton
635 791
 End Class

+ 83
- 25
GA-ERP-SYS/基本資料管理/基本資料.vb Wyświetl plik

@@ -1,5 +1,5 @@
1 1
 Public Class 基本資料
2
-    ReadOnly ds, ds1, ds2, ds4, ds6 As New DataSet
2
+    ReadOnly ds, ds1, ds2, ds4, ds6 As New DataSet : Dim GP As Integer = 0 : Dim GPP As String
3 3
     Private Sub Set_商品清單()
4 4
         商品_dgv.DataSource = Nothing : ds.Clear() : 商品_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
5 5
         商品_dgv.ColumnHeadersHeight = 25
@@ -36,16 +36,16 @@
36 36
         客戶下_dgv.AllowUserToAddRows = False
37 37
         SQL_基本資料_客戶下資料表()
38 38
         da.Fill(ds4) : 客戶下_dgv.DataSource = ds4.Tables(0) : conn.Close()
39
-        客戶下_dgv.Columns(0).FillWeight = 80 : 客戶下_dgv.Columns(1).FillWeight = 200 : 客戶下_dgv.Columns(2).FillWeight = 80 : 客戶下_dgv.Columns(3).FillWeight = 80
40
-        客戶下_dgv.Columns(4).FillWeight = 80 : 客戶下_dgv.Columns(5).Visible = False
41 39
         客戶下_dgv.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill
40
+        客戶下_dgv.Columns(0).FillWeight = 80 : 客戶下_dgv.Columns(1).FillWeight = 200 : 客戶下_dgv.Columns(2).FillWeight = 80 : 客戶下_dgv.Columns(3).FillWeight = 80
41
+        客戶下_dgv.Columns(4).FillWeight = 80 : 客戶下_dgv.Columns(5).Visible = False : 客戶下_dgv.Columns(6).FillWeight = 80
42 42
     End Sub
43 43
     Private Sub Set_商客清單()
44 44
         商客_dgv.DataSource = Nothing : ds6.Clear()
45 45
         商客_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
46 46
         商客_dgv.ColumnHeadersHeight = 25
47 47
         商客_dgv.AllowUserToAddRows = False
48
-        SQL_商客資料表()
48
+        SQL_商客資料表2()
49 49
         da.Fill(ds6) : 商客_dgv.DataSource = ds6.Tables(0) : conn.Close()
50 50
         商客_dgv.Columns(0).FillWeight = 140
51 51
         商客_dgv.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill
@@ -58,7 +58,7 @@
58 58
     End Sub
59 59
     Private Sub 基本資料_Load(sender As Object, e As EventArgs) Handles MyBase.Load
60 60
         Me.MdiParent = GA_ERP_SYS : Me.WindowState = 2 : Me.AutoScroll = True
61
-        Set_商品清單() : Set_基數清單() : Set_資料清單() : Set_客戶下清單() : Set_商客清單()
61
+
62 62
         SQL_下拉商品清單讀取()
63 63
         商品_cb.Items.Clear() : While (dr.Read()) : 商品_cb.Items.Add(dr("商品")) : End While : conn.Close()
64 64
         '-------------------------------------------------------------------------------------------------------
@@ -70,6 +70,8 @@
70 70
         '-------------------------------------------------------------------------------------------------------
71 71
         SQL_上行清單讀取()
72 72
         下行_cb.Items.Clear() : 下行1_cb.Items.Clear() : While (dr.Read()) : 下行_cb.Items.Add(dr("基數")) : 下行1_cb.Items.Add(dr("基數")) : End While : conn.Close()
73
+
74
+        PA = "" : PA1 = "" : PA9 = "" : Set_商品清單() : Set_基數清單() : Set_資料清單() : Set_客戶下清單() : Set_商客清單()
73 75
     End Sub
74 76
     Private Sub 商客_dgv_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles 商客_dgv.RowPostPaint
75 77
         Dim linePen As New Pen(Color.Blue, 2)
@@ -99,49 +101,84 @@
99 101
             End If
100 102
         End If
101 103
     End Sub
104
+    Private Sub 資料_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 資料_cb.SelectedIndexChanged
105
+        If Strings.Left(資料_cb.Text, 2) = "長板" Then
106
+            上行_cb.Text = "上缴金额"
107
+            If Strings.Mid(資料_cb.Text, 3, 7) = "(總監)" Then : 下行_cb.Text = "總監"
108
+            ElseIf Strings.Mid(資料_cb.Text, 3, 7) = "(大股東)" Then : 下行_cb.Text = "大股東"
109
+            ElseIf Strings.Mid(資料_cb.Text, 3, 7) = "(股東)" Then : 下行_cb.Text = "股東"
110
+            ElseIf Strings.Mid(資料_cb.Text, 3, 7) = "(總代理)" Then : 下行_cb.Text = "總代理"
111
+            ElseIf Strings.Mid(資料_cb.Text, 3, 7) = "(代理)" Then : 下行_cb.Text = "代理"
112
+            ElseIf Strings.Mid(資料_cb.Text, 3, 7) = "(會員)" Then : 下行_cb.Text = "會員"
113
+            End If
114
+        Else
115
+            If Strings.Mid(資料_cb.Text, 3, 7) = "(總監)" Then : 上行_cb.Text = "總監" : 下行_cb.Text = "大股東"
116
+            ElseIf Strings.Mid(資料_cb.Text, 3, 7) = "(大股東)" Then : 上行_cb.Text = "大股東" : 下行_cb.Text = "股東"
117
+            ElseIf Strings.Mid(資料_cb.Text, 3, 7) = "(股東)" Then : 上行_cb.Text = "股東" : 下行_cb.Text = "總代理"
118
+            ElseIf Strings.Mid(資料_cb.Text, 3, 7) = "(總代理)" Then : 上行_cb.Text = "總代理" : 下行_cb.Text = "代理"
119
+            ElseIf Strings.Mid(資料_cb.Text, 3, 7) = "(代理)" Then : 上行_cb.Text = "代理" : 下行_cb.Text = "會員"
120
+            ElseIf Strings.Mid(資料_cb.Text, 3, 7) = "(會員)" Then : 上行_cb.Text = "會員" : 下行_cb.Text = "會員"
121
+            End If
122
+        End If
123
+    End Sub
102 124
     '----------------------------------------------下行客戶----------------------------------------------------------------
103 125
     Private Sub 客戶下新增_bt_Click(sender As Object, e As EventArgs) Handles 客戶下新增_bt.Click
104 126
         If 客戶下_tb.Text = "" Or 網址3_tb.Text = "" Or 帳號3_tb.Text = "" Or 下行1_cb.Text = "" Then
105 127
             MsgBox("資料沒有完整,請重新檢查")
106 128
         Else
107
-            連結() : SQL_系統編碼規則_客戶下重複查詢() : CmdSet_For_dr()
129
+            SQL_系統編碼規則_客戶下重複查詢()
108 130
             If dr.Read() Then
109 131
                 MsgBox("資料重複,請從新輸入或檢查") : conn.Close() : dr.Close()
110 132
             Else
111
-                重開() : SQL_系統編碼規則_客戶下新增() : CmdSet_For_dr() : MsgBox("新增完成") : conn.Close() : dr.Close()
133
+                SQL_下行客戶流水號最後一筆()
134
+                If dr.Read() Then : GP = Double.Parse(Strings.Right(dr("流水號").ToString, 6)) : Else : GP = 0 : End If : conn.Close()
135
+                '----------------------自动生成流水号-------------------------------------------------------------------------
136
+                If GP < 10 Then : GPP = "GA" & "00000" & GP
137
+                ElseIf GP > 9 And GP < 100 Then : GPP = "GA" & "0000" & GP
138
+                ElseIf GP > 99 And GP < 1000 Then : GPP = "GA" & "000" & GP
139
+                ElseIf GP > 999 And GP < 10000 Then : GPP = "GA" & "00" & GP
140
+                ElseIf GP > 9999 And GP < 100000 Then : GPP = "GA" & "0" & GP
141
+                ElseIf GP > 999999 Then : GPP = "GA" & GP : End If : PA10 = GPP
142
+
143
+                SQL_系統編碼規則_客戶下新增() : MsgBox("新增完成") : conn.Close() : dr.Close()
112 144
             End If
113
-        End If : Set_客戶下清單()
145
+        End If : PA = "" : Set_客戶下清單()
114 146
     End Sub
115 147
     Private Sub 客戶下修正_bt_Click(sender As Object, e As EventArgs) Handles 客戶下修正_bt.Click
116 148
         If 客戶下_tb.Text = "" Or 網址3_tb.Text = "" Or 帳號3_tb.Text = "" Or 下行1_cb.Text = "" Then
117 149
             MsgBox("資料有缺或有誤,請重新檢查")
118 150
         Else
119
-            PA = InputBox("請輸入要修改的客戶名稱", "", 客戶下_tb.Text)
120
-            PA1 = InputBox("請輸入要修改的網址", "", 網址3_tb.Text)
121
-            PA2 = InputBox("請輸入要修改的帳號", "", 帳號3_tb.Text)
122
-            PA3 = InputBox("請輸入要修改的基數", "", 下行1_cb.Text)
151
+            PA = 客戶下_tb.Text : PA1 = 網址3_tb.Text : PA2 = 帳號3_tb.Text : PA3 = 下行1_cb.Text : PA4 = 客戶名稱_tb.Text
123 152
             If PA = "" Or PA1 = "" Or PA2 = "" Or PA3 = "" Then
124 153
                 MsgBox("不能空白")
125 154
             Else
126 155
                 連結() : SQL_系統編碼規則_客戶下修改() : CmdSet_For_dr() : MsgBox("修改完成") : conn.Close() : dr.Close()
127 156
             End If
128
-        End If : Set_客戶下清單()
157
+        End If : PA = "" : Set_客戶下清單()
129 158
     End Sub
130 159
     Private Sub 客戶下刪除_bt_Click(sender As Object, e As EventArgs) Handles 客戶下刪除_bt.Click
131 160
         Dim aa As MsgBoxResult = MsgBox("確定要刪除該筆資料?", MsgBoxStyle.OkCancel)
132 161
         If aa = MsgBoxResult.Ok Then
133
-            ConnOpen_子SQL() : SQL_系統編碼規則_客戶下刪除() : CmdSet_For_dr() : MsgBox("刪除完成")
134
-        End If
135
-        conn.Close() : Set_客戶下清單()
162
+            SQL_系統編碼規則_客戶下刪除() : MsgBox("刪除完成")
163
+        End If : conn.Close() : PA = "" : Set_客戶下清單()
136 164
     End Sub
137 165
     Private Sub 客戶下_dgv_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles 客戶下_dgv.CellClick
138 166
         If e.RowIndex = -1 Then : Else
167
+            SQL_上行清單讀取() : 下行1_cb.Items.Clear() : While (dr.Read()) : 下行1_cb.Items.Add(dr("基數")) : End While : conn.Close()
168
+            流水號_tb.Text = 客戶下_dgv("流水號", e.RowIndex).Value.ToString
139 169
             客戶下_tb.Text = 客戶下_dgv("客戶帳號", e.RowIndex).Value.ToString
140 170
             網址3_tb.Text = 客戶下_dgv("網址", e.RowIndex).Value.ToString
141 171
             帳號3_tb.Text = 客戶下_dgv("老闆帳號", e.RowIndex).Value.ToString
142
-            下行1_cb.Text = 客戶下_dgv("客戶名稱", e.RowIndex).Value.ToString
172
+            下行1_cb.Text = 客戶下_dgv("基數", e.RowIndex).Value.ToString
173
+            客戶名稱_tb.Text = 客戶下_dgv("客戶名稱", e.RowIndex).Value.ToString
143 174
         End If
144 175
     End Sub
176
+    Private Sub 搜索1_bt_Click(sender As Object, e As EventArgs) Handles 搜索1_bt.Click
177
+        PA = 客戶下_tb.Text : Set_客戶下清單()
178
+    End Sub
179
+    Private Sub 清除搜索_bt_Click(sender As Object, e As EventArgs) Handles 清除搜索1_bt.Click
180
+        PA = "" : Set_客戶下清單()
181
+    End Sub
145 182
     '-----------------------------------商客基本資料表-----------------------------------------
146 183
     Private Sub 商客_dgv_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles 商客_dgv.CellClick
147 184
         If e.RowIndex = -1 Then : Else
@@ -160,26 +197,47 @@
160 197
             If dr.Read() Then
161 198
                 MsgBox("資料重複,請從新輸入或檢查") : conn.Close() : dr.Close()
162 199
             Else
200
+                PA9 = 商品_cb.Text
201
+                SQL_商品確認()
202
+                If dr.Read() Then : conn.Close()
203
+                Else : SQL_商品寫入() : Set_商品清單() : conn.Close() : End If
163 204
                 重開() : SQL_系統編碼規則_商客新增() : CmdSet_For_dr() : MsgBox("新增完成") : conn.Close() : dr.Close()
164 205
             End If
165 206
         End If : Set_商客清單()
166 207
     End Sub
167 208
     Private Sub 商客刪除_bt_Click(sender As Object, e As EventArgs) Handles 商客刪除_bt.Click
168
-        SQL_系統編碼規則_商客刪除()
169
-        ConnOpen_子SQL()
170
-        Dim aa As MsgBoxResult
171
-        aa = MsgBox("確定要刪除該筆資料?", MsgBoxStyle.OkCancel)
209
+        Dim aa As MsgBoxResult = MsgBox("確定要刪除該筆資料?", MsgBoxStyle.OkCancel)
172 210
         If aa = MsgBoxResult.Ok Then
173
-            CmdSet_For_dr() : MsgBox("刪除完成")
174
-        End If
175
-        conn.Close() : Set_商客清單()
211
+            SQL_系統編碼規則_商客刪除() : MsgBox("刪除完成") : conn.Close()
212
+        End If : PA1 = "" : Set_商客清單()
176 213
     End Sub
177 214
     Private Sub 商客修正_bt_Click(sender As Object, e As EventArgs) Handles 商客修正_bt.Click
178 215
         If 網址_tb.Text = "" Or 上繳源_tb.Text = "" Or 帳號_tb.Text = "" Or 密碼_tb.Text = "" Or 上行_cb.Text = "" Or 下行_cb.Text = "" Then
179 216
             MsgBox("資料有缺或有誤,請重新檢查")
180 217
         Else
181 218
             PA2 = 網址_tb.Text : PA3 = 上繳源_tb.Text : PA4 = 帳號_tb.Text : PA5 = 密碼_tb.Text : PA6 = 上行_cb.Text : PA7 = 下行_cb.Text : PA8 = 資料_cb.Text : PA9 = 商品_cb.Text
219
+            SQL_商品確認()
220
+            If dr.Read() Then : conn.Close()
221
+            Else : SQL_商品寫入() : Set_商品清單() : conn.Close() : End If
182 222
             連結() : SQL_系統編碼規則_商客修改() : CmdSet_For_dr() : MsgBox("修改完成") : conn.Close() : dr.Close()
183
-        End If : Set_商客清單()
223
+        End If : PA1 = "" : Set_商客清單()
224
+    End Sub
225
+    Private Sub 搜索2_bt_Click(sender As Object, e As EventArgs) Handles 搜索2_bt.Click
226
+        PA1 = 網址_tb.Text : Set_商客清單()
227
+    End Sub
228
+    Private Sub 搜索3_bt_Click(sender As Object, e As EventArgs) Handles 搜索3_bt.Click
229
+        PA1 = 網址3_tb.Text : Set_商客清單()
230
+    End Sub
231
+    Private Sub 清除搜索2_bt_Click(sender As Object, e As EventArgs) Handles 清除搜索2_bt.Click
232
+        PA1 = "" : Set_商客清單()
233
+    End Sub
234
+    Private Sub RadioButton1_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton1.Click
235
+        PA9 = "" : Set_客戶下清單()
236
+    End Sub
237
+    Private Sub RadioButton2_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton2.Click
238
+        PA9 = "AND (客名 NOT LIKE N'')" : Set_客戶下清單()
239
+    End Sub
240
+    Private Sub RadioButton3_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton3.Click
241
+        PA9 = "AND (客名 LIKE N'' OR 客名 IS NULL)" : Set_客戶下清單()
184 242
     End Sub
185 243
 End Class

+ 306
- 105
GA-ERP-SYS/報表系統管理/流水帳查詢.Designer.vb Wyświetl plik

@@ -23,15 +23,18 @@ Partial Class 流水帳查詢
23 23
     <System.Diagnostics.DebuggerStepThrough()>
24 24
     Private Sub InitializeComponent()
25 25
         Me.components = New System.ComponentModel.Container()
26
-        Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
27
-        Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
28
-        Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
29
-        Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
30
-        Dim DataGridViewCellStyle5 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
31
-        Dim DataGridViewCellStyle6 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
32
-        Dim DataGridViewCellStyle7 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
33
-        Dim DataGridViewCellStyle8 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
34
-        Dim DataGridViewCellStyle9 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
26
+        Dim DataGridViewCellStyle13 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
27
+        Dim DataGridViewCellStyle14 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
28
+        Dim DataGridViewCellStyle15 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
29
+        Dim DataGridViewCellStyle16 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
30
+        Dim DataGridViewCellStyle17 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
31
+        Dim DataGridViewCellStyle18 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
32
+        Dim DataGridViewCellStyle19 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
33
+        Dim DataGridViewCellStyle20 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
34
+        Dim DataGridViewCellStyle21 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
35
+        Dim DataGridViewCellStyle22 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
36
+        Dim DataGridViewCellStyle23 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
37
+        Dim DataGridViewCellStyle24 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
35 38
         Me.流水帳_dgv = New System.Windows.Forms.DataGridView()
36 39
         Me.Label9 = New System.Windows.Forms.Label()
37 40
         Me.資料_cb = New System.Windows.Forms.ComboBox()
@@ -88,13 +91,26 @@ Partial Class 流水帳查詢
88 91
         Me.使用網址_ch = New System.Windows.Forms.CheckBox()
89 92
         Me.重新導入_bt = New System.Windows.Forms.Button()
90 93
         Me.LOG檔_bt = New System.Windows.Forms.Button()
91
-        Me.LOG檔_GUP = New System.Windows.Forms.GroupBox()
94
+        Me.L50 = New System.Windows.Forms.GroupBox()
92 95
         Me.列印_bt = New System.Windows.Forms.Button()
93
-        Me.流水帳1_dgv = New System.Windows.Forms.DataGridView()
94
-        Me.明細合併_bt = New System.Windows.Forms.Button()
95 96
         Me.客戶資料_bt = New System.Windows.Forms.Button()
96 97
         Me.RadioButton3 = New System.Windows.Forms.RadioButton()
97
-        Me.RadioButton4 = New System.Windows.Forms.RadioButton()
98
+        Me.彙總3_dgv = New System.Windows.Forms.DataGridView()
99
+        Me.彙總4_dgv = New System.Windows.Forms.DataGridView()
100
+        Me.老闆_tb = New System.Windows.Forms.TextBox()
101
+        Me.L1 = New System.Windows.Forms.Label()
102
+        Me.L2 = New System.Windows.Forms.Label()
103
+        Me.所得1_tb = New System.Windows.Forms.TextBox()
104
+        Me.L4 = New System.Windows.Forms.Label()
105
+        Me.地帳1_tb = New System.Windows.Forms.TextBox()
106
+        Me.L3 = New System.Windows.Forms.Label()
107
+        Me.天帳1_tb = New System.Windows.Forms.TextBox()
108
+        Me.客戶_dgv = New System.Windows.Forms.DataGridView()
109
+        Me.彙總5_dgv = New System.Windows.Forms.DataGridView()
110
+        Me.客戶_tb = New System.Windows.Forms.TextBox()
111
+        Me.L5 = New System.Windows.Forms.Label()
112
+        Me.L6 = New System.Windows.Forms.Label()
113
+        Me.合計_tb = New System.Windows.Forms.TextBox()
98 114
         CType(Me.流水帳_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
99 115
         CType(Me.彙總_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
100 116
         CType(Me.彙總1_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -104,14 +120,17 @@ Partial Class 流水帳查詢
104 120
         CType(Me.LOG2_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
105 121
         CType(Me.日期_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
106 122
         CType(Me.批次_nud, System.ComponentModel.ISupportInitialize).BeginInit()
107
-        Me.LOG檔_GUP.SuspendLayout()
108
-        CType(Me.流水帳1_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
123
+        Me.L50.SuspendLayout()
124
+        CType(Me.彙總3_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
125
+        CType(Me.彙總4_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
126
+        CType(Me.客戶_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
127
+        CType(Me.彙總5_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
109 128
         Me.SuspendLayout()
110 129
         '
111 130
         '流水帳_dgv
112 131
         '
113
-        DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer))
114
-        Me.流水帳_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
132
+        DataGridViewCellStyle13.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer))
133
+        Me.流水帳_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle13
115 134
         Me.流水帳_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
116 135
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
117 136
         Me.流水帳_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
@@ -182,8 +201,8 @@ Partial Class 流水帳查詢
182 201
         '
183 202
         '彙總_dgv
184 203
         '
185
-        DataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
186
-        Me.彙總_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2
204
+        DataGridViewCellStyle14.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
205
+        Me.彙總_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle14
187 206
         Me.彙總_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
188 207
             Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
189 208
         Me.彙總_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
@@ -282,28 +301,31 @@ Partial Class 流水帳查詢
282 301
         'RadioButton1
283 302
         '
284 303
         Me.RadioButton1.AutoSize = True
285
-        Me.RadioButton1.Checked = True
286
-        Me.RadioButton1.Location = New System.Drawing.Point(592, 86)
304
+        Me.RadioButton1.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
305
+        Me.RadioButton1.Location = New System.Drawing.Point(588, 86)
287 306
         Me.RadioButton1.Name = "RadioButton1"
288
-        Me.RadioButton1.Size = New System.Drawing.Size(135, 20)
307
+        Me.RadioButton1.Size = New System.Drawing.Size(190, 20)
289 308
         Me.RadioButton1.TabIndex = 1531
290
-        Me.RadioButton1.Text = "應付彙總(商品/老闆)"
309
+        Me.RadioButton1.Text = "帳務彙總表(查看資料受否齊全)"
291 310
         Me.RadioButton1.UseVisualStyleBackColor = True
292 311
         '
293 312
         'RadioButton2
294 313
         '
295 314
         Me.RadioButton2.AutoSize = True
296
-        Me.RadioButton2.Location = New System.Drawing.Point(732, 86)
315
+        Me.RadioButton2.Checked = True
316
+        Me.RadioButton2.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
317
+        Me.RadioButton2.Location = New System.Drawing.Point(588, 109)
297 318
         Me.RadioButton2.Name = "RadioButton2"
298
-        Me.RadioButton2.Size = New System.Drawing.Size(130, 20)
319
+        Me.RadioButton2.Size = New System.Drawing.Size(142, 20)
299 320
         Me.RadioButton2.TabIndex = 1532
300
-        Me.RadioButton2.Text = "應付彙總(分離呈現)"
321
+        Me.RadioButton2.TabStop = True
322
+        Me.RadioButton2.Text = "應收付報表(點選查詢)"
301 323
         Me.RadioButton2.UseVisualStyleBackColor = True
302 324
         '
303 325
         '彙總1_dgv
304 326
         '
305
-        DataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
306
-        Me.彙總1_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
327
+        DataGridViewCellStyle15.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
328
+        Me.彙總1_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle15
307 329
         Me.彙總1_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
308 330
             Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
309 331
         Me.彙總1_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
@@ -312,13 +334,13 @@ Partial Class 流水帳查詢
312 334
         Me.彙總1_dgv.Name = "彙總1_dgv"
313 335
         Me.彙總1_dgv.RowHeadersWidth = 4
314 336
         Me.彙總1_dgv.RowTemplate.Height = 24
315
-        Me.彙總1_dgv.Size = New System.Drawing.Size(427, 834)
337
+        Me.彙總1_dgv.Size = New System.Drawing.Size(427, 407)
316 338
         Me.彙總1_dgv.TabIndex = 1534
317 339
         '
318 340
         '彙總2_dgv
319 341
         '
320
-        DataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
321
-        Me.彙總2_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle4
342
+        DataGridViewCellStyle16.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
343
+        Me.彙總2_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle16
322 344
         Me.彙總2_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
323 345
             Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
324 346
         Me.彙總2_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
@@ -327,13 +349,13 @@ Partial Class 流水帳查詢
327 349
         Me.彙總2_dgv.Name = "彙總2_dgv"
328 350
         Me.彙總2_dgv.RowHeadersWidth = 4
329 351
         Me.彙總2_dgv.RowTemplate.Height = 24
330
-        Me.彙總2_dgv.Size = New System.Drawing.Size(427, 834)
352
+        Me.彙總2_dgv.Size = New System.Drawing.Size(427, 407)
331 353
         Me.彙總2_dgv.TabIndex = 1535
332 354
         '
333 355
         '客戶下_dgv
334 356
         '
335
-        DataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
336
-        Me.客戶下_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle5
357
+        DataGridViewCellStyle17.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
358
+        Me.客戶下_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle17
337 359
         Me.客戶下_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
338 360
             Or System.Windows.Forms.AnchorStyles.Left) _
339 361
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
@@ -353,7 +375,7 @@ Partial Class 流水帳查詢
353 375
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
354 376
         Me.存檔_bt.Location = New System.Drawing.Point(865, 933)
355 377
         Me.存檔_bt.Name = "存檔_bt"
356
-        Me.存檔_bt.Size = New System.Drawing.Size(753, 33)
378
+        Me.存檔_bt.Size = New System.Drawing.Size(825, 33)
357 379
         Me.存檔_bt.TabIndex = 1537
358 380
         Me.存檔_bt.Text = "客戶資料比對存檔"
359 381
         Me.存檔_bt.UseVisualStyleBackColor = True
@@ -362,7 +384,7 @@ Partial Class 流水帳查詢
362 384
         '
363 385
         Me.Delete_bT.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
364 386
         Me.Delete_bT.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
365
-        Me.Delete_bT.Location = New System.Drawing.Point(1619, 933)
387
+        Me.Delete_bT.Location = New System.Drawing.Point(1692, 933)
366 388
         Me.Delete_bT.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
367 389
         Me.Delete_bT.Name = "Delete_bT"
368 390
         Me.Delete_bT.Size = New System.Drawing.Size(73, 33)
@@ -383,8 +405,8 @@ Partial Class 流水帳查詢
383 405
         '
384 406
         'LOG1_dgv
385 407
         '
386
-        DataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
387
-        Me.LOG1_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle6
408
+        DataGridViewCellStyle18.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
409
+        Me.LOG1_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle18
388 410
         Me.LOG1_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
389 411
             Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
390 412
         Me.LOG1_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
@@ -398,8 +420,8 @@ Partial Class 流水帳查詢
398 420
         '
399 421
         'LOG2_dgv
400 422
         '
401
-        DataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
402
-        Me.LOG2_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle7
423
+        DataGridViewCellStyle19.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
424
+        Me.LOG2_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle19
403 425
         Me.LOG2_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
404 426
             Or System.Windows.Forms.AnchorStyles.Left) _
405 427
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
@@ -474,8 +496,8 @@ Partial Class 流水帳查詢
474 496
         '
475 497
         '日期_dgv
476 498
         '
477
-        DataGridViewCellStyle8.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
478
-        Me.日期_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle8
499
+        DataGridViewCellStyle20.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
500
+        Me.日期_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle20
479 501
         Me.日期_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
480 502
             Or System.Windows.Forms.AnchorStyles.Left) _
481 503
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
@@ -701,14 +723,14 @@ Partial Class 流水帳查詢
701 723
         Me.重新導入_bt.Name = "重新導入_bt"
702 724
         Me.重新導入_bt.Size = New System.Drawing.Size(272, 27)
703 725
         Me.重新導入_bt.TabIndex = 1569
704
-        Me.重新導入_bt.Text = "重新導入 [ X ] 資料"
726
+        Me.重新導入_bt.Text = "重新導入 [ X 或 NA] 資料"
705 727
         Me.重新導入_bt.UseVisualStyleBackColor = True
706 728
         '
707 729
         'LOG檔_bt
708 730
         '
709 731
         Me.LOG檔_bt.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
710 732
         Me.LOG檔_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
711
-        Me.LOG檔_bt.Location = New System.Drawing.Point(1693, 933)
733
+        Me.LOG檔_bt.Location = New System.Drawing.Point(1766, 933)
712 734
         Me.LOG檔_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
713 735
         Me.LOG檔_bt.Name = "LOG檔_bt"
714 736
         Me.LOG檔_bt.Size = New System.Drawing.Size(73, 33)
@@ -716,16 +738,16 @@ Partial Class 流水帳查詢
716 738
         Me.LOG檔_bt.Text = "LOG檔"
717 739
         Me.LOG檔_bt.UseVisualStyleBackColor = True
718 740
         '
719
-        'LOG檔_GUP
741
+        'L50
720 742
         '
721
-        Me.LOG檔_GUP.Controls.Add(Me.LOG1_dgv)
722
-        Me.LOG檔_GUP.Controls.Add(Me.LOG2_dgv)
723
-        Me.LOG檔_GUP.Location = New System.Drawing.Point(865, 526)
724
-        Me.LOG檔_GUP.Name = "LOG檔_GUP"
725
-        Me.LOG檔_GUP.Size = New System.Drawing.Size(1050, 404)
726
-        Me.LOG檔_GUP.TabIndex = 1571
727
-        Me.LOG檔_GUP.TabStop = False
728
-        Me.LOG檔_GUP.Text = "LOG檔"
743
+        Me.L50.Controls.Add(Me.LOG1_dgv)
744
+        Me.L50.Controls.Add(Me.LOG2_dgv)
745
+        Me.L50.Location = New System.Drawing.Point(865, 526)
746
+        Me.L50.Name = "L50"
747
+        Me.L50.Size = New System.Drawing.Size(1050, 404)
748
+        Me.L50.TabIndex = 1571
749
+        Me.L50.TabStop = False
750
+        Me.L50.Text = "LOG檔"
729 751
         '
730 752
         '列印_bt
731 753
         '
@@ -738,38 +760,11 @@ Partial Class 流水帳查詢
738 760
         Me.列印_bt.Text = "列印成EXCEL"
739 761
         Me.列印_bt.UseVisualStyleBackColor = True
740 762
         '
741
-        '流水帳1_dgv
742
-        '
743
-        DataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer))
744
-        Me.流水帳1_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle9
745
-        Me.流水帳1_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
746
-            Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
747
-        Me.流水帳1_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
748
-        Me.流水帳1_dgv.Location = New System.Drawing.Point(865, 30)
749
-        Me.流水帳1_dgv.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
750
-        Me.流水帳1_dgv.Name = "流水帳1_dgv"
751
-        Me.流水帳1_dgv.RowHeadersWidth = 4
752
-        Me.流水帳1_dgv.RowTemplate.Height = 24
753
-        Me.流水帳1_dgv.Size = New System.Drawing.Size(1050, 900)
754
-        Me.流水帳1_dgv.TabIndex = 1573
755
-        '
756
-        '明細合併_bt
757
-        '
758
-        Me.明細合併_bt.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
759
-        Me.明細合併_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
760
-        Me.明細合併_bt.Location = New System.Drawing.Point(1842, 933)
761
-        Me.明細合併_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
762
-        Me.明細合併_bt.Name = "明細合併_bt"
763
-        Me.明細合併_bt.Size = New System.Drawing.Size(73, 33)
764
-        Me.明細合併_bt.TabIndex = 1574
765
-        Me.明細合併_bt.Text = "明細合併"
766
-        Me.明細合併_bt.UseVisualStyleBackColor = True
767
-        '
768 763
         '客戶資料_bt
769 764
         '
770 765
         Me.客戶資料_bt.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
771 766
         Me.客戶資料_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
772
-        Me.客戶資料_bt.Location = New System.Drawing.Point(1768, 933)
767
+        Me.客戶資料_bt.Location = New System.Drawing.Point(1841, 933)
773 768
         Me.客戶資料_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
774 769
         Me.客戶資料_bt.Name = "客戶資料_bt"
775 770
         Me.客戶資料_bt.Size = New System.Drawing.Size(73, 33)
@@ -780,34 +775,222 @@ Partial Class 流水帳查詢
780 775
         'RadioButton3
781 776
         '
782 777
         Me.RadioButton3.AutoSize = True
783
-        Me.RadioButton3.Location = New System.Drawing.Point(732, 109)
778
+        Me.RadioButton3.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
779
+        Me.RadioButton3.Location = New System.Drawing.Point(733, 109)
784 780
         Me.RadioButton3.Name = "RadioButton3"
785 781
         Me.RadioButton3.Size = New System.Drawing.Size(130, 20)
786
-        Me.RadioButton3.TabIndex = 1577
787
-        Me.RadioButton3.Text = "應收彙總(分離呈現)"
782
+        Me.RadioButton3.TabIndex = 1576
783
+        Me.RadioButton3.Text = "收付關聯表(依老闆)"
788 784
         Me.RadioButton3.UseVisualStyleBackColor = True
789 785
         '
790
-        'RadioButton4
786
+        '彙總3_dgv
791 787
         '
792
-        Me.RadioButton4.AutoSize = True
793
-        Me.RadioButton4.Location = New System.Drawing.Point(592, 109)
794
-        Me.RadioButton4.Name = "RadioButton4"
795
-        Me.RadioButton4.Size = New System.Drawing.Size(135, 20)
796
-        Me.RadioButton4.TabIndex = 1576
797
-        Me.RadioButton4.Text = "應收彙總(商品/客戶)"
798
-        Me.RadioButton4.UseVisualStyleBackColor = True
788
+        DataGridViewCellStyle21.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
789
+        Me.彙總3_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle21
790
+        Me.彙總3_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
791
+            Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
792
+        Me.彙總3_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
793
+        Me.彙總3_dgv.Location = New System.Drawing.Point(6, 568)
794
+        Me.彙總3_dgv.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
795
+        Me.彙總3_dgv.Name = "彙總3_dgv"
796
+        Me.彙總3_dgv.RowHeadersWidth = 4
797
+        Me.彙總3_dgv.RowTemplate.Height = 24
798
+        Me.彙總3_dgv.Size = New System.Drawing.Size(331, 371)
799
+        Me.彙總3_dgv.TabIndex = 1579
800
+        '
801
+        '彙總4_dgv
802
+        '
803
+        DataGridViewCellStyle22.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
804
+        Me.彙總4_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle22
805
+        Me.彙總4_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
806
+            Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
807
+        Me.彙總4_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
808
+        Me.彙總4_dgv.Location = New System.Drawing.Point(343, 541)
809
+        Me.彙總4_dgv.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
810
+        Me.彙總4_dgv.Name = "彙總4_dgv"
811
+        Me.彙總4_dgv.RowHeadersWidth = 4
812
+        Me.彙總4_dgv.RowTemplate.Height = 24
813
+        Me.彙總4_dgv.Size = New System.Drawing.Size(519, 425)
814
+        Me.彙總4_dgv.TabIndex = 1578
815
+        '
816
+        '老闆_tb
817
+        '
818
+        Me.老闆_tb.ForeColor = System.Drawing.Color.Black
819
+        Me.老闆_tb.Location = New System.Drawing.Point(48, 541)
820
+        Me.老闆_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
821
+        Me.老闆_tb.Name = "老闆_tb"
822
+        Me.老闆_tb.Size = New System.Drawing.Size(69, 23)
823
+        Me.老闆_tb.TabIndex = 1580
824
+        Me.老闆_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
825
+        '
826
+        'L1
827
+        '
828
+        Me.L1.AutoSize = True
829
+        Me.L1.Font = New System.Drawing.Font("微軟正黑體", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
830
+        Me.L1.ForeColor = System.Drawing.Color.Black
831
+        Me.L1.Location = New System.Drawing.Point(12, 544)
832
+        Me.L1.Name = "L1"
833
+        Me.L1.Size = New System.Drawing.Size(34, 17)
834
+        Me.L1.TabIndex = 1581
835
+        Me.L1.Text = "老闆"
836
+        '
837
+        'L2
838
+        '
839
+        Me.L2.AutoSize = True
840
+        Me.L2.Font = New System.Drawing.Font("微軟正黑體", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
841
+        Me.L2.ForeColor = System.Drawing.Color.Green
842
+        Me.L2.Location = New System.Drawing.Point(171, 544)
843
+        Me.L2.Name = "L2"
844
+        Me.L2.Size = New System.Drawing.Size(34, 17)
845
+        Me.L2.TabIndex = 1587
846
+        Me.L2.Text = "所得"
847
+        '
848
+        '所得1_tb
849
+        '
850
+        Me.所得1_tb.ForeColor = System.Drawing.Color.Green
851
+        Me.所得1_tb.Location = New System.Drawing.Point(207, 541)
852
+        Me.所得1_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
853
+        Me.所得1_tb.Name = "所得1_tb"
854
+        Me.所得1_tb.Size = New System.Drawing.Size(130, 23)
855
+        Me.所得1_tb.TabIndex = 1586
856
+        Me.所得1_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
857
+        '
858
+        'L4
859
+        '
860
+        Me.L4.AutoSize = True
861
+        Me.L4.Font = New System.Drawing.Font("微軟正黑體", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
862
+        Me.L4.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
863
+        Me.L4.Location = New System.Drawing.Point(173, 944)
864
+        Me.L4.Name = "L4"
865
+        Me.L4.Size = New System.Drawing.Size(34, 17)
866
+        Me.L4.TabIndex = 1585
867
+        Me.L4.Text = "應收"
868
+        '
869
+        '地帳1_tb
870
+        '
871
+        Me.地帳1_tb.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
872
+        Me.地帳1_tb.Location = New System.Drawing.Point(207, 941)
873
+        Me.地帳1_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
874
+        Me.地帳1_tb.Name = "地帳1_tb"
875
+        Me.地帳1_tb.Size = New System.Drawing.Size(130, 23)
876
+        Me.地帳1_tb.TabIndex = 1584
877
+        Me.地帳1_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
878
+        '
879
+        'L3
880
+        '
881
+        Me.L3.AutoSize = True
882
+        Me.L3.Font = New System.Drawing.Font("微軟正黑體", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
883
+        Me.L3.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
884
+        Me.L3.Location = New System.Drawing.Point(6, 944)
885
+        Me.L3.Name = "L3"
886
+        Me.L3.Size = New System.Drawing.Size(34, 17)
887
+        Me.L3.TabIndex = 1583
888
+        Me.L3.Text = "應付"
889
+        '
890
+        '天帳1_tb
891
+        '
892
+        Me.天帳1_tb.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
893
+        Me.天帳1_tb.Location = New System.Drawing.Point(40, 941)
894
+        Me.天帳1_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
895
+        Me.天帳1_tb.Name = "天帳1_tb"
896
+        Me.天帳1_tb.Size = New System.Drawing.Size(130, 23)
897
+        Me.天帳1_tb.TabIndex = 1582
898
+        Me.天帳1_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
899
+        '
900
+        '客戶_dgv
901
+        '
902
+        DataGridViewCellStyle23.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
903
+        Me.客戶_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle23
904
+        Me.客戶_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
905
+            Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
906
+        Me.客戶_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
907
+        Me.客戶_dgv.Location = New System.Drawing.Point(342, 568)
908
+        Me.客戶_dgv.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
909
+        Me.客戶_dgv.Name = "客戶_dgv"
910
+        Me.客戶_dgv.RowHeadersWidth = 4
911
+        Me.客戶_dgv.RowTemplate.Height = 24
912
+        Me.客戶_dgv.Size = New System.Drawing.Size(90, 398)
913
+        Me.客戶_dgv.TabIndex = 1588
914
+        '
915
+        '彙總5_dgv
916
+        '
917
+        DataGridViewCellStyle24.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
918
+        Me.彙總5_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle24
919
+        Me.彙總5_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
920
+            Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
921
+        Me.彙總5_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
922
+        Me.彙總5_dgv.Location = New System.Drawing.Point(435, 568)
923
+        Me.彙總5_dgv.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
924
+        Me.彙總5_dgv.Name = "彙總5_dgv"
925
+        Me.彙總5_dgv.RowHeadersWidth = 4
926
+        Me.彙總5_dgv.RowTemplate.Height = 24
927
+        Me.彙總5_dgv.Size = New System.Drawing.Size(427, 398)
928
+        Me.彙總5_dgv.TabIndex = 1589
929
+        '
930
+        '客戶_tb
931
+        '
932
+        Me.客戶_tb.ForeColor = System.Drawing.Color.Black
933
+        Me.客戶_tb.Location = New System.Drawing.Point(473, 542)
934
+        Me.客戶_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
935
+        Me.客戶_tb.Name = "客戶_tb"
936
+        Me.客戶_tb.Size = New System.Drawing.Size(69, 23)
937
+        Me.客戶_tb.TabIndex = 1590
938
+        Me.客戶_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
939
+        '
940
+        'L5
941
+        '
942
+        Me.L5.AutoSize = True
943
+        Me.L5.Font = New System.Drawing.Font("微軟正黑體", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
944
+        Me.L5.ForeColor = System.Drawing.Color.Black
945
+        Me.L5.Location = New System.Drawing.Point(437, 545)
946
+        Me.L5.Name = "L5"
947
+        Me.L5.Size = New System.Drawing.Size(34, 17)
948
+        Me.L5.TabIndex = 1591
949
+        Me.L5.Text = "客戶"
950
+        '
951
+        'L6
952
+        '
953
+        Me.L6.AutoSize = True
954
+        Me.L6.Font = New System.Drawing.Font("微軟正黑體", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
955
+        Me.L6.ForeColor = System.Drawing.Color.Green
956
+        Me.L6.Location = New System.Drawing.Point(548, 545)
957
+        Me.L6.Name = "L6"
958
+        Me.L6.Size = New System.Drawing.Size(34, 17)
959
+        Me.L6.TabIndex = 1593
960
+        Me.L6.Text = "合計"
961
+        '
962
+        '合計_tb
963
+        '
964
+        Me.合計_tb.ForeColor = System.Drawing.Color.Green
965
+        Me.合計_tb.Location = New System.Drawing.Point(584, 542)
966
+        Me.合計_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
967
+        Me.合計_tb.Name = "合計_tb"
968
+        Me.合計_tb.Size = New System.Drawing.Size(130, 23)
969
+        Me.合計_tb.TabIndex = 1592
970
+        Me.合計_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
799 971
         '
800 972
         '流水帳查詢
801 973
         '
802 974
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
803 975
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
804 976
         Me.ClientSize = New System.Drawing.Size(1924, 971)
805
-        Me.Controls.Add(Me.RadioButton3)
806
-        Me.Controls.Add(Me.RadioButton4)
977
+        Me.Controls.Add(Me.L6)
978
+        Me.Controls.Add(Me.合計_tb)
979
+        Me.Controls.Add(Me.客戶_tb)
980
+        Me.Controls.Add(Me.L5)
981
+        Me.Controls.Add(Me.客戶_dgv)
982
+        Me.Controls.Add(Me.L2)
983
+        Me.Controls.Add(Me.所得1_tb)
984
+        Me.Controls.Add(Me.L4)
985
+        Me.Controls.Add(Me.地帳1_tb)
986
+        Me.Controls.Add(Me.L3)
987
+        Me.Controls.Add(Me.天帳1_tb)
988
+        Me.Controls.Add(Me.老闆_tb)
989
+        Me.Controls.Add(Me.L1)
990
+        Me.Controls.Add(Me.彙總3_dgv)
807 991
         Me.Controls.Add(Me.客戶資料_bt)
808
-        Me.Controls.Add(Me.明細合併_bt)
809 992
         Me.Controls.Add(Me.列印_bt)
810
-        Me.Controls.Add(Me.LOG檔_GUP)
993
+        Me.Controls.Add(Me.L50)
811 994
         Me.Controls.Add(Me.LOG檔_bt)
812 995
         Me.Controls.Add(Me.重新導入_bt)
813 996
         Me.Controls.Add(Me.使用網址_ch)
@@ -838,7 +1021,6 @@ Partial Class 流水帳查詢
838 1021
         Me.Controls.Add(Me.重讀_bt)
839 1022
         Me.Controls.Add(Me.Delete_bT)
840 1023
         Me.Controls.Add(Me.存檔_bt)
841
-        Me.Controls.Add(Me.客戶下_dgv)
842 1024
         Me.Controls.Add(Me.RadioButton2)
843 1025
         Me.Controls.Add(Me.Panel1)
844 1026
         Me.Controls.Add(Me.水差_tb)
@@ -856,11 +1038,14 @@ Partial Class 流水帳查詢
856 1038
         Me.Controls.Add(Me.資料_cb)
857 1039
         Me.Controls.Add(Me.RadioButton1)
858 1040
         Me.Controls.Add(Me.彙總2_dgv)
859
-        Me.Controls.Add(Me.彙總_dgv)
860 1041
         Me.Controls.Add(Me.彙總1_dgv)
861 1042
         Me.Controls.Add(Me.Label5)
862
-        Me.Controls.Add(Me.流水帳1_dgv)
863 1043
         Me.Controls.Add(Me.流水帳_dgv)
1044
+        Me.Controls.Add(Me.彙總5_dgv)
1045
+        Me.Controls.Add(Me.彙總4_dgv)
1046
+        Me.Controls.Add(Me.客戶下_dgv)
1047
+        Me.Controls.Add(Me.彙總_dgv)
1048
+        Me.Controls.Add(Me.RadioButton3)
864 1049
         Me.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
865 1050
         Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
866 1051
         Me.Name = "流水帳查詢"
@@ -874,8 +1059,11 @@ Partial Class 流水帳查詢
874 1059
         CType(Me.LOG2_dgv, System.ComponentModel.ISupportInitialize).EndInit()
875 1060
         CType(Me.日期_dgv, System.ComponentModel.ISupportInitialize).EndInit()
876 1061
         CType(Me.批次_nud, System.ComponentModel.ISupportInitialize).EndInit()
877
-        Me.LOG檔_GUP.ResumeLayout(False)
878
-        CType(Me.流水帳1_dgv, System.ComponentModel.ISupportInitialize).EndInit()
1062
+        Me.L50.ResumeLayout(False)
1063
+        CType(Me.彙總3_dgv, System.ComponentModel.ISupportInitialize).EndInit()
1064
+        CType(Me.彙總4_dgv, System.ComponentModel.ISupportInitialize).EndInit()
1065
+        CType(Me.客戶_dgv, System.ComponentModel.ISupportInitialize).EndInit()
1066
+        CType(Me.彙總5_dgv, System.ComponentModel.ISupportInitialize).EndInit()
879 1067
         Me.ResumeLayout(False)
880 1068
         Me.PerformLayout()
881 1069
 
@@ -937,11 +1125,24 @@ Partial Class 流水帳查詢
937 1125
     Friend WithEvents 使用網址_ch As CheckBox
938 1126
     Friend WithEvents 重新導入_bt As Button
939 1127
     Friend WithEvents LOG檔_bt As Button
940
-    Friend WithEvents LOG檔_GUP As GroupBox
1128
+    Friend WithEvents L50 As GroupBox
941 1129
     Friend WithEvents 列印_bt As Button
942
-    Friend WithEvents 流水帳1_dgv As DataGridView
943
-    Friend WithEvents 明細合併_bt As Button
944 1130
     Friend WithEvents 客戶資料_bt As Button
945 1131
     Friend WithEvents RadioButton3 As RadioButton
946
-    Friend WithEvents RadioButton4 As RadioButton
1132
+    Friend WithEvents 彙總3_dgv As DataGridView
1133
+    Friend WithEvents 彙總4_dgv As DataGridView
1134
+    Friend WithEvents 老闆_tb As TextBox
1135
+    Friend WithEvents L1 As Label
1136
+    Friend WithEvents L2 As Label
1137
+    Friend WithEvents 所得1_tb As TextBox
1138
+    Friend WithEvents L4 As Label
1139
+    Friend WithEvents 地帳1_tb As TextBox
1140
+    Friend WithEvents L3 As Label
1141
+    Friend WithEvents 天帳1_tb As TextBox
1142
+    Friend WithEvents 客戶_dgv As DataGridView
1143
+    Friend WithEvents 彙總5_dgv As DataGridView
1144
+    Friend WithEvents 客戶_tb As TextBox
1145
+    Friend WithEvents L5 As Label
1146
+    Friend WithEvents L6 As Label
1147
+    Friend WithEvents 合計_tb As TextBox
947 1148
 End Class

+ 401
- 90
GA-ERP-SYS/報表系統管理/流水帳查詢.vb Wyświetl plik

@@ -10,7 +10,8 @@ Imports Microsoft.Office.Interop.Excel.XlThemeFont
10 10
 Imports Microsoft.Office.Interop.Excel.XlThemeColor
11 11
 Imports Microsoft.Office.Interop.Excel.XlWindowState
12 12
 Public Class 流水帳查詢
13
-    ReadOnly ds, ds1, ds2, ds3, ds4, ds5, ds6, ds7 As New DataSet : Dim 批次, N1, N2, N3 As Integer : Dim GP As Integer = 0 : Dim GPP As String
13
+    ReadOnly ds, ds1, ds2, ds3, ds4, ds5, ds6, ds7, ds8, ds9, ds10, ds11 As New DataSet : Dim 第一, 第二 As String
14
+    Dim 批次, N1, N2, N3 As Integer : Dim GP As Integer = 0 : Dim GPP As String : Dim NN1, NN2 As Integer
14 15
     Private Sub Set_客戶下清單()
15 16
         客戶下_dgv.DataSource = Nothing : ds4.Clear()
16 17
         客戶下_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
@@ -27,17 +28,20 @@ Public Class 流水帳查詢
27 28
         流水帳_dgv.AllowUserToAddRows = False
28 29
         PA40 = 網址_tb.Text : SQL_流水帳查詢()
29 30
         da.Fill(ds) : 流水帳_dgv.DataSource = ds.Tables(0) : conn.Close()
30
-        流水帳_dgv.Columns("水差").Visible = False
31
+
31 32
         流水帳_dgv.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill
33
+        流水帳_dgv.Columns("水差").Visible = False : 流水帳_dgv.Columns("核帳").FillWeight = 55 : 流水帳_dgv.Columns("客名").FillWeight = 65
34
+        流水帳_dgv.Columns(7).Visible = False : 流水帳_dgv.Columns(6).Visible = False
35
+        流水帳_dgv.Columns("網址").FillWeight = 180 : 流水帳_dgv.Columns("客戶").FillWeight = 150 : 流水帳_dgv.Columns(1).FillWeight = 110
36
+        流水帳_dgv.Columns(0).FillWeight = 110
32 37
 
33
-        流水帳_dgv.Columns("網址").FillWeight = 200 : 流水帳_dgv.Columns("客戶").FillWeight = 150 : 流水帳_dgv.Columns(1).FillWeight = 110
34 38
         流水帳_dgv.Columns("天帳").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
35 39
         流水帳_dgv.Columns("地帳").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
36 40
         流水帳_dgv.Columns("水差").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
37 41
         流水帳_dgv.Columns("個人所得").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
38 42
         流水帳_dgv.Columns("核帳").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
39 43
 
40
-        流水帳_dgv.Columns(7).Visible = False : 流水帳_dgv.Columns(6).Visible = False
44
+
41 45
         For i As Integer = 15 To 55 : 流水帳_dgv.Columns(i).Visible = False : Next
42 46
         計算()
43 47
     End Sub
@@ -174,7 +178,7 @@ Public Class 流水帳查詢
174 178
             流水帳_dgv.Rows(i).Cells("客帳").Value = StrReverse(帳號)
175 179
 
176 180
             For ii As Integer = 0 To 客戶下_dgv.Rows.Count - 1
177
-                If 流水帳_dgv("客帳", i).Value.ToString = 客戶下_dgv("客戶帳號", ii).Value.ToString Then
181
+                If 流水帳_dgv("客帳", i).Value.ToString = 客戶下_dgv("客戶帳號", ii).Value.ToString And 流水帳_dgv("網址", i).Value.ToString = 客戶下_dgv("網址", ii).Value.ToString Then
178 182
                     流水帳_dgv("客名", i).Value = 客戶下_dgv("客戶名稱", ii).Value.ToString : Exit For
179 183
                 Else
180 184
                     流水帳_dgv("客名", i).Value = ""
@@ -196,6 +200,7 @@ Public Class 流水帳查詢
196 200
         彙總_dgv.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill
197 201
         彙總_dgv.Columns(0).FillWeight = 90 : 彙總_dgv.Columns(1).FillWeight = 75 : 彙總_dgv.Columns(2).FillWeight = 130 : 彙總_dgv.Columns(3).FillWeight = 80
198 202
         彙總_dgv.Columns(7).Visible = False : 彙總_dgv.Columns(8).FillWeight = 60 : 彙總_dgv.Columns(9).FillWeight = 45 : 彙總_dgv.Columns(10).Visible = False
203
+
199 204
         彙總_dgv.Columns("天帳").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
200 205
         彙總_dgv.Columns("地帳").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
201 206
         彙總_dgv.Columns("水差").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
@@ -272,7 +277,7 @@ Public Class 流水帳查詢
272 277
         da.Fill(ds2) : 彙總1_dgv.DataSource = ds2.Tables(0) : conn.Close()
273 278
         彙總1_dgv.Columns("水差").Visible = False
274 279
         彙總1_dgv.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill
275
-        彙總1_dgv.Columns(4).FillWeight = 80 : 彙總1_dgv.Columns(5).FillWeight = 80
280
+        彙總1_dgv.Columns(4).FillWeight = 80 : 彙總1_dgv.Columns(5).FillWeight = 50
276 281
         彙總1_dgv.Columns("天帳").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
277 282
         彙總1_dgv.Columns("地帳").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
278 283
         彙總1_dgv.Columns("水差").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
@@ -309,7 +314,7 @@ Public Class 流水帳查詢
309 314
         da.Fill(ds3) : 彙總2_dgv.DataSource = ds3.Tables(0) : conn.Close()
310 315
         彙總2_dgv.Columns("水差").Visible = False
311 316
         彙總2_dgv.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill
312
-        彙總2_dgv.Columns(4).FillWeight = 80 : 彙總2_dgv.Columns(5).FillWeight = 80
317
+        彙總2_dgv.Columns(4).FillWeight = 80 : 彙總2_dgv.Columns(5).FillWeight = 50
313 318
         彙總2_dgv.Columns("天帳").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
314 319
         彙總2_dgv.Columns("地帳").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
315 320
         彙總2_dgv.Columns("水差").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
@@ -338,12 +343,155 @@ Public Class 流水帳查詢
338 343
             彙總2_dgv.Rows(i).Cells("核帳").Value = Strings.Format(Val(彙總2_dgv.Rows(i).Cells("核帳").Value), "#,##0")
339 344
         Next
340 345
     End Sub
346
+    Private Sub Set_流水帳清單5()
347
+        彙總3_dgv.DataSource = Nothing : ds9.Clear() : 彙總3_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
348
+        彙總3_dgv.ColumnHeadersHeight = 25
349
+        彙總3_dgv.AllowUserToAddRows = False
350
+        SQL_彙總查詢3()
351
+        da.Fill(ds9) : 彙總3_dgv.DataSource = ds9.Tables(0) : conn.Close()
352
+        彙總3_dgv.Columns("水差").Visible = False : 彙總3_dgv.Columns("上繳源").Visible = False
353
+        彙總3_dgv.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill
354
+        彙總3_dgv.Columns("核帳").FillWeight = 50
355
+        彙總3_dgv.Columns("天帳").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
356
+        彙總3_dgv.Columns("地帳").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
357
+        彙總3_dgv.Columns("水差").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
358
+        彙總3_dgv.Columns("個人所得").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
359
+        彙總3_dgv.Columns("核帳").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
360
+
361
+        For i As Integer = 0 To 彙總3_dgv.Rows.Count - 1
362
+            彙總3_dgv.Rows(i).Cells("天帳").Value = "0" : 彙總3_dgv.Rows(i).Cells("地帳").Value = "0"
363
+            彙總3_dgv.Rows(i).Cells("個人所得").Value = "0" : 彙總3_dgv.Rows(i).Cells("水差").Value = "0"
364
+            For ii As Integer = 0 To 流水帳_dgv.Rows.Count - 1
365
+                If 彙總3_dgv.Rows(i).Cells("上繳源").Value.ToString = 流水帳_dgv.Rows(ii).Cells("老闆").Value.ToString And
366
+                    彙總3_dgv.Rows(i).Cells("商品").Value.ToString = 流水帳_dgv.Rows(ii).Cells("商品").Value.ToString Then
367
+                    彙總3_dgv.Rows(i).Cells("天帳").Value = Val(彙總3_dgv.Rows(i).Cells("天帳").Value) + Val(流水帳_dgv.Rows(ii).Cells("天帳1").Value)
368
+                    彙總3_dgv.Rows(i).Cells("地帳").Value = Val(彙總3_dgv.Rows(i).Cells("地帳").Value) + Val(流水帳_dgv.Rows(ii).Cells("地帳1").Value)
369
+                    彙總3_dgv.Rows(i).Cells("個人所得").Value = Val(彙總3_dgv.Rows(i).Cells("個人所得").Value) + Val(流水帳_dgv.Rows(ii).Cells("個人所得1").Value)
370
+                    彙總3_dgv.Rows(i).Cells("水差").Value = Val(彙總3_dgv.Rows(i).Cells("水差").Value) + Val(流水帳_dgv.Rows(ii).Cells("水差1").Value)
371
+                End If
372
+            Next
373
+
374
+            彙總3_dgv.Rows(i).Cells("核帳").Value = Val(彙總3_dgv.Rows(i).Cells("天帳").Value) + Val(彙總3_dgv.Rows(i).Cells("地帳").Value) +
375
+                                                     Val(彙總3_dgv.Rows(i).Cells("個人所得").Value)
376
+
377
+            彙總3_dgv.Rows(i).Cells("天帳").Value = Strings.Format(Val(彙總3_dgv.Rows(i).Cells("天帳").Value), "#,##0")
378
+            彙總3_dgv.Rows(i).Cells("地帳").Value = Strings.Format(Val(彙總3_dgv.Rows(i).Cells("地帳").Value), "#,##0")
379
+            彙總3_dgv.Rows(i).Cells("個人所得").Value = Strings.Format(Val(彙總3_dgv.Rows(i).Cells("個人所得").Value), "#,##0")
380
+            彙總3_dgv.Rows(i).Cells("水差").Value = Strings.Format(Val(彙總3_dgv.Rows(i).Cells("水差").Value), "#,##0")
381
+            彙總3_dgv.Rows(i).Cells("核帳").Value = Strings.Format(Val(彙總3_dgv.Rows(i).Cells("核帳").Value), "#,##0")
382
+        Next
383
+    End Sub
384
+    Private Sub Set_流水帳清單6()
385
+        彙總4_dgv.DataSource = Nothing : ds8.Clear() : 彙總4_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
386
+        彙總4_dgv.ColumnHeadersHeight = 25
387
+        彙總4_dgv.AllowUserToAddRows = False
388
+        SQL_彙總查詢4()
389
+        da.Fill(ds8) : 彙總4_dgv.DataSource = ds8.Tables(0) : conn.Close()
390
+        彙總4_dgv.Columns("水差").Visible = False : 彙總4_dgv.Columns("上繳源").Visible = False
391
+        彙總4_dgv.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill
392
+        彙總4_dgv.Columns("核帳").FillWeight = 50
393
+        彙總4_dgv.Columns("天帳").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
394
+        彙總4_dgv.Columns("地帳").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
395
+        彙總4_dgv.Columns("水差").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
396
+        彙總4_dgv.Columns("個人所得").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
397
+        彙總4_dgv.Columns("核帳").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
398
+
399
+        For i As Integer = 0 To 彙總4_dgv.Rows.Count - 1
400
+            彙總4_dgv.Rows(i).Cells("天帳").Value = "0" : 彙總4_dgv.Rows(i).Cells("地帳").Value = "0"
401
+            彙總4_dgv.Rows(i).Cells("個人所得").Value = "0" : 彙總4_dgv.Rows(i).Cells("水差").Value = "0"
402
+            For ii As Integer = 0 To 流水帳_dgv.Rows.Count - 1
403
+                If 彙總4_dgv.Rows(i).Cells("上繳源").Value.ToString = 流水帳_dgv.Rows(ii).Cells("老闆").Value.ToString And
404
+                    彙總4_dgv.Rows(i).Cells("商品").Value.ToString = 流水帳_dgv.Rows(ii).Cells("商品").Value.ToString And
405
+                    彙總4_dgv.Rows(i).Cells("帳號").Value.ToString = 流水帳_dgv.Rows(ii).Cells("客帳").Value.ToString Then
406
+                    彙總4_dgv.Rows(i).Cells("天帳").Value = Val(彙總4_dgv.Rows(i).Cells("天帳").Value) + Val(流水帳_dgv.Rows(ii).Cells("天帳1").Value)
407
+                    彙總4_dgv.Rows(i).Cells("地帳").Value = Val(彙總4_dgv.Rows(i).Cells("地帳").Value) + Val(流水帳_dgv.Rows(ii).Cells("地帳1").Value)
408
+                    彙總4_dgv.Rows(i).Cells("個人所得").Value = Val(彙總4_dgv.Rows(i).Cells("個人所得").Value) + Val(流水帳_dgv.Rows(ii).Cells("個人所得1").Value)
409
+                    彙總4_dgv.Rows(i).Cells("水差").Value = Val(彙總4_dgv.Rows(i).Cells("水差").Value) + Val(流水帳_dgv.Rows(ii).Cells("水差1").Value)
410
+                End If
411
+            Next
412
+
413
+            彙總4_dgv.Rows(i).Cells("核帳").Value = Val(彙總4_dgv.Rows(i).Cells("天帳").Value) + Val(彙總4_dgv.Rows(i).Cells("地帳").Value) +
414
+                                                     Val(彙總4_dgv.Rows(i).Cells("個人所得").Value)
415
+
416
+            彙總4_dgv.Rows(i).Cells("天帳").Value = Strings.Format(Val(彙總4_dgv.Rows(i).Cells("天帳").Value), "#,##0")
417
+            彙總4_dgv.Rows(i).Cells("地帳").Value = Strings.Format(Val(彙總4_dgv.Rows(i).Cells("地帳").Value), "#,##0")
418
+            彙總4_dgv.Rows(i).Cells("個人所得").Value = Strings.Format(Val(彙總4_dgv.Rows(i).Cells("個人所得").Value), "#,##0")
419
+            彙總4_dgv.Rows(i).Cells("水差").Value = Strings.Format(Val(彙總4_dgv.Rows(i).Cells("水差").Value), "#,##0")
420
+            彙總4_dgv.Rows(i).Cells("核帳").Value = Strings.Format(Val(彙總4_dgv.Rows(i).Cells("核帳").Value), "#,##0")
421
+        Next
422
+    End Sub
423
+    Private Sub Set_流水帳清單7()
424
+        彙總5_dgv.DataSource = Nothing : ds11.Clear() : 彙總5_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
425
+        彙總5_dgv.ColumnHeadersHeight = 25
426
+        彙總5_dgv.AllowUserToAddRows = False
427
+        SQL_彙總查詢5()
428
+        da.Fill(ds11) : 彙總5_dgv.DataSource = ds11.Tables(0) : conn.Close()
429
+
430
+        彙總5_dgv.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill
431
+        彙總5_dgv.Columns(0).FillWeight = 80 : 彙總5_dgv.Columns(1).FillWeight = 90 : 彙總5_dgv.Columns(2).FillWeight = 80
432
+        彙總5_dgv.Columns(3).FillWeight = 80 : 彙總5_dgv.Columns(4).FillWeight = 130 : 彙總5_dgv.Columns(5).Visible = False
433
+        彙總5_dgv.Columns("應收").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
434
+        合計_tb.Text = "0"
435
+        For i As Integer = 0 To 彙總5_dgv.Rows.Count - 1
436
+            彙總5_dgv.Rows(i).Cells("應收").Value = "0"
437
+            For ii As Integer = 0 To 流水帳_dgv.Rows.Count - 1
438
+                If Strings.Left(流水帳_dgv.Rows(ii).Cells("資料").Value, 2) = "短版" Or Strings.Left(流水帳_dgv.Rows(ii).Cells("資料").Value, 2) = "短板" Then
439
+                    If 彙總5_dgv.Rows(i).Cells("網址").Value.ToString = 流水帳_dgv.Rows(ii).Cells("網址").Value.ToString And
440
+                       彙總5_dgv.Rows(i).Cells("商品").Value.ToString = 流水帳_dgv.Rows(ii).Cells("商品").Value.ToString And
441
+                       彙總5_dgv.Rows(i).Cells("客戶帳號").Value.ToString = 流水帳_dgv.Rows(ii).Cells("客帳").Value.ToString Then
442
+                        If 彙總5_dgv.Rows(i).Cells("基數").Value.ToString = "總監" Then
443
+                            彙總5_dgv.Rows(i).Cells("應收").Value = Val(彙總5_dgv.Rows(i).Cells("應收").Value) + Val(流水帳_dgv.Rows(ii).Cells("總監小計s").Value)
444
+                        ElseIf 彙總5_dgv.Rows(i).Cells("基數").Value.ToString = "大股東" Then
445
+                            彙總5_dgv.Rows(i).Cells("應收").Value = Val(彙總5_dgv.Rows(i).Cells("應收").Value) + Val(流水帳_dgv.Rows(ii).Cells("大股東小計s").Value)
446
+                        ElseIf 彙總5_dgv.Rows(i).Cells("基數").Value.ToString = "股東" Then
447
+                            彙總5_dgv.Rows(i).Cells("應收").Value = Val(彙總5_dgv.Rows(i).Cells("應收").Value) + Val(流水帳_dgv.Rows(ii).Cells("股東小計s").Value)
448
+                        ElseIf 彙總5_dgv.Rows(i).Cells("基數").Value.ToString = "總代理" Then
449
+                            彙總5_dgv.Rows(i).Cells("應收").Value = Val(彙總5_dgv.Rows(i).Cells("應收").Value) + Val(流水帳_dgv.Rows(ii).Cells("總代理小計s").Value)
450
+                        ElseIf 彙總5_dgv.Rows(i).Cells("基數").Value.ToString = "代理" Then
451
+                            彙總5_dgv.Rows(i).Cells("應收").Value = Val(彙總5_dgv.Rows(i).Cells("應收").Value) + Val(流水帳_dgv.Rows(ii).Cells("代理小計s").Value)
452
+                        ElseIf 彙總5_dgv.Rows(i).Cells("基數").Value.ToString = "會員" Then
453
+                            彙總5_dgv.Rows(i).Cells("應收").Value = Val(彙總5_dgv.Rows(i).Cells("應收").Value) + Val(流水帳_dgv.Rows(ii).Cells("客戶小計s").Value)
454
+                        End If
455
+                    End If
456
+                ElseIf Strings.Left(流水帳_dgv.Rows(iI).Cells("資料").Value, 2) = "長板" Or Strings.Left(流水帳_dgv.Rows(iI).Cells("資料").Value, 2) = "長版" Then
457
+                    If 彙總5_dgv.Rows(i).Cells("網址").Value.ToString = 流水帳_dgv.Rows(ii).Cells("網址").Value.ToString And
458
+                       彙總5_dgv.Rows(i).Cells("商品").Value.ToString = 流水帳_dgv.Rows(ii).Cells("商品").Value.ToString And
459
+                       彙總5_dgv.Rows(i).Cells("客戶帳號").Value.ToString = 流水帳_dgv.Rows(ii).Cells("客帳").Value.ToString Then
460
+                        If 彙總5_dgv.Rows(i).Cells("基數").Value.ToString = "總監" Then
461
+                            彙總5_dgv.Rows(i).Cells("應收").Value = Val(彙總5_dgv.Rows(i).Cells("應收").Value) + Val(流水帳_dgv.Rows(ii).Cells("總監").Value)
462
+                        ElseIf 彙總5_dgv.Rows(i).Cells("基數").Value.ToString = "大股東" Then
463
+                            彙總5_dgv.Rows(i).Cells("應收").Value = Val(彙總5_dgv.Rows(i).Cells("應收").Value) + Val(流水帳_dgv.Rows(ii).Cells("大股東").Value)
464
+                        ElseIf 彙總5_dgv.Rows(i).Cells("基數").Value.ToString = "股東" Then
465
+                            彙總5_dgv.Rows(i).Cells("應收").Value = Val(彙總5_dgv.Rows(i).Cells("應收").Value) + Val(流水帳_dgv.Rows(ii).Cells("股東").Value)
466
+                        ElseIf 彙總5_dgv.Rows(i).Cells("基數").Value.ToString = "總代理" Then
467
+                            彙總5_dgv.Rows(i).Cells("應收").Value = Val(彙總5_dgv.Rows(i).Cells("應收").Value) + Val(流水帳_dgv.Rows(ii).Cells("總代理").Value)
468
+                        ElseIf 彙總5_dgv.Rows(i).Cells("基數").Value.ToString = "代理" Then
469
+                            彙總5_dgv.Rows(i).Cells("應收").Value = Val(彙總5_dgv.Rows(i).Cells("應收").Value) + Val(流水帳_dgv.Rows(ii).Cells("代理").Value)
470
+                        ElseIf 彙總5_dgv.Rows(i).Cells("基數").Value.ToString = "會員" Then
471
+                            彙總5_dgv.Rows(i).Cells("應收").Value = Val(彙總5_dgv.Rows(i).Cells("應收").Value) + Val(流水帳_dgv.Rows(ii).Cells("會員").Value)
472
+                        End If
473
+                    End If
474
+                End If
475
+            Next
476
+            合計_tb.Text = Val(合計_tb.Text) + Val(彙總5_dgv.Rows(i).Cells("應收").Value)
477
+            彙總5_dgv.Rows(i).Cells("應收").Value = Strings.Format(Val(彙總5_dgv.Rows(i).Cells("應收").Value), "#,##0")
478
+        Next
479
+        合計_tb.Text = Strings.Format(Val(合計_tb.Text), "#,##0")
480
+    End Sub
481
+    Private Sub Set_客戶名稱()
482
+        客戶_dgv.DataSource = Nothing : ds5.Clear() : 客戶_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
483
+        客戶_dgv.ColumnHeadersHeight = 25
484
+        客戶_dgv.AllowUserToAddRows = False
485
+        SQL_客戶下名稱()
486
+        da.Fill(ds5) : 客戶_dgv.DataSource = ds5.Tables(0) : conn.Close()
487
+        客戶_dgv.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill
488
+    End Sub
341 489
     Private Sub Set_LOG1()
342
-        LOG1_dgv.DataSource = Nothing : ds5.Clear() : LOG1_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
490
+        LOG1_dgv.DataSource = Nothing : ds10.Clear() : LOG1_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
343 491
         LOG1_dgv.ColumnHeadersHeight = 25
344 492
         LOG1_dgv.AllowUserToAddRows = False
345 493
         SQL_LOG查詢1()
346
-        da.Fill(ds5) : LOG1_dgv.DataSource = ds5.Tables(0) : conn.Close()
494
+        da.Fill(ds10) : LOG1_dgv.DataSource = ds10.Tables(0) : conn.Close()
347 495
         LOG1_dgv.Columns(0).FillWeight = 35 : LOG1_dgv.Columns(2).FillWeight = 90 : LOG1_dgv.Columns(3).FillWeight = 75 : LOG1_dgv.Columns(4).Visible = False
348 496
         LOG1_dgv.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill
349 497
         For I As Integer = 0 To LOG1_dgv.Rows.Count - 1
@@ -398,13 +546,19 @@ Public Class 流水帳查詢
398 546
     End Sub
399 547
     Private Sub 流水帳查詢_Load(sender As Object, e As EventArgs) Handles MyBase.Load
400 548
         Me.MdiParent = GA_ERP_SYS : Me.WindowState = 2 : Me.AutoScroll = True
549
+
401 550
         天_ch.Checked = False : 周_ch.Checked = True : 月_ch.Checked = False : DA1_bt.Text = "上週" : DA2_bt.Text = "本週" : DA3_bt.Text = "下週"
402
-        LOG檔_GUP.Visible = False : 流水帳1_dgv.Visible = False : 客戶下_dgv.Visible = False
403
-        Set_客戶下清單() : Set_日期清單() : SQL_流水帳上繳()
551
+        L50.Visible = False : 客戶下_dgv.Visible = False : L6.Visible = True
552
+        彙總_dgv.Visible = False : 彙總1_dgv.Visible = True : 彙總2_dgv.Visible = True : 彙總3_dgv.Visible = True : 彙總4_dgv.Visible = False
553
+        L1.Visible = True : L2.Visible = True : L3.Visible = True : L4.Visible = True : L5.Visible = True : 老闆_tb.Visible = True : 所得1_tb.Visible = True
554
+        天帳1_tb.Visible = True : 地帳1_tb.Visible = True : 客戶_dgv.Visible = True : 彙總5_dgv.Visible = True : 客戶_tb.Visible = True : 合計_tb.Visible = True
555
+
556
+        Set_客戶名稱() : Set_客戶下清單() : Set_日期清單() : SQL_流水帳上繳()
404 557
         老闆_cb.Items.Clear() : 老闆_cb.Items.Add("") : While (dr.Read()) : 老闆_cb.Items.Add(dr("上繳源")) : End While : conn.Close()
405 558
         SQL_流水帳商品()
406 559
         商品_cb.Items.Clear() : 商品_cb.Items.Add("") : While (dr.Read()) : 商品_cb.Items.Add(dr("商品")) : End While : conn.Close()
407
-        彙總_dgv.Visible = True : 彙總1_dgv.Visible = False : 彙總2_dgv.Visible = False : 資料_cb.SelectedIndex = 0
560
+        資料_cb.SelectedIndex = 0
561
+
408 562
         Set_流水帳清單1()
409 563
         If CC(8) = False Then
410 564
             Delete_bT.Enabled = False
@@ -417,6 +571,18 @@ Public Class 流水帳查詢
417 571
             End If
418 572
         End If
419 573
     End Sub
574
+    Private Sub 彙總2_dgv_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles 彙總2_dgv.CellClick
575
+        If e.RowIndex = -1 Then : Else
576
+            老闆_tb.Text = 彙總2_dgv("老闆", e.RowIndex).Value.ToString : Set_流水帳清單5() : Set_流水帳清單6()
577
+            所得1_tb.Text = 彙總2_dgv("個人所得", e.RowIndex).Value.ToString
578
+            天帳1_tb.Text = 彙總2_dgv("天帳", e.RowIndex).Value.ToString : 地帳1_tb.Text = 彙總2_dgv("地帳", e.RowIndex).Value.ToString
579
+        End If
580
+    End Sub
581
+    Private Sub 客戶_dgv_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles 客戶_dgv.CellClick
582
+        If e.RowIndex = -1 Then : Else
583
+            客戶_tb.Text = 客戶_dgv("客戶", e.RowIndex).Value.ToString : Set_流水帳清單7()
584
+        End If
585
+    End Sub
420 586
     Private Sub 流水帳_dgv_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles 流水帳_dgv.CellClick
421 587
         If e.RowIndex = -1 Then : Else
422 588
             If 使用網址_ch.Checked = True Then
@@ -455,6 +621,20 @@ Public Class 流水帳查詢
455 621
             End If
456 622
         End If
457 623
     End Sub
624
+    Private Sub 彙總4_dgv_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles 彙總4_dgv.RowPostPaint
625
+        Dim linePen As New Pen(Color.Blue, 2)
626
+        If e.RowIndex = 彙總4_dgv.Rows.Count - 1 Then
627
+            Exit Sub
628
+        Else
629
+            If 彙總4_dgv(0, e.RowIndex).Value.ToString <> 彙總4_dgv(0, e.RowIndex + 1).Value.ToString Then
630
+                Dim startX As Integer = IIf(彙總4_dgv.RowHeadersVisible, 彙總4_dgv.RowHeadersWidth, 0)
631
+                Dim startY As Integer = e.RowBounds.Top + e.RowBounds.Height - 1
632
+                Dim endX As Integer = startX + 彙總4_dgv.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - 彙總4_dgv.HorizontalScrollingOffset
633
+                e.Graphics.DrawLine(linePen, startX, startY, endX, startY)
634
+                Exit Sub
635
+            End If
636
+        End If
637
+    End Sub
458 638
     Private Sub 流水帳_dgv_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles 流水帳_dgv.RowPostPaint
459 639
         Dim linePen As New Pen(Color.Blue, 2)
460 640
         If e.RowIndex = 流水帳_dgv.Rows.Count - 1 Then
@@ -489,6 +669,21 @@ Public Class 流水帳查詢
489 669
             e.CellStyle.ForeColor = Color.Red
490 670
         End If
491 671
     End Sub
672
+    Private Sub 彙總3_dgv_CellFormatting(sender As Object, e As DataGridViewCellFormattingEventArgs) Handles 彙總3_dgv.CellFormatting
673
+        If IsNumeric(Val(e.Value.ToString)) = True And Val(e.Value.ToString) < 0 Then
674
+            e.CellStyle.ForeColor = Color.Red
675
+        End If
676
+    End Sub
677
+    Private Sub 彙總4_dgv_CellFormatting(sender As Object, e As DataGridViewCellFormattingEventArgs) Handles 彙總4_dgv.CellFormatting
678
+        If IsNumeric(Val(e.Value.ToString)) = True And Val(e.Value.ToString) < 0 Then
679
+            e.CellStyle.ForeColor = Color.Red
680
+        End If
681
+    End Sub
682
+    Private Sub 彙總5_dgv_CellFormatting(sender As Object, e As DataGridViewCellFormattingEventArgs) Handles 彙總5_dgv.CellFormatting
683
+        If IsNumeric(Val(e.Value.ToString)) = True And Val(e.Value.ToString) < 0 Then
684
+            e.CellStyle.ForeColor = Color.Red
685
+        End If
686
+    End Sub
492 687
     Private Sub 資料_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 資料_cb.SelectedIndexChanged
493 688
         Set_流水帳清單1()
494 689
     End Sub
@@ -497,15 +692,15 @@ Public Class 流水帳查詢
497 692
     End Sub
498 693
     Private Sub 天_ch_CheckedChanged(sender As Object, e As EventArgs) Handles 天_ch.Click
499 694
         天_ch.Checked = True : 周_ch.Checked = False : 月_ch.Checked = False : DA2_bt.PerformClick()
500
-        DA1_bt.Text = "上一天" : DA2_bt.Text = "今天" : DA3_bt.Text = "下一天" : 重讀_bt.PerformClick()
695
+        DA1_bt.Text = "上一天" : DA2_bt.Text = "今天" : DA3_bt.Text = "下一天" : Set_日期清單() : 重讀_bt.PerformClick()
501 696
     End Sub
502 697
     Private Sub 周_ch_CheckedChanged(sender As Object, e As EventArgs) Handles 周_ch.Click
503 698
         天_ch.Checked = False : 周_ch.Checked = True : 月_ch.Checked = False : DA2_bt.PerformClick()
504
-        DA1_bt.Text = "上一週" : DA2_bt.Text = "本週" : DA3_bt.Text = "下一週" : 重讀_bt.PerformClick()
699
+        DA1_bt.Text = "上一週" : DA2_bt.Text = "本週" : DA3_bt.Text = "下一週" : Set_日期清單() : 重讀_bt.PerformClick()
505 700
     End Sub
506 701
     Private Sub 月_ch_CheckedChanged(sender As Object, e As EventArgs) Handles 月_ch.Click
507 702
         天_ch.Checked = False : 周_ch.Checked = False : 月_ch.Checked = True : DA2_bt.PerformClick()
508
-        DA1_bt.Text = "上一月" : DA2_bt.Text = "本月" : DA3_bt.Text = "下一月" : 重讀_bt.PerformClick()
703
+        DA1_bt.Text = "上一月" : DA2_bt.Text = "本月" : DA3_bt.Text = "下一月" : Set_日期清單() : 重讀_bt.PerformClick()
509 704
     End Sub
510 705
     Private Sub DA1_bt_Click(sender As Object, e As EventArgs) Handles DA1_bt.Click
511 706
         If 天_ch.Checked = True Then
@@ -567,28 +762,42 @@ Public Class 流水帳查詢
567 762
         End If
568 763
     End Sub
569 764
     Private Sub Delete_bTlick(sender As Object, e As EventArgs) Handles Delete_bT.Click
570
-        Set_客戶下清單() : SQL_LOG_刪除() : SQL_流水帳_清除() : Set_日期清單()
765
+        Set_客戶名稱() : Set_客戶下清單() : SQL_LOG_刪除() : SQL_流水帳_清除() : Set_日期清單()
571 766
         SQL_流水帳上繳()
572 767
         老闆_cb.Items.Clear() : 老闆_cb.Items.Add("") : While (dr.Read()) : 老闆_cb.Items.Add(dr("上繳源")) : End While : conn.Close()
573 768
         SQL_流水帳商品()
574 769
         商品_cb.Items.Clear() : 商品_cb.Items.Add("") : While (dr.Read()) : 商品_cb.Items.Add(dr("商品")) : End While : conn.Close()
575
-        彙總_dgv.Visible = True : 彙總1_dgv.Visible = False : 彙總2_dgv.Visible = False : 資料_cb.SelectedIndex = 0
770
+        資料_cb.SelectedIndex = 0
576 771
         Set_流水帳清單1()
577 772
     End Sub
578 773
     Private Sub 重讀_bt_Click(sender As Object, e As EventArgs) Handles 重讀_bt.Click
579
-        Set_客戶下清單() : Set_日期清單()
774
+        Set_客戶名稱() : Set_客戶下清單()
580 775
         SQL_流水帳上繳()
581 776
         老闆_cb.Items.Clear() : 老闆_cb.Items.Add("") : While (dr.Read()) : 老闆_cb.Items.Add(dr("上繳源")) : End While : conn.Close()
582 777
         SQL_流水帳商品()
583 778
         商品_cb.Items.Clear() : 商品_cb.Items.Add("") : While (dr.Read()) : 商品_cb.Items.Add(dr("商品")) : End While : conn.Close()
584
-        彙總_dgv.Visible = True : 彙總1_dgv.Visible = False : 彙總2_dgv.Visible = False : 資料_cb.SelectedIndex = 0
585 779
         Set_流水帳清單1()
586 780
     End Sub
587 781
     Private Sub RadioButton1_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton1.CheckedChanged
588
-        彙總_dgv.Visible = True : 彙總1_dgv.Visible = False : 彙總2_dgv.Visible = False
782
+        彙總_dgv.Visible = True : 彙總1_dgv.Visible = False : 彙總2_dgv.Visible = False : 彙總3_dgv.Visible = False : 彙總4_dgv.Visible = False
783
+        L1.Visible = False : L2.Visible = False : L3.Visible = False : L4.Visible = False : L5.Visible = False : L6.Visible = False
784
+        老闆_tb.Visible = False : 所得1_tb.Visible = False : 合計_tb.Visible = False
785
+        天帳1_tb.Visible = False : 地帳1_tb.Visible = False : 客戶_dgv.Visible = False : 彙總5_dgv.Visible = False : 客戶_tb.Visible = False
589 786
     End Sub
590 787
     Private Sub RadioButton2_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton2.CheckedChanged
591
-        彙總_dgv.Visible = False : 彙總1_dgv.Visible = True : 彙總2_dgv.Visible = True
788
+        彙總_dgv.Visible = False : 彙總1_dgv.Visible = True : 彙總2_dgv.Visible = True : 彙總3_dgv.Visible = True : 彙總4_dgv.Visible = False
789
+        L1.Visible = True : L2.Visible = True : L3.Visible = True : L4.Visible = True : L5.Visible = True : L6.Visible = True
790
+        老闆_tb.Visible = True : 所得1_tb.Visible = True : 合計_tb.Visible = True
791
+        天帳1_tb.Visible = True : 地帳1_tb.Visible = True : 客戶_dgv.Visible = True : 彙總5_dgv.Visible = True : 客戶_tb.Visible = True
792
+    End Sub
793
+    Private Sub RadioButton3_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton3.CheckedChanged
794
+        彙總_dgv.Visible = False : 彙總1_dgv.Visible = True : 彙總2_dgv.Visible = True : 彙總3_dgv.Visible = True : 彙總4_dgv.Visible = True
795
+        L1.Visible = True : L2.Visible = True : L3.Visible = True : L4.Visible = True : L5.Visible = False : L6.Visible = False
796
+        老闆_tb.Visible = True : 所得1_tb.Visible = True : 合計_tb.Visible = False
797
+        天帳1_tb.Visible = True : 地帳1_tb.Visible = True : 客戶_dgv.Visible = False : 彙總5_dgv.Visible = False : 客戶_tb.Visible = False
798
+    End Sub
799
+    Private Sub 客戶資料_bt_Click(sender As Object, e As EventArgs) Handles 客戶資料_bt.Click
800
+        If 客戶下_dgv.Visible = False Then : 客戶下_dgv.Visible = True : 客戶下_dgv.BringToFront() : Else : 客戶下_dgv.Visible = False : End If
592 801
     End Sub
593 802
     Private Sub 商品_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 商品_cb.SelectedIndexChanged
594 803
         Set_流水帳清單1()
@@ -652,15 +861,16 @@ Public Class 流水帳查詢
652 861
         GA_ERP_SYS.ToolStripProgressBar1.Value = 0 : 最終數 = 0
653 862
     End Sub
654 863
     Private Sub LOG檔_bt_Click(sender As Object, e As EventArgs) Handles LOG檔_bt.Click
655
-        If LOG檔_GUP.Visible = False Then : LOG檔_GUP.Visible = True : Else : LOG檔_GUP.Visible = False : End If
864
+        If L50.Visible = False Then : L50.Visible = True : Else : L50.Visible = False : End If
656 865
     End Sub
657 866
     Private Sub R_bT_Click(sender As Object, e As EventArgs) Handles R_bT.Click
658 867
         SQL_SQL_自動導入判斷_關閉()
659 868
     End Sub
660 869
     Private Sub 重新導入_bt_Click(sender As Object, e As EventArgs) Handles 重新導入_bt.Click
870
+        RadioButton1.Checked = True : RadioButton2.Checked = False : RadioButton3.Checked = False
661 871
         Dim 執行 As Boolean
662 872
         For i As Integer = 0 To 彙總_dgv.Rows.Count - 1
663
-            If 彙總_dgv.Rows(i).Cells("狀態").Value.ToString = "X" Then
873
+            If 彙總_dgv.Rows(i).Cells("狀態").Value.ToString = "X" Or 彙總_dgv.Rows(i).Cells("狀態").Value.ToString = "NA" Then
664 874
                 PA1 = 彙總_dgv.Rows(i).Cells("網址").Value.ToString : PA2 = 彙總_dgv.Rows(i).Cells("帳號").Value.ToString
665 875
                 PA3 = 彙總_dgv.Rows(i).Cells("密碼").Value.ToString : SQL_商客資料暫存檔_新增() : 執行 = True
666 876
             End If
@@ -674,7 +884,7 @@ Public Class 流水帳查詢
674 884
                 Else
675 885
                     conn.Close() : dr.Close() : SQL_SQL_自動導入判斷_開啟()
676 886
                     PA1 = Strings.Format(開始日期_dtp.Value, "yyyy-MM-dd") : PA2 = Strings.Format(結束日期_dtp.Value, "yyyy-MM-dd")
677
-                    SQL_查詢日期清空() : SQL_LOG_刪除2() : SQL_查詢日期寫入1()
887
+                    SQL_查詢日期清空() : SQL_LOG_刪除1() : SQL_查詢日期寫入1()
678 888
                     If File.Exists("000.csv") Then
679 889
                         File.Delete("000.csv")
680 890
                     End If
@@ -703,13 +913,9 @@ Public Class 流水帳查詢
703 913
             MsgBox("沒有需要重新導入的網址與帳號!!")
704 914
         End If
705 915
     End Sub
706
-    Private Sub 明細合併_bt_Click(sender As Object, e As EventArgs) Handles 明細合併_bt.Click
707
-        If 流水帳1_dgv.Visible = False Then : 流水帳1_dgv.Visible = True : Else : 流水帳1_dgv.Visible = False : End If
708
-    End Sub
709
-    Private Sub 客戶資料_bt_Click(sender As Object, e As EventArgs) Handles 客戶資料_bt.Click
710
-        If 客戶下_dgv.Visible = False Then : 客戶下_dgv.Visible = True : Else : 客戶下_dgv.Visible = False : End If
711
-    End Sub
916
+
712 917
     Private Sub 商客新增_bt_Click(sender As Object, e As EventArgs) Handles 商客新增_bt.Click
918
+        RadioButton1.Checked = True : RadioButton2.Checked = False : RadioButton3.Checked = False
713 919
         SQL_自動導入判斷()
714 920
         If dr.Read() Then
715 921
             If dr("正在自動導入中").ToString = "YES" Then
@@ -758,10 +964,12 @@ Public Class 流水帳查詢
758 964
                     File.Delete(My.Computer.FileSystem.SpecialDirectories.Desktop & "000.csv")
759 965
                 End If
760 966
                 LOG檔.ShowDialog() : SQL_SQL_自動導入判斷_關閉() : SQL_查詢日期清空() : SQL_商客資料暫存檔_刪除() : 重讀_bt.PerformClick()
967
+                存檔_bt.PerformClick()
761 968
             End If
762 969
         End If
763 970
     End Sub
764 971
     Private Sub 批次導入_bt_Click(sender As Object, e As EventArgs) Handles 批次導入_bt.Click
972
+        RadioButton1.Checked = True : RadioButton2.Checked = False : RadioButton3.Checked = False
765 973
         批次 = 0 : Timer2.Enabled = True
766 974
     End Sub
767 975
     Private Sub 清除_bt_Click(sender As Object, e As EventArgs) Handles 清除_bt.Click
@@ -784,6 +992,7 @@ Public Class 流水帳查詢
784 992
                     Timer2.Enabled = False
785 993
                     SQL_SQL_自動導入判斷_關閉() : SQL_查詢日期清空()
786 994
                     MsgBox("批量自動導入 " & 批次 - 1 & " 次,完成!!!") : conn.Close() : dr.Close() : 重讀_bt.PerformClick()
995
+                    存檔_bt.PerformClick()
787 996
                 Else
788 997
                     conn.Close() : dr.Close() : SQL_SQL_自動導入判斷_開啟()
789 998
                     PA1 = Strings.Format(開始日期_dtp.Value, "yyyy-MM-dd") : PA2 = Strings.Format(結束日期_dtp.Value, "yyyy-MM-dd")
@@ -830,8 +1039,21 @@ Public Class 流水帳查詢
830 1039
         Else : xlApp.Sheets("sheet2").Select : xlApp.Sheets("sheet2").Name = "應收帳款" : End If
831 1040
         xlBook.Activate()
832 1041
         xlSheet.Activate()
833
-
834
-
1042
+        NN2 = 0 : DD(xlApp, xlSheet)
1043
+        For i As Integer = 0 To 客戶_dgv.Rows.Count - 1
1044
+            客戶_tb.Text = 客戶_dgv("客戶", i).Value.ToString : Set_流水帳清單7()
1045
+            NN1 = 0
1046
+            xlSheet.Cells(1, 1 + NN2) = Strings.Right(Strings.Format(開始日期_dtp.Value, "yyyy/MM/dd"), 5) & "~" & Strings.Right(Strings.Format(結束日期_dtp.Value, "yyyy/MM/dd"), 5)
1047
+            xlSheet.Cells(1, 2 + NN2) = 客戶_tb.Text
1048
+            For ii As Integer = 0 To 彙總5_dgv.Rows.Count - 1
1049
+                xlSheet.Cells(2 + ii, 1 + NN2) = 彙總5_dgv.Rows(ii).Cells("商品").Value : xlSheet.Cells(2 + ii, 2 + NN2) = 彙總5_dgv.Rows(ii).Cells("應收").Value
1050
+                NN1 = ii + 4
1051
+            Next
1052
+            xlSheet.Cells(1 + NN1, 1 + NN2) = "前期" : xlSheet.Cells(1 + NN1 + 1, 1 + NN2) = "已收"
1053
+            xlSheet.Cells(1 + NN1 + 2, 1 + NN2) = "合計" : xlSheet.Cells(1 + NN1 + 2, 2 + NN2) = 合計_tb.Text
1054
+            EE(xlApp, xlSheet) : NN2 += 3
1055
+        Next
1056
+        FF(xlApp, xlSheet)
835 1057
         '-------------------------------------------------------------------------------------------------------------------------------------------------------------------
836 1058
         xlSheet = NewMethod(xlBook)
837 1059
         If xlApp.Sheets(1).Name = "工作表3" Then : xlApp.Sheets("工作表3").Select : xlApp.Sheets("工作表3").Name = "應付帳款"
@@ -847,23 +1069,30 @@ Public Class 流水帳查詢
847 1069
             xlSheet.Cells(2 + I, 5) = 彙總2_dgv.Rows(I).Cells("核帳").Value
848 1070
             N1 = I + 2
849 1071
         Next
850
-        xlSheet.Cells(1, 7) = "商品" : xlSheet.Cells(1, 8) = "應收" : xlSheet.Cells(1, 9) = "應付" : xlSheet.Cells(1, 10) = "個人所得" : xlSheet.Cells(1, 11) = "核帳"
851
-        For I As Integer = 0 To 彙總1_dgv.Rows.Count - 1
852
-            xlSheet.Cells(2 + I, 7) = 彙總1_dgv.Rows(I).Cells("商品").Value : xlSheet.Cells(2 + I, 8) = 彙總1_dgv.Rows(I).Cells("天帳").Value
853
-            xlSheet.Cells(2 + I, 9) = 彙總1_dgv.Rows(I).Cells("地帳").Value : xlSheet.Cells(2 + I, 10) = 彙總1_dgv.Rows(I).Cells("個人所得").Value
854
-            xlSheet.Cells(2 + I, 11) = 彙總1_dgv.Rows(I).Cells("核帳").Value
855
-            N2 = I + 2
856
-        Next
857
-        xlSheet.Cells(1, 13) = "商品" : xlSheet.Cells(1, 14) = "老闆" : xlSheet.Cells(1, 15) = "網址" : xlSheet.Cells(1, 16) = "帳號"
858
-        xlSheet.Cells(1, 17) = "應收" : xlSheet.Cells(1, 18) = "應付" : xlSheet.Cells(1, 19) = "個人所得" : xlSheet.Cells(1, 20) = "核帳"
859
-        For I As Integer = 0 To 彙總1_dgv.Rows.Count - 1
860
-            xlSheet.Cells(2 + I, 13) = 彙總_dgv.Rows(I).Cells("商品").Value : xlSheet.Cells(2 + I, 14) = 彙總_dgv.Rows(I).Cells("老闆").Value
861
-            xlSheet.Cells(2 + I, 15) = 彙總_dgv.Rows(I).Cells("網址").Value : xlSheet.Cells(2 + I, 16) = 彙總_dgv.Rows(I).Cells("帳號").Value
862
-            xlSheet.Cells(2 + I, 17) = 彙總_dgv.Rows(I).Cells("天帳").Value : xlSheet.Cells(2 + I, 18) = 彙總_dgv.Rows(I).Cells("地帳").Value
863
-            xlSheet.Cells(2 + I, 19) = 彙總_dgv.Rows(I).Cells("個人所得").Value : xlSheet.Cells(2 + I, 20) = 彙總_dgv.Rows(I).Cells("核帳").Value
864
-            N3 = I + 2
1072
+        NN2 = 0
1073
+        For i As Integer = 0 To 彙總2_dgv.Rows.Count - 1
1074
+            老闆_tb.Text = 彙總2_dgv("老闆", i).Value.ToString : Set_流水帳清單5() : Set_流水帳清單6()
1075
+            所得1_tb.Text = 彙總2_dgv("個人所得", i).Value.ToString
1076
+            天帳1_tb.Text = 彙總2_dgv("天帳", i).Value.ToString : 地帳1_tb.Text = 彙總2_dgv("地帳", i).Value.ToString
1077
+
1078
+            NN1 = 0
1079
+            xlSheet.Cells(1, 7 + NN2) = Strings.Right(Strings.Format(開始日期_dtp.Value, "yyyy/MM/dd"), 5) & "~" & Strings.Right(Strings.Format(結束日期_dtp.Value, "yyyy/MM/dd"), 5)
1080
+            xlSheet.Cells(1, 8 + NN2) = 老闆_tb.Text
1081
+            For ii As Integer = 0 To 彙總3_dgv.Rows.Count - 1
1082
+                xlSheet.Cells(2 + ii, 7 + NN2) = 彙總3_dgv.Rows(ii).Cells("商品").Value : xlSheet.Cells(2 + ii, 8 + NN2) = 彙總3_dgv.Rows(ii).Cells("天帳").Value
1083
+                NN1 = ii + 4
1084
+            Next
1085
+            xlSheet.Cells(1 + NN1, 7 + NN2) = "已付" : xlSheet.Cells(1 + NN1 + 1, 7 + NN2) = "前期"
1086
+            xlSheet.Cells(1 + NN1 + 2, 7 + NN2) = "合計" : xlSheet.Cells(1 + NN1 + 2, 8 + NN2) = 天帳1_tb.Text
1087
+            GG(xlApp, xlSheet) : NN2 += 3
865 1088
         Next
866
-        BB(xlApp, xlSheet)
1089
+        BB(xlApp, xlSheet) : FF(xlApp, xlSheet)
1090
+
1091
+        If xlApp.Sheets(3).Name = "工作表1" Then
1092
+            xlApp.Sheets("工作表1").Delete
1093
+        Else
1094
+            xlApp.Sheets("sheet1").Delete
1095
+        End If
867 1096
 
868 1097
         xlSheet.PageSetup.PrintArea = ""
869 1098
         xlApp.Cells.Select()
@@ -879,19 +1108,12 @@ Public Class 流水帳查詢
879 1108
         With myExcel.Selection.Font : .Name = "微軟正黑體" : .Size = 10 : .Strikethrough = False : .Superscript = False : .Subscript = False : .OutlineFont = False
880 1109
             .Shadow = False : .Underline = xlUnderlineStyleNone : .ThemeColor = xlThemeColorLight1 : .TintAndShade = 0 : .ThemeFont = xlThemeFontNone
881 1110
         End With
1111
+        myExcel.Selection.ColumnWidth = 1
1112
+
882 1113
         xlSheet.Columns("A:A").Select
883 1114
         With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
884 1115
             .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With
885
-        xlSheet.Columns("G:G").Select
886
-        With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
887
-            .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With
888
-        xlSheet.Columns("M:M").Select
889
-        With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
890
-            .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With
891
-        xlSheet.Columns("N:N").Select
892
-        With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
893
-            .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With
894
-        xlSheet.Range("A1:T1").Select()
1116
+        xlSheet.Range("A1:E1").Select()
895 1117
         With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
896 1118
             .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With
897 1119
 
@@ -905,30 +1127,9 @@ Public Class 流水帳查詢
905 1127
         With myExcel.Selection.Borders(xlInsideHorizontal) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
906 1128
         With myExcel.Selection.Interior : .Pattern = xlSolid : .PatternColorIndex = xlAutomatic
907 1129
             .ThemeColor = xlThemeColorAccent1 : .TintAndShade = 0.399975585192419 : .PatternTintAndShade = 0 : End With
908
-        xlSheet.Range("G1:K1").Select()
909
-        myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
910
-        With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
911
-        With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
912
-        With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
913
-        With myExcel.Selection.Borders(xlEdgeRight) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
914
-        With myExcel.Selection.Borders(xlInsideVertical) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
915
-        With myExcel.Selection.Borders(xlInsideHorizontal) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
916
-        With myExcel.Selection.Interior : .Pattern = xlSolid : .PatternColorIndex = xlAutomatic
917
-            .ThemeColor = xlThemeColorAccent1 : .TintAndShade = 0.399975585192419 : .PatternTintAndShade = 0 : End With
918
-        xlSheet.Range("M1:T1").Select()
919
-        myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
920
-        With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
921
-        With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
922
-        With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
923
-        With myExcel.Selection.Borders(xlEdgeRight) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
924
-        With myExcel.Selection.Borders(xlInsideVertical) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
925
-        With myExcel.Selection.Borders(xlInsideHorizontal) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
926
-        With myExcel.Selection.Interior : .Pattern = xlSolid : .PatternColorIndex = xlAutomatic
927
-            .ThemeColor = xlThemeColorAccent1 : .TintAndShade = 0.399975585192419 : .PatternTintAndShade = 0 : End With
928 1130
     End Sub
929 1131
     Private Sub BB(ByVal myExcel As Microsoft.Office.Interop.Excel.Application, ByVal xlSheet As Microsoft.Office.Interop.Excel.Worksheet)
930
-        xlSheet.Columns("A:T").Select
931
-        xlSheet.Columns("A:T").EntireColumn.AutoFit
1132
+        xlSheet.Columns("A:E").Select
932 1133
         xlSheet.Range("A2:E" & N1).Select()
933 1134
         myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
934 1135
         With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
@@ -941,8 +1142,47 @@ Public Class 流水帳查詢
941 1142
         xlSheet.Range("A2:A" & N1).Select()
942 1143
         With myExcel.Selection.Interior : .Pattern = xlSolid : .PatternColorIndex = xlAutomatic : .Color = 65535
943 1144
             .TintAndShade = 0 : .PatternTintAndShade = 0 : End With
1145
+    End Sub
1146
+    Private Sub DD(ByVal myExcel As Microsoft.Office.Interop.Excel.Application, ByVal xlSheet As Microsoft.Office.Interop.Excel.Worksheet)
1147
+        xlSheet.Cells.Select()
1148
+        With myExcel.Selection.Font : .Name = "微軟正黑體" : .Size = 10 : .Strikethrough = False : .Superscript = False : .Subscript = False
1149
+            .OutlineFont = False : .Shadow = False : .Underline = xlUnderlineStyleNone : .ThemeColor = xlThemeColorLight1 : .TintAndShade = 0
1150
+            .ThemeFont = xlThemeFontNone : End With
1151
+        myExcel.Selection.ColumnWidth = 1
1152
+    End Sub
1153
+    Private Sub EE(ByVal myExcel As Microsoft.Office.Interop.Excel.Application, ByVal xlSheet As Microsoft.Office.Interop.Excel.Worksheet)
1154
+        If NN2 = 0 Then : 第一 = "A" : 第二 = "B" : ElseIf NN2 = 3 Then : 第一 = "D" : 第二 = "E" : ElseIf NN2 = 6 Then : 第一 = "G" : 第二 = "H"
1155
+        ElseIf NN2 = 9 Then : 第一 = "J" : 第二 = "K" : ElseIf NN2 = 12 Then : 第一 = "M" : 第二 = "N" : ElseIf NN2 = 15 Then : 第一 = "P" : 第二 = "Q"
1156
+        ElseIf NN2 = 18 Then : 第一 = "S" : 第二 = "T" : ElseIf NN2 = 21 Then : 第一 = "V" : 第二 = "W" : ElseIf NN2 = 24 Then : 第一 = "Y" : 第二 = "Z"
1157
+        ElseIf NN2 = 27 Then : 第一 = "AB" : 第二 = "AC" : ElseIf NN2 = 30 Then : 第一 = "AE" : 第二 = "AF" : ElseIf NN2 = 33 Then : 第一 = "AH" : 第二 = "AI"
1158
+        ElseIf NN2 = 36 Then : 第一 = "AK" : 第二 = "AL" : ElseIf NN2 = 39 Then : 第一 = "AN" : 第二 = "AO" : ElseIf NN2 = 42 Then : 第一 = "AQ" : 第二 = "AR"
1159
+        ElseIf NN2 = 45 Then : 第一 = "AT" : 第二 = "AU" : ElseIf NN2 = 48 Then : 第一 = "AW" : 第二 = "AX" : ElseIf NN2 = 51 Then : 第一 = "AZ" : 第二 = "BA"
1160
+        ElseIf NN2 = 54 Then : 第一 = "BC" : 第二 = "BD" : ElseIf NN2 = 57 Then : 第一 = "BF" : 第二 = "BG" : ElseIf NN2 = 60 Then : 第一 = "BI" : 第二 = "BJ"
1161
+        ElseIf NN2 = 63 Then : 第一 = "BL" : 第二 = "BM" : ElseIf NN2 = 66 Then : 第一 = "BO" : 第二 = "BP" : ElseIf NN2 = 69 Then : 第一 = "BR" : 第二 = "BS"
1162
+        ElseIf NN2 = 72 Then : 第一 = "BU" : 第二 = "BV" : ElseIf NN2 = 75 Then : 第一 = "BX" : 第二 = "BY" : ElseIf NN2 = 78 Then : 第一 = "CA" : 第二 = "CB"
1163
+        ElseIf NN2 = 81 Then : 第一 = "CD" : 第二 = "CE" : ElseIf NN2 = 84 Then : 第一 = "CG" : 第二 = "CH" : ElseIf NN2 = 87 Then : 第一 = "CJ" : 第二 = "CK"
1164
+        ElseIf NN2 = 90 Then : 第一 = "CM" : 第二 = "CN" : ElseIf NN2 = 93 Then : 第一 = "CP" : 第二 = "CQ" : ElseIf NN2 = 96 Then : 第一 = "CS" : 第二 = "CT"
1165
+        ElseIf NN2 = 99 Then : 第一 = "CV" : 第二 = "CW" : ElseIf NN2 = 102 Then : 第一 = "CY" : 第二 = "CZ" : ElseIf NN2 = 105 Then : 第一 = "DB" : 第二 = "DC"
1166
+        ElseIf NN2 = 108 Then : 第一 = "DE" : 第二 = "DF" : ElseIf NN2 = 111 Then : 第一 = "DH" : 第二 = "DI" : ElseIf NN2 = 114 Then : 第一 = "DK" : 第二 = "DL"
1167
+        ElseIf NN2 = 117 Then : 第一 = "DN" : 第二 = "DO" : ElseIf NN2 = 120 Then : 第一 = "DQ" : 第二 = "DR" : ElseIf NN2 = 123 Then : 第一 = "DT" : 第二 = "DU"
1168
+        ElseIf NN2 = 126 Then : 第一 = "DW" : 第二 = "DX" : ElseIf NN2 = 129 Then : 第一 = "DZ" : 第二 = "EA" : ElseIf NN2 = 132 Then : 第一 = "EC" : 第二 = "ED"
1169
+        ElseIf NN2 = 135 Then : 第一 = "EF" : 第二 = "EG" : ElseIf NN2 = 138 Then : 第一 = "EI" : 第二 = "EJ" : ElseIf NN2 = 141 Then : 第一 = "EL" : 第二 = "EM"
1170
+        ElseIf NN2 = 144 Then : 第一 = "EO" : 第二 = "EP" : ElseIf NN2 = 147 Then : 第一 = "ER" : 第二 = "ES" : ElseIf NN2 = 150 Then : 第一 = "EU" : 第二 = "EV"
1171
+        ElseIf NN2 = 153 Then : 第一 = "EX" : 第二 = "EY" : ElseIf NN2 = 156 Then : 第一 = "FA" : 第二 = "FB" : ElseIf NN2 = 159 Then : 第一 = "FD" : 第二 = "FE"
1172
+        ElseIf NN2 = 162 Then : 第一 = "FG" : 第二 = "FH" : ElseIf NN2 = 165 Then : 第一 = "FJ" : 第二 = "FK" : ElseIf NN2 = 168 Then : 第一 = "FM" : 第二 = "FN"
1173
+        ElseIf NN2 = 171 Then : 第一 = "FP" : 第二 = "FQ" : ElseIf NN2 = 174 Then : 第一 = "FS" : 第二 = "FT" : ElseIf NN2 = 177 Then : 第一 = "FV" : 第二 = "FW"
1174
+        ElseIf NN2 = 180 Then : 第一 = "FY" : 第二 = "FZ" : ElseIf NN2 = 183 Then : 第一 = "GB" : 第二 = "GC" : ElseIf NN2 = 186 Then : 第一 = "GE" : 第二 = "GF"
1175
+        ElseIf NN2 = 189 Then : 第一 = "GH" : 第二 = "GI" : ElseIf NN2 = 192 Then : 第一 = "GK" : 第二 = "GL" : ElseIf NN2 = 195 Then : 第一 = "GN" : 第二 = "GO"
1176
+        ElseIf NN2 = 198 Then : 第一 = "GQ" : 第二 = "GR" : ElseIf NN2 = 201 Then : 第一 = "GT" : 第二 = "GU" : ElseIf NN2 = 204 Then : 第一 = "GW" : 第二 = "GX"
1177
+        ElseIf NN2 = 207 Then : 第一 = "GZ" : 第二 = "HA" : End If
944 1178
 
945
-        xlSheet.Range("G2:K" & N2).Select()
1179
+        xlSheet.Columns(第一 & ":" & 第一).Select
1180
+        With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
1181
+            .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With
1182
+        xlSheet.Columns(第二 & ":" & 第二).Select : myExcel.Selection.NumberFormatLocal = "#,##0;[紅色]-#,##0"
1183
+        xlSheet.Range(第一 & "2:" & 第一 & NN1 - 2).Select()
1184
+        With myExcel.Selection.Interior : .Pattern = xlSolid : .PatternColorIndex = xlAutomatic : .Color = 65535 : .TintAndShade = 0 : .PatternTintAndShade = 0 : End With
1185
+        xlSheet.Range(第一 & "1:" & 第二 & NN1 + 3).Select()
946 1186
         myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
947 1187
         With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
948 1188
         With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
@@ -950,12 +1190,87 @@ Public Class 流水帳查詢
950 1190
         With myExcel.Selection.Borders(xlEdgeRight) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
951 1191
         With myExcel.Selection.Borders(xlInsideVertical) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
952 1192
         With myExcel.Selection.Borders(xlInsideHorizontal) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
953
-        myExcel.Selection.NumberFormatLocal = "#,##0_ ;[紅色]-#,##0 "
954
-        xlSheet.Range("G2:G" & N2).Select()
955
-        With myExcel.Selection.Interior : .Pattern = xlSolid : .PatternColorIndex = xlAutomatic : .Color = 65535
956
-            .TintAndShade = 0 : .PatternTintAndShade = 0 : End With
1193
+    End Sub
1194
+    Private Sub FF(ByVal myExcel As Microsoft.Office.Interop.Excel.Application, ByVal xlSheet As Microsoft.Office.Interop.Excel.Worksheet)
1195
+        xlSheet.Cells.Select()
1196
+        myExcel.Cells.EntireColumn.AutoFit()
1197
+    End Sub
1198
+    Private Sub GG(ByVal myExcel As Microsoft.Office.Interop.Excel.Application, ByVal xlSheet As Microsoft.Office.Interop.Excel.Worksheet)
1199
+        If NN2 = 0 Then : 第一 = "G" : 第二 = "H" : ElseIf NN2 = 3 Then : 第一 = "J" : 第二 = "K"
1200
+        ElseIf NN2 = 6 Then : 第一 = "M" : 第二 = "N"
1201
+        ElseIf NN2 = 9 Then : 第一 = "P" : 第二 = "Q"
1202
+        ElseIf NN2 = 12 Then : 第一 = "S" : 第二 = "T"
1203
+        ElseIf NN2 = 15 Then : 第一 = "V" : 第二 = "W"
1204
+        ElseIf NN2 = 18 Then : 第一 = "Y" : 第二 = "Z"
1205
+        ElseIf NN2 = 21 Then : 第一 = "AB" : 第二 = "AC"
1206
+        ElseIf NN2 = 24 Then : 第一 = "AE" : 第二 = "AF"
1207
+        ElseIf NN2 = 27 Then : 第一 = "AH" : 第二 = "AI"
1208
+        ElseIf NN2 = 30 Then : 第一 = "AK" : 第二 = "AL"
1209
+        ElseIf NN2 = 33 Then : 第一 = "AN" : 第二 = "AO"
1210
+        ElseIf NN2 = 36 Then : 第一 = "AQ" : 第二 = "AR"
1211
+        ElseIf NN2 = 39 Then : 第一 = "AT" : 第二 = "AU"
1212
+        ElseIf NN2 = 42 Then : 第一 = "AW" : 第二 = "AX"
1213
+        ElseIf NN2 = 45 Then : 第一 = "AZ" : 第二 = "BA"
1214
+        ElseIf NN2 = 48 Then : 第一 = "BC" : 第二 = "BD"
1215
+        ElseIf NN2 = 51 Then : 第一 = "BF" : 第二 = "BG"
1216
+        ElseIf NN2 = 54 Then : 第一 = "BI" : 第二 = "BJ"
1217
+        ElseIf NN2 = 57 Then : 第一 = "BL" : 第二 = "BM"
1218
+        ElseIf NN2 = 60 Then : 第一 = "BO" : 第二 = "BP"
1219
+        ElseIf NN2 = 63 Then : 第一 = "BR" : 第二 = "BS"
1220
+        ElseIf NN2 = 66 Then : 第一 = "BU" : 第二 = "BV"
1221
+        ElseIf NN2 = 69 Then : 第一 = "BX" : 第二 = "BY"
1222
+        ElseIf NN2 = 72 Then : 第一 = "CA" : 第二 = "CB"
1223
+        ElseIf NN2 = 75 Then : 第一 = "CD" : 第二 = "CE"
1224
+        ElseIf NN2 = 78 Then : 第一 = "CG" : 第二 = "CH"
1225
+        ElseIf NN2 = 81 Then : 第一 = "CJ" : 第二 = "CK"
1226
+        ElseIf NN2 = 84 Then : 第一 = "CM" : 第二 = "CN"
1227
+        ElseIf NN2 = 87 Then : 第一 = "CP" : 第二 = "CQ"
1228
+        ElseIf NN2 = 90 Then : 第一 = "CS" : 第二 = "CT"
1229
+        ElseIf NN2 = 93 Then : 第一 = "CV" : 第二 = "CW"
1230
+        ElseIf NN2 = 96 Then : 第一 = "CY" : 第二 = "CZ"
1231
+        ElseIf NN2 = 99 Then : 第一 = "DB" : 第二 = "DC"
1232
+        ElseIf NN2 = 102 Then : 第一 = "DE" : 第二 = "DF"
1233
+        ElseIf NN2 = 105 Then : 第一 = "DH" : 第二 = "DI"
1234
+        ElseIf NN2 = 108 Then : 第一 = "DK" : 第二 = "DL"
1235
+        ElseIf NN2 = 111 Then : 第一 = "DN" : 第二 = "DO"
1236
+        ElseIf NN2 = 114 Then : 第一 = "DQ" : 第二 = "DR"
1237
+        ElseIf NN2 = 117 Then : 第一 = "DT" : 第二 = "DU"
1238
+        ElseIf NN2 = 120 Then : 第一 = "DW" : 第二 = "DX"
1239
+        ElseIf NN2 = 123 Then : 第一 = "DZ" : 第二 = "EA"
1240
+        ElseIf NN2 = 126 Then : 第一 = "EC" : 第二 = "ED"
1241
+        ElseIf NN2 = 129 Then : 第一 = "EF" : 第二 = "EG"
1242
+        ElseIf NN2 = 132 Then : 第一 = "EI" : 第二 = "EJ"
1243
+        ElseIf NN2 = 135 Then : 第一 = "EL" : 第二 = "EM"
1244
+        ElseIf NN2 = 138 Then : 第一 = "EO" : 第二 = "EP"
1245
+        ElseIf NN2 = 141 Then : 第一 = "ER" : 第二 = "ES"
1246
+        ElseIf NN2 = 144 Then : 第一 = "EU" : 第二 = "EV"
1247
+        ElseIf NN2 = 147 Then : 第一 = "EX" : 第二 = "EY"
1248
+        ElseIf NN2 = 150 Then : 第一 = "FA" : 第二 = "FB"
1249
+        ElseIf NN2 = 153 Then : 第一 = "FD" : 第二 = "FE"
1250
+        ElseIf NN2 = 156 Then : 第一 = "FG" : 第二 = "FH"
1251
+        ElseIf NN2 = 159 Then : 第一 = "FJ" : 第二 = "FK"
1252
+        ElseIf NN2 = 162 Then : 第一 = "FM" : 第二 = "FN"
1253
+        ElseIf NN2 = 165 Then : 第一 = "FP" : 第二 = "FQ"
1254
+        ElseIf NN2 = 168 Then : 第一 = "FS" : 第二 = "FT"
1255
+        ElseIf NN2 = 171 Then : 第一 = "FV" : 第二 = "FW"
1256
+        ElseIf NN2 = 174 Then : 第一 = "FY" : 第二 = "FZ"
1257
+        ElseIf NN2 = 177 Then : 第一 = "GB" : 第二 = "GC"
1258
+        ElseIf NN2 = 180 Then : 第一 = "GE" : 第二 = "GF"
1259
+        ElseIf NN2 = 183 Then : 第一 = "GH" : 第二 = "GI"
1260
+        ElseIf NN2 = 186 Then : 第一 = "GK" : 第二 = "GL"
1261
+        ElseIf NN2 = 189 Then : 第一 = "GN" : 第二 = "GO"
1262
+        ElseIf NN2 = 192 Then : 第一 = "GQ" : 第二 = "GR"
1263
+        ElseIf NN2 = 195 Then : 第一 = "GT" : 第二 = "GU"
1264
+        ElseIf NN2 = 198 Then : 第一 = "GW" : 第二 = "GX"
1265
+        ElseIf NN2 = 201 Then : 第一 = "GZ" : 第二 = "HA" : End If
957 1266
 
958
-        xlSheet.Range("M2:T" & N3).Select()
1267
+        xlSheet.Columns(第一 & ":" & 第一).Select
1268
+        With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
1269
+            .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With
1270
+        xlSheet.Columns(第二 & ":" & 第二).Select : myExcel.Selection.NumberFormatLocal = "#,##0;[紅色]-#,##0"
1271
+        xlSheet.Range(第一 & "2:" & 第一 & NN1 - 2).Select()
1272
+        With myExcel.Selection.Interior : .Pattern = xlSolid : .PatternColorIndex = xlAutomatic : .Color = 65535 : .TintAndShade = 0 : .PatternTintAndShade = 0 : End With
1273
+        xlSheet.Range(第一 & "1:" & 第二 & NN1 + 3).Select()
959 1274
         myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
960 1275
         With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
961 1276
         With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
@@ -963,9 +1278,5 @@ Public Class 流水帳查詢
963 1278
         With myExcel.Selection.Borders(xlEdgeRight) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
964 1279
         With myExcel.Selection.Borders(xlInsideVertical) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
965 1280
         With myExcel.Selection.Borders(xlInsideHorizontal) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
966
-        myExcel.Selection.NumberFormatLocal = "#,##0_ ;[紅色]-#,##0 "
967
-        xlSheet.Range("M2:N" & N3).Select()
968
-        With myExcel.Selection.Interior : .Pattern = xlSolid : .PatternColorIndex = xlAutomatic : .Color = 65535
969
-            .TintAndShade = 0 : .PatternTintAndShade = 0 : End With
970 1281
     End Sub
971 1282
 End Class

+ 6
- 95
GA-ERP-SYS/資料庫系統管理/系統執行檔版本管理.Designer.vb Wyświetl plik

@@ -22,101 +22,26 @@ Partial Class 系統執行檔版本管理
22 22
     '請勿使用程式碼編輯器進行修改。
23 23
     <System.Diagnostics.DebuggerStepThrough()> _
24 24
     Private Sub InitializeComponent()
25
-        Me.Label1 = New System.Windows.Forms.Label()
26
-        Me.FTP原代碼_wb = New System.Windows.Forms.WebBrowser()
27 25
         Me.資料庫版本號_lb = New System.Windows.Forms.Label()
28
-        Me.Label12 = New System.Windows.Forms.Label()
29
-        Me.Label13 = New System.Windows.Forms.Label()
30
-        Me.讀取資料夾路徑_bt = New System.Windows.Forms.Button()
31
-        Me.本機資料夾_wb = New System.Windows.Forms.WebBrowser()
32
-        Me.FTP執行檔_wb = New System.Windows.Forms.WebBrowser()
33 26
         Me.修改_bt = New System.Windows.Forms.Button()
34 27
         Me.Label3 = New System.Windows.Forms.Label()
35 28
         Me.版本號_tb = New System.Windows.Forms.TextBox()
36 29
         Me.FolderBrowserDialog1 = New System.Windows.Forms.FolderBrowserDialog()
37 30
         Me.SuspendLayout()
38 31
         '
39
-        'Label1
40
-        '
41
-        Me.Label1.AutoSize = True
42
-        Me.Label1.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
43
-        Me.Label1.Location = New System.Drawing.Point(958, 514)
44
-        Me.Label1.Name = "Label1"
45
-        Me.Label1.Size = New System.Drawing.Size(80, 16)
46
-        Me.Label1.TabIndex = 660
47
-        Me.Label1.Text = "原代碼存放取"
48
-        '
49
-        'FTP原代碼_wb
50
-        '
51
-        Me.FTP原代碼_wb.Location = New System.Drawing.Point(961, 536)
52
-        Me.FTP原代碼_wb.MinimumSize = New System.Drawing.Size(20, 20)
53
-        Me.FTP原代碼_wb.Name = "FTP原代碼_wb"
54
-        Me.FTP原代碼_wb.Size = New System.Drawing.Size(936, 419)
55
-        Me.FTP原代碼_wb.TabIndex = 659
56
-        Me.FTP原代碼_wb.Url = New System.Uri("", System.UriKind.Relative)
57
-        '
58 32
         '資料庫版本號_lb
59 33
         '
60 34
         Me.資料庫版本號_lb.AutoSize = True
61 35
         Me.資料庫版本號_lb.BackColor = System.Drawing.SystemColors.Control
62
-        Me.資料庫版本號_lb.Location = New System.Drawing.Point(283, 19)
36
+        Me.資料庫版本號_lb.Location = New System.Drawing.Point(262, 12)
63 37
         Me.資料庫版本號_lb.Name = "資料庫版本號_lb"
64 38
         Me.資料庫版本號_lb.Size = New System.Drawing.Size(146, 12)
65 39
         Me.資料庫版本號_lb.TabIndex = 658
66 40
         Me.資料庫版本號_lb.Text = "資料庫版本號 : 2021060901"
67 41
         '
68
-        'Label12
69
-        '
70
-        Me.Label12.AutoSize = True
71
-        Me.Label12.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
72
-        Me.Label12.Location = New System.Drawing.Point(959, 52)
73
-        Me.Label12.Name = "Label12"
74
-        Me.Label12.Size = New System.Drawing.Size(92, 16)
75
-        Me.Label12.TabIndex = 657
76
-        Me.Label12.Text = "執行檔案更新區"
77
-        '
78
-        'Label13
79
-        '
80
-        Me.Label13.AutoSize = True
81
-        Me.Label13.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
82
-        Me.Label13.Location = New System.Drawing.Point(17, 48)
83
-        Me.Label13.Name = "Label13"
84
-        Me.Label13.Size = New System.Drawing.Size(56, 16)
85
-        Me.Label13.TabIndex = 656
86
-        Me.Label13.Text = "我的電腦"
87
-        '
88
-        '讀取資料夾路徑_bt
89
-        '
90
-        Me.讀取資料夾路徑_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
91
-        Me.讀取資料夾路徑_bt.ForeColor = System.Drawing.Color.Blue
92
-        Me.讀取資料夾路徑_bt.Location = New System.Drawing.Point(79, 44)
93
-        Me.讀取資料夾路徑_bt.Name = "讀取資料夾路徑_bt"
94
-        Me.讀取資料夾路徑_bt.Size = New System.Drawing.Size(97, 24)
95
-        Me.讀取資料夾路徑_bt.TabIndex = 655
96
-        Me.讀取資料夾路徑_bt.Text = "讀取料夾路徑"
97
-        Me.讀取資料夾路徑_bt.UseVisualStyleBackColor = True
98
-        '
99
-        '本機資料夾_wb
100
-        '
101
-        Me.本機資料夾_wb.Location = New System.Drawing.Point(20, 74)
102
-        Me.本機資料夾_wb.MinimumSize = New System.Drawing.Size(20, 20)
103
-        Me.本機資料夾_wb.Name = "本機資料夾_wb"
104
-        Me.本機資料夾_wb.Size = New System.Drawing.Size(936, 881)
105
-        Me.本機資料夾_wb.TabIndex = 654
106
-        Me.本機資料夾_wb.Url = New System.Uri("", System.UriKind.Relative)
107
-        '
108
-        'FTP執行檔_wb
109
-        '
110
-        Me.FTP執行檔_wb.Location = New System.Drawing.Point(962, 74)
111
-        Me.FTP執行檔_wb.MinimumSize = New System.Drawing.Size(20, 20)
112
-        Me.FTP執行檔_wb.Name = "FTP執行檔_wb"
113
-        Me.FTP執行檔_wb.Size = New System.Drawing.Size(936, 419)
114
-        Me.FTP執行檔_wb.TabIndex = 653
115
-        Me.FTP執行檔_wb.Url = New System.Uri("", System.UriKind.Relative)
116
-        '
117 42
         '修改_bt
118 43
         '
119
-        Me.修改_bt.Location = New System.Drawing.Point(172, 16)
44
+        Me.修改_bt.Location = New System.Drawing.Point(155, 6)
120 45
         Me.修改_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
121 46
         Me.修改_bt.Name = "修改_bt"
122 47
         Me.修改_bt.Size = New System.Drawing.Size(105, 24)
@@ -127,7 +52,7 @@ Partial Class 系統執行檔版本管理
127 52
         '
128 53
         Me.Label3.AutoSize = True
129 54
         Me.Label3.BackColor = System.Drawing.SystemColors.Control
130
-        Me.Label3.Location = New System.Drawing.Point(17, 19)
55
+        Me.Label3.Location = New System.Drawing.Point(9, 12)
131 56
         Me.Label3.Name = "Label3"
132 57
         Me.Label3.Size = New System.Drawing.Size(41, 12)
133 58
         Me.Label3.TabIndex = 651
@@ -136,7 +61,7 @@ Partial Class 系統執行檔版本管理
136 61
         '版本號_tb
137 62
         '
138 63
         Me.版本號_tb.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
139
-        Me.版本號_tb.Location = New System.Drawing.Point(63, 16)
64
+        Me.版本號_tb.Location = New System.Drawing.Point(52, 7)
140 65
         Me.版本號_tb.Margin = New System.Windows.Forms.Padding(5)
141 66
         Me.版本號_tb.Name = "版本號_tb"
142 67
         Me.版本號_tb.Size = New System.Drawing.Size(101, 23)
@@ -146,33 +71,19 @@ Partial Class 系統執行檔版本管理
146 71
         '
147 72
         Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
148 73
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
149
-        Me.ClientSize = New System.Drawing.Size(1914, 971)
150
-        Me.Controls.Add(Me.Label1)
151
-        Me.Controls.Add(Me.FTP原代碼_wb)
74
+        Me.ClientSize = New System.Drawing.Size(411, 35)
152 75
         Me.Controls.Add(Me.資料庫版本號_lb)
153
-        Me.Controls.Add(Me.Label12)
154
-        Me.Controls.Add(Me.Label13)
155
-        Me.Controls.Add(Me.讀取資料夾路徑_bt)
156
-        Me.Controls.Add(Me.本機資料夾_wb)
157
-        Me.Controls.Add(Me.FTP執行檔_wb)
158 76
         Me.Controls.Add(Me.修改_bt)
159 77
         Me.Controls.Add(Me.Label3)
160 78
         Me.Controls.Add(Me.版本號_tb)
161 79
         Me.Name = "系統執行檔版本管理"
80
+        Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
162 81
         Me.Text = "系統執行檔版本管理"
163 82
         Me.ResumeLayout(False)
164 83
         Me.PerformLayout()
165 84
 
166 85
     End Sub
167
-
168
-    Friend WithEvents Label1 As Label
169
-    Friend WithEvents FTP原代碼_wb As WebBrowser
170 86
     Friend WithEvents 資料庫版本號_lb As Label
171
-    Friend WithEvents Label12 As Label
172
-    Friend WithEvents Label13 As Label
173
-    Friend WithEvents 讀取資料夾路徑_bt As Button
174
-    Friend WithEvents 本機資料夾_wb As WebBrowser
175
-    Friend WithEvents FTP執行檔_wb As WebBrowser
176 87
     Friend WithEvents 修改_bt As Button
177 88
     Friend WithEvents Label3 As Label
178 89
     Friend WithEvents 版本號_tb As TextBox

+ 1
- 6
GA-ERP-SYS/資料庫系統管理/系統執行檔版本管理.vb Wyświetl plik

@@ -1,17 +1,12 @@
1 1
 Option Strict Off
2 2
 Public Class 系統執行檔版本管理
3 3
     Private Sub 系統執行檔版本管理_Load(sender As Object, e As EventArgs) Handles MyBase.Load
4
-        Me.MdiParent = GA_ERP_SYS : Me.WindowState = 2 : Me.AutoScroll = True
5 4
         SQL_系統版本號驗證()
6 5
         If dr.Read() Then : 資料庫版本號_lb.Text = "資料庫版本號 : " & dr("系統認證版本號") : 版本號_tb.Text = dr("系統認證版本號") : End If : conn.Close()
7
-        Target1 = Target & AA(0) & "/" : Target2 = Target & AA(1) & "/" : FTP執行檔_wb.Url = New Uri(Target1) : FTP原代碼_wb.Url = New Uri(Target2)
8
-        If FolderBrowserDialog1.ShowDialog = DialogResult.OK Then : 本機資料夾_wb.Navigate(FolderBrowserDialog1.SelectedPath) : End If
9 6
     End Sub
10 7
     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles 修改_bt.Click
11 8
         SQL_版本號管理修改() : conn.Close() : SQL_系統版本號驗證()
12 9
         If dr.Read() Then : 資料庫版本號_lb.Text = "資料庫版本號 : " & dr("系統認證版本號") : 版本號_tb.Text = dr("系統認證版本號") : End If : conn.Close() : MsgBox("修改完成")
13
-    End Sub
14
-    Private Sub Button14_Click(sender As Object, e As EventArgs) Handles 讀取資料夾路徑_bt.Click
15
-        If FolderBrowserDialog1.ShowDialog = DialogResult.OK Then : 本機資料夾_wb.Navigate(FolderBrowserDialog1.SelectedPath) : End If
10
+        Me.Close()
16 11
     End Sub
17 12
 End Class

Ładowanie…
Anuluj
Zapisz