B70340 před 4 roky
rodič
revize
befc1182ce

binární
.vs/TENDEN-MES-SYS/v16/.suo Zobrazit soubor


+ 1
- 1
TENDEN-MES-SYS/Module/全域變數.vb Zobrazit soubor

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

binární
TENDEN-MES-SYS/bin/Debug/TENDEN-ERP-SYS.exe Zobrazit soubor


binární
TENDEN-MES-SYS/bin/Debug/TENDEN-ERP-SYS.pdb Zobrazit soubor


binární
TENDEN-MES-SYS/obj/Debug/TENDEN-ERP-SYS.exe Zobrazit soubor


binární
TENDEN-MES-SYS/obj/Debug/TENDEN-ERP-SYS.pdb Zobrazit soubor


binární
TENDEN-MES-SYS/obj/Debug/天盾系統.vbproj.GenerateResource.cache Zobrazit soubor


binární
TENDEN-MES-SYS/obj/Debug/天盾系統.vbprojAssemblyReference.cache Zobrazit soubor


+ 48
- 24
TENDEN-MES-SYS/圖片資料庫管理/驗貨報告圖片導入資料庫.Designer.vb Zobrazit soubor

@@ -24,7 +24,7 @@ Partial Class 驗貨報告圖片導入資料庫
24 24
     Private  Sub InitializeComponent()
25 25
         Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
26 26
         Me.WebBrowser1 = New System.Windows.Forms.WebBrowser()
27
-        Me.DataGridView1 = New System.Windows.Forms.DataGridView()
27
+        Me.訂單清單_dgv = New System.Windows.Forms.DataGridView()
28 28
         Me.Label3 = New System.Windows.Forms.Label()
29 29
         Me.Label2 = New System.Windows.Forms.Label()
30 30
         Me.TextBox1 = New System.Windows.Forms.TextBox()
@@ -47,7 +47,9 @@ Partial Class 驗貨報告圖片導入資料庫
47 47
         Me.Label8 = New System.Windows.Forms.Label()
48 48
         Me.TextBox5 = New System.Windows.Forms.TextBox()
49 49
         Me.Label10 = New System.Windows.Forms.Label()
50
-        CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).BeginInit()
50
+        Me.資料庫選擇2_bt = New System.Windows.Forms.Button()
51
+        Me.資料庫選擇1_bt = New System.Windows.Forms.Button()
52
+        CType(Me.訂單清單_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
51 53
         Me.SuspendLayout()
52 54
         '
53 55
         'WebBrowser1
@@ -59,18 +61,18 @@ Partial Class 驗貨報告圖片導入資料庫
59 61
         Me.WebBrowser1.TabIndex = 521
60 62
         Me.WebBrowser1.Url = New System.Uri("", System.UriKind.Relative)
61 63
         '
62
-        'DataGridView1
64
+        '訂單清單_dgv
63 65
         '
64 66
         DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
65
-        Me.DataGridView1.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
66
-        Me.DataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
67
-        Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
68
-        Me.DataGridView1.Location = New System.Drawing.Point(990, 6)
69
-        Me.DataGridView1.Name = "DataGridView1"
70
-        Me.DataGridView1.RowHeadersWidth = 5
71
-        Me.DataGridView1.RowTemplate.Height = 24
72
-        Me.DataGridView1.Size = New System.Drawing.Size(915, 973)
73
-        Me.DataGridView1.TabIndex = 522
67
+        Me.訂單清單_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
68
+        Me.訂單清單_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
69
+        Me.訂單清單_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
70
+        Me.訂單清單_dgv.Location = New System.Drawing.Point(990, 6)
71
+        Me.訂單清單_dgv.Name = "訂單清單_dgv"
72
+        Me.訂單清單_dgv.RowHeadersWidth = 5
73
+        Me.訂單清單_dgv.RowTemplate.Height = 24
74
+        Me.訂單清單_dgv.Size = New System.Drawing.Size(915, 973)
75
+        Me.訂單清單_dgv.TabIndex = 522
74 76
         '
75 77
         'Label3
76 78
         '
@@ -109,9 +111,9 @@ Partial Class 驗貨報告圖片導入資料庫
109 111
         'Button31
110 112
         '
111 113
         Me.Button31.ForeColor = System.Drawing.Color.Black
112
-        Me.Button31.Location = New System.Drawing.Point(884, 6)
114
+        Me.Button31.Location = New System.Drawing.Point(835, 47)
113 115
         Me.Button31.Name = "Button31"
114
-        Me.Button31.Size = New System.Drawing.Size(100, 78)
116
+        Me.Button31.Size = New System.Drawing.Size(149, 35)
115 117
         Me.Button31.TabIndex = 532
116 118
         Me.Button31.Text = "查詢"
117 119
         Me.Button31.UseVisualStyleBackColor = True
@@ -139,7 +141,7 @@ Partial Class 驗貨報告圖片導入資料庫
139 141
         '
140 142
         Me.Button11.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
141 143
         Me.Button11.ForeColor = System.Drawing.Color.Blue
142
-        Me.Button11.Location = New System.Drawing.Point(616, 6)
144
+        Me.Button11.Location = New System.Drawing.Point(458, 6)
143 145
         Me.Button11.Name = "Button11"
144 146
         Me.Button11.Size = New System.Drawing.Size(107, 52)
145 147
         Me.Button11.TabIndex = 535
@@ -149,7 +151,7 @@ Partial Class 驗貨報告圖片導入資料庫
149 151
         'DateTimePicker1
150 152
         '
151 153
         Me.DateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
152
-        Me.DateTimePicker1.Location = New System.Drawing.Point(520, 6)
154
+        Me.DateTimePicker1.Location = New System.Drawing.Point(362, 34)
153 155
         Me.DateTimePicker1.Name = "DateTimePicker1"
154 156
         Me.DateTimePicker1.Size = New System.Drawing.Size(90, 23)
155 157
         Me.DateTimePicker1.TabIndex = 536
@@ -157,7 +159,7 @@ Partial Class 驗貨報告圖片導入資料庫
157 159
         'Label1
158 160
         '
159 161
         Me.Label1.AutoSize = True
160
-        Me.Label1.Location = New System.Drawing.Point(458, 9)
162
+        Me.Label1.Location = New System.Drawing.Point(300, 37)
161 163
         Me.Label1.Name = "Label1"
162 164
         Me.Label1.Size = New System.Drawing.Size(56, 16)
163 165
         Me.Label1.TabIndex = 537
@@ -246,11 +248,11 @@ Partial Class 驗貨報告圖片導入資料庫
246 248
         '
247 249
         Me.Label8.AutoSize = True
248 250
         Me.Label8.ForeColor = System.Drawing.Color.Red
249
-        Me.Label8.Location = New System.Drawing.Point(729, 6)
251
+        Me.Label8.Location = New System.Drawing.Point(571, 9)
250 252
         Me.Label8.Name = "Label8"
251
-        Me.Label8.Size = New System.Drawing.Size(140, 80)
253
+        Me.Label8.Size = New System.Drawing.Size(224, 48)
252 254
         Me.Label8.TabIndex = 570
253
-        Me.Label8.Text = "驗貨報告圖庫不提供修改" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "圖片功能,入圖時請小心" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "謹慎,如有需要修改驗貨" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "報告圖片請向單位主管提" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "出申請"
255
+        Me.Label8.Text = "驗貨報告圖庫不提供修改圖片功能,入圖" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "時請小心謹慎,如有需要修改驗貨報告圖" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "片請向單位主管提出申請"
254 256
         '
255 257
         'TextBox5
256 258
         '
@@ -269,11 +271,32 @@ Partial Class 驗貨報告圖片導入資料庫
269 271
         Me.Label10.TabIndex = 571
270 272
         Me.Label10.Text = "天盾訂單號"
271 273
         '
274
+        '資料庫選擇2_bt
275
+        '
276
+        Me.資料庫選擇2_bt.Location = New System.Drawing.Point(910, 6)
277
+        Me.資料庫選擇2_bt.Name = "資料庫選擇2_bt"
278
+        Me.資料庫選擇2_bt.Size = New System.Drawing.Size(75, 35)
279
+        Me.資料庫選擇2_bt.TabIndex = 574
280
+        Me.資料庫選擇2_bt.Text = "DRS/ LIF"
281
+        Me.資料庫選擇2_bt.UseVisualStyleBackColor = True
282
+        '
283
+        '資料庫選擇1_bt
284
+        '
285
+        Me.資料庫選擇1_bt.Location = New System.Drawing.Point(835, 6)
286
+        Me.資料庫選擇1_bt.Name = "資料庫選擇1_bt"
287
+        Me.資料庫選擇1_bt.Size = New System.Drawing.Size(75, 35)
288
+        Me.資料庫選擇1_bt.TabIndex = 573
289
+        Me.資料庫選擇1_bt.Text = "VIONIC"
290
+        Me.資料庫選擇1_bt.UseVisualStyleBackColor = True
291
+        '
272 292
         '驗貨報告圖片導入資料庫
273 293
         '
274 294
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
275 295
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
276 296
         Me.ClientSize = New System.Drawing.Size(1914, 991)
297
+        Me.Controls.Add(Me.資料庫選擇2_bt)
298
+        Me.Controls.Add(Me.資料庫選擇1_bt)
299
+        Me.Controls.Add(Me.Button31)
277 300
         Me.Controls.Add(Me.TextBox5)
278 301
         Me.Controls.Add(Me.Label10)
279 302
         Me.Controls.Add(Me.Label8)
@@ -288,12 +311,11 @@ Partial Class 驗貨報告圖片導入資料庫
288 311
         Me.Controls.Add(Me.DateTimePicker1)
289 312
         Me.Controls.Add(Me.Button11)
290 313
         Me.Controls.Add(Me.TextBox4)
291
-        Me.Controls.Add(Me.Button31)
292 314
         Me.Controls.Add(Me.TextBox2)
293 315
         Me.Controls.Add(Me.TextBox1)
294 316
         Me.Controls.Add(Me.Label3)
295 317
         Me.Controls.Add(Me.Label2)
296
-        Me.Controls.Add(Me.DataGridView1)
318
+        Me.Controls.Add(Me.訂單清單_dgv)
297 319
         Me.Controls.Add(Me.WebBrowser1)
298 320
         Me.Controls.Add(Me.Label7)
299 321
         Me.Controls.Add(Me.Label9)
@@ -301,14 +323,14 @@ Partial Class 驗貨報告圖片導入資料庫
301 323
         Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
302 324
         Me.Name = "驗貨報告圖片導入資料庫"
303 325
         Me.Text = "驗貨報告圖片導入資料庫"
304
-        CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).EndInit()
326
+        CType(Me.訂單清單_dgv, System.ComponentModel.ISupportInitialize).EndInit()
305 327
         Me.ResumeLayout(False)
306 328
         Me.PerformLayout()
307 329
 
308 330
     End Sub
309 331
 
310 332
     Friend WithEvents WebBrowser1 As WebBrowser
311
-    Friend WithEvents DataGridView1 As DataGridView
333
+    Friend WithEvents 訂單清單_dgv As DataGridView
312 334
     Friend WithEvents Label3 As Label
313 335
     Friend WithEvents Label2 As Label
314 336
     Friend WithEvents TextBox1 As TextBox
@@ -331,5 +353,7 @@ Partial Class 驗貨報告圖片導入資料庫
331 353
     Friend WithEvents Label8 As Label
332 354
     Friend WithEvents TextBox5 As TextBox
333 355
     Friend WithEvents Label10 As Label
356
+    Friend WithEvents 資料庫選擇2_bt As Button
357
+    Friend WithEvents 資料庫選擇1_bt As Button
334 358
 End Class
335 359
 

+ 30
- 17
TENDEN-MES-SYS/圖片資料庫管理/驗貨報告圖片導入資料庫.vb Zobrazit soubor

@@ -5,28 +5,29 @@ Public Class 驗貨報告圖片導入資料庫
5 5
     ReadOnly ds As New DataSet : ReadOnly ds1 As New DataSet : ReadOnly ds2 As New DataSet
6 6
     Dim DTP As String
7 7
     Private  Sub Set_DGV1載入前設定()
8
-        DataGridView1.DataSource = Nothing : ds.Clear()
9
-        DataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
10
-        DataGridView1.ColumnHeadersHeight = 25
11
-        DataGridView1.AllowUserToAddRows = False
8
+        訂單清單_dgv.DataSource = Nothing : ds.Clear()
9
+        訂單清單_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
10
+        訂單清單_dgv.ColumnHeadersHeight = 25
11
+        訂單清單_dgv.AllowUserToAddRows = False
12 12
         ConnOpen()
13 13
     End Sub
14 14
     Private  Sub Set_DGV1載入後設定()
15
-        CmdSet_For_DGV() : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds) : DataGridView1.DataSource = ds.Tables(0) : conn.Close()
15
+        CmdSet_For_DGV() : da.SelectCommand.CommandTimeout = 900 : da.Fill(ds) : 訂單清單_dgv.DataSource = ds.Tables(0) : conn.Close()
16 16
     End Sub
17 17
     Private  Sub Set_清單1()
18 18
         Set_DGV1載入前設定()
19
-        SQL1 = "SELECT 訂單流水號, 年份季度, 客戶訂單號, 形體號, 顏色, 生產工廠, 裁斷時間, 針車時間, 成型時間, 驗貨時間, 驗貨報告圖片 FROM 訂單控制表 
19
+        SQL1 = "SELECT 訂單流水號, 年份季度, 客戶訂單號, 形體號, 顏色, 生產工廠, 裁斷時間, 針車時間, 成型時間, 驗貨時間, 驗貨報告圖片 FROM " & 訂單資料表(1) & " 
20 20
                 WHERE (CXL = 0 OR CXL IS NULL) AND (訂單數量 - 出貨數量 <> 0) AND (驗貨時間 LIKE '') ORDER BY   SUBSTRING(訂單流水號, 4, 6), 客戶訂單號, 形體號"
21 21
         Set_DGV1載入後設定()
22 22
     End Sub
23 23
     Private  Sub Set_grid1()
24
-        DataGridView1.Columns(0).FillWeight = 80 : DataGridView1.Columns(1).FillWeight = 70 : DataGridView1.Columns(2).FillWeight = 120 : DataGridView1.Columns(3).FillWeight = 140
25
-        DataGridView1.Columns(4).FillWeight = 100 : DataGridView1.Columns(5).FillWeight = 80 : DataGridView1.Columns(6).FillWeight = 100 : DataGridView1.Columns(7).FillWeight = 100
26
-        DataGridView1.Columns(8).FillWeight = 100 : DataGridView1.Columns(9).Visible = False : DataGridView1.Columns(10).Visible = False
24
+        訂單清單_dgv.Columns(0).FillWeight = 80 : 訂單清單_dgv.Columns(1).FillWeight = 70 : 訂單清單_dgv.Columns(2).FillWeight = 120 : 訂單清單_dgv.Columns(3).FillWeight = 140
25
+        訂單清單_dgv.Columns(4).FillWeight = 100 : 訂單清單_dgv.Columns(5).FillWeight = 80 : 訂單清單_dgv.Columns(6).FillWeight = 100 : 訂單清單_dgv.Columns(7).FillWeight = 100
26
+        訂單清單_dgv.Columns(8).FillWeight = 100 : 訂單清單_dgv.Columns(9).Visible = False : 訂單清單_dgv.Columns(10).Visible = False
27 27
     End Sub
28
-    Private  Sub 驗貨報告圖片導入資料庫_Load(sender As Object, e As EventArgs) Handles MyBase.Load
28
+    Private Sub 驗貨報告圖片導入資料庫_Load(sender As Object, e As EventArgs) Handles MyBase.Load
29 29
         Me.MdiParent = TENDEN_MES_SYS : Me.WindowState = 2 : Me.AutoScroll = True
30
+        訂單資料庫選擇.ShowDialog()
30 31
         Target1 = Target & AA(3) & "/"
31 32
         WebBrowser1.Url = New Uri(Target1)
32 33
         Set_清單1() : Set_grid1()
@@ -35,16 +36,16 @@ Public Class 驗貨報告圖片導入資料庫
35 36
             WebBrowser2.Navigate(FolderBrowserDialog1.SelectedPath)
36 37
         End If
37 38
     End Sub
38
-    Private  Sub DataGridView1_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles DataGridView1.CellClick
39
+    Private  Sub DataGridView1_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 訂單清單_dgv.CellClick
39 40
         If e.RowIndex = -1 Then : Else
40
-            TextBox1.Text = DataGridView1("客戶訂單號", e.RowIndex).Value.ToString : TextBox2.Text = DataGridView1("形體號", e.RowIndex).Value.ToString
41
-            TextBox5.Text = DataGridView1("訂單流水號", e.RowIndex).Value.ToString
41
+            TextBox1.Text = 訂單清單_dgv("客戶訂單號", e.RowIndex).Value.ToString : TextBox2.Text = 訂單清單_dgv("形體號", e.RowIndex).Value.ToString
42
+            TextBox5.Text = 訂單清單_dgv("訂單流水號", e.RowIndex).Value.ToString
42 43
         End If
43 44
     End Sub
44 45
     Private  Sub Button31_Click(sender As Object, e As EventArgs) Handles Button31.Click
45 46
         PA = InputBox("請輸入要查詢的資料")
46 47
         Set_DGV1載入前設定()
47
-        SQL1 = "SELECT 訂單流水號, 年份季度, 客戶訂單號, 形體號, 顏色, 生產工廠, 裁斷時間, 針車時間, 成型時間, 驗貨時間, 驗貨報告圖片 FROM 訂單控制表 " &
48
+        SQL1 = "SELECT 訂單流水號, 年份季度, 客戶訂單號, 形體號, 顏色, 生產工廠, 裁斷時間, 針車時間, 成型時間, 驗貨時間, 驗貨報告圖片 FROM " & 訂單資料表(1) & " " &
48 49
                "WHERE (CXL = 0 OR CXL IS NULL) AND (訂單數量 - 出貨數量 <> 0) AND (驗貨時間 LIKE '') AND (訂單流水號 LIKE '%" & PA & "%' OR 年份季度 LIKE '%" & PA & "%' OR " &
49 50
                "客戶訂單號 LIKE '%" & PA & "%' OR 形體號 LIKE '%" & PA & "%' OR 生產工廠 LIKE '%" & PA & "%') ORDER BY   SUBSTRING(訂單流水號, 4, 6), 客戶訂單號, 形體號"
50 51
         Set_DGV1載入後設定() : Set_grid1()
@@ -73,13 +74,19 @@ Public Class 驗貨報告圖片導入資料庫
73 74
             End If
74 75
 
75 76
             ConnOpen()
76
-            SQL1 = "INSERT INTO 驗貨報告圖庫 (客戶訂單號, 型體名稱, 驗貨報告編號, 操作人, 驗貨報告) SELECT '" & TextBox1.Text & "','" & TextBox2.Text & "','" & TextBox3.Text & "','" & gUserName & "', " &
77
+            If Strings.Left(Target1, 18) = "ftp://106.1.50.79/" Then
78
+                SQL1 = "INSERT INTO 驗貨報告圖庫 (客戶訂單號, 型體名稱, 驗貨報告編號, 操作人, 驗貨報告) SELECT '" & TextBox1.Text & "','" & TextBox2.Text & "','" & TextBox3.Text & "','" & gUserName & "', " &
79
+                       "BULKCOLUMN FROM OPENROWSET ( BULK 'C:\FTP\TENDENZA\0004\" & TextBox4.Text & "', SINGLE_BLOB) AS EMPLOYEEPICTURE"
80
+            Else
81
+                SQL1 = "INSERT INTO 驗貨報告圖庫 (客戶訂單號, 型體名稱, 驗貨報告編號, 操作人, 驗貨報告) SELECT '" & TextBox1.Text & "','" & TextBox2.Text & "','" & TextBox3.Text & "','" & gUserName & "', " &
77 82
                        "BULKCOLUMN FROM OPENROWSET ( BULK 'E:\TENDENZA\0004\" & TextBox4.Text & "', SINGLE_BLOB) AS EMPLOYEEPICTURE"
83
+            End If
78 84
             CmdSet_For_dr() : conn.Close()
79 85
 
80 86
             DTP = Format(DateTimePicker1.Value, "yyyy/MM/dd")
87
+
81 88
             ConnOpen()
82
-            SQL1 = "UPDATE 訂單控制表 SET 驗貨時間 = '" & DTP & "', 驗貨報告圖片 = '" & TextBox3.Text & "' 
89
+            SQL1 = "UPDATE " & 訂單資料表(1) & " SET 驗貨時間 = '" & DTP & "', 驗貨報告圖片 = '" & TextBox3.Text & "' 
83 90
                         WHERE (訂單流水號 LIKE '" & TextBox5.Text & "' AND 客戶訂單號 = '" & TextBox1.Text & "' AND 形體號 = '" & TextBox2.Text & "')"
84 91
             cmd.CommandText = SQL1 : cmd.ExecuteNonQuery() : conn.Close()
85 92
             '---FTP方式刪除檔案----------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -139,9 +146,15 @@ Public Class 驗貨報告圖片導入資料庫
139 146
             TextBox4.AppendText(file + Environment.NewLine)
140 147
         Next
141 148
     End Sub
142
-    Private  Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
149
+    Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
143 150
         If FolderBrowserDialog1.ShowDialog = DialogResult.OK Then
144 151
             WebBrowser2.Navigate(FolderBrowserDialog1.SelectedPath)
145 152
         End If
146 153
     End Sub
154
+    Private Sub 資料庫選擇1_bt_Click(sender As Object, e As EventArgs) Handles 資料庫選擇1_bt.Click
155
+        SQL_訂單資料表選擇_VIONIC() : Set_清單1()
156
+    End Sub
157
+    Private Sub 資料庫選擇2_bt_Click(sender As Object, e As EventArgs) Handles 資料庫選擇2_bt.Click
158
+        SQL_訂單資料表選擇_非VIONIC() : Set_清單1()
159
+    End Sub
147 160
 End Class

+ 26
- 2
TENDEN-MES-SYS/圖片資料庫管理/驗貨報告資料庫.Designer.vb Zobrazit soubor

@@ -51,6 +51,8 @@ Partial Class 驗貨報告資料庫
51 51
         Me.Button24 = New System.Windows.Forms.Button()
52 52
         Me.Label7 = New System.Windows.Forms.Label()
53 53
         Me.FolderBrowserDialog1 = New System.Windows.Forms.FolderBrowserDialog()
54
+        Me.資料庫選擇2_bt = New System.Windows.Forms.Button()
55
+        Me.資料庫選擇1_bt = New System.Windows.Forms.Button()
54 56
         CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).BeginInit()
55 57
         CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
56 58
         Me.SuspendLayout()
@@ -59,12 +61,12 @@ Partial Class 驗貨報告資料庫
59 61
         '
60 62
         Me.DataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
61 63
         Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
62
-        Me.DataGridView1.Location = New System.Drawing.Point(12, 13)
64
+        Me.DataGridView1.Location = New System.Drawing.Point(12, 42)
63 65
         Me.DataGridView1.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
64 66
         Me.DataGridView1.Name = "DataGridView1"
65 67
         Me.DataGridView1.RowHeadersWidth = 5
66 68
         Me.DataGridView1.RowTemplate.Height = 24
67
-        Me.DataGridView1.Size = New System.Drawing.Size(615, 965)
69
+        Me.DataGridView1.Size = New System.Drawing.Size(615, 936)
68 70
         Me.DataGridView1.TabIndex = 4
69 71
         '
70 72
         'PictureBox1
@@ -323,11 +325,31 @@ Partial Class 驗貨報告資料庫
323 325
         Me.Label7.TabIndex = 584
324 326
         Me.Label7.Text = "↓"
325 327
         '
328
+        '資料庫選擇2_bt
329
+        '
330
+        Me.資料庫選擇2_bt.Location = New System.Drawing.Point(552, 5)
331
+        Me.資料庫選擇2_bt.Name = "資料庫選擇2_bt"
332
+        Me.資料庫選擇2_bt.Size = New System.Drawing.Size(75, 35)
333
+        Me.資料庫選擇2_bt.TabIndex = 587
334
+        Me.資料庫選擇2_bt.Text = "DRS/ LIF"
335
+        Me.資料庫選擇2_bt.UseVisualStyleBackColor = True
336
+        '
337
+        '資料庫選擇1_bt
338
+        '
339
+        Me.資料庫選擇1_bt.Location = New System.Drawing.Point(477, 5)
340
+        Me.資料庫選擇1_bt.Name = "資料庫選擇1_bt"
341
+        Me.資料庫選擇1_bt.Size = New System.Drawing.Size(75, 35)
342
+        Me.資料庫選擇1_bt.TabIndex = 586
343
+        Me.資料庫選擇1_bt.Text = "VIONIC"
344
+        Me.資料庫選擇1_bt.UseVisualStyleBackColor = True
345
+        '
326 346
         '驗貨報告資料庫
327 347
         '
328 348
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
329 349
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
330 350
         Me.ClientSize = New System.Drawing.Size(1914, 991)
351
+        Me.Controls.Add(Me.資料庫選擇2_bt)
352
+        Me.Controls.Add(Me.資料庫選擇1_bt)
331 353
         Me.Controls.Add(Me.Label10)
332 354
         Me.Controls.Add(Me.Label6)
333 355
         Me.Controls.Add(Me.TextBox7)
@@ -395,4 +417,6 @@ Partial Class 驗貨報告資料庫
395 417
     Friend WithEvents Button24 As Button
396 418
     Friend WithEvents Label7 As Label
397 419
     Friend WithEvents FolderBrowserDialog1 As FolderBrowserDialog
420
+    Friend WithEvents 資料庫選擇2_bt As Button
421
+    Friend WithEvents 資料庫選擇1_bt As Button
398 422
 End Class

+ 18
- 8
TENDEN-MES-SYS/圖片資料庫管理/驗貨報告資料庫.vb Zobrazit soubor

@@ -25,9 +25,10 @@ Public Class 驗貨報告資料庫
25 25
     End Sub
26 26
     Private  Sub Set_圖片清單()
27 27
         Set_DGV1載入前設定()
28
-        SQL1 = "SELECT 訂單控制表.訂單流水號, 訂單控制表.年份季度, 驗貨報告圖庫.客戶訂單號, 驗貨報告圖庫.型體名稱, 訂單控制表.顏色,  驗貨報告圖庫.驗貨報告編號 " &
29
-               "FROM 驗貨報告圖庫 LEFT OUTER JOIN 訂單控制表 ON 驗貨報告圖庫.客戶訂單號 = 訂單控制表.客戶訂單號 GROUP BY   訂單控制表.訂單流水號, 訂單控制表.年份季度, " &
30
-               "驗貨報告圖庫.客戶訂單號, 驗貨報告圖庫.型體名稱, 訂單控制表.顏色, 驗貨報告圖庫.驗貨報告編號 ORDER BY 驗貨報告圖庫.客戶訂單號, 驗貨報告圖庫.型體名稱"
28
+        SQL1 = "SELECT     " & 訂單資料表(1) & ".訂單流水號, " & 訂單資料表(1) & ".年份季度, 驗貨報告圖庫.客戶訂單號, 驗貨報告圖庫.型體名稱, " & 訂單資料表(1) & ".顏色,  驗貨報告圖庫.驗貨報告編號 
29
+                FROM       驗貨報告圖庫 INNER JOIN " & 訂單資料表(1) & " ON 驗貨報告圖庫.客戶訂單號 = " & 訂單資料表(1) & ".客戶訂單號 
30
+                GROUP BY   " & 訂單資料表(1) & ".訂單流水號, " & 訂單資料表(1) & ".年份季度, 驗貨報告圖庫.客戶訂單號, 驗貨報告圖庫.型體名稱, " & 訂單資料表(1) & ".顏色, 驗貨報告圖庫.驗貨報告編號 
31
+                ORDER BY   驗貨報告圖庫.客戶訂單號, 驗貨報告圖庫.型體名稱"
31 32
         Set_DGV1載入後設定()
32 33
     End Sub
33 34
     Private  Sub Set_grid()
@@ -36,6 +37,7 @@ Public Class 驗貨報告資料庫
36 37
     End Sub
37 38
     Private  Sub 驗貨報告資料庫_Load(sender As Object, e As EventArgs) Handles MyBase.Load
38 39
         Me.MdiParent = TENDEN_MES_SYS : Me.WindowState = 2 : Me.AutoScroll = True
40
+        訂單資料庫選擇.ShowDialog()
39 41
         Target1 = Target & AA(3) & "/"
40 42
         WebBrowser1.Url = New Uri(Target1)
41 43
         TextBox1.Enabled = False : TextBox2.Enabled = False : TextBox3.Enabled = False : TextBox4.Enabled = False : TextBox5.Visible = False : TextBox7.Visible = False : Button24.Enabled = False
@@ -81,10 +83,12 @@ Public Class 驗貨報告資料庫
81 83
     Private  Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
82 84
         PA = InputBox("請輸入關鍵字")
83 85
         Set_DGV1載入前設定()
84
-        SQL1 = "SELECT 訂單控制表.訂單流水號, 訂單控制表.年份季度, 驗貨報告圖庫.客戶訂單號, 驗貨報告圖庫.型體名稱, 訂單控制表.顏色,  驗貨報告圖庫.驗貨報告編號 " &
85
-               "FROM 驗貨報告圖庫 LEFT OUTER JOIN 訂單控制表 ON 驗貨報告圖庫.客戶訂單號 = 訂單控制表.客戶訂單號 WHERE 訂單控制表.訂單流水號 LIKE '%" & PA & "%' OR " &
86
-               "訂單控制表.年份季度 LIKE '%" & PA & "%' OR 驗貨報告圖庫.客戶訂單號 LIKE '%" & PA & "%' OR 驗貨報告圖庫.型體名稱 LIKE '%" & PA & "%' GROUP BY 訂單控制表.訂單流水號, 訂單控制表.年份季度, " &
87
-               "驗貨報告圖庫.客戶訂單號, 驗貨報告圖庫.型體名稱, 訂單控制表.顏色, 驗貨報告圖庫.驗貨報告編號 ORDER BY 驗貨報告圖庫.客戶訂單號, 驗貨報告圖庫.型體名稱"
86
+        SQL1 = "SELECT   " & 訂單資料表(1) & ".訂單流水號, " & 訂單資料表(1) & ".年份季度, 驗貨報告圖庫.客戶訂單號, 驗貨報告圖庫.型體名稱, " & 訂單資料表(1) & ".顏色,  驗貨報告圖庫.驗貨報告編號 
87
+                FROM     驗貨報告圖庫 LEFT OUTER JOIN " & 訂單資料表(1) & " ON 驗貨報告圖庫.客戶訂單號 = " & 訂單資料表(1) & ".客戶訂單號 
88
+                WHERE    " & 訂單資料表(1) & ".訂單流水號 LIKE '%" & PA & "%' OR " &
89
+                         "" & 訂單資料表(1) & ".年份季度 LIKE '%" & PA & "%' OR 驗貨報告圖庫.客戶訂單號 LIKE '%" & PA & "%' OR 驗貨報告圖庫.型體名稱 LIKE '%" & PA & "%' 
90
+                GROUP BY " & 訂單資料表(1) & ".訂單流水號, " & 訂單資料表(1) & ".年份季度, 驗貨報告圖庫.客戶訂單號, 驗貨報告圖庫.型體名稱, " & 訂單資料表(1) & ".顏色, 驗貨報告圖庫.驗貨報告編號 
91
+                ORDER BY 驗貨報告圖庫.客戶訂單號, 驗貨報告圖庫.型體名稱"
88 92
         Set_DGV1載入後設定() : Set_grid()
89 93
     End Sub
90 94
     Private  Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
@@ -204,7 +208,7 @@ Public Class 驗貨報告資料庫
204 208
             TextBox6.AppendText(file + Environment.NewLine)
205 209
         Next
206 210
     End Sub
207
-    Private  Sub Button24_Click(sender As Object, e As EventArgs) Handles Button24.Click
211
+    Private Sub Button24_Click(sender As Object, e As EventArgs) Handles Button24.Click
208 212
         conn.Close()
209 213
         If TextBox1.Text = "" Then
210 214
             MsgBox("請先選擇需要修改的圖片")
@@ -234,4 +238,10 @@ Public Class 驗貨報告資料庫
234 238
             End If
235 239
         End If
236 240
     End Sub
241
+    Private Sub 資料庫選擇1_bt_Click(sender As Object, e As EventArgs) Handles 資料庫選擇1_bt.Click
242
+        SQL_訂單資料表選擇_VIONIC() : Set_圖片清單()
243
+    End Sub
244
+    Private Sub 資料庫選擇2_bt_Click(sender As Object, e As EventArgs) Handles 資料庫選擇2_bt.Click
245
+        SQL_訂單資料表選擇_非VIONIC() : Set_圖片清單()
246
+    End Sub
237 247
 End Class

Loading…
Zrušit
Uložit