B70340 il y a 4 ans
Parent
révision
befc1182ce

BIN
.vs/TENDEN-MES-SYS/v16/.suo Voir le fichier


+ 1
- 1
TENDEN-MES-SYS/Module/全域變數.vb Voir le fichier

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
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
     Public CC(99) As Boolean : Public AA(99) As String : Public 登入判斷 As Boolean
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
     Public 匯率 As Double
9
     Public 匯率 As Double
10
 
10
 

BIN
TENDEN-MES-SYS/bin/Debug/TENDEN-ERP-SYS.exe Voir le fichier


BIN
TENDEN-MES-SYS/bin/Debug/TENDEN-ERP-SYS.pdb Voir le fichier


BIN
TENDEN-MES-SYS/obj/Debug/TENDEN-ERP-SYS.exe Voir le fichier


BIN
TENDEN-MES-SYS/obj/Debug/TENDEN-ERP-SYS.pdb Voir le fichier


BIN
TENDEN-MES-SYS/obj/Debug/天盾系統.vbproj.GenerateResource.cache Voir le fichier


BIN
TENDEN-MES-SYS/obj/Debug/天盾系統.vbprojAssemblyReference.cache Voir le fichier


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

24
     Private  Sub InitializeComponent()
24
     Private  Sub InitializeComponent()
25
         Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
25
         Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
26
         Me.WebBrowser1 = New System.Windows.Forms.WebBrowser()
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
         Me.Label3 = New System.Windows.Forms.Label()
28
         Me.Label3 = New System.Windows.Forms.Label()
29
         Me.Label2 = New System.Windows.Forms.Label()
29
         Me.Label2 = New System.Windows.Forms.Label()
30
         Me.TextBox1 = New System.Windows.Forms.TextBox()
30
         Me.TextBox1 = New System.Windows.Forms.TextBox()
47
         Me.Label8 = New System.Windows.Forms.Label()
47
         Me.Label8 = New System.Windows.Forms.Label()
48
         Me.TextBox5 = New System.Windows.Forms.TextBox()
48
         Me.TextBox5 = New System.Windows.Forms.TextBox()
49
         Me.Label10 = New System.Windows.Forms.Label()
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
         Me.SuspendLayout()
53
         Me.SuspendLayout()
52
         '
54
         '
53
         'WebBrowser1
55
         'WebBrowser1
59
         Me.WebBrowser1.TabIndex = 521
61
         Me.WebBrowser1.TabIndex = 521
60
         Me.WebBrowser1.Url = New System.Uri("", System.UriKind.Relative)
62
         Me.WebBrowser1.Url = New System.Uri("", System.UriKind.Relative)
61
         '
63
         '
62
-        'DataGridView1
64
+        '訂單清單_dgv
63
         '
65
         '
64
         DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
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
         'Label3
77
         'Label3
76
         '
78
         '
109
         'Button31
111
         'Button31
110
         '
112
         '
111
         Me.Button31.ForeColor = System.Drawing.Color.Black
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
         Me.Button31.Name = "Button31"
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
         Me.Button31.TabIndex = 532
117
         Me.Button31.TabIndex = 532
116
         Me.Button31.Text = "查詢"
118
         Me.Button31.Text = "查詢"
117
         Me.Button31.UseVisualStyleBackColor = True
119
         Me.Button31.UseVisualStyleBackColor = True
139
         '
141
         '
140
         Me.Button11.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
142
         Me.Button11.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
141
         Me.Button11.ForeColor = System.Drawing.Color.Blue
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
         Me.Button11.Name = "Button11"
145
         Me.Button11.Name = "Button11"
144
         Me.Button11.Size = New System.Drawing.Size(107, 52)
146
         Me.Button11.Size = New System.Drawing.Size(107, 52)
145
         Me.Button11.TabIndex = 535
147
         Me.Button11.TabIndex = 535
149
         'DateTimePicker1
151
         'DateTimePicker1
150
         '
152
         '
151
         Me.DateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
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
         Me.DateTimePicker1.Name = "DateTimePicker1"
155
         Me.DateTimePicker1.Name = "DateTimePicker1"
154
         Me.DateTimePicker1.Size = New System.Drawing.Size(90, 23)
156
         Me.DateTimePicker1.Size = New System.Drawing.Size(90, 23)
155
         Me.DateTimePicker1.TabIndex = 536
157
         Me.DateTimePicker1.TabIndex = 536
157
         'Label1
159
         'Label1
158
         '
160
         '
159
         Me.Label1.AutoSize = True
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
         Me.Label1.Name = "Label1"
163
         Me.Label1.Name = "Label1"
162
         Me.Label1.Size = New System.Drawing.Size(56, 16)
164
         Me.Label1.Size = New System.Drawing.Size(56, 16)
163
         Me.Label1.TabIndex = 537
165
         Me.Label1.TabIndex = 537
246
         '
248
         '
247
         Me.Label8.AutoSize = True
249
         Me.Label8.AutoSize = True
248
         Me.Label8.ForeColor = System.Drawing.Color.Red
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
         Me.Label8.Name = "Label8"
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
         Me.Label8.TabIndex = 570
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
         'TextBox5
257
         'TextBox5
256
         '
258
         '
269
         Me.Label10.TabIndex = 571
271
         Me.Label10.TabIndex = 571
270
         Me.Label10.Text = "天盾訂單號"
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
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
294
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
275
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
295
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
276
         Me.ClientSize = New System.Drawing.Size(1914, 991)
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
         Me.Controls.Add(Me.TextBox5)
300
         Me.Controls.Add(Me.TextBox5)
278
         Me.Controls.Add(Me.Label10)
301
         Me.Controls.Add(Me.Label10)
279
         Me.Controls.Add(Me.Label8)
302
         Me.Controls.Add(Me.Label8)
288
         Me.Controls.Add(Me.DateTimePicker1)
311
         Me.Controls.Add(Me.DateTimePicker1)
289
         Me.Controls.Add(Me.Button11)
312
         Me.Controls.Add(Me.Button11)
290
         Me.Controls.Add(Me.TextBox4)
313
         Me.Controls.Add(Me.TextBox4)
291
-        Me.Controls.Add(Me.Button31)
292
         Me.Controls.Add(Me.TextBox2)
314
         Me.Controls.Add(Me.TextBox2)
293
         Me.Controls.Add(Me.TextBox1)
315
         Me.Controls.Add(Me.TextBox1)
294
         Me.Controls.Add(Me.Label3)
316
         Me.Controls.Add(Me.Label3)
295
         Me.Controls.Add(Me.Label2)
317
         Me.Controls.Add(Me.Label2)
296
-        Me.Controls.Add(Me.DataGridView1)
318
+        Me.Controls.Add(Me.訂單清單_dgv)
297
         Me.Controls.Add(Me.WebBrowser1)
319
         Me.Controls.Add(Me.WebBrowser1)
298
         Me.Controls.Add(Me.Label7)
320
         Me.Controls.Add(Me.Label7)
299
         Me.Controls.Add(Me.Label9)
321
         Me.Controls.Add(Me.Label9)
301
         Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
323
         Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
302
         Me.Name = "驗貨報告圖片導入資料庫"
324
         Me.Name = "驗貨報告圖片導入資料庫"
303
         Me.Text = "驗貨報告圖片導入資料庫"
325
         Me.Text = "驗貨報告圖片導入資料庫"
304
-        CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).EndInit()
326
+        CType(Me.訂單清單_dgv, System.ComponentModel.ISupportInitialize).EndInit()
305
         Me.ResumeLayout(False)
327
         Me.ResumeLayout(False)
306
         Me.PerformLayout()
328
         Me.PerformLayout()
307
 
329
 
308
     End Sub
330
     End Sub
309
 
331
 
310
     Friend WithEvents WebBrowser1 As WebBrowser
332
     Friend WithEvents WebBrowser1 As WebBrowser
311
-    Friend WithEvents DataGridView1 As DataGridView
333
+    Friend WithEvents 訂單清單_dgv As DataGridView
312
     Friend WithEvents Label3 As Label
334
     Friend WithEvents Label3 As Label
313
     Friend WithEvents Label2 As Label
335
     Friend WithEvents Label2 As Label
314
     Friend WithEvents TextBox1 As TextBox
336
     Friend WithEvents TextBox1 As TextBox
331
     Friend WithEvents Label8 As Label
353
     Friend WithEvents Label8 As Label
332
     Friend WithEvents TextBox5 As TextBox
354
     Friend WithEvents TextBox5 As TextBox
333
     Friend WithEvents Label10 As Label
355
     Friend WithEvents Label10 As Label
356
+    Friend WithEvents 資料庫選擇2_bt As Button
357
+    Friend WithEvents 資料庫選擇1_bt As Button
334
 End Class
358
 End Class
335
 
359
 

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

5
     ReadOnly ds As New DataSet : ReadOnly ds1 As New DataSet : ReadOnly ds2 As New DataSet
5
     ReadOnly ds As New DataSet : ReadOnly ds1 As New DataSet : ReadOnly ds2 As New DataSet
6
     Dim DTP As String
6
     Dim DTP As String
7
     Private  Sub Set_DGV1載入前設定()
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
         ConnOpen()
12
         ConnOpen()
13
     End Sub
13
     End Sub
14
     Private  Sub Set_DGV1載入後設定()
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
     End Sub
16
     End Sub
17
     Private  Sub Set_清單1()
17
     Private  Sub Set_清單1()
18
         Set_DGV1載入前設定()
18
         Set_DGV1載入前設定()
19
-        SQL1 = "SELECT 訂單流水號, 年份季度, 客戶訂單號, 形體號, 顏色, 生產工廠, 裁斷時間, 針車時間, 成型時間, 驗貨時間, 驗貨報告圖片 FROM 訂單控制表 
19
+        SQL1 = "SELECT 訂單流水號, 年份季度, 客戶訂單號, 形體號, 顏色, 生產工廠, 裁斷時間, 針車時間, 成型時間, 驗貨時間, 驗貨報告圖片 FROM " & 訂單資料表(1) & " 
20
                 WHERE (CXL = 0 OR CXL IS NULL) AND (訂單數量 - 出貨數量 <> 0) AND (驗貨時間 LIKE '') ORDER BY   SUBSTRING(訂單流水號, 4, 6), 客戶訂單號, 形體號"
20
                 WHERE (CXL = 0 OR CXL IS NULL) AND (訂單數量 - 出貨數量 <> 0) AND (驗貨時間 LIKE '') ORDER BY   SUBSTRING(訂單流水號, 4, 6), 客戶訂單號, 形體號"
21
         Set_DGV1載入後設定()
21
         Set_DGV1載入後設定()
22
     End Sub
22
     End Sub
23
     Private  Sub Set_grid1()
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
     End Sub
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
         Me.MdiParent = TENDEN_MES_SYS : Me.WindowState = 2 : Me.AutoScroll = True
29
         Me.MdiParent = TENDEN_MES_SYS : Me.WindowState = 2 : Me.AutoScroll = True
30
+        訂單資料庫選擇.ShowDialog()
30
         Target1 = Target & AA(3) & "/"
31
         Target1 = Target & AA(3) & "/"
31
         WebBrowser1.Url = New Uri(Target1)
32
         WebBrowser1.Url = New Uri(Target1)
32
         Set_清單1() : Set_grid1()
33
         Set_清單1() : Set_grid1()
35
             WebBrowser2.Navigate(FolderBrowserDialog1.SelectedPath)
36
             WebBrowser2.Navigate(FolderBrowserDialog1.SelectedPath)
36
         End If
37
         End If
37
     End Sub
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
         If e.RowIndex = -1 Then : Else
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
         End If
43
         End If
43
     End Sub
44
     End Sub
44
     Private  Sub Button31_Click(sender As Object, e As EventArgs) Handles Button31.Click
45
     Private  Sub Button31_Click(sender As Object, e As EventArgs) Handles Button31.Click
45
         PA = InputBox("請輸入要查詢的資料")
46
         PA = InputBox("請輸入要查詢的資料")
46
         Set_DGV1載入前設定()
47
         Set_DGV1載入前設定()
47
-        SQL1 = "SELECT 訂單流水號, 年份季度, 客戶訂單號, 形體號, 顏色, 生產工廠, 裁斷時間, 針車時間, 成型時間, 驗貨時間, 驗貨報告圖片 FROM 訂單控制表 " &
48
+        SQL1 = "SELECT 訂單流水號, 年份季度, 客戶訂單號, 形體號, 顏色, 生產工廠, 裁斷時間, 針車時間, 成型時間, 驗貨時間, 驗貨報告圖片 FROM " & 訂單資料表(1) & " " &
48
                "WHERE (CXL = 0 OR CXL IS NULL) AND (訂單數量 - 出貨數量 <> 0) AND (驗貨時間 LIKE '') AND (訂單流水號 LIKE '%" & PA & "%' OR 年份季度 LIKE '%" & PA & "%' OR " &
49
                "WHERE (CXL = 0 OR CXL IS NULL) AND (訂單數量 - 出貨數量 <> 0) AND (驗貨時間 LIKE '') AND (訂單流水號 LIKE '%" & PA & "%' OR 年份季度 LIKE '%" & PA & "%' OR " &
49
                "客戶訂單號 LIKE '%" & PA & "%' OR 形體號 LIKE '%" & PA & "%' OR 生產工廠 LIKE '%" & PA & "%') ORDER BY   SUBSTRING(訂單流水號, 4, 6), 客戶訂單號, 形體號"
50
                "客戶訂單號 LIKE '%" & PA & "%' OR 形體號 LIKE '%" & PA & "%' OR 生產工廠 LIKE '%" & PA & "%') ORDER BY   SUBSTRING(訂單流水號, 4, 6), 客戶訂單號, 形體號"
50
         Set_DGV1載入後設定() : Set_grid1()
51
         Set_DGV1載入後設定() : Set_grid1()
73
             End If
74
             End If
74
 
75
 
75
             ConnOpen()
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
                        "BULKCOLUMN FROM OPENROWSET ( BULK 'E:\TENDENZA\0004\" & TextBox4.Text & "', SINGLE_BLOB) AS EMPLOYEEPICTURE"
82
                        "BULKCOLUMN FROM OPENROWSET ( BULK 'E:\TENDENZA\0004\" & TextBox4.Text & "', SINGLE_BLOB) AS EMPLOYEEPICTURE"
83
+            End If
78
             CmdSet_For_dr() : conn.Close()
84
             CmdSet_For_dr() : conn.Close()
79
 
85
 
80
             DTP = Format(DateTimePicker1.Value, "yyyy/MM/dd")
86
             DTP = Format(DateTimePicker1.Value, "yyyy/MM/dd")
87
+
81
             ConnOpen()
88
             ConnOpen()
82
-            SQL1 = "UPDATE 訂單控制表 SET 驗貨時間 = '" & DTP & "', 驗貨報告圖片 = '" & TextBox3.Text & "' 
89
+            SQL1 = "UPDATE " & 訂單資料表(1) & " SET 驗貨時間 = '" & DTP & "', 驗貨報告圖片 = '" & TextBox3.Text & "' 
83
                         WHERE (訂單流水號 LIKE '" & TextBox5.Text & "' AND 客戶訂單號 = '" & TextBox1.Text & "' AND 形體號 = '" & TextBox2.Text & "')"
90
                         WHERE (訂單流水號 LIKE '" & TextBox5.Text & "' AND 客戶訂單號 = '" & TextBox1.Text & "' AND 形體號 = '" & TextBox2.Text & "')"
84
             cmd.CommandText = SQL1 : cmd.ExecuteNonQuery() : conn.Close()
91
             cmd.CommandText = SQL1 : cmd.ExecuteNonQuery() : conn.Close()
85
             '---FTP方式刪除檔案----------------------------------------------------------------------------------------------------------------------------------------------------------------------
92
             '---FTP方式刪除檔案----------------------------------------------------------------------------------------------------------------------------------------------------------------------
139
             TextBox4.AppendText(file + Environment.NewLine)
146
             TextBox4.AppendText(file + Environment.NewLine)
140
         Next
147
         Next
141
     End Sub
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
         If FolderBrowserDialog1.ShowDialog = DialogResult.OK Then
150
         If FolderBrowserDialog1.ShowDialog = DialogResult.OK Then
144
             WebBrowser2.Navigate(FolderBrowserDialog1.SelectedPath)
151
             WebBrowser2.Navigate(FolderBrowserDialog1.SelectedPath)
145
         End If
152
         End If
146
     End Sub
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
 End Class
160
 End Class

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

51
         Me.Button24 = New System.Windows.Forms.Button()
51
         Me.Button24 = New System.Windows.Forms.Button()
52
         Me.Label7 = New System.Windows.Forms.Label()
52
         Me.Label7 = New System.Windows.Forms.Label()
53
         Me.FolderBrowserDialog1 = New System.Windows.Forms.FolderBrowserDialog()
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
         CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).BeginInit()
56
         CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).BeginInit()
55
         CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
57
         CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
56
         Me.SuspendLayout()
58
         Me.SuspendLayout()
59
         '
61
         '
60
         Me.DataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
62
         Me.DataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
61
         Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
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
         Me.DataGridView1.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
65
         Me.DataGridView1.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
64
         Me.DataGridView1.Name = "DataGridView1"
66
         Me.DataGridView1.Name = "DataGridView1"
65
         Me.DataGridView1.RowHeadersWidth = 5
67
         Me.DataGridView1.RowHeadersWidth = 5
66
         Me.DataGridView1.RowTemplate.Height = 24
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
         Me.DataGridView1.TabIndex = 4
70
         Me.DataGridView1.TabIndex = 4
69
         '
71
         '
70
         'PictureBox1
72
         'PictureBox1
323
         Me.Label7.TabIndex = 584
325
         Me.Label7.TabIndex = 584
324
         Me.Label7.Text = "↓"
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
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
348
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
329
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
349
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
330
         Me.ClientSize = New System.Drawing.Size(1914, 991)
350
         Me.ClientSize = New System.Drawing.Size(1914, 991)
351
+        Me.Controls.Add(Me.資料庫選擇2_bt)
352
+        Me.Controls.Add(Me.資料庫選擇1_bt)
331
         Me.Controls.Add(Me.Label10)
353
         Me.Controls.Add(Me.Label10)
332
         Me.Controls.Add(Me.Label6)
354
         Me.Controls.Add(Me.Label6)
333
         Me.Controls.Add(Me.TextBox7)
355
         Me.Controls.Add(Me.TextBox7)
395
     Friend WithEvents Button24 As Button
417
     Friend WithEvents Button24 As Button
396
     Friend WithEvents Label7 As Label
418
     Friend WithEvents Label7 As Label
397
     Friend WithEvents FolderBrowserDialog1 As FolderBrowserDialog
419
     Friend WithEvents FolderBrowserDialog1 As FolderBrowserDialog
420
+    Friend WithEvents 資料庫選擇2_bt As Button
421
+    Friend WithEvents 資料庫選擇1_bt As Button
398
 End Class
422
 End Class

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

25
     End Sub
25
     End Sub
26
     Private  Sub Set_圖片清單()
26
     Private  Sub Set_圖片清單()
27
         Set_DGV1載入前設定()
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
         Set_DGV1載入後設定()
32
         Set_DGV1載入後設定()
32
     End Sub
33
     End Sub
33
     Private  Sub Set_grid()
34
     Private  Sub Set_grid()
36
     End Sub
37
     End Sub
37
     Private  Sub 驗貨報告資料庫_Load(sender As Object, e As EventArgs) Handles MyBase.Load
38
     Private  Sub 驗貨報告資料庫_Load(sender As Object, e As EventArgs) Handles MyBase.Load
38
         Me.MdiParent = TENDEN_MES_SYS : Me.WindowState = 2 : Me.AutoScroll = True
39
         Me.MdiParent = TENDEN_MES_SYS : Me.WindowState = 2 : Me.AutoScroll = True
40
+        訂單資料庫選擇.ShowDialog()
39
         Target1 = Target & AA(3) & "/"
41
         Target1 = Target & AA(3) & "/"
40
         WebBrowser1.Url = New Uri(Target1)
42
         WebBrowser1.Url = New Uri(Target1)
41
         TextBox1.Enabled = False : TextBox2.Enabled = False : TextBox3.Enabled = False : TextBox4.Enabled = False : TextBox5.Visible = False : TextBox7.Visible = False : Button24.Enabled = False
43
         TextBox1.Enabled = False : TextBox2.Enabled = False : TextBox3.Enabled = False : TextBox4.Enabled = False : TextBox5.Visible = False : TextBox7.Visible = False : Button24.Enabled = False
81
     Private  Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
83
     Private  Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
82
         PA = InputBox("請輸入關鍵字")
84
         PA = InputBox("請輸入關鍵字")
83
         Set_DGV1載入前設定()
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
         Set_DGV1載入後設定() : Set_grid()
92
         Set_DGV1載入後設定() : Set_grid()
89
     End Sub
93
     End Sub
90
     Private  Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
94
     Private  Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
204
             TextBox6.AppendText(file + Environment.NewLine)
208
             TextBox6.AppendText(file + Environment.NewLine)
205
         Next
209
         Next
206
     End Sub
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
         conn.Close()
212
         conn.Close()
209
         If TextBox1.Text = "" Then
213
         If TextBox1.Text = "" Then
210
             MsgBox("請先選擇需要修改的圖片")
214
             MsgBox("請先選擇需要修改的圖片")
234
             End If
238
             End If
235
         End If
239
         End If
236
     End Sub
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
 End Class
247
 End Class

Loading…
Annuler
Enregistrer