B70340 3 年前
父节点
当前提交
7d57b535ad

二进制
.vs/GA-ERP-SYS/v16/.suo 查看文件


+ 7
- 7
GA-ERP-SYS/GA-ERP-SYS.Designer.vb 查看文件

156
         '
156
         '
157
         Me.基本資料_tsm.Image = Global.GA_ERP_SYS.My.Resources.Resources.business_info
157
         Me.基本資料_tsm.Image = Global.GA_ERP_SYS.My.Resources.Resources.business_info
158
         Me.基本資料_tsm.Name = "基本資料_tsm"
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
         Me.基本資料_tsm.Text = "基本資料"
160
         Me.基本資料_tsm.Text = "基本資料"
161
         '
161
         '
162
         '報表系統管理ToolStripMenuItem
162
         '報表系統管理ToolStripMenuItem
186
         '
186
         '
187
         Me.流水帳自動導入_tsm.Image = Global.GA_ERP_SYS.My.Resources.Resources.pen
187
         Me.流水帳自動導入_tsm.Image = Global.GA_ERP_SYS.My.Resources.Resources.pen
188
         Me.流水帳自動導入_tsm.Name = "流水帳自動導入_tsm"
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
         Me.流水帳自動導入_tsm.Text = "流水帳自動導入"
190
         Me.流水帳自動導入_tsm.Text = "流水帳自動導入"
191
         '
191
         '
192
         '流水帳手動輸入_tsm
192
         '流水帳手動輸入_tsm
193
         '
193
         '
194
         Me.流水帳手動輸入_tsm.Image = Global.GA_ERP_SYS.My.Resources.Resources.pen
194
         Me.流水帳手動輸入_tsm.Image = Global.GA_ERP_SYS.My.Resources.Resources.pen
195
         Me.流水帳手動輸入_tsm.Name = "流水帳手動輸入_tsm"
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
         Me.流水帳手動輸入_tsm.Text = "流水帳手動輸入"
197
         Me.流水帳手動輸入_tsm.Text = "流水帳手動輸入"
198
         '
198
         '
199
         '商客資料導入_tsm
199
         '商客資料導入_tsm
200
         '
200
         '
201
         Me.商客資料導入_tsm.Image = Global.GA_ERP_SYS.My.Resources.Resources.pen
201
         Me.商客資料導入_tsm.Image = Global.GA_ERP_SYS.My.Resources.Resources.pen
202
         Me.商客資料導入_tsm.Name = "商客資料導入_tsm"
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
         Me.商客資料導入_tsm.Text = "商客資料導入"
204
         Me.商客資料導入_tsm.Text = "商客資料導入"
205
         '
205
         '
206
         '資料庫系統管理_tsm
206
         '資料庫系統管理_tsm
238
         Me.FTP_tsm.Name = "FTP_tsm"
238
         Me.FTP_tsm.Name = "FTP_tsm"
239
         Me.FTP_tsm.Size = New System.Drawing.Size(194, 22)
239
         Me.FTP_tsm.Size = New System.Drawing.Size(194, 22)
240
         Me.FTP_tsm.Text = "FTP資料夾管理"
240
         Me.FTP_tsm.Text = "FTP資料夾管理"
241
+        Me.FTP_tsm.Visible = False
241
         '
242
         '
242
         '人員ID卡系統配置設定_tsm
243
         '人員ID卡系統配置設定_tsm
243
         '
244
         '
258
         'ToolStripStatusLabel
259
         'ToolStripStatusLabel
259
         '
260
         '
260
         Me.ToolStripStatusLabel.Name = "ToolStripStatusLabel"
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
         'ToolStripStatusLabel1
265
         'ToolStripStatusLabel1
266
         '
266
         '

+ 1
- 1
GA-ERP-SYS/GA-ERP-SYS.vb 查看文件

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

+ 31
- 23
GA-ERP-SYS/LoginForm1.vb 查看文件

33
 
33
 
34
         Me.ActiveControl = 使用者帳號_cb
34
         Me.ActiveControl = 使用者帳號_cb
35
         '-----MAC碼與硬碟資料-------------------------------------------------------------------------------------------------------------------------------------------------------------
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
         Set_使用者清單()
57
         Set_使用者清單()
58
     End Sub
58
     End Sub
59
     Private Sub 簡易登入_dgv_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles 簡易登入_dgv.CellClick
59
     Private Sub 簡易登入_dgv_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles 簡易登入_dgv.CellClick
63
     End Sub
63
     End Sub
64
     Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 伺服器區域_ch.SelectedIndexChanged
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
     End Sub
67
     End Sub
68
     Private Sub 登入()
68
     Private Sub 登入()
69
         '-----------------------寫入連線字串-----------------------------------------------------------------------------------------------------------------------------------------------
69
         '-----------------------寫入連線字串-----------------------------------------------------------------------------------------------------------------------------------------------
89
         登入程序()
89
         登入程序()
90
     End Sub
90
     End Sub
91
     Private Sub 自動更新2()
91
     Private Sub 自動更新2()
92
-        Dim aa1 As MsgBoxResult
93
-        aa1 = MsgBox("系統版本號 與 資料庫版本號 對應不上,請下載最新的執行檔。", MsgBoxStyle.OkCancel)
92
+        Dim aa1 As MsgBoxResult = MsgBox("系統版本號 與 資料庫版本號 對應不上,請下載最新的執行檔。", MsgBoxStyle.OkCancel)
94
         If aa1 = MsgBoxResult.Ok Then
93
         If aa1 = MsgBoxResult.Ok Then
95
             更新下載_ch.Checked = True
94
             更新下載_ch.Checked = True
96
             Me.Size = New Size(805, 279)
95
             Me.Size = New Size(805, 279)
101
             ElseIf screenWidth = 1600 And screenHeight = 900 Then
100
             ElseIf screenWidth = 1600 And screenHeight = 900 Then
102
             End If
101
             End If
103
             Shell("explorer http://106.1.50.79:8080/ga-erp-sys/", vbNormalFocus)
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
         End If
112
         End If
105
     End Sub
113
     End Sub
106
     Private Sub 登入程序()
114
     Private Sub 登入程序()

+ 67
- 15
GA-ERP-SYS/Module/SQL_子系統管理.vb 查看文件

14
     '-----------------------下行客戶--------------------------------------------------------------------
14
     '-----------------------下行客戶--------------------------------------------------------------------
15
     Friend Sub SQL_基本資料_客戶下資料表()
15
     Friend Sub SQL_基本資料_客戶下資料表()
16
         ConnOpen_子SQL()
16
         ConnOpen_子SQL()
17
-        SQL1 = "SELECT     商客基本資料表.商品, 下行客戶.網址, 下行客戶.帳號 AS 老闆帳號, 下行客戶.客戶下 AS 客戶帳號, 下行客戶.基數 AS 客戶名稱, 下行客戶.流水號
17
+        SQL1 = "SELECT     商客基本資料表.商品, 下行客戶.網址, 下行客戶.帳號 AS 老闆帳號, 下行客戶.客戶下 AS 客戶帳號, 下行客戶.客名 AS 客戶名稱, 下行客戶.流水號, 下行客戶.基數
18
                 FROM       下行客戶 LEFT OUTER JOIN
18
                 FROM       下行客戶 LEFT OUTER JOIN
19
                            商客基本資料表 ON 下行客戶.網址 = 商客基本資料表.網址 AND 下行客戶.帳號 = 商客基本資料表.帳號
19
                            商客基本資料表 ON 下行客戶.網址 = 商客基本資料表.網址 AND 下行客戶.帳號 = 商客基本資料表.帳號
20
+                WHERE      下行客戶.客戶下 LIKE N'%" & PA & "%' " & PA9 & "
20
                 ORDER BY   商客基本資料表.商品, 下行客戶.帳號"
21
                 ORDER BY   商客基本資料表.商品, 下行客戶.帳號"
21
         CmdSet_For_DGV()
22
         CmdSet_For_DGV()
22
     End Sub
23
     End Sub
23
     Friend Sub SQL_系統編碼規則_客戶下重複查詢()
24
     Friend Sub SQL_系統編碼規則_客戶下重複查詢()
25
+        ConnOpen_子SQL()
24
         SQL1 = "SELECT 客戶下 FROM 下行客戶 
26
         SQL1 = "SELECT 客戶下 FROM 下行客戶 
25
                 WHERE  客戶下 LIKE N'" & 基本資料.客戶下_tb.Text & "' AND 網址 LIKE N'" & 基本資料.網址3_tb.Text & "' AND 
27
                 WHERE  客戶下 LIKE N'" & 基本資料.客戶下_tb.Text & "' AND 網址 LIKE N'" & 基本資料.網址3_tb.Text & "' AND 
26
                        帳號 LIKE N'" & 基本資料.帳號3_tb.Text & "' AND 基數 LIKE N'" & 基本資料.下行1_cb.Text & "'"
28
                        帳號 LIKE N'" & 基本資料.帳號3_tb.Text & "' AND 基數 LIKE N'" & 基本資料.下行1_cb.Text & "'"
29
+        CmdSet_For_dr()
27
     End Sub
30
     End Sub
28
     Friend Sub SQL_系統編碼規則_客戶下新增()
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
     End Sub
37
     End Sub
32
     Friend Sub SQL_系統編碼規則_客戶下刪除()
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
     End Sub
40
     End Sub
36
     Friend Sub SQL_系統編碼規則_客戶下修改()
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
     End Sub
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
     Friend Sub SQL_商客資料表()
51
     Friend Sub SQL_商客資料表()
43
         ConnOpen_子SQL()
52
         ConnOpen_子SQL()
44
         SQL1 = "SELECT 網址, 帳號, 密碼, 資料, 上繳源, 商品, 上行基數, 下行基數 FROM 商客基本資料表 WHERE 網址 NOT LIKE N'' ORDER BY  商品, 上繳源, 帳號"
53
         SQL1 = "SELECT 網址, 帳號, 密碼, 資料, 上繳源, 商品, 上行基數, 下行基數 FROM 商客基本資料表 WHERE 網址 NOT LIKE N'' ORDER BY  商品, 上繳源, 帳號"
56
                                     N'" & 基本資料.上繳源_tb.Text & "', N'" & 基本資料.商品_cb.Text & "', N'" & 基本資料.上行_cb.Text & "', N'" & 基本資料.下行_cb.Text & "')"
65
                                     N'" & 基本資料.上繳源_tb.Text & "', N'" & 基本資料.商品_cb.Text & "', N'" & 基本資料.上行_cb.Text & "', N'" & 基本資料.下行_cb.Text & "')"
57
     End Sub
66
     End Sub
58
     Friend Sub SQL_系統編碼規則_商客刪除()
67
     Friend Sub SQL_系統編碼規則_商客刪除()
68
+        ConnOpen_子SQL()
59
         SQL1 = "DELETE FROM 商客基本資料表 WHERE (帳號 LIKE N'" & 基本資料.帳號_tb.Text & "' AND  網址 LIKE N'" & 基本資料.網址_tb.Text & "')"
69
         SQL1 = "DELETE FROM 商客基本資料表 WHERE (帳號 LIKE N'" & 基本資料.帳號_tb.Text & "' AND  網址 LIKE N'" & 基本資料.網址_tb.Text & "')"
70
+        CmdSet_For_dr()
60
     End Sub
71
     End Sub
61
     Friend Sub SQL_系統編碼規則_商客修改()
72
     Friend Sub SQL_系統編碼規則_商客修改()
62
         SQL1 = "UPDATE 商客基本資料表 SET 網址 = N'" & PA2 & "',上繳源 = N'" & PA3 & "', 資料 = N'" & PA8 & "', 商品 = N'" & PA9 & "',
73
         SQL1 = "UPDATE 商客基本資料表 SET 網址 = N'" & PA2 & "',上繳源 = N'" & PA3 & "', 資料 = N'" & PA8 & "', 商品 = N'" & PA9 & "',
63
                                           帳號 = N'" & PA4 & "', 密碼 = N'" & PA5 & "' ,上行基數 = N'" & PA6 & "' ,下行基數 = N'" & PA7 & "'                                    
74
                                           帳號 = N'" & PA4 & "', 密碼 = N'" & PA5 & "' ,上行基數 = N'" & PA6 & "' ,下行基數 = N'" & PA7 & "'                                    
64
                                   WHERE (帳號 LIKE N'" & 基本資料.帳號1_tb.Text & "' AND  網址 LIKE N'" & 基本資料.網址1_tb.Text & "')"
75
                                   WHERE (帳號 LIKE N'" & 基本資料.帳號1_tb.Text & "' AND  網址 LIKE N'" & 基本資料.網址1_tb.Text & "')"
65
     End Sub
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
     Friend Sub SQL_下拉商品清單讀取()
84
     Friend Sub SQL_下拉商品清單讀取()
69
         ConnOpen_子SQL() : SQL1 = "SELECT 商品 FROM 商品資料表" : CmdSet_For_dr()
85
         ConnOpen_子SQL() : SQL1 = "SELECT 商品 FROM 商品資料表" : CmdSet_For_dr()
186
     Friend Sub SQL_LOG_刪除1()
202
     Friend Sub SQL_LOG_刪除1()
187
         ConnOpen_子SQL() : SQL1 = "DELETE [LOG] WHERE 查詢區間 LIKE N'" & PA1 & "-" & PA2 & "'" : CmdSet_For_dr()
203
         ConnOpen_子SQL() : SQL1 = "DELETE [LOG] WHERE 查詢區間 LIKE N'" & PA1 & "-" & PA2 & "'" : CmdSet_For_dr()
188
     End Sub
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
     Friend Sub SQL_查詢日期資料()
205
     Friend Sub SQL_查詢日期資料()
193
         ConnOpen_子SQL() : SQL1 = "SELECT TOP (1) 開始, 結束 FROM 查詢時間" : CmdSet_For_dr()
206
         ConnOpen_子SQL() : SQL1 = "SELECT TOP (1) 開始, 結束 FROM 查詢時間" : CmdSet_For_dr()
194
     End Sub
207
     End Sub
291
                 ORDER BY    商客基本資料表.上繳源"
304
                 ORDER BY    商客基本資料表.上繳源"
292
         CmdSet_For_DGV()
305
         CmdSet_For_DGV()
293
     End Sub
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
     Friend Sub SQL_流水帳_清除()
340
     Friend Sub SQL_流水帳_清除()
295
         ConnOpen_子SQL()
341
         ConnOpen_子SQL()
296
         SQL1 = "DELETE  流水帳 
342
         SQL1 = "DELETE  流水帳 
308
         ConnOpen_子SQL() : SQL1 = "SELECT 商品 FROM 商客基本資料表 GROUP BY 商品 ORDER BY 商品" : CmdSet_For_dr()
354
         ConnOpen_子SQL() : SQL1 = "SELECT 商品 FROM 商客基本資料表 GROUP BY 商品 ORDER BY 商品" : CmdSet_For_dr()
309
     End Sub
355
     End Sub
310
     Friend Sub SQL_流水帳_客戶下新增()
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
     End Sub
361
     End Sub
313
     Friend Sub SQL_流水帳_客戶下修改()
362
     Friend Sub SQL_流水帳_客戶下修改()
314
         ConnOpen_子SQL()
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
         CmdSet_For_dr()
365
         CmdSet_For_dr()
317
     End Sub
366
     End Sub
318
     Friend Sub SQL_客戶下資料表()
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
     End Sub
372
     End Sub
321
     Friend Sub SQL_LOG查詢1()
373
     Friend Sub SQL_LOG查詢1()
322
         ConnOpen_子SQL()
374
         ConnOpen_子SQL()

+ 1
- 1
GA-ERP-SYS/Module/SQL_連線字串.vb 查看文件

1
 Module SQL_連線字串
1
 Module SQL_連線字串
2
     Friend Sub SQL_連線字串_主SQL()
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
     End Sub
4
     End Sub
5
     Friend Sub SQL_連線字串_子SQL()
5
     Friend Sub SQL_連線字串_子SQL()
6
         ConString1 = "Data Source=" & 登入人IP2 & ";Initial Catalog=" & 子SQL名稱 & ";Persist Security Info=True;User ID=" & 業務帳號 & ";Password=" & 業務密碼 & ";Max pool size = 200;Connection Timeout=0"
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 查看文件

7
     Public 子SQL名稱 As String : Public 子SQL名稱1 As String : Public 登入客戶 As String : Public 登入資料庫 As String : Public 業務名稱 As String
7
     Public 子SQL名稱 As String : Public 子SQL名稱1 As String : Public 登入客戶 As String : Public 登入資料庫 As String : Public 業務名稱 As String
8
     Public 業務帳號 As String : Public 業務密碼 As String : Public 業務帳號1 As String : Public 業務密碼1 As String
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
     Public 判斷重登 As Boolean : Public 內外網 As Boolean : Public 重登確認 As Boolean : Public 主頁開啟 As Boolean
13
     Public 判斷重登 As Boolean : Public 內外網 As Boolean : Public 重登確認 As Boolean : Public 主頁開啟 As Boolean

+ 2
- 2
GA-ERP-SYS/My Project/AssemblyInfo.vb 查看文件

31
 ' 設為預設,如下所示:
31
 ' 設為預設,如下所示:
32
 ' <Assembly: AssemblyVersion("1.0.*")>
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")>

二进制
GA-ERP-SYS/bin/Debug/2021061001.exe → GA-ERP-SYS/bin/Debug/2021071201.exe 查看文件


二进制
GA-ERP-SYS/bin/Debug/GA-ERP-SYS.exe 查看文件


二进制
GA-ERP-SYS/bin/Debug/GA-ERP-SYS.pdb 查看文件


二进制
GA-ERP-SYS/bin/Debug/新增資料夾/2021061001.exe 查看文件


二进制
GA-ERP-SYS/obj/Debug/GA-ERP-SYS.exe 查看文件


二进制
GA-ERP-SYS/obj/Debug/GA-ERP-SYS.pdb 查看文件


二进制
GA-ERP-SYS/obj/Debug/GA-ERP-SYS.vbproj.GenerateResource.cache 查看文件


二进制
GA-ERP-SYS/obj/Debug/GA-ERP-SYS.vbprojAssemblyReference.cache 查看文件


+ 204
- 48
GA-ERP-SYS/基本資料管理/基本資料.Designer.vb 查看文件

34
         Me.GroupBox3 = New System.Windows.Forms.GroupBox()
34
         Me.GroupBox3 = New System.Windows.Forms.GroupBox()
35
         Me.資料_dgv = New System.Windows.Forms.DataGridView()
35
         Me.資料_dgv = New System.Windows.Forms.DataGridView()
36
         Me.GroupBox5 = New System.Windows.Forms.GroupBox()
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
         Me.下行1_cb = New System.Windows.Forms.ComboBox()
46
         Me.下行1_cb = New System.Windows.Forms.ComboBox()
38
         Me.Label29 = New System.Windows.Forms.Label()
47
         Me.Label29 = New System.Windows.Forms.Label()
39
         Me.網址3_tb = New System.Windows.Forms.TextBox()
48
         Me.網址3_tb = New System.Windows.Forms.TextBox()
47
         Me.客戶下_dgv = New System.Windows.Forms.DataGridView()
56
         Me.客戶下_dgv = New System.Windows.Forms.DataGridView()
48
         Me.Label25 = New System.Windows.Forms.Label()
57
         Me.Label25 = New System.Windows.Forms.Label()
49
         Me.GroupBox7 = New System.Windows.Forms.GroupBox()
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
         Me.下行_cb = New System.Windows.Forms.ComboBox()
61
         Me.下行_cb = New System.Windows.Forms.ComboBox()
51
         Me.上行_cb = New System.Windows.Forms.ComboBox()
62
         Me.上行_cb = New System.Windows.Forms.ComboBox()
52
         Me.Label24 = New System.Windows.Forms.Label()
63
         Me.Label24 = New System.Windows.Forms.Label()
167
         '
178
         '
168
         'GroupBox5
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
         Me.GroupBox5.Controls.Add(Me.下行1_cb)
190
         Me.GroupBox5.Controls.Add(Me.下行1_cb)
171
         Me.GroupBox5.Controls.Add(Me.Label29)
191
         Me.GroupBox5.Controls.Add(Me.Label29)
172
         Me.GroupBox5.Controls.Add(Me.網址3_tb)
192
         Me.GroupBox5.Controls.Add(Me.網址3_tb)
188
         Me.GroupBox5.TabStop = False
208
         Me.GroupBox5.TabStop = False
189
         Me.GroupBox5.Text = "下行客戶"
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
         '下行1_cb
309
         '下行1_cb
192
         '
310
         '
193
         Me.下行1_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
311
         Me.下行1_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
194
         Me.下行1_cb.FormattingEnabled = True
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
         Me.下行1_cb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
314
         Me.下行1_cb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
197
         Me.下行1_cb.Name = "下行1_cb"
315
         Me.下行1_cb.Name = "下行1_cb"
198
         Me.下行1_cb.Size = New System.Drawing.Size(110, 24)
316
         Me.下行1_cb.Size = New System.Drawing.Size(110, 24)
202
         '
320
         '
203
         Me.Label29.AutoSize = True
321
         Me.Label29.AutoSize = True
204
         Me.Label29.Font = New System.Drawing.Font("微軟正黑體", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
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
         Me.Label29.Name = "Label29"
324
         Me.Label29.Name = "Label29"
207
         Me.Label29.Size = New System.Drawing.Size(34, 17)
325
         Me.Label29.Size = New System.Drawing.Size(34, 17)
208
         Me.Label29.TabIndex = 1529
326
         Me.Label29.TabIndex = 1529
210
         '
328
         '
211
         '網址3_tb
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
         Me.網址3_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
332
         Me.網址3_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
215
         Me.網址3_tb.Name = "網址3_tb"
333
         Me.網址3_tb.Name = "網址3_tb"
216
         Me.網址3_tb.Size = New System.Drawing.Size(271, 23)
334
         Me.網址3_tb.Size = New System.Drawing.Size(271, 23)
218
         '
336
         '
219
         '帳號3_tb
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
         Me.帳號3_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
340
         Me.帳號3_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
223
         Me.帳號3_tb.Name = "帳號3_tb"
341
         Me.帳號3_tb.Name = "帳號3_tb"
224
         Me.帳號3_tb.Size = New System.Drawing.Size(134, 23)
342
         Me.帳號3_tb.Size = New System.Drawing.Size(134, 23)
228
         '
346
         '
229
         Me.Label26.AutoSize = True
347
         Me.Label26.AutoSize = True
230
         Me.Label26.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
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
         Me.Label26.Name = "Label26"
350
         Me.Label26.Name = "Label26"
233
         Me.Label26.Size = New System.Drawing.Size(32, 16)
351
         Me.Label26.Size = New System.Drawing.Size(32, 16)
234
         Me.Label26.TabIndex = 1523
352
         Me.Label26.TabIndex = 1523
238
         '
356
         '
239
         Me.客戶下刪除_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
357
         Me.客戶下刪除_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
240
         Me.客戶下刪除_bt.ForeColor = System.Drawing.Color.Red
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
         Me.客戶下刪除_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
360
         Me.客戶下刪除_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
243
         Me.客戶下刪除_bt.Name = "客戶下刪除_bt"
361
         Me.客戶下刪除_bt.Name = "客戶下刪除_bt"
244
         Me.客戶下刪除_bt.Size = New System.Drawing.Size(52, 24)
362
         Me.客戶下刪除_bt.Size = New System.Drawing.Size(52, 24)
248
         '
366
         '
249
         '客戶下_tb
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
         Me.客戶下_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
370
         Me.客戶下_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
253
         Me.客戶下_tb.Name = "客戶下_tb"
371
         Me.客戶下_tb.Name = "客戶下_tb"
254
         Me.客戶下_tb.Size = New System.Drawing.Size(134, 23)
372
         Me.客戶下_tb.Size = New System.Drawing.Size(134, 23)
257
         '客戶下修正_bt
375
         '客戶下修正_bt
258
         '
376
         '
259
         Me.客戶下修正_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
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
         Me.客戶下修正_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
379
         Me.客戶下修正_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
262
         Me.客戶下修正_bt.Name = "客戶下修正_bt"
380
         Me.客戶下修正_bt.Name = "客戶下修正_bt"
263
         Me.客戶下修正_bt.Size = New System.Drawing.Size(52, 24)
381
         Me.客戶下修正_bt.Size = New System.Drawing.Size(52, 24)
269
         '
387
         '
270
         Me.Label6.AutoSize = True
388
         Me.Label6.AutoSize = True
271
         Me.Label6.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
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
         Me.Label6.Name = "Label6"
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
         Me.Label6.TabIndex = 1
393
         Me.Label6.TabIndex = 1
276
-        Me.Label6.Text = "客戶"
394
+        Me.Label6.Text = "客戶帳號"
277
         '
395
         '
278
         '客戶下新增_bt
396
         '客戶下新增_bt
279
         '
397
         '
280
         Me.客戶下新增_bt.BackColor = System.Drawing.SystemColors.ControlLight
398
         Me.客戶下新增_bt.BackColor = System.Drawing.SystemColors.ControlLight
281
         Me.客戶下新增_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
399
         Me.客戶下新增_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
282
         Me.客戶下新增_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
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
         Me.客戶下新增_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
402
         Me.客戶下新增_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
285
         Me.客戶下新增_bt.Name = "客戶下新增_bt"
403
         Me.客戶下新增_bt.Name = "客戶下新增_bt"
286
         Me.客戶下新增_bt.Size = New System.Drawing.Size(52, 24)
404
         Me.客戶下新增_bt.Size = New System.Drawing.Size(52, 24)
296
             Or System.Windows.Forms.AnchorStyles.Left) _
414
             Or System.Windows.Forms.AnchorStyles.Left) _
297
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
415
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
298
         Me.客戶下_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
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
         Me.客戶下_dgv.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
418
         Me.客戶下_dgv.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
301
         Me.客戶下_dgv.Name = "客戶下_dgv"
419
         Me.客戶下_dgv.Name = "客戶下_dgv"
302
         Me.客戶下_dgv.RowHeadersWidth = 4
420
         Me.客戶下_dgv.RowHeadersWidth = 4
303
         Me.客戶下_dgv.RowTemplate.Height = 24
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
         Me.客戶下_dgv.TabIndex = 0
423
         Me.客戶下_dgv.TabIndex = 0
306
         '
424
         '
307
         'Label25
425
         'Label25
308
         '
426
         '
309
         Me.Label25.AutoSize = True
427
         Me.Label25.AutoSize = True
310
         Me.Label25.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
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
         Me.Label25.Name = "Label25"
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
         Me.Label25.TabIndex = 1522
432
         Me.Label25.TabIndex = 1522
315
-        Me.Label25.Text = "帳號"
433
+        Me.Label25.Text = "老闆帳號"
316
         '
434
         '
317
         'GroupBox7
435
         'GroupBox7
318
         '
436
         '
437
+        Me.GroupBox7.Controls.Add(Me.清除搜索2_bt)
438
+        Me.GroupBox7.Controls.Add(Me.搜索2_bt)
319
         Me.GroupBox7.Controls.Add(Me.下行_cb)
439
         Me.GroupBox7.Controls.Add(Me.下行_cb)
320
         Me.GroupBox7.Controls.Add(Me.上行_cb)
440
         Me.GroupBox7.Controls.Add(Me.上行_cb)
321
         Me.GroupBox7.Controls.Add(Me.Label24)
441
         Me.GroupBox7.Controls.Add(Me.Label24)
347
         Me.GroupBox7.TabStop = False
467
         Me.GroupBox7.TabStop = False
348
         Me.GroupBox7.Text = "商客基本資料表"
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
         '下行_cb
496
         '下行_cb
351
         '
497
         '
352
         Me.下行_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
498
         Me.下行_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
353
         Me.下行_cb.FormattingEnabled = True
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
         Me.下行_cb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
501
         Me.下行_cb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
356
         Me.下行_cb.Name = "下行_cb"
502
         Me.下行_cb.Name = "下行_cb"
357
         Me.下行_cb.Size = New System.Drawing.Size(110, 24)
503
         Me.下行_cb.Size = New System.Drawing.Size(110, 24)
361
         '
507
         '
362
         Me.上行_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
508
         Me.上行_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
363
         Me.上行_cb.FormattingEnabled = True
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
         Me.上行_cb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
511
         Me.上行_cb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
366
         Me.上行_cb.Name = "上行_cb"
512
         Me.上行_cb.Name = "上行_cb"
367
         Me.上行_cb.Size = New System.Drawing.Size(110, 24)
513
         Me.上行_cb.Size = New System.Drawing.Size(110, 24)
371
         '
517
         '
372
         Me.Label24.AutoSize = True
518
         Me.Label24.AutoSize = True
373
         Me.Label24.Font = New System.Drawing.Font("微軟正黑體", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
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
         Me.Label24.Name = "Label24"
521
         Me.Label24.Name = "Label24"
376
         Me.Label24.Size = New System.Drawing.Size(60, 17)
522
         Me.Label24.Size = New System.Drawing.Size(60, 17)
377
         Me.Label24.TabIndex = 1524
523
         Me.Label24.TabIndex = 1524
381
         '
527
         '
382
         Me.Label22.AutoSize = True
528
         Me.Label22.AutoSize = True
383
         Me.Label22.Font = New System.Drawing.Font("微軟正黑體", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
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
         Me.Label22.Name = "Label22"
531
         Me.Label22.Name = "Label22"
386
         Me.Label22.Size = New System.Drawing.Size(60, 17)
532
         Me.Label22.Size = New System.Drawing.Size(60, 17)
387
         Me.Label22.TabIndex = 1523
533
         Me.Label22.TabIndex = 1523
392
         Me.網址1_tb.Location = New System.Drawing.Point(47, 273)
538
         Me.網址1_tb.Location = New System.Drawing.Point(47, 273)
393
         Me.網址1_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
539
         Me.網址1_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
394
         Me.網址1_tb.Name = "網址1_tb"
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
         Me.網址1_tb.TabIndex = 1522
542
         Me.網址1_tb.TabIndex = 1522
397
         Me.網址1_tb.Visible = False
543
         Me.網址1_tb.Visible = False
398
         '
544
         '
399
         '帳號1_tb
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
         Me.帳號1_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
548
         Me.帳號1_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
403
         Me.帳號1_tb.Name = "帳號1_tb"
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
         Me.帳號1_tb.TabIndex = 1521
551
         Me.帳號1_tb.TabIndex = 1521
406
         Me.帳號1_tb.Visible = False
552
         Me.帳號1_tb.Visible = False
407
         '
553
         '
408
         '商客刪除_bt
554
         '商客刪除_bt
409
         '
555
         '
410
         Me.商客刪除_bt.ForeColor = System.Drawing.Color.Red
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
         Me.商客刪除_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
558
         Me.商客刪除_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
413
         Me.商客刪除_bt.Name = "商客刪除_bt"
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
         Me.商客刪除_bt.TabIndex = 1511
561
         Me.商客刪除_bt.TabIndex = 1511
416
         Me.商客刪除_bt.Text = "刪除"
562
         Me.商客刪除_bt.Text = "刪除"
417
         Me.商客刪除_bt.UseVisualStyleBackColor = True
563
         Me.商客刪除_bt.UseVisualStyleBackColor = True
418
         '
564
         '
419
         '商客修正_bt
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
         Me.商客修正_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
568
         Me.商客修正_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
423
         Me.商客修正_bt.Name = "商客修正_bt"
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
         Me.商客修正_bt.TabIndex = 1510
571
         Me.商客修正_bt.TabIndex = 1510
426
         Me.商客修正_bt.Text = "修正"
572
         Me.商客修正_bt.Text = "修正"
427
         Me.商客修正_bt.UseVisualStyleBackColor = True
573
         Me.商客修正_bt.UseVisualStyleBackColor = True
429
         '商客新增_bt
575
         '商客新增_bt
430
         '
576
         '
431
         Me.商客新增_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
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
         Me.商客新增_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
579
         Me.商客新增_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
434
         Me.商客新增_bt.Name = "商客新增_bt"
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
         Me.商客新增_bt.TabIndex = 1509
582
         Me.商客新增_bt.TabIndex = 1509
437
         Me.商客新增_bt.Text = "新增"
583
         Me.商客新增_bt.Text = "新增"
438
         Me.商客新增_bt.UseVisualStyleBackColor = True
584
         Me.商客新增_bt.UseVisualStyleBackColor = True
439
         '
585
         '
440
         '網址_tb
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
         Me.網址_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
589
         Me.網址_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
444
         Me.網址_tb.Name = "網址_tb"
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
         Me.網址_tb.TabIndex = 1520
592
         Me.網址_tb.TabIndex = 1520
447
         '
593
         '
448
         'Label9
594
         'Label9
449
         '
595
         '
450
         Me.Label9.AutoSize = True
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
         Me.Label9.Name = "Label9"
598
         Me.Label9.Name = "Label9"
453
         Me.Label9.Size = New System.Drawing.Size(32, 16)
599
         Me.Label9.Size = New System.Drawing.Size(32, 16)
454
         Me.Label9.TabIndex = 1514
600
         Me.Label9.TabIndex = 1514
458
         '
604
         '
459
         Me.資料_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
605
         Me.資料_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
460
         Me.資料_cb.FormattingEnabled = True
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
         Me.資料_cb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
608
         Me.資料_cb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
463
         Me.資料_cb.Name = "資料_cb"
609
         Me.資料_cb.Name = "資料_cb"
464
         Me.資料_cb.Size = New System.Drawing.Size(160, 24)
610
         Me.資料_cb.Size = New System.Drawing.Size(160, 24)
467
         'Label11
613
         'Label11
468
         '
614
         '
469
         Me.Label11.AutoSize = True
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
         Me.Label11.Name = "Label11"
617
         Me.Label11.Name = "Label11"
472
         Me.Label11.Size = New System.Drawing.Size(32, 16)
618
         Me.Label11.Size = New System.Drawing.Size(32, 16)
473
         Me.Label11.TabIndex = 1517
619
         Me.Label11.TabIndex = 1517
475
         '
621
         '
476
         '密碼_tb
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
         Me.密碼_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
625
         Me.密碼_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
480
         Me.密碼_tb.Name = "密碼_tb"
626
         Me.密碼_tb.Name = "密碼_tb"
481
         Me.密碼_tb.Size = New System.Drawing.Size(115, 23)
627
         Me.密碼_tb.Size = New System.Drawing.Size(115, 23)
485
         '
631
         '
486
         Me.Label12.AutoSize = True
632
         Me.Label12.AutoSize = True
487
         Me.Label12.Font = New System.Drawing.Font("微軟正黑體", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
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
         Me.Label12.Name = "Label12"
635
         Me.Label12.Name = "Label12"
490
         Me.Label12.Size = New System.Drawing.Size(47, 17)
636
         Me.Label12.Size = New System.Drawing.Size(47, 17)
491
         Me.Label12.TabIndex = 1518
637
         Me.Label12.TabIndex = 1518
495
         '
641
         '
496
         Me.Label10.AutoSize = True
642
         Me.Label10.AutoSize = True
497
         Me.Label10.Font = New System.Drawing.Font("微軟正黑體", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
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
         Me.Label10.Name = "Label10"
645
         Me.Label10.Name = "Label10"
500
         Me.Label10.Size = New System.Drawing.Size(34, 17)
646
         Me.Label10.Size = New System.Drawing.Size(34, 17)
501
         Me.Label10.TabIndex = 1516
647
         Me.Label10.TabIndex = 1516
503
         '
649
         '
504
         '上繳源_tb
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
         Me.上繳源_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
653
         Me.上繳源_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
508
         Me.上繳源_tb.Name = "上繳源_tb"
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
         Me.上繳源_tb.TabIndex = 1517
656
         Me.上繳源_tb.TabIndex = 1517
511
         '
657
         '
512
         'Label8
658
         'Label8
513
         '
659
         '
514
         Me.Label8.AutoSize = True
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
         Me.Label8.Name = "Label8"
662
         Me.Label8.Name = "Label8"
517
         Me.Label8.Size = New System.Drawing.Size(32, 16)
663
         Me.Label8.Size = New System.Drawing.Size(32, 16)
518
         Me.Label8.TabIndex = 1512
664
         Me.Label8.TabIndex = 1512
520
         '
666
         '
521
         '商品_cb
667
         '商品_cb
522
         '
668
         '
523
-        Me.商品_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
524
         Me.商品_cb.FormattingEnabled = True
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
         Me.商品_cb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
671
         Me.商品_cb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
527
         Me.商品_cb.Name = "商品_cb"
672
         Me.商品_cb.Name = "商品_cb"
528
         Me.商品_cb.Size = New System.Drawing.Size(160, 24)
673
         Me.商品_cb.Size = New System.Drawing.Size(160, 24)
536
             Or System.Windows.Forms.AnchorStyles.Left) _
681
             Or System.Windows.Forms.AnchorStyles.Left) _
537
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
682
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
538
         Me.商客_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
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
         Me.商客_dgv.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
685
         Me.商客_dgv.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
541
         Me.商客_dgv.Name = "商客_dgv"
686
         Me.商客_dgv.Name = "商客_dgv"
542
         Me.商客_dgv.RowHeadersWidth = 4
687
         Me.商客_dgv.RowHeadersWidth = 4
543
         Me.商客_dgv.RowTemplate.Height = 24
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
         Me.商客_dgv.TabIndex = 0
690
         Me.商客_dgv.TabIndex = 0
546
         '
691
         '
547
         '帳號_tb
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
         Me.帳號_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
695
         Me.帳號_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
551
         Me.帳號_tb.Name = "帳號_tb"
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
         Me.帳號_tb.TabIndex = 1515
698
         Me.帳號_tb.TabIndex = 1515
554
         '
699
         '
555
         'Label13
700
         'Label13
556
         '
701
         '
557
         Me.Label13.AutoSize = True
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
         Me.Label13.Name = "Label13"
704
         Me.Label13.Name = "Label13"
560
         Me.Label13.Size = New System.Drawing.Size(32, 16)
705
         Me.Label13.Size = New System.Drawing.Size(32, 16)
561
         Me.Label13.TabIndex = 1519
706
         Me.Label13.TabIndex = 1519
632
     Friend WithEvents Label25 As Label
777
     Friend WithEvents Label25 As Label
633
     Friend WithEvents 下行1_cb As ComboBox
778
     Friend WithEvents 下行1_cb As ComboBox
634
     Friend WithEvents Label29 As Label
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
 End Class
791
 End Class

+ 83
- 25
GA-ERP-SYS/基本資料管理/基本資料.vb 查看文件

1
 Public Class 基本資料
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
     Private Sub Set_商品清單()
3
     Private Sub Set_商品清單()
4
         商品_dgv.DataSource = Nothing : ds.Clear() : 商品_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
4
         商品_dgv.DataSource = Nothing : ds.Clear() : 商品_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
5
         商品_dgv.ColumnHeadersHeight = 25
5
         商品_dgv.ColumnHeadersHeight = 25
36
         客戶下_dgv.AllowUserToAddRows = False
36
         客戶下_dgv.AllowUserToAddRows = False
37
         SQL_基本資料_客戶下資料表()
37
         SQL_基本資料_客戶下資料表()
38
         da.Fill(ds4) : 客戶下_dgv.DataSource = ds4.Tables(0) : conn.Close()
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
         客戶下_dgv.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill
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
     End Sub
42
     End Sub
43
     Private Sub Set_商客清單()
43
     Private Sub Set_商客清單()
44
         商客_dgv.DataSource = Nothing : ds6.Clear()
44
         商客_dgv.DataSource = Nothing : ds6.Clear()
45
         商客_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
45
         商客_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
46
         商客_dgv.ColumnHeadersHeight = 25
46
         商客_dgv.ColumnHeadersHeight = 25
47
         商客_dgv.AllowUserToAddRows = False
47
         商客_dgv.AllowUserToAddRows = False
48
-        SQL_商客資料表()
48
+        SQL_商客資料表2()
49
         da.Fill(ds6) : 商客_dgv.DataSource = ds6.Tables(0) : conn.Close()
49
         da.Fill(ds6) : 商客_dgv.DataSource = ds6.Tables(0) : conn.Close()
50
         商客_dgv.Columns(0).FillWeight = 140
50
         商客_dgv.Columns(0).FillWeight = 140
51
         商客_dgv.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill
51
         商客_dgv.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill
58
     End Sub
58
     End Sub
59
     Private Sub 基本資料_Load(sender As Object, e As EventArgs) Handles MyBase.Load
59
     Private Sub 基本資料_Load(sender As Object, e As EventArgs) Handles MyBase.Load
60
         Me.MdiParent = GA_ERP_SYS : Me.WindowState = 2 : Me.AutoScroll = True
60
         Me.MdiParent = GA_ERP_SYS : Me.WindowState = 2 : Me.AutoScroll = True
61
-        Set_商品清單() : Set_基數清單() : Set_資料清單() : Set_客戶下清單() : Set_商客清單()
61
+
62
         SQL_下拉商品清單讀取()
62
         SQL_下拉商品清單讀取()
63
         商品_cb.Items.Clear() : While (dr.Read()) : 商品_cb.Items.Add(dr("商品")) : End While : conn.Close()
63
         商品_cb.Items.Clear() : While (dr.Read()) : 商品_cb.Items.Add(dr("商品")) : End While : conn.Close()
64
         '-------------------------------------------------------------------------------------------------------
64
         '-------------------------------------------------------------------------------------------------------
70
         '-------------------------------------------------------------------------------------------------------
70
         '-------------------------------------------------------------------------------------------------------
71
         SQL_上行清單讀取()
71
         SQL_上行清單讀取()
72
         下行_cb.Items.Clear() : 下行1_cb.Items.Clear() : While (dr.Read()) : 下行_cb.Items.Add(dr("基數")) : 下行1_cb.Items.Add(dr("基數")) : End While : conn.Close()
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
     End Sub
75
     End Sub
74
     Private Sub 商客_dgv_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles 商客_dgv.RowPostPaint
76
     Private Sub 商客_dgv_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles 商客_dgv.RowPostPaint
75
         Dim linePen As New Pen(Color.Blue, 2)
77
         Dim linePen As New Pen(Color.Blue, 2)
99
             End If
101
             End If
100
         End If
102
         End If
101
     End Sub
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
     Private Sub 客戶下新增_bt_Click(sender As Object, e As EventArgs) Handles 客戶下新增_bt.Click
125
     Private Sub 客戶下新增_bt_Click(sender As Object, e As EventArgs) Handles 客戶下新增_bt.Click
104
         If 客戶下_tb.Text = "" Or 網址3_tb.Text = "" Or 帳號3_tb.Text = "" Or 下行1_cb.Text = "" Then
126
         If 客戶下_tb.Text = "" Or 網址3_tb.Text = "" Or 帳號3_tb.Text = "" Or 下行1_cb.Text = "" Then
105
             MsgBox("資料沒有完整,請重新檢查")
127
             MsgBox("資料沒有完整,請重新檢查")
106
         Else
128
         Else
107
-            連結() : SQL_系統編碼規則_客戶下重複查詢() : CmdSet_For_dr()
129
+            SQL_系統編碼規則_客戶下重複查詢()
108
             If dr.Read() Then
130
             If dr.Read() Then
109
                 MsgBox("資料重複,請從新輸入或檢查") : conn.Close() : dr.Close()
131
                 MsgBox("資料重複,請從新輸入或檢查") : conn.Close() : dr.Close()
110
             Else
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
             End If
144
             End If
113
-        End If : Set_客戶下清單()
145
+        End If : PA = "" : Set_客戶下清單()
114
     End Sub
146
     End Sub
115
     Private Sub 客戶下修正_bt_Click(sender As Object, e As EventArgs) Handles 客戶下修正_bt.Click
147
     Private Sub 客戶下修正_bt_Click(sender As Object, e As EventArgs) Handles 客戶下修正_bt.Click
116
         If 客戶下_tb.Text = "" Or 網址3_tb.Text = "" Or 帳號3_tb.Text = "" Or 下行1_cb.Text = "" Then
148
         If 客戶下_tb.Text = "" Or 網址3_tb.Text = "" Or 帳號3_tb.Text = "" Or 下行1_cb.Text = "" Then
117
             MsgBox("資料有缺或有誤,請重新檢查")
149
             MsgBox("資料有缺或有誤,請重新檢查")
118
         Else
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
             If PA = "" Or PA1 = "" Or PA2 = "" Or PA3 = "" Then
152
             If PA = "" Or PA1 = "" Or PA2 = "" Or PA3 = "" Then
124
                 MsgBox("不能空白")
153
                 MsgBox("不能空白")
125
             Else
154
             Else
126
                 連結() : SQL_系統編碼規則_客戶下修改() : CmdSet_For_dr() : MsgBox("修改完成") : conn.Close() : dr.Close()
155
                 連結() : SQL_系統編碼規則_客戶下修改() : CmdSet_For_dr() : MsgBox("修改完成") : conn.Close() : dr.Close()
127
             End If
156
             End If
128
-        End If : Set_客戶下清單()
157
+        End If : PA = "" : Set_客戶下清單()
129
     End Sub
158
     End Sub
130
     Private Sub 客戶下刪除_bt_Click(sender As Object, e As EventArgs) Handles 客戶下刪除_bt.Click
159
     Private Sub 客戶下刪除_bt_Click(sender As Object, e As EventArgs) Handles 客戶下刪除_bt.Click
131
         Dim aa As MsgBoxResult = MsgBox("確定要刪除該筆資料?", MsgBoxStyle.OkCancel)
160
         Dim aa As MsgBoxResult = MsgBox("確定要刪除該筆資料?", MsgBoxStyle.OkCancel)
132
         If aa = MsgBoxResult.Ok Then
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
     End Sub
164
     End Sub
137
     Private Sub 客戶下_dgv_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles 客戶下_dgv.CellClick
165
     Private Sub 客戶下_dgv_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles 客戶下_dgv.CellClick
138
         If e.RowIndex = -1 Then : Else
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
             客戶下_tb.Text = 客戶下_dgv("客戶帳號", e.RowIndex).Value.ToString
169
             客戶下_tb.Text = 客戶下_dgv("客戶帳號", e.RowIndex).Value.ToString
140
             網址3_tb.Text = 客戶下_dgv("網址", e.RowIndex).Value.ToString
170
             網址3_tb.Text = 客戶下_dgv("網址", e.RowIndex).Value.ToString
141
             帳號3_tb.Text = 客戶下_dgv("老闆帳號", e.RowIndex).Value.ToString
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
         End If
174
         End If
144
     End Sub
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
     Private Sub 商客_dgv_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles 商客_dgv.CellClick
183
     Private Sub 商客_dgv_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles 商客_dgv.CellClick
147
         If e.RowIndex = -1 Then : Else
184
         If e.RowIndex = -1 Then : Else
160
             If dr.Read() Then
197
             If dr.Read() Then
161
                 MsgBox("資料重複,請從新輸入或檢查") : conn.Close() : dr.Close()
198
                 MsgBox("資料重複,請從新輸入或檢查") : conn.Close() : dr.Close()
162
             Else
199
             Else
200
+                PA9 = 商品_cb.Text
201
+                SQL_商品確認()
202
+                If dr.Read() Then : conn.Close()
203
+                Else : SQL_商品寫入() : Set_商品清單() : conn.Close() : End If
163
                 重開() : SQL_系統編碼規則_商客新增() : CmdSet_For_dr() : MsgBox("新增完成") : conn.Close() : dr.Close()
204
                 重開() : SQL_系統編碼規則_商客新增() : CmdSet_For_dr() : MsgBox("新增完成") : conn.Close() : dr.Close()
164
             End If
205
             End If
165
         End If : Set_商客清單()
206
         End If : Set_商客清單()
166
     End Sub
207
     End Sub
167
     Private Sub 商客刪除_bt_Click(sender As Object, e As EventArgs) Handles 商客刪除_bt.Click
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
         If aa = MsgBoxResult.Ok Then
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
     End Sub
213
     End Sub
177
     Private Sub 商客修正_bt_Click(sender As Object, e As EventArgs) Handles 商客修正_bt.Click
214
     Private Sub 商客修正_bt_Click(sender As Object, e As EventArgs) Handles 商客修正_bt.Click
178
         If 網址_tb.Text = "" Or 上繳源_tb.Text = "" Or 帳號_tb.Text = "" Or 密碼_tb.Text = "" Or 上行_cb.Text = "" Or 下行_cb.Text = "" Then
215
         If 網址_tb.Text = "" Or 上繳源_tb.Text = "" Or 帳號_tb.Text = "" Or 密碼_tb.Text = "" Or 上行_cb.Text = "" Or 下行_cb.Text = "" Then
179
             MsgBox("資料有缺或有誤,請重新檢查")
216
             MsgBox("資料有缺或有誤,請重新檢查")
180
         Else
217
         Else
181
             PA2 = 網址_tb.Text : PA3 = 上繳源_tb.Text : PA4 = 帳號_tb.Text : PA5 = 密碼_tb.Text : PA6 = 上行_cb.Text : PA7 = 下行_cb.Text : PA8 = 資料_cb.Text : PA9 = 商品_cb.Text
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
             連結() : SQL_系統編碼規則_商客修改() : CmdSet_For_dr() : MsgBox("修改完成") : conn.Close() : dr.Close()
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
     End Sub
242
     End Sub
185
 End Class
243
 End Class

+ 306
- 105
GA-ERP-SYS/報表系統管理/流水帳查詢.Designer.vb 查看文件

23
     <System.Diagnostics.DebuggerStepThrough()>
23
     <System.Diagnostics.DebuggerStepThrough()>
24
     Private Sub InitializeComponent()
24
     Private Sub InitializeComponent()
25
         Me.components = New System.ComponentModel.Container()
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
         Me.流水帳_dgv = New System.Windows.Forms.DataGridView()
38
         Me.流水帳_dgv = New System.Windows.Forms.DataGridView()
36
         Me.Label9 = New System.Windows.Forms.Label()
39
         Me.Label9 = New System.Windows.Forms.Label()
37
         Me.資料_cb = New System.Windows.Forms.ComboBox()
40
         Me.資料_cb = New System.Windows.Forms.ComboBox()
88
         Me.使用網址_ch = New System.Windows.Forms.CheckBox()
91
         Me.使用網址_ch = New System.Windows.Forms.CheckBox()
89
         Me.重新導入_bt = New System.Windows.Forms.Button()
92
         Me.重新導入_bt = New System.Windows.Forms.Button()
90
         Me.LOG檔_bt = New System.Windows.Forms.Button()
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
         Me.列印_bt = New System.Windows.Forms.Button()
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
         Me.客戶資料_bt = New System.Windows.Forms.Button()
96
         Me.客戶資料_bt = New System.Windows.Forms.Button()
96
         Me.RadioButton3 = New System.Windows.Forms.RadioButton()
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
         CType(Me.流水帳_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
114
         CType(Me.流水帳_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
99
         CType(Me.彙總_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
115
         CType(Me.彙總_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
100
         CType(Me.彙總1_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
116
         CType(Me.彙總1_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
104
         CType(Me.LOG2_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
120
         CType(Me.LOG2_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
105
         CType(Me.日期_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
121
         CType(Me.日期_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
106
         CType(Me.批次_nud, System.ComponentModel.ISupportInitialize).BeginInit()
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
         Me.SuspendLayout()
128
         Me.SuspendLayout()
110
         '
129
         '
111
         '流水帳_dgv
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
         Me.流水帳_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
134
         Me.流水帳_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
116
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
135
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
117
         Me.流水帳_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
136
         Me.流水帳_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
182
         '
201
         '
183
         '彙總_dgv
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
         Me.彙總_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
206
         Me.彙總_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
188
             Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
207
             Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
189
         Me.彙總_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
208
         Me.彙總_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
282
         'RadioButton1
301
         'RadioButton1
283
         '
302
         '
284
         Me.RadioButton1.AutoSize = True
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
         Me.RadioButton1.Name = "RadioButton1"
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
         Me.RadioButton1.TabIndex = 1531
308
         Me.RadioButton1.TabIndex = 1531
290
-        Me.RadioButton1.Text = "應付彙總(商品/老闆)"
309
+        Me.RadioButton1.Text = "帳務彙總表(查看資料受否齊全)"
291
         Me.RadioButton1.UseVisualStyleBackColor = True
310
         Me.RadioButton1.UseVisualStyleBackColor = True
292
         '
311
         '
293
         'RadioButton2
312
         'RadioButton2
294
         '
313
         '
295
         Me.RadioButton2.AutoSize = True
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
         Me.RadioButton2.Name = "RadioButton2"
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
         Me.RadioButton2.TabIndex = 1532
320
         Me.RadioButton2.TabIndex = 1532
300
-        Me.RadioButton2.Text = "應付彙總(分離呈現)"
321
+        Me.RadioButton2.TabStop = True
322
+        Me.RadioButton2.Text = "應收付報表(點選查詢)"
301
         Me.RadioButton2.UseVisualStyleBackColor = True
323
         Me.RadioButton2.UseVisualStyleBackColor = True
302
         '
324
         '
303
         '彙總1_dgv
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
         Me.彙總1_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
329
         Me.彙總1_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
308
             Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
330
             Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
309
         Me.彙總1_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
331
         Me.彙總1_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
312
         Me.彙總1_dgv.Name = "彙總1_dgv"
334
         Me.彙總1_dgv.Name = "彙總1_dgv"
313
         Me.彙總1_dgv.RowHeadersWidth = 4
335
         Me.彙總1_dgv.RowHeadersWidth = 4
314
         Me.彙總1_dgv.RowTemplate.Height = 24
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
         Me.彙總1_dgv.TabIndex = 1534
338
         Me.彙總1_dgv.TabIndex = 1534
317
         '
339
         '
318
         '彙總2_dgv
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
         Me.彙總2_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
344
         Me.彙總2_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
323
             Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
345
             Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
324
         Me.彙總2_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
346
         Me.彙總2_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
327
         Me.彙總2_dgv.Name = "彙總2_dgv"
349
         Me.彙總2_dgv.Name = "彙總2_dgv"
328
         Me.彙總2_dgv.RowHeadersWidth = 4
350
         Me.彙總2_dgv.RowHeadersWidth = 4
329
         Me.彙總2_dgv.RowTemplate.Height = 24
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
         Me.彙總2_dgv.TabIndex = 1535
353
         Me.彙總2_dgv.TabIndex = 1535
332
         '
354
         '
333
         '客戶下_dgv
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
         Me.客戶下_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
359
         Me.客戶下_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
338
             Or System.Windows.Forms.AnchorStyles.Left) _
360
             Or System.Windows.Forms.AnchorStyles.Left) _
339
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
361
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
353
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
375
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
354
         Me.存檔_bt.Location = New System.Drawing.Point(865, 933)
376
         Me.存檔_bt.Location = New System.Drawing.Point(865, 933)
355
         Me.存檔_bt.Name = "存檔_bt"
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
         Me.存檔_bt.TabIndex = 1537
379
         Me.存檔_bt.TabIndex = 1537
358
         Me.存檔_bt.Text = "客戶資料比對存檔"
380
         Me.存檔_bt.Text = "客戶資料比對存檔"
359
         Me.存檔_bt.UseVisualStyleBackColor = True
381
         Me.存檔_bt.UseVisualStyleBackColor = True
362
         '
384
         '
363
         Me.Delete_bT.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
385
         Me.Delete_bT.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
364
         Me.Delete_bT.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
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
         Me.Delete_bT.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
388
         Me.Delete_bT.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
367
         Me.Delete_bT.Name = "Delete_bT"
389
         Me.Delete_bT.Name = "Delete_bT"
368
         Me.Delete_bT.Size = New System.Drawing.Size(73, 33)
390
         Me.Delete_bT.Size = New System.Drawing.Size(73, 33)
383
         '
405
         '
384
         'LOG1_dgv
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
         Me.LOG1_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
410
         Me.LOG1_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
389
             Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
411
             Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
390
         Me.LOG1_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
412
         Me.LOG1_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
398
         '
420
         '
399
         'LOG2_dgv
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
         Me.LOG2_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
425
         Me.LOG2_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
404
             Or System.Windows.Forms.AnchorStyles.Left) _
426
             Or System.Windows.Forms.AnchorStyles.Left) _
405
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
427
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
474
         '
496
         '
475
         '日期_dgv
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
         Me.日期_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
501
         Me.日期_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
480
             Or System.Windows.Forms.AnchorStyles.Left) _
502
             Or System.Windows.Forms.AnchorStyles.Left) _
481
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
503
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
701
         Me.重新導入_bt.Name = "重新導入_bt"
723
         Me.重新導入_bt.Name = "重新導入_bt"
702
         Me.重新導入_bt.Size = New System.Drawing.Size(272, 27)
724
         Me.重新導入_bt.Size = New System.Drawing.Size(272, 27)
703
         Me.重新導入_bt.TabIndex = 1569
725
         Me.重新導入_bt.TabIndex = 1569
704
-        Me.重新導入_bt.Text = "重新導入 [ X ] 資料"
726
+        Me.重新導入_bt.Text = "重新導入 [ X 或 NA] 資料"
705
         Me.重新導入_bt.UseVisualStyleBackColor = True
727
         Me.重新導入_bt.UseVisualStyleBackColor = True
706
         '
728
         '
707
         'LOG檔_bt
729
         'LOG檔_bt
708
         '
730
         '
709
         Me.LOG檔_bt.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
731
         Me.LOG檔_bt.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
710
         Me.LOG檔_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
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
         Me.LOG檔_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
734
         Me.LOG檔_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
713
         Me.LOG檔_bt.Name = "LOG檔_bt"
735
         Me.LOG檔_bt.Name = "LOG檔_bt"
714
         Me.LOG檔_bt.Size = New System.Drawing.Size(73, 33)
736
         Me.LOG檔_bt.Size = New System.Drawing.Size(73, 33)
716
         Me.LOG檔_bt.Text = "LOG檔"
738
         Me.LOG檔_bt.Text = "LOG檔"
717
         Me.LOG檔_bt.UseVisualStyleBackColor = True
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
         '列印_bt
752
         '列印_bt
731
         '
753
         '
738
         Me.列印_bt.Text = "列印成EXCEL"
760
         Me.列印_bt.Text = "列印成EXCEL"
739
         Me.列印_bt.UseVisualStyleBackColor = True
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
         '客戶資料_bt
763
         '客戶資料_bt
769
         '
764
         '
770
         Me.客戶資料_bt.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
765
         Me.客戶資料_bt.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
771
         Me.客戶資料_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
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
         Me.客戶資料_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
768
         Me.客戶資料_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
774
         Me.客戶資料_bt.Name = "客戶資料_bt"
769
         Me.客戶資料_bt.Name = "客戶資料_bt"
775
         Me.客戶資料_bt.Size = New System.Drawing.Size(73, 33)
770
         Me.客戶資料_bt.Size = New System.Drawing.Size(73, 33)
780
         'RadioButton3
775
         'RadioButton3
781
         '
776
         '
782
         Me.RadioButton3.AutoSize = True
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
         Me.RadioButton3.Name = "RadioButton3"
780
         Me.RadioButton3.Name = "RadioButton3"
785
         Me.RadioButton3.Size = New System.Drawing.Size(130, 20)
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
         Me.RadioButton3.UseVisualStyleBackColor = True
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
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
974
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
803
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
975
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
804
         Me.ClientSize = New System.Drawing.Size(1924, 971)
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
         Me.Controls.Add(Me.客戶資料_bt)
991
         Me.Controls.Add(Me.客戶資料_bt)
808
-        Me.Controls.Add(Me.明細合併_bt)
809
         Me.Controls.Add(Me.列印_bt)
992
         Me.Controls.Add(Me.列印_bt)
810
-        Me.Controls.Add(Me.LOG檔_GUP)
993
+        Me.Controls.Add(Me.L50)
811
         Me.Controls.Add(Me.LOG檔_bt)
994
         Me.Controls.Add(Me.LOG檔_bt)
812
         Me.Controls.Add(Me.重新導入_bt)
995
         Me.Controls.Add(Me.重新導入_bt)
813
         Me.Controls.Add(Me.使用網址_ch)
996
         Me.Controls.Add(Me.使用網址_ch)
838
         Me.Controls.Add(Me.重讀_bt)
1021
         Me.Controls.Add(Me.重讀_bt)
839
         Me.Controls.Add(Me.Delete_bT)
1022
         Me.Controls.Add(Me.Delete_bT)
840
         Me.Controls.Add(Me.存檔_bt)
1023
         Me.Controls.Add(Me.存檔_bt)
841
-        Me.Controls.Add(Me.客戶下_dgv)
842
         Me.Controls.Add(Me.RadioButton2)
1024
         Me.Controls.Add(Me.RadioButton2)
843
         Me.Controls.Add(Me.Panel1)
1025
         Me.Controls.Add(Me.Panel1)
844
         Me.Controls.Add(Me.水差_tb)
1026
         Me.Controls.Add(Me.水差_tb)
856
         Me.Controls.Add(Me.資料_cb)
1038
         Me.Controls.Add(Me.資料_cb)
857
         Me.Controls.Add(Me.RadioButton1)
1039
         Me.Controls.Add(Me.RadioButton1)
858
         Me.Controls.Add(Me.彙總2_dgv)
1040
         Me.Controls.Add(Me.彙總2_dgv)
859
-        Me.Controls.Add(Me.彙總_dgv)
860
         Me.Controls.Add(Me.彙總1_dgv)
1041
         Me.Controls.Add(Me.彙總1_dgv)
861
         Me.Controls.Add(Me.Label5)
1042
         Me.Controls.Add(Me.Label5)
862
-        Me.Controls.Add(Me.流水帳1_dgv)
863
         Me.Controls.Add(Me.流水帳_dgv)
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
         Me.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
1049
         Me.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
865
         Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
1050
         Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
866
         Me.Name = "流水帳查詢"
1051
         Me.Name = "流水帳查詢"
874
         CType(Me.LOG2_dgv, System.ComponentModel.ISupportInitialize).EndInit()
1059
         CType(Me.LOG2_dgv, System.ComponentModel.ISupportInitialize).EndInit()
875
         CType(Me.日期_dgv, System.ComponentModel.ISupportInitialize).EndInit()
1060
         CType(Me.日期_dgv, System.ComponentModel.ISupportInitialize).EndInit()
876
         CType(Me.批次_nud, System.ComponentModel.ISupportInitialize).EndInit()
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
         Me.ResumeLayout(False)
1067
         Me.ResumeLayout(False)
880
         Me.PerformLayout()
1068
         Me.PerformLayout()
881
 
1069
 
937
     Friend WithEvents 使用網址_ch As CheckBox
1125
     Friend WithEvents 使用網址_ch As CheckBox
938
     Friend WithEvents 重新導入_bt As Button
1126
     Friend WithEvents 重新導入_bt As Button
939
     Friend WithEvents LOG檔_bt As Button
1127
     Friend WithEvents LOG檔_bt As Button
940
-    Friend WithEvents LOG檔_GUP As GroupBox
1128
+    Friend WithEvents L50 As GroupBox
941
     Friend WithEvents 列印_bt As Button
1129
     Friend WithEvents 列印_bt As Button
942
-    Friend WithEvents 流水帳1_dgv As DataGridView
943
-    Friend WithEvents 明細合併_bt As Button
944
     Friend WithEvents 客戶資料_bt As Button
1130
     Friend WithEvents 客戶資料_bt As Button
945
     Friend WithEvents RadioButton3 As RadioButton
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
 End Class
1148
 End Class

+ 401
- 90
GA-ERP-SYS/報表系統管理/流水帳查詢.vb 查看文件

10
 Imports Microsoft.Office.Interop.Excel.XlThemeColor
10
 Imports Microsoft.Office.Interop.Excel.XlThemeColor
11
 Imports Microsoft.Office.Interop.Excel.XlWindowState
11
 Imports Microsoft.Office.Interop.Excel.XlWindowState
12
 Public Class 流水帳查詢
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
     Private Sub Set_客戶下清單()
15
     Private Sub Set_客戶下清單()
15
         客戶下_dgv.DataSource = Nothing : ds4.Clear()
16
         客戶下_dgv.DataSource = Nothing : ds4.Clear()
16
         客戶下_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
17
         客戶下_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
27
         流水帳_dgv.AllowUserToAddRows = False
28
         流水帳_dgv.AllowUserToAddRows = False
28
         PA40 = 網址_tb.Text : SQL_流水帳查詢()
29
         PA40 = 網址_tb.Text : SQL_流水帳查詢()
29
         da.Fill(ds) : 流水帳_dgv.DataSource = ds.Tables(0) : conn.Close()
30
         da.Fill(ds) : 流水帳_dgv.DataSource = ds.Tables(0) : conn.Close()
30
-        流水帳_dgv.Columns("水差").Visible = False
31
+
31
         流水帳_dgv.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill
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
         流水帳_dgv.Columns("天帳").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
38
         流水帳_dgv.Columns("天帳").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
35
         流水帳_dgv.Columns("地帳").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
39
         流水帳_dgv.Columns("地帳").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
36
         流水帳_dgv.Columns("水差").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
40
         流水帳_dgv.Columns("水差").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
37
         流水帳_dgv.Columns("個人所得").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
41
         流水帳_dgv.Columns("個人所得").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
38
         流水帳_dgv.Columns("核帳").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
42
         流水帳_dgv.Columns("核帳").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
39
 
43
 
40
-        流水帳_dgv.Columns(7).Visible = False : 流水帳_dgv.Columns(6).Visible = False
44
+
41
         For i As Integer = 15 To 55 : 流水帳_dgv.Columns(i).Visible = False : Next
45
         For i As Integer = 15 To 55 : 流水帳_dgv.Columns(i).Visible = False : Next
42
         計算()
46
         計算()
43
     End Sub
47
     End Sub
174
             流水帳_dgv.Rows(i).Cells("客帳").Value = StrReverse(帳號)
178
             流水帳_dgv.Rows(i).Cells("客帳").Value = StrReverse(帳號)
175
 
179
 
176
             For ii As Integer = 0 To 客戶下_dgv.Rows.Count - 1
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
                     流水帳_dgv("客名", i).Value = 客戶下_dgv("客戶名稱", ii).Value.ToString : Exit For
182
                     流水帳_dgv("客名", i).Value = 客戶下_dgv("客戶名稱", ii).Value.ToString : Exit For
179
                 Else
183
                 Else
180
                     流水帳_dgv("客名", i).Value = ""
184
                     流水帳_dgv("客名", i).Value = ""
196
         彙總_dgv.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill
200
         彙總_dgv.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill
197
         彙總_dgv.Columns(0).FillWeight = 90 : 彙總_dgv.Columns(1).FillWeight = 75 : 彙總_dgv.Columns(2).FillWeight = 130 : 彙總_dgv.Columns(3).FillWeight = 80
201
         彙總_dgv.Columns(0).FillWeight = 90 : 彙總_dgv.Columns(1).FillWeight = 75 : 彙總_dgv.Columns(2).FillWeight = 130 : 彙總_dgv.Columns(3).FillWeight = 80
198
         彙總_dgv.Columns(7).Visible = False : 彙總_dgv.Columns(8).FillWeight = 60 : 彙總_dgv.Columns(9).FillWeight = 45 : 彙總_dgv.Columns(10).Visible = False
202
         彙總_dgv.Columns(7).Visible = False : 彙總_dgv.Columns(8).FillWeight = 60 : 彙總_dgv.Columns(9).FillWeight = 45 : 彙總_dgv.Columns(10).Visible = False
203
+
199
         彙總_dgv.Columns("天帳").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
204
         彙總_dgv.Columns("天帳").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
200
         彙總_dgv.Columns("地帳").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
205
         彙總_dgv.Columns("地帳").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
201
         彙總_dgv.Columns("水差").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
206
         彙總_dgv.Columns("水差").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
272
         da.Fill(ds2) : 彙總1_dgv.DataSource = ds2.Tables(0) : conn.Close()
277
         da.Fill(ds2) : 彙總1_dgv.DataSource = ds2.Tables(0) : conn.Close()
273
         彙總1_dgv.Columns("水差").Visible = False
278
         彙總1_dgv.Columns("水差").Visible = False
274
         彙總1_dgv.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill
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
         彙總1_dgv.Columns("天帳").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
281
         彙總1_dgv.Columns("天帳").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
277
         彙總1_dgv.Columns("地帳").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
282
         彙總1_dgv.Columns("地帳").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
278
         彙總1_dgv.Columns("水差").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
283
         彙總1_dgv.Columns("水差").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
309
         da.Fill(ds3) : 彙總2_dgv.DataSource = ds3.Tables(0) : conn.Close()
314
         da.Fill(ds3) : 彙總2_dgv.DataSource = ds3.Tables(0) : conn.Close()
310
         彙總2_dgv.Columns("水差").Visible = False
315
         彙總2_dgv.Columns("水差").Visible = False
311
         彙總2_dgv.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill
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
         彙總2_dgv.Columns("天帳").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
318
         彙總2_dgv.Columns("天帳").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
314
         彙總2_dgv.Columns("地帳").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
319
         彙總2_dgv.Columns("地帳").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
315
         彙總2_dgv.Columns("水差").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
320
         彙總2_dgv.Columns("水差").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
338
             彙總2_dgv.Rows(i).Cells("核帳").Value = Strings.Format(Val(彙總2_dgv.Rows(i).Cells("核帳").Value), "#,##0")
343
             彙總2_dgv.Rows(i).Cells("核帳").Value = Strings.Format(Val(彙總2_dgv.Rows(i).Cells("核帳").Value), "#,##0")
339
         Next
344
         Next
340
     End Sub
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
     Private Sub Set_LOG1()
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
         LOG1_dgv.ColumnHeadersHeight = 25
491
         LOG1_dgv.ColumnHeadersHeight = 25
344
         LOG1_dgv.AllowUserToAddRows = False
492
         LOG1_dgv.AllowUserToAddRows = False
345
         SQL_LOG查詢1()
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
         LOG1_dgv.Columns(0).FillWeight = 35 : LOG1_dgv.Columns(2).FillWeight = 90 : LOG1_dgv.Columns(3).FillWeight = 75 : LOG1_dgv.Columns(4).Visible = False
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
         LOG1_dgv.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill
496
         LOG1_dgv.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill
349
         For I As Integer = 0 To LOG1_dgv.Rows.Count - 1
497
         For I As Integer = 0 To LOG1_dgv.Rows.Count - 1
398
     End Sub
546
     End Sub
399
     Private Sub 流水帳查詢_Load(sender As Object, e As EventArgs) Handles MyBase.Load
547
     Private Sub 流水帳查詢_Load(sender As Object, e As EventArgs) Handles MyBase.Load
400
         Me.MdiParent = GA_ERP_SYS : Me.WindowState = 2 : Me.AutoScroll = True
548
         Me.MdiParent = GA_ERP_SYS : Me.WindowState = 2 : Me.AutoScroll = True
549
+
401
         天_ch.Checked = False : 周_ch.Checked = True : 月_ch.Checked = False : DA1_bt.Text = "上週" : DA2_bt.Text = "本週" : DA3_bt.Text = "下週"
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
         老闆_cb.Items.Clear() : 老闆_cb.Items.Add("") : While (dr.Read()) : 老闆_cb.Items.Add(dr("上繳源")) : End While : conn.Close()
557
         老闆_cb.Items.Clear() : 老闆_cb.Items.Add("") : While (dr.Read()) : 老闆_cb.Items.Add(dr("上繳源")) : End While : conn.Close()
405
         SQL_流水帳商品()
558
         SQL_流水帳商品()
406
         商品_cb.Items.Clear() : 商品_cb.Items.Add("") : While (dr.Read()) : 商品_cb.Items.Add(dr("商品")) : End While : conn.Close()
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
         Set_流水帳清單1()
562
         Set_流水帳清單1()
409
         If CC(8) = False Then
563
         If CC(8) = False Then
410
             Delete_bT.Enabled = False
564
             Delete_bT.Enabled = False
417
             End If
571
             End If
418
         End If
572
         End If
419
     End Sub
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
     Private Sub 流水帳_dgv_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles 流水帳_dgv.CellClick
586
     Private Sub 流水帳_dgv_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles 流水帳_dgv.CellClick
421
         If e.RowIndex = -1 Then : Else
587
         If e.RowIndex = -1 Then : Else
422
             If 使用網址_ch.Checked = True Then
588
             If 使用網址_ch.Checked = True Then
455
             End If
621
             End If
456
         End If
622
         End If
457
     End Sub
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
     Private Sub 流水帳_dgv_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles 流水帳_dgv.RowPostPaint
638
     Private Sub 流水帳_dgv_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles 流水帳_dgv.RowPostPaint
459
         Dim linePen As New Pen(Color.Blue, 2)
639
         Dim linePen As New Pen(Color.Blue, 2)
460
         If e.RowIndex = 流水帳_dgv.Rows.Count - 1 Then
640
         If e.RowIndex = 流水帳_dgv.Rows.Count - 1 Then
489
             e.CellStyle.ForeColor = Color.Red
669
             e.CellStyle.ForeColor = Color.Red
490
         End If
670
         End If
491
     End Sub
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
     Private Sub 資料_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 資料_cb.SelectedIndexChanged
687
     Private Sub 資料_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 資料_cb.SelectedIndexChanged
493
         Set_流水帳清單1()
688
         Set_流水帳清單1()
494
     End Sub
689
     End Sub
497
     End Sub
692
     End Sub
498
     Private Sub 天_ch_CheckedChanged(sender As Object, e As EventArgs) Handles 天_ch.Click
693
     Private Sub 天_ch_CheckedChanged(sender As Object, e As EventArgs) Handles 天_ch.Click
499
         天_ch.Checked = True : 周_ch.Checked = False : 月_ch.Checked = False : DA2_bt.PerformClick()
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
     End Sub
696
     End Sub
502
     Private Sub 周_ch_CheckedChanged(sender As Object, e As EventArgs) Handles 周_ch.Click
697
     Private Sub 周_ch_CheckedChanged(sender As Object, e As EventArgs) Handles 周_ch.Click
503
         天_ch.Checked = False : 周_ch.Checked = True : 月_ch.Checked = False : DA2_bt.PerformClick()
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
     End Sub
700
     End Sub
506
     Private Sub 月_ch_CheckedChanged(sender As Object, e As EventArgs) Handles 月_ch.Click
701
     Private Sub 月_ch_CheckedChanged(sender As Object, e As EventArgs) Handles 月_ch.Click
507
         天_ch.Checked = False : 周_ch.Checked = False : 月_ch.Checked = True : DA2_bt.PerformClick()
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
     End Sub
704
     End Sub
510
     Private Sub DA1_bt_Click(sender As Object, e As EventArgs) Handles DA1_bt.Click
705
     Private Sub DA1_bt_Click(sender As Object, e As EventArgs) Handles DA1_bt.Click
511
         If 天_ch.Checked = True Then
706
         If 天_ch.Checked = True Then
567
         End If
762
         End If
568
     End Sub
763
     End Sub
569
     Private Sub Delete_bTlick(sender As Object, e As EventArgs) Handles Delete_bT.Click
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
         SQL_流水帳上繳()
766
         SQL_流水帳上繳()
572
         老闆_cb.Items.Clear() : 老闆_cb.Items.Add("") : While (dr.Read()) : 老闆_cb.Items.Add(dr("上繳源")) : End While : conn.Close()
767
         老闆_cb.Items.Clear() : 老闆_cb.Items.Add("") : While (dr.Read()) : 老闆_cb.Items.Add(dr("上繳源")) : End While : conn.Close()
573
         SQL_流水帳商品()
768
         SQL_流水帳商品()
574
         商品_cb.Items.Clear() : 商品_cb.Items.Add("") : While (dr.Read()) : 商品_cb.Items.Add(dr("商品")) : End While : conn.Close()
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
         Set_流水帳清單1()
771
         Set_流水帳清單1()
577
     End Sub
772
     End Sub
578
     Private Sub 重讀_bt_Click(sender As Object, e As EventArgs) Handles 重讀_bt.Click
773
     Private Sub 重讀_bt_Click(sender As Object, e As EventArgs) Handles 重讀_bt.Click
579
-        Set_客戶下清單() : Set_日期清單()
774
+        Set_客戶名稱() : Set_客戶下清單()
580
         SQL_流水帳上繳()
775
         SQL_流水帳上繳()
581
         老闆_cb.Items.Clear() : 老闆_cb.Items.Add("") : While (dr.Read()) : 老闆_cb.Items.Add(dr("上繳源")) : End While : conn.Close()
776
         老闆_cb.Items.Clear() : 老闆_cb.Items.Add("") : While (dr.Read()) : 老闆_cb.Items.Add(dr("上繳源")) : End While : conn.Close()
582
         SQL_流水帳商品()
777
         SQL_流水帳商品()
583
         商品_cb.Items.Clear() : 商品_cb.Items.Add("") : While (dr.Read()) : 商品_cb.Items.Add(dr("商品")) : End While : conn.Close()
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
         Set_流水帳清單1()
779
         Set_流水帳清單1()
586
     End Sub
780
     End Sub
587
     Private Sub RadioButton1_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton1.CheckedChanged
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
     End Sub
786
     End Sub
590
     Private Sub RadioButton2_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton2.CheckedChanged
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
     End Sub
801
     End Sub
593
     Private Sub 商品_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 商品_cb.SelectedIndexChanged
802
     Private Sub 商品_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 商品_cb.SelectedIndexChanged
594
         Set_流水帳清單1()
803
         Set_流水帳清單1()
652
         GA_ERP_SYS.ToolStripProgressBar1.Value = 0 : 最終數 = 0
861
         GA_ERP_SYS.ToolStripProgressBar1.Value = 0 : 最終數 = 0
653
     End Sub
862
     End Sub
654
     Private Sub LOG檔_bt_Click(sender As Object, e As EventArgs) Handles LOG檔_bt.Click
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
     End Sub
865
     End Sub
657
     Private Sub R_bT_Click(sender As Object, e As EventArgs) Handles R_bT.Click
866
     Private Sub R_bT_Click(sender As Object, e As EventArgs) Handles R_bT.Click
658
         SQL_SQL_自動導入判斷_關閉()
867
         SQL_SQL_自動導入判斷_關閉()
659
     End Sub
868
     End Sub
660
     Private Sub 重新導入_bt_Click(sender As Object, e As EventArgs) Handles 重新導入_bt.Click
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
         Dim 執行 As Boolean
871
         Dim 執行 As Boolean
662
         For i As Integer = 0 To 彙總_dgv.Rows.Count - 1
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
                 PA1 = 彙總_dgv.Rows(i).Cells("網址").Value.ToString : PA2 = 彙總_dgv.Rows(i).Cells("帳號").Value.ToString
874
                 PA1 = 彙總_dgv.Rows(i).Cells("網址").Value.ToString : PA2 = 彙總_dgv.Rows(i).Cells("帳號").Value.ToString
665
                 PA3 = 彙總_dgv.Rows(i).Cells("密碼").Value.ToString : SQL_商客資料暫存檔_新增() : 執行 = True
875
                 PA3 = 彙總_dgv.Rows(i).Cells("密碼").Value.ToString : SQL_商客資料暫存檔_新增() : 執行 = True
666
             End If
876
             End If
674
                 Else
884
                 Else
675
                     conn.Close() : dr.Close() : SQL_SQL_自動導入判斷_開啟()
885
                     conn.Close() : dr.Close() : SQL_SQL_自動導入判斷_開啟()
676
                     PA1 = Strings.Format(開始日期_dtp.Value, "yyyy-MM-dd") : PA2 = Strings.Format(結束日期_dtp.Value, "yyyy-MM-dd")
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
                     If File.Exists("000.csv") Then
888
                     If File.Exists("000.csv") Then
679
                         File.Delete("000.csv")
889
                         File.Delete("000.csv")
680
                     End If
890
                     End If
703
             MsgBox("沒有需要重新導入的網址與帳號!!")
913
             MsgBox("沒有需要重新導入的網址與帳號!!")
704
         End If
914
         End If
705
     End Sub
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
     Private Sub 商客新增_bt_Click(sender As Object, e As EventArgs) Handles 商客新增_bt.Click
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
         SQL_自動導入判斷()
919
         SQL_自動導入判斷()
714
         If dr.Read() Then
920
         If dr.Read() Then
715
             If dr("正在自動導入中").ToString = "YES" Then
921
             If dr("正在自動導入中").ToString = "YES" Then
758
                     File.Delete(My.Computer.FileSystem.SpecialDirectories.Desktop & "000.csv")
964
                     File.Delete(My.Computer.FileSystem.SpecialDirectories.Desktop & "000.csv")
759
                 End If
965
                 End If
760
                 LOG檔.ShowDialog() : SQL_SQL_自動導入判斷_關閉() : SQL_查詢日期清空() : SQL_商客資料暫存檔_刪除() : 重讀_bt.PerformClick()
966
                 LOG檔.ShowDialog() : SQL_SQL_自動導入判斷_關閉() : SQL_查詢日期清空() : SQL_商客資料暫存檔_刪除() : 重讀_bt.PerformClick()
967
+                存檔_bt.PerformClick()
761
             End If
968
             End If
762
         End If
969
         End If
763
     End Sub
970
     End Sub
764
     Private Sub 批次導入_bt_Click(sender As Object, e As EventArgs) Handles 批次導入_bt.Click
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
         批次 = 0 : Timer2.Enabled = True
973
         批次 = 0 : Timer2.Enabled = True
766
     End Sub
974
     End Sub
767
     Private Sub 清除_bt_Click(sender As Object, e As EventArgs) Handles 清除_bt.Click
975
     Private Sub 清除_bt_Click(sender As Object, e As EventArgs) Handles 清除_bt.Click
784
                     Timer2.Enabled = False
992
                     Timer2.Enabled = False
785
                     SQL_SQL_自動導入判斷_關閉() : SQL_查詢日期清空()
993
                     SQL_SQL_自動導入判斷_關閉() : SQL_查詢日期清空()
786
                     MsgBox("批量自動導入 " & 批次 - 1 & " 次,完成!!!") : conn.Close() : dr.Close() : 重讀_bt.PerformClick()
994
                     MsgBox("批量自動導入 " & 批次 - 1 & " 次,完成!!!") : conn.Close() : dr.Close() : 重讀_bt.PerformClick()
995
+                    存檔_bt.PerformClick()
787
                 Else
996
                 Else
788
                     conn.Close() : dr.Close() : SQL_SQL_自動導入判斷_開啟()
997
                     conn.Close() : dr.Close() : SQL_SQL_自動導入判斷_開啟()
789
                     PA1 = Strings.Format(開始日期_dtp.Value, "yyyy-MM-dd") : PA2 = Strings.Format(結束日期_dtp.Value, "yyyy-MM-dd")
998
                     PA1 = Strings.Format(開始日期_dtp.Value, "yyyy-MM-dd") : PA2 = Strings.Format(結束日期_dtp.Value, "yyyy-MM-dd")
830
         Else : xlApp.Sheets("sheet2").Select : xlApp.Sheets("sheet2").Name = "應收帳款" : End If
1039
         Else : xlApp.Sheets("sheet2").Select : xlApp.Sheets("sheet2").Name = "應收帳款" : End If
831
         xlBook.Activate()
1040
         xlBook.Activate()
832
         xlSheet.Activate()
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
         xlSheet = NewMethod(xlBook)
1058
         xlSheet = NewMethod(xlBook)
837
         If xlApp.Sheets(1).Name = "工作表3" Then : xlApp.Sheets("工作表3").Select : xlApp.Sheets("工作表3").Name = "應付帳款"
1059
         If xlApp.Sheets(1).Name = "工作表3" Then : xlApp.Sheets("工作表3").Select : xlApp.Sheets("工作表3").Name = "應付帳款"
847
             xlSheet.Cells(2 + I, 5) = 彙總2_dgv.Rows(I).Cells("核帳").Value
1069
             xlSheet.Cells(2 + I, 5) = 彙總2_dgv.Rows(I).Cells("核帳").Value
848
             N1 = I + 2
1070
             N1 = I + 2
849
         Next
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
         Next
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
         xlSheet.PageSetup.PrintArea = ""
1097
         xlSheet.PageSetup.PrintArea = ""
869
         xlApp.Cells.Select()
1098
         xlApp.Cells.Select()
879
         With myExcel.Selection.Font : .Name = "微軟正黑體" : .Size = 10 : .Strikethrough = False : .Superscript = False : .Subscript = False : .OutlineFont = False
1108
         With myExcel.Selection.Font : .Name = "微軟正黑體" : .Size = 10 : .Strikethrough = False : .Superscript = False : .Subscript = False : .OutlineFont = False
880
             .Shadow = False : .Underline = xlUnderlineStyleNone : .ThemeColor = xlThemeColorLight1 : .TintAndShade = 0 : .ThemeFont = xlThemeFontNone
1109
             .Shadow = False : .Underline = xlUnderlineStyleNone : .ThemeColor = xlThemeColorLight1 : .TintAndShade = 0 : .ThemeFont = xlThemeFontNone
881
         End With
1110
         End With
1111
+        myExcel.Selection.ColumnWidth = 1
1112
+
882
         xlSheet.Columns("A:A").Select
1113
         xlSheet.Columns("A:A").Select
883
         With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
1114
         With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
884
             .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With
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
         With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
1117
         With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
896
             .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With
1118
             .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With
897
 
1119
 
905
         With myExcel.Selection.Borders(xlInsideHorizontal) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
1127
         With myExcel.Selection.Borders(xlInsideHorizontal) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
906
         With myExcel.Selection.Interior : .Pattern = xlSolid : .PatternColorIndex = xlAutomatic
1128
         With myExcel.Selection.Interior : .Pattern = xlSolid : .PatternColorIndex = xlAutomatic
907
             .ThemeColor = xlThemeColorAccent1 : .TintAndShade = 0.399975585192419 : .PatternTintAndShade = 0 : End With
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
     End Sub
1130
     End Sub
929
     Private Sub BB(ByVal myExcel As Microsoft.Office.Interop.Excel.Application, ByVal xlSheet As Microsoft.Office.Interop.Excel.Worksheet)
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
         xlSheet.Range("A2:E" & N1).Select()
1133
         xlSheet.Range("A2:E" & N1).Select()
933
         myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
1134
         myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
934
         With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
1135
         With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
941
         xlSheet.Range("A2:A" & N1).Select()
1142
         xlSheet.Range("A2:A" & N1).Select()
942
         With myExcel.Selection.Interior : .Pattern = xlSolid : .PatternColorIndex = xlAutomatic : .Color = 65535
1143
         With myExcel.Selection.Interior : .Pattern = xlSolid : .PatternColorIndex = xlAutomatic : .Color = 65535
943
             .TintAndShade = 0 : .PatternTintAndShade = 0 : End With
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
         myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
1186
         myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
947
         With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
1187
         With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
948
         With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
1188
         With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
950
         With myExcel.Selection.Borders(xlEdgeRight) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
1190
         With myExcel.Selection.Borders(xlEdgeRight) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
951
         With myExcel.Selection.Borders(xlInsideVertical) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
1191
         With myExcel.Selection.Borders(xlInsideVertical) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
952
         With myExcel.Selection.Borders(xlInsideHorizontal) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
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
         myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
1274
         myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
960
         With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
1275
         With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
961
         With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
1276
         With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
963
         With myExcel.Selection.Borders(xlEdgeRight) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
1278
         With myExcel.Selection.Borders(xlEdgeRight) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
964
         With myExcel.Selection.Borders(xlInsideVertical) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
1279
         With myExcel.Selection.Borders(xlInsideVertical) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
965
         With myExcel.Selection.Borders(xlInsideHorizontal) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
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
     End Sub
1281
     End Sub
971
 End Class
1282
 End Class

+ 6
- 95
GA-ERP-SYS/資料庫系統管理/系統執行檔版本管理.Designer.vb 查看文件

22
     '請勿使用程式碼編輯器進行修改。
22
     '請勿使用程式碼編輯器進行修改。
23
     <System.Diagnostics.DebuggerStepThrough()> _
23
     <System.Diagnostics.DebuggerStepThrough()> _
24
     Private Sub InitializeComponent()
24
     Private Sub InitializeComponent()
25
-        Me.Label1 = New System.Windows.Forms.Label()
26
-        Me.FTP原代碼_wb = New System.Windows.Forms.WebBrowser()
27
         Me.資料庫版本號_lb = New System.Windows.Forms.Label()
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
         Me.修改_bt = New System.Windows.Forms.Button()
26
         Me.修改_bt = New System.Windows.Forms.Button()
34
         Me.Label3 = New System.Windows.Forms.Label()
27
         Me.Label3 = New System.Windows.Forms.Label()
35
         Me.版本號_tb = New System.Windows.Forms.TextBox()
28
         Me.版本號_tb = New System.Windows.Forms.TextBox()
36
         Me.FolderBrowserDialog1 = New System.Windows.Forms.FolderBrowserDialog()
29
         Me.FolderBrowserDialog1 = New System.Windows.Forms.FolderBrowserDialog()
37
         Me.SuspendLayout()
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
         '資料庫版本號_lb
32
         '資料庫版本號_lb
59
         '
33
         '
60
         Me.資料庫版本號_lb.AutoSize = True
34
         Me.資料庫版本號_lb.AutoSize = True
61
         Me.資料庫版本號_lb.BackColor = System.Drawing.SystemColors.Control
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
         Me.資料庫版本號_lb.Name = "資料庫版本號_lb"
37
         Me.資料庫版本號_lb.Name = "資料庫版本號_lb"
64
         Me.資料庫版本號_lb.Size = New System.Drawing.Size(146, 12)
38
         Me.資料庫版本號_lb.Size = New System.Drawing.Size(146, 12)
65
         Me.資料庫版本號_lb.TabIndex = 658
39
         Me.資料庫版本號_lb.TabIndex = 658
66
         Me.資料庫版本號_lb.Text = "資料庫版本號 : 2021060901"
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
         '修改_bt
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
         Me.修改_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
45
         Me.修改_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
121
         Me.修改_bt.Name = "修改_bt"
46
         Me.修改_bt.Name = "修改_bt"
122
         Me.修改_bt.Size = New System.Drawing.Size(105, 24)
47
         Me.修改_bt.Size = New System.Drawing.Size(105, 24)
127
         '
52
         '
128
         Me.Label3.AutoSize = True
53
         Me.Label3.AutoSize = True
129
         Me.Label3.BackColor = System.Drawing.SystemColors.Control
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
         Me.Label3.Name = "Label3"
56
         Me.Label3.Name = "Label3"
132
         Me.Label3.Size = New System.Drawing.Size(41, 12)
57
         Me.Label3.Size = New System.Drawing.Size(41, 12)
133
         Me.Label3.TabIndex = 651
58
         Me.Label3.TabIndex = 651
136
         '版本號_tb
61
         '版本號_tb
137
         '
62
         '
138
         Me.版本號_tb.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
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
         Me.版本號_tb.Margin = New System.Windows.Forms.Padding(5)
65
         Me.版本號_tb.Margin = New System.Windows.Forms.Padding(5)
141
         Me.版本號_tb.Name = "版本號_tb"
66
         Me.版本號_tb.Name = "版本號_tb"
142
         Me.版本號_tb.Size = New System.Drawing.Size(101, 23)
67
         Me.版本號_tb.Size = New System.Drawing.Size(101, 23)
146
         '
71
         '
147
         Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
72
         Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
148
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
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
         Me.Controls.Add(Me.資料庫版本號_lb)
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
         Me.Controls.Add(Me.修改_bt)
76
         Me.Controls.Add(Me.修改_bt)
159
         Me.Controls.Add(Me.Label3)
77
         Me.Controls.Add(Me.Label3)
160
         Me.Controls.Add(Me.版本號_tb)
78
         Me.Controls.Add(Me.版本號_tb)
161
         Me.Name = "系統執行檔版本管理"
79
         Me.Name = "系統執行檔版本管理"
80
+        Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
162
         Me.Text = "系統執行檔版本管理"
81
         Me.Text = "系統執行檔版本管理"
163
         Me.ResumeLayout(False)
82
         Me.ResumeLayout(False)
164
         Me.PerformLayout()
83
         Me.PerformLayout()
165
 
84
 
166
     End Sub
85
     End Sub
167
-
168
-    Friend WithEvents Label1 As Label
169
-    Friend WithEvents FTP原代碼_wb As WebBrowser
170
     Friend WithEvents 資料庫版本號_lb As Label
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
     Friend WithEvents 修改_bt As Button
87
     Friend WithEvents 修改_bt As Button
177
     Friend WithEvents Label3 As Label
88
     Friend WithEvents Label3 As Label
178
     Friend WithEvents 版本號_tb As TextBox
89
     Friend WithEvents 版本號_tb As TextBox

+ 1
- 6
GA-ERP-SYS/資料庫系統管理/系統執行檔版本管理.vb 查看文件

1
 Option Strict Off
1
 Option Strict Off
2
 Public Class 系統執行檔版本管理
2
 Public Class 系統執行檔版本管理
3
     Private Sub 系統執行檔版本管理_Load(sender As Object, e As EventArgs) Handles MyBase.Load
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
         SQL_系統版本號驗證()
4
         SQL_系統版本號驗證()
6
         If dr.Read() Then : 資料庫版本號_lb.Text = "資料庫版本號 : " & dr("系統認證版本號") : 版本號_tb.Text = dr("系統認證版本號") : End If : conn.Close()
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
     End Sub
6
     End Sub
10
     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles 修改_bt.Click
7
     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles 修改_bt.Click
11
         SQL_版本號管理修改() : conn.Close() : SQL_系統版本號驗證()
8
         SQL_版本號管理修改() : conn.Close() : SQL_系統版本號驗證()
12
         If dr.Read() Then : 資料庫版本號_lb.Text = "資料庫版本號 : " & dr("系統認證版本號") : 版本號_tb.Text = dr("系統認證版本號") : End If : conn.Close() : MsgBox("修改完成")
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
     End Sub
11
     End Sub
17
 End Class
12
 End Class

正在加载...
取消
保存