B70340 2 vuotta sitten
vanhempi
commit
af0f5f0485

.vs/TENDEN-MES-SYS/FileContentIndex/60b1a83c-e059-41f8-bcb2-6c4b78b139e2.vsidx → .vs/TENDEN-MES-SYS/FileContentIndex/466b813f-2f64-42a1-a8fd-f2afefee2fbf.vsidx Näytä tiedosto


BIN
.vs/TENDEN-MES-SYS/FileContentIndex/6dacd10b-d3b9-4485-be2d-dc6a498c5de4.vsidx → .vs/TENDEN-MES-SYS/FileContentIndex/7daa0bb2-576b-4165-a6b1-364ae406a7e8.vsidx Näytä tiedosto


BIN
.vs/TENDEN-MES-SYS/FileContentIndex/d06492e1-0834-4c51-94ed-524c570e0a2b.vsidx → .vs/TENDEN-MES-SYS/FileContentIndex/c6184e7a-568f-4b19-932b-54a1e9f1687e.vsidx Näytä tiedosto


BIN
.vs/TENDEN-MES-SYS/v17/.suo Näytä tiedosto


BIN
.vs/TENDEN-MES-SYS/v17/0jev3sqx.ziy Näytä tiedosto


BIN
.vs/TENDEN-MES-SYS/v17/p0vs2xgs.zez Näytä tiedosto


BIN
.vs/TENDEN-MES-SYS/v17/slgtwers.hgd Näytä tiedosto


BIN
.vs/TENDEN-MES-SYS/v17/y3vykmap.ywj Näytä tiedosto


+ 21
- 2
TENDEN-MES-SYS/Module/SQL_量產訂單系統.vb Näytä tiedosto

@@ -255,6 +255,10 @@
255 255
                     WHERE (天盾流水號 = '" & 訂單明細表.訂單號_tb.Text & "')"
256 256
         CmdSet_For_dr()
257 257
     End Sub
258
+    Friend Sub SQL_修改季節資料()
259
+        ConnOpen() : SQL1 = "UPDATE " & 訂單資料表(1) & " SET 年份季度 = '" & 出貨明細表.季度1_cb.Text & "' WHERE (訂單流水號 = '" & 出貨明細表.天盾訂單號1_tb.Text & "')" : CmdSet_For_dr()
260
+        ConnOpen() : SQL1 = "UPDATE 貨款匯入出款明細表 SET 年份季度 = '" & 出貨明細表.季度1_cb.Text & "' WHERE (訂單流水號 = '" & 出貨明細表.天盾訂單號1_tb.Text & "')" : CmdSet_For_dr()
261
+    End Sub
258 262
     Friend Sub SQL_修改資料修改抬頭1()
259 263
         ConnOpen()
260 264
         SQL1 = "UPDATE 訂單控制表 SET 工廠回復交期 = '" & DTP5 & "' WHERE (訂單流水號 like '" & 訂單明細表.訂單號_tb.Text & "')"
@@ -336,8 +340,20 @@
336 340
                        楦型 LIKE '%" & PA & "%' OR 備註 LIKE '%" & PA & "%' OR 生產工廠 LIKE '%" & PA & "%' OR 訂單種類 LIKE '%" & PA & "%') AND (CXL = 1) ORDER BY 訂單流水號 DESC"
337 341
     End Sub
338 342
     '------------------------出貨明細表------------------------------------------
343
+    Friend Sub SQL_出貨明細()
344
+        ConnOpen()
345
+        SQL1 = "SELECT     TOP (1000) " & 訂單資料表(1) & ".訂單流水號, " & 訂單資料表(1) & ".年份季度, " & 訂單資料表(1) & ".客戶訂單號 AS 力威訂單號, 
346
+                           " & 訂單資料表(1) & ".力威訂單號 AS 客戶訂單號
347
+                FROM       " & 訂單資料表(1) & " FULL OUTER JOIN
348
+                           貨款匯入出款明細表 ON " & 訂單資料表(1) & ".資料流水號 = 貨款匯入出款明細表.資料流水號
349
+                WHERE     (" & 訂單資料表(1) & ".出貨數量 <> 0) AND (" & 訂單資料表(1) & ".訂單流水號 LIKE N'%" & PA & "%' OR " & 訂單資料表(1) & ".客戶訂單號 LIKE N'%" & PA & "%' OR 
350
+                           " & 訂單資料表(1) & ".力威訂單號 LIKE N'%" & PA & "%')
351
+                GROUP BY   " & 訂單資料表(1) & ".訂單流水號, " & 訂單資料表(1) & ".年份季度, " & 訂單資料表(1) & ".客戶訂單號, " & 訂單資料表(1) & ".力威訂單號
352
+                ORDER BY   " & 訂單資料表(1) & ".訂單流水號 DESC"
353
+        CmdSet_For_DGV()
354
+    End Sub
339 355
     Friend Sub SQL_出貨明細表()
340
-        SQL1 = "SELECT  貨款匯入出款明細表.貨款流水號, 貨款匯入出款明細表.訂單流水號, 貨款匯入出款明細表.年份季度, 
356
+        SQL1 = "SELECT      TOP (1000) 貨款匯入出款明細表.貨款流水號, 貨款匯入出款明細表.訂單流水號, 貨款匯入出款明細表.年份季度, 
341 357
                             貨款匯入出款明細表.客戶訂單號, 貨款匯入出款明細表.形體號, 貨款匯入出款明細表.顏色, 
342 358
                             貨款匯入出款明細表.楦型, 貨款匯入出款明細表.訂單數量, 貨款匯入出款明細表.出貨數量, 
343 359
                             " & 訂單資料表(1) & ".備註, " & 訂單資料表(1) & ".生產工廠, " & 訂單資料表(1) & ".訂單種類, 
@@ -358,7 +374,7 @@
358 374
                             貨款匯入出款明細表.楦型"
359 375
     End Sub
360 376
     Friend Sub SQL_出貨明細表1()
361
-        SQL1 = "SELECT  貨款匯入出款明細表.貨款流水號, 貨款匯入出款明細表.訂單流水號, 貨款匯入出款明細表.年份季度, 
377
+        SQL1 = "SELECT      TOP (1000) 貨款匯入出款明細表.貨款流水號, 貨款匯入出款明細表.訂單流水號, 貨款匯入出款明細表.年份季度, 
362 378
                             貨款匯入出款明細表.客戶訂單號, 貨款匯入出款明細表.形體號, 貨款匯入出款明細表.顏色, 
363 379
                             貨款匯入出款明細表.楦型, 貨款匯入出款明細表.訂單數量, 貨款匯入出款明細表.出貨數量, 
364 380
                             " & 訂單資料表(1) & ".備註, " & 訂單資料表(1) & ".生產工廠, " & 訂單資料表(1) & ".訂單種類, 
@@ -403,6 +419,9 @@
403 419
                 ORDER BY   " & 訂單資料表(5) & ".ProductName, " & 訂單資料表(5) & ".Color"
404 420
         CmdSet_For_DGV()
405 421
     End Sub
422
+    Friend Sub SQL_下拉風格明細()
423
+        ConnOpen() : SQL1 = "SELECT 年份季度 FROM 訂單控制表年份季度清單 ORDER BY 年份季度 DESC" : CmdSet_For_dr()
424
+    End Sub
406 425
     Friend Sub SQL_下拉出貨明細表()
407 426
         ConnOpen()
408 427
         SQL1 = "SELECT 年份季度 FROM 訂單控制表年份季度清單 ORDER BY 年份季度 DESC"

+ 1
- 1
TENDEN-MES-SYS/Module/全域變數.vb Näytä tiedosto

@@ -3,7 +3,7 @@
3 3
     Public g_conn_type, gUserName, 版本號, Target, Target1, Target2, FTP帳號, FTP密碼, 登入人IP, AA(99), 圖片庫, SQL密碼 As String
4 4
     Public CC(99), 登入判斷 As Boolean
5 5
     '----系統版本-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
6
-    Public 版本 As String = "2023020201"
6
+    Public 版本 As String = "2023021801"
7 7
     '----系統用全域變數-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
8 8
     Public 匯率 As Double
9 9
     '----系統用全域變數----------------------------------------------------------------------------------------------------------------------------------------------------------------------

BIN
TENDEN-MES-SYS/bin/Debug/TENDEN-ERP-SYS.exe Näytä tiedosto


BIN
TENDEN-MES-SYS/bin/Debug/TENDEN-ERP-SYS.pdb Näytä tiedosto


BIN
TENDEN-MES-SYS/obj/Debug/TENDEN-ERP-SYS.exe Näytä tiedosto


BIN
TENDEN-MES-SYS/obj/Debug/TENDEN-ERP-SYS.pdb Näytä tiedosto


BIN
TENDEN-MES-SYS/obj/Debug/天盾系統.vbproj.GenerateResource.cache Näytä tiedosto


+ 252
- 6
TENDEN-MES-SYS/量產訂單管理/量產管理報表/出貨明細表.Designer.vb Näytä tiedosto

@@ -22,8 +22,9 @@ Partial Class 出貨明細表
22 22
     '請勿使用程式碼編輯器進行修改。
23 23
     <System.Diagnostics.DebuggerStepThrough()>
24 24
     Private  Sub InitializeComponent()
25
-        Dim DataGridViewCellStyle5 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
26
-        Dim DataGridViewCellStyle6 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
25
+        Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
26
+        Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
27
+        Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
27 28
         Me.訂單明細表_dgv = New System.Windows.Forms.DataGridView()
28 29
         Me.搜尋_bt = New System.Windows.Forms.Button()
29 30
         Me.驗貨報告編號_tb = New System.Windows.Forms.TextBox()
@@ -69,21 +70,43 @@ Partial Class 出貨明細表
69 70
         Me.字體_NUD = New System.Windows.Forms.NumericUpDown()
70 71
         Me.字體大小調整_lb = New System.Windows.Forms.Label()
71 72
         Me.刪除_bt = New System.Windows.Forms.Button()
73
+        Me.修改_bt = New System.Windows.Forms.Button()
74
+        Me.視窗2_pl = New System.Windows.Forms.Panel()
75
+        Me.Panel3 = New System.Windows.Forms.Panel()
76
+        Me.存檔_bt = New System.Windows.Forms.Button()
77
+        Me.Label12 = New System.Windows.Forms.Label()
78
+        Me.季度1_cb = New System.Windows.Forms.ComboBox()
79
+        Me.Label11 = New System.Windows.Forms.Label()
80
+        Me.季度_cb = New System.Windows.Forms.ComboBox()
81
+        Me.訂單明細_dgv = New System.Windows.Forms.DataGridView()
82
+        Me.Label10 = New System.Windows.Forms.Label()
83
+        Me.天盾訂單號1_tb = New System.Windows.Forms.TextBox()
84
+        Me.Label8 = New System.Windows.Forms.Label()
85
+        Me.Label9 = New System.Windows.Forms.Label()
86
+        Me.客戶訂單號1_tb = New System.Windows.Forms.TextBox()
87
+        Me.搜尋_tb = New System.Windows.Forms.TextBox()
88
+        Me.搜尋1_bt = New System.Windows.Forms.Button()
89
+        Me.日報表編輯_lb = New System.Windows.Forms.Label()
90
+        Me.CanceL2_bt = New System.Windows.Forms.Button()
72 91
         CType(Me.訂單明細表_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
73 92
         CType(Me.驗貨報告_pb, System.ComponentModel.ISupportInitialize).BeginInit()
74 93
         CType(Me.驗貨報告圖庫_pb, System.ComponentModel.ISupportInitialize).BeginInit()
75 94
         CType(Me.明細表_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
76 95
         CType(Me.字體_NUD, System.ComponentModel.ISupportInitialize).BeginInit()
96
+        Me.視窗2_pl.SuspendLayout()
97
+        Me.Panel3.SuspendLayout()
98
+        CType(Me.訂單明細_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
77 99
         Me.SuspendLayout()
78 100
         '
79 101
         '訂單明細表_dgv
80 102
         '
81
-        DataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
82
-        Me.訂單明細表_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle5
103
+        DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
104
+        Me.訂單明細表_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
83 105
         Me.訂單明細表_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
84 106
             Or System.Windows.Forms.AnchorStyles.Left) _
85 107
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
86 108
         Me.訂單明細表_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
109
+        Me.訂單明細表_dgv.BackgroundColor = System.Drawing.Color.White
87 110
         Me.訂單明細表_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
88 111
         Me.訂單明細表_dgv.Location = New System.Drawing.Point(310, 4)
89 112
         Me.訂單明細表_dgv.Name = "訂單明細表_dgv"
@@ -439,11 +462,12 @@ Partial Class 出貨明細表
439 462
         '
440 463
         '明細表_dgv
441 464
         '
442
-        DataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
443
-        Me.明細表_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle6
465
+        DataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
466
+        Me.明細表_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2
444 467
         Me.明細表_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _
445 468
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
446 469
         Me.明細表_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
470
+        Me.明細表_dgv.BackgroundColor = System.Drawing.Color.White
447 471
         Me.明細表_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
448 472
         Me.明細表_dgv.Location = New System.Drawing.Point(5, 555)
449 473
         Me.明細表_dgv.Name = "明細表_dgv"
@@ -527,11 +551,210 @@ Partial Class 出貨明細表
527 551
         Me.刪除_bt.Text = "刪除"
528 552
         Me.刪除_bt.UseVisualStyleBackColor = True
529 553
         '
554
+        '修改_bt
555
+        '
556
+        Me.修改_bt.Font = New System.Drawing.Font("微軟正黑體", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
557
+        Me.修改_bt.ForeColor = System.Drawing.Color.Black
558
+        Me.修改_bt.Location = New System.Drawing.Point(227, 36)
559
+        Me.修改_bt.Name = "修改_bt"
560
+        Me.修改_bt.Size = New System.Drawing.Size(80, 38)
561
+        Me.修改_bt.TabIndex = 1647
562
+        Me.修改_bt.Text = "修改資料"
563
+        Me.修改_bt.UseVisualStyleBackColor = True
564
+        '
565
+        '視窗2_pl
566
+        '
567
+        Me.視窗2_pl.BackColor = System.Drawing.Color.White
568
+        Me.視窗2_pl.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
569
+        Me.視窗2_pl.Controls.Add(Me.Panel3)
570
+        Me.視窗2_pl.Controls.Add(Me.日報表編輯_lb)
571
+        Me.視窗2_pl.Controls.Add(Me.CanceL2_bt)
572
+        Me.視窗2_pl.Location = New System.Drawing.Point(498, 177)
573
+        Me.視窗2_pl.Name = "視窗2_pl"
574
+        Me.視窗2_pl.Size = New System.Drawing.Size(470, 418)
575
+        Me.視窗2_pl.TabIndex = 1835
576
+        '
577
+        'Panel3
578
+        '
579
+        Me.Panel3.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
580
+            Or System.Windows.Forms.AnchorStyles.Left) _
581
+            Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
582
+        Me.Panel3.BackColor = System.Drawing.SystemColors.Control
583
+        Me.Panel3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
584
+        Me.Panel3.Controls.Add(Me.存檔_bt)
585
+        Me.Panel3.Controls.Add(Me.Label12)
586
+        Me.Panel3.Controls.Add(Me.季度1_cb)
587
+        Me.Panel3.Controls.Add(Me.Label11)
588
+        Me.Panel3.Controls.Add(Me.季度_cb)
589
+        Me.Panel3.Controls.Add(Me.訂單明細_dgv)
590
+        Me.Panel3.Controls.Add(Me.Label10)
591
+        Me.Panel3.Controls.Add(Me.天盾訂單號1_tb)
592
+        Me.Panel3.Controls.Add(Me.Label8)
593
+        Me.Panel3.Controls.Add(Me.Label9)
594
+        Me.Panel3.Controls.Add(Me.客戶訂單號1_tb)
595
+        Me.Panel3.Controls.Add(Me.搜尋_tb)
596
+        Me.Panel3.Controls.Add(Me.搜尋1_bt)
597
+        Me.Panel3.Location = New System.Drawing.Point(3, 28)
598
+        Me.Panel3.Name = "Panel3"
599
+        Me.Panel3.Size = New System.Drawing.Size(463, 386)
600
+        Me.Panel3.TabIndex = 1367
601
+        '
602
+        '存檔_bt
603
+        '
604
+        Me.存檔_bt.Font = New System.Drawing.Font("微軟正黑體", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
605
+        Me.存檔_bt.ForeColor = System.Drawing.Color.Green
606
+        Me.存檔_bt.Location = New System.Drawing.Point(376, 1)
607
+        Me.存檔_bt.Name = "存檔_bt"
608
+        Me.存檔_bt.Size = New System.Drawing.Size(80, 25)
609
+        Me.存檔_bt.TabIndex = 563
610
+        Me.存檔_bt.Text = "修改"
611
+        Me.存檔_bt.UseVisualStyleBackColor = True
612
+        '
613
+        'Label12
614
+        '
615
+        Me.Label12.AutoSize = True
616
+        Me.Label12.ForeColor = System.Drawing.Color.Green
617
+        Me.Label12.Location = New System.Drawing.Point(238, 56)
618
+        Me.Label12.Name = "Label12"
619
+        Me.Label12.Size = New System.Drawing.Size(73, 16)
620
+        Me.Label12.TabIndex = 562
621
+        Me.Label12.Text = "NEW STYLE"
622
+        '
623
+        '季度1_cb
624
+        '
625
+        Me.季度1_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
626
+        Me.季度1_cb.ForeColor = System.Drawing.Color.Green
627
+        Me.季度1_cb.FormattingEnabled = True
628
+        Me.季度1_cb.Location = New System.Drawing.Point(326, 53)
629
+        Me.季度1_cb.Name = "季度1_cb"
630
+        Me.季度1_cb.Size = New System.Drawing.Size(130, 24)
631
+        Me.季度1_cb.TabIndex = 561
632
+        '
633
+        'Label11
634
+        '
635
+        Me.Label11.AutoSize = True
636
+        Me.Label11.ForeColor = System.Drawing.Color.Blue
637
+        Me.Label11.Location = New System.Drawing.Point(16, 56)
638
+        Me.Label11.Name = "Label11"
639
+        Me.Label11.Size = New System.Drawing.Size(69, 16)
640
+        Me.Label11.TabIndex = 560
641
+        Me.Label11.Text = "OLD STYLE"
642
+        '
643
+        '季度_cb
644
+        '
645
+        Me.季度_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
646
+        Me.季度_cb.ForeColor = System.Drawing.Color.Blue
647
+        Me.季度_cb.FormattingEnabled = True
648
+        Me.季度_cb.Location = New System.Drawing.Point(98, 53)
649
+        Me.季度_cb.Name = "季度_cb"
650
+        Me.季度_cb.Size = New System.Drawing.Size(130, 24)
651
+        Me.季度_cb.TabIndex = 559
652
+        '
653
+        '訂單明細_dgv
654
+        '
655
+        DataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
656
+        Me.訂單明細_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
657
+        Me.訂單明細_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
658
+            Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
659
+        Me.訂單明細_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
660
+        Me.訂單明細_dgv.BackgroundColor = System.Drawing.Color.White
661
+        Me.訂單明細_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
662
+        Me.訂單明細_dgv.Location = New System.Drawing.Point(3, 79)
663
+        Me.訂單明細_dgv.Name = "訂單明細_dgv"
664
+        Me.訂單明細_dgv.RowHeadersWidth = 5
665
+        Me.訂單明細_dgv.RowTemplate.Height = 24
666
+        Me.訂單明細_dgv.Size = New System.Drawing.Size(453, 300)
667
+        Me.訂單明細_dgv.TabIndex = 558
668
+        '
669
+        'Label10
670
+        '
671
+        Me.Label10.AutoSize = True
672
+        Me.Label10.Location = New System.Drawing.Point(3, 7)
673
+        Me.Label10.Name = "Label10"
674
+        Me.Label10.Size = New System.Drawing.Size(103, 16)
675
+        Me.Label10.TabIndex = 557
676
+        Me.Label10.Text = "訂單號或是流水號"
677
+        '
678
+        '天盾訂單號1_tb
679
+        '
680
+        Me.天盾訂單號1_tb.ForeColor = System.Drawing.Color.Black
681
+        Me.天盾訂單號1_tb.Location = New System.Drawing.Point(326, 28)
682
+        Me.天盾訂單號1_tb.Name = "天盾訂單號1_tb"
683
+        Me.天盾訂單號1_tb.Size = New System.Drawing.Size(130, 23)
684
+        Me.天盾訂單號1_tb.TabIndex = 555
685
+        '
686
+        'Label8
687
+        '
688
+        Me.Label8.AutoSize = True
689
+        Me.Label8.Location = New System.Drawing.Point(234, 31)
690
+        Me.Label8.Name = "Label8"
691
+        Me.Label8.Size = New System.Drawing.Size(89, 16)
692
+        Me.Label8.TabIndex = 556
693
+        Me.Label8.Text = "Tendenza Po#"
694
+        '
695
+        'Label9
696
+        '
697
+        Me.Label9.AutoSize = True
698
+        Me.Label9.Location = New System.Drawing.Point(14, 31)
699
+        Me.Label9.Name = "Label9"
700
+        Me.Label9.Size = New System.Drawing.Size(76, 16)
701
+        Me.Label9.TabIndex = 554
702
+        Me.Label9.Text = "CLIENT PO#"
703
+        '
704
+        '客戶訂單號1_tb
705
+        '
706
+        Me.客戶訂單號1_tb.Location = New System.Drawing.Point(98, 28)
707
+        Me.客戶訂單號1_tb.Name = "客戶訂單號1_tb"
708
+        Me.客戶訂單號1_tb.Size = New System.Drawing.Size(130, 23)
709
+        Me.客戶訂單號1_tb.TabIndex = 553
710
+        '
711
+        '搜尋_tb
712
+        '
713
+        Me.搜尋_tb.Location = New System.Drawing.Point(107, 3)
714
+        Me.搜尋_tb.Name = "搜尋_tb"
715
+        Me.搜尋_tb.Size = New System.Drawing.Size(132, 23)
716
+        Me.搜尋_tb.TabIndex = 306
717
+        '
718
+        '搜尋1_bt
719
+        '
720
+        Me.搜尋1_bt.Font = New System.Drawing.Font("微軟正黑體", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
721
+        Me.搜尋1_bt.ForeColor = System.Drawing.Color.Red
722
+        Me.搜尋1_bt.Location = New System.Drawing.Point(240, 2)
723
+        Me.搜尋1_bt.Name = "搜尋1_bt"
724
+        Me.搜尋1_bt.Size = New System.Drawing.Size(80, 25)
725
+        Me.搜尋1_bt.TabIndex = 305
726
+        Me.搜尋1_bt.Text = "搜尋"
727
+        Me.搜尋1_bt.UseVisualStyleBackColor = True
728
+        '
729
+        '日報表編輯_lb
730
+        '
731
+        Me.日報表編輯_lb.AutoSize = True
732
+        Me.日報表編輯_lb.Location = New System.Drawing.Point(5, 7)
733
+        Me.日報表編輯_lb.Name = "日報表編輯_lb"
734
+        Me.日報表編輯_lb.Size = New System.Drawing.Size(67, 16)
735
+        Me.日報表編輯_lb.TabIndex = 1375
736
+        Me.日報表編輯_lb.Text = "資料編輯器"
737
+        '
738
+        'CanceL2_bt
739
+        '
740
+        Me.CanceL2_bt.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
741
+        Me.CanceL2_bt.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
742
+        Me.CanceL2_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
743
+        Me.CanceL2_bt.ForeColor = System.Drawing.Color.Black
744
+        Me.CanceL2_bt.Location = New System.Drawing.Point(438, 2)
745
+        Me.CanceL2_bt.Name = "CanceL2_bt"
746
+        Me.CanceL2_bt.Size = New System.Drawing.Size(26, 26)
747
+        Me.CanceL2_bt.TabIndex = 1374
748
+        Me.CanceL2_bt.Text = "X"
749
+        Me.CanceL2_bt.UseVisualStyleBackColor = False
750
+        '
530 751
         '出貨明細表
531 752
         '
532 753
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
533 754
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
534 755
         Me.ClientSize = New System.Drawing.Size(1350, 701)
756
+        Me.Controls.Add(Me.視窗2_pl)
757
+        Me.Controls.Add(Me.修改_bt)
535 758
         Me.Controls.Add(Me.刪除_bt)
536 759
         Me.Controls.Add(Me.字體_NUD)
537 760
         Me.Controls.Add(Me.字體大小調整_lb)
@@ -586,6 +809,11 @@ Partial Class 出貨明細表
586 809
         CType(Me.驗貨報告圖庫_pb, System.ComponentModel.ISupportInitialize).EndInit()
587 810
         CType(Me.明細表_dgv, System.ComponentModel.ISupportInitialize).EndInit()
588 811
         CType(Me.字體_NUD, System.ComponentModel.ISupportInitialize).EndInit()
812
+        Me.視窗2_pl.ResumeLayout(False)
813
+        Me.視窗2_pl.PerformLayout()
814
+        Me.Panel3.ResumeLayout(False)
815
+        Me.Panel3.PerformLayout()
816
+        CType(Me.訂單明細_dgv, System.ComponentModel.ISupportInitialize).EndInit()
589 817
         Me.ResumeLayout(False)
590 818
         Me.PerformLayout()
591 819
 
@@ -636,5 +864,23 @@ Partial Class 出貨明細表
636 864
     Friend WithEvents 字體_NUD As NumericUpDown
637 865
     Friend WithEvents 字體大小調整_lb As Label
638 866
     Friend WithEvents 刪除_bt As Button
867
+    Friend WithEvents 修改_bt As Button
868
+    Friend WithEvents 視窗2_pl As Panel
869
+    Friend WithEvents Panel3 As Panel
870
+    Friend WithEvents 日報表編輯_lb As Label
871
+    Friend WithEvents CanceL2_bt As Button
872
+    Friend WithEvents 訂單明細_dgv As DataGridView
873
+    Friend WithEvents Label10 As Label
874
+    Friend WithEvents 天盾訂單號1_tb As TextBox
875
+    Friend WithEvents Label8 As Label
876
+    Friend WithEvents Label9 As Label
877
+    Friend WithEvents 客戶訂單號1_tb As TextBox
878
+    Friend WithEvents 搜尋_tb As TextBox
879
+    Friend WithEvents 搜尋1_bt As Button
880
+    Friend WithEvents 季度_cb As ComboBox
881
+    Friend WithEvents 存檔_bt As Button
882
+    Friend WithEvents Label12 As Label
883
+    Friend WithEvents 季度1_cb As ComboBox
884
+    Friend WithEvents Label11 As Label
639 885
 End Class
640 886
 

+ 171
- 188
TENDEN-MES-SYS/量產訂單管理/量產管理報表/出貨明細表.vb Näytä tiedosto

@@ -3,186 +3,162 @@ Imports System.IO
3 3
 Public Class 出貨明細表
4 4
     ReadOnly ds, ds2 As New DataSet
5 5
     Private Sub Set_訂單清單()
6
-        Try
7
-            訂單明細表_dgv.DataSource = Nothing : ds.Clear()
8
-            訂單明細表_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
9
-            訂單明細表_dgv.ColumnHeadersHeight = 25
10
-            訂單明細表_dgv.AllowUserToAddRows = False
11
-            ConnOpen()
12
-            If PA = "" Then : SQL_出貨明細表() : Else : SQL_出貨明細表1() : End If
13
-            列印用SQL = SQL1
14
-            CmdSet_For_DGV()
15
-            da.SelectCommand.CommandTimeout = 900 : da.Fill(ds) : 訂單明細表_dgv.DataSource = ds.Tables(0) : conn.Close()
6
+        訂單明細表_dgv.DataSource = Nothing : ds.Clear()
7
+        訂單明細表_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
8
+        訂單明細表_dgv.ColumnHeadersHeight = 25
9
+        訂單明細表_dgv.AllowUserToAddRows = False
10
+        ConnOpen()
11
+        If PA = "" Then : SQL_出貨明細表() : Else : SQL_出貨明細表1() : End If
12
+        列印用SQL = SQL1
13
+        CmdSet_For_DGV()
14
+        da.SelectCommand.CommandTimeout = 900 : da.Fill(ds) : 訂單明細表_dgv.DataSource = ds.Tables(0) : conn.Close()
16 15
 
17
-            訂單明細表_dgv.Columns(0).Visible = False : 訂單明細表_dgv.Columns(1).FillWeight = 75 : 訂單明細表_dgv.Columns(2).FillWeight = 60 : 訂單明細表_dgv.Columns(3).FillWeight = 120
18
-            訂單明細表_dgv.Columns(4).FillWeight = 150 : 訂單明細表_dgv.Columns(5).FillWeight = 130 : 訂單明細表_dgv.Columns(6).FillWeight = 60
16
+        訂單明細表_dgv.Columns(0).Visible = False : 訂單明細表_dgv.Columns(1).FillWeight = 75 : 訂單明細表_dgv.Columns(2).FillWeight = 60 : 訂單明細表_dgv.Columns(3).FillWeight = 120
17
+        訂單明細表_dgv.Columns(4).FillWeight = 150 : 訂單明細表_dgv.Columns(5).FillWeight = 130 : 訂單明細表_dgv.Columns(6).FillWeight = 60
19 18
 
20
-            訂單明細表_dgv.Columns(7).FillWeight = 80 : 訂單明細表_dgv.Columns(8).FillWeight = 80
21
-            訂單明細表_dgv.Columns(7).DefaultCellStyle.Format = "#,##0"
22
-            訂單明細表_dgv.Columns(7).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
23
-            訂單明細表_dgv.Columns(7).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
24
-            訂單明細表_dgv.Columns(8).DefaultCellStyle.Format = "#,##0"
25
-            訂單明細表_dgv.Columns(8).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
26
-            訂單明細表_dgv.Columns(8).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
19
+        訂單明細表_dgv.Columns(7).FillWeight = 80 : 訂單明細表_dgv.Columns(8).FillWeight = 80
20
+        訂單明細表_dgv.Columns(7).DefaultCellStyle.Format = "#,##0"
21
+        訂單明細表_dgv.Columns(7).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
22
+        訂單明細表_dgv.Columns(7).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
23
+        訂單明細表_dgv.Columns(8).DefaultCellStyle.Format = "#,##0"
24
+        訂單明細表_dgv.Columns(8).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
25
+        訂單明細表_dgv.Columns(8).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
27 26
 
28
-            訂單明細表_dgv.Columns(9).Visible = False : 訂單明細表_dgv.Columns(10).FillWeight = 80 : 訂單明細表_dgv.Columns(11).FillWeight = 80 : 訂單明細表_dgv.Columns(12).FillWeight = 80
29
-            訂單明細表_dgv.Columns(13).FillWeight = 80 : 訂單明細表_dgv.Columns(14).FillWeight = 80 : 訂單明細表_dgv.Columns(15).Visible = False
30
-            訂單明細表_dgv.Columns(16).Visible = False : 訂單明細表_dgv.Columns(17).Visible = False : 訂單明細表_dgv.Columns(18).Visible = False
31
-        Catch ex As Exception
32
-            MsgBox(ex.Message)
33
-        End Try
27
+        訂單明細表_dgv.Columns(9).Visible = False : 訂單明細表_dgv.Columns(10).FillWeight = 80 : 訂單明細表_dgv.Columns(11).FillWeight = 80 : 訂單明細表_dgv.Columns(12).FillWeight = 80
28
+        訂單明細表_dgv.Columns(13).FillWeight = 80 : 訂單明細表_dgv.Columns(14).FillWeight = 80 : 訂單明細表_dgv.Columns(15).Visible = False
29
+        訂單明細表_dgv.Columns(16).Visible = False : 訂單明細表_dgv.Columns(17).Visible = False : 訂單明細表_dgv.Columns(18).Visible = False
34 30
     End Sub
35 31
     Private Sub Set_訂單明細()
36
-        Try
37
-            明細表_dgv.DataSource = Nothing : ds2.Clear()
38
-            明細表_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
39
-            明細表_dgv.ColumnHeadersHeight = 25
40
-            明細表_dgv.AllowUserToAddRows = False
41
-            SQL_出貨明細表2()
42
-            da.SelectCommand.CommandTimeout = 900 : da.Fill(ds2) : 明細表_dgv.DataSource = ds2.Tables(0) : conn.Close()
32
+        明細表_dgv.DataSource = Nothing : ds2.Clear()
33
+        明細表_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
34
+        明細表_dgv.ColumnHeadersHeight = 25
35
+        明細表_dgv.AllowUserToAddRows = False
36
+        SQL_出貨明細表2()
37
+        da.SelectCommand.CommandTimeout = 900 : da.Fill(ds2) : 明細表_dgv.DataSource = ds2.Tables(0) : conn.Close()
43 38
 
44
-            明細表_dgv.Columns(0).Visible = False : 明細表_dgv.Columns(1).Visible = False
45
-            明細表_dgv.Columns(2).FillWeight = 90 : 明細表_dgv.Columns(3).FillWeight = 90 : 明細表_dgv.Columns(4).FillWeight = 190 : 明細表_dgv.Columns(5).FillWeight = 80
46
-            明細表_dgv.Columns(6).FillWeight = 70 : 明細表_dgv.Columns(7).FillWeight = 40 : 明細表_dgv.Columns(8).FillWeight = 40 : 明細表_dgv.Columns(9).FillWeight = 40
47
-            明細表_dgv.Columns(10).FillWeight = 40 : 明細表_dgv.Columns(11).FillWeight = 40 : 明細表_dgv.Columns(12).FillWeight = 40 : 明細表_dgv.Columns(13).FillWeight = 40
48
-            明細表_dgv.Columns(14).FillWeight = 40 : 明細表_dgv.Columns(15).FillWeight = 40 : 明細表_dgv.Columns(16).FillWeight = 40 : 明細表_dgv.Columns(17).FillWeight = 40
49
-            明細表_dgv.Columns(18).FillWeight = 40 : 明細表_dgv.Columns(19).FillWeight = 40 : 明細表_dgv.Columns(20).FillWeight = 40 : 明細表_dgv.Columns(21).FillWeight = 40
50
-            明細表_dgv.Columns(22).FillWeight = 40 : 明細表_dgv.Columns(23).FillWeight = 40 : 明細表_dgv.Columns(24).FillWeight = 40 : 明細表_dgv.Columns(25).FillWeight = 60
51
-            明細表_dgv.Columns(7).DefaultCellStyle.Format = "#,##0" : 明細表_dgv.Columns(8).DefaultCellStyle.Format = "#,##0" : 明細表_dgv.Columns(9).DefaultCellStyle.Format = "#,##0"
52
-            明細表_dgv.Columns(10).DefaultCellStyle.Format = "#,##0" : 明細表_dgv.Columns(11).DefaultCellStyle.Format = "#,##0" : 明細表_dgv.Columns(12).DefaultCellStyle.Format = "#,##0"
53
-            明細表_dgv.Columns(13).DefaultCellStyle.Format = "#,##0" : 明細表_dgv.Columns(14).DefaultCellStyle.Format = "#,##0" : 明細表_dgv.Columns(15).DefaultCellStyle.Format = "#,##0"
54
-            明細表_dgv.Columns(16).DefaultCellStyle.Format = "#,##0" : 明細表_dgv.Columns(17).DefaultCellStyle.Format = "#,##0" : 明細表_dgv.Columns(18).DefaultCellStyle.Format = "#,##0"
55
-            明細表_dgv.Columns(19).DefaultCellStyle.Format = "#,##0" : 明細表_dgv.Columns(20).DefaultCellStyle.Format = "#,##0" : 明細表_dgv.Columns(21).DefaultCellStyle.Format = "#,##0"
56
-            明細表_dgv.Columns(22).DefaultCellStyle.Format = "#,##0" : 明細表_dgv.Columns(23).DefaultCellStyle.Format = "#,##0" : 明細表_dgv.Columns(24).DefaultCellStyle.Format = "#,##0"
57
-            明細表_dgv.Columns(25).DefaultCellStyle.Format = "#,##0"
58
-        Catch ex As Exception
59
-            MsgBox(ex.Message)
60
-        End Try
39
+        明細表_dgv.Columns(0).Visible = False : 明細表_dgv.Columns(1).Visible = False
40
+        明細表_dgv.Columns(2).FillWeight = 90 : 明細表_dgv.Columns(3).FillWeight = 90 : 明細表_dgv.Columns(4).FillWeight = 190 : 明細表_dgv.Columns(5).FillWeight = 80
41
+        明細表_dgv.Columns(6).FillWeight = 70 : 明細表_dgv.Columns(7).FillWeight = 40 : 明細表_dgv.Columns(8).FillWeight = 40 : 明細表_dgv.Columns(9).FillWeight = 40
42
+        明細表_dgv.Columns(10).FillWeight = 40 : 明細表_dgv.Columns(11).FillWeight = 40 : 明細表_dgv.Columns(12).FillWeight = 40 : 明細表_dgv.Columns(13).FillWeight = 40
43
+        明細表_dgv.Columns(14).FillWeight = 40 : 明細表_dgv.Columns(15).FillWeight = 40 : 明細表_dgv.Columns(16).FillWeight = 40 : 明細表_dgv.Columns(17).FillWeight = 40
44
+        明細表_dgv.Columns(18).FillWeight = 40 : 明細表_dgv.Columns(19).FillWeight = 40 : 明細表_dgv.Columns(20).FillWeight = 40 : 明細表_dgv.Columns(21).FillWeight = 40
45
+        明細表_dgv.Columns(22).FillWeight = 40 : 明細表_dgv.Columns(23).FillWeight = 40 : 明細表_dgv.Columns(24).FillWeight = 40 : 明細表_dgv.Columns(25).FillWeight = 60
46
+        明細表_dgv.Columns(7).DefaultCellStyle.Format = "#,##0" : 明細表_dgv.Columns(8).DefaultCellStyle.Format = "#,##0" : 明細表_dgv.Columns(9).DefaultCellStyle.Format = "#,##0"
47
+        明細表_dgv.Columns(10).DefaultCellStyle.Format = "#,##0" : 明細表_dgv.Columns(11).DefaultCellStyle.Format = "#,##0" : 明細表_dgv.Columns(12).DefaultCellStyle.Format = "#,##0"
48
+        明細表_dgv.Columns(13).DefaultCellStyle.Format = "#,##0" : 明細表_dgv.Columns(14).DefaultCellStyle.Format = "#,##0" : 明細表_dgv.Columns(15).DefaultCellStyle.Format = "#,##0"
49
+        明細表_dgv.Columns(16).DefaultCellStyle.Format = "#,##0" : 明細表_dgv.Columns(17).DefaultCellStyle.Format = "#,##0" : 明細表_dgv.Columns(18).DefaultCellStyle.Format = "#,##0"
50
+        明細表_dgv.Columns(19).DefaultCellStyle.Format = "#,##0" : 明細表_dgv.Columns(20).DefaultCellStyle.Format = "#,##0" : 明細表_dgv.Columns(21).DefaultCellStyle.Format = "#,##0"
51
+        明細表_dgv.Columns(22).DefaultCellStyle.Format = "#,##0" : 明細表_dgv.Columns(23).DefaultCellStyle.Format = "#,##0" : 明細表_dgv.Columns(24).DefaultCellStyle.Format = "#,##0"
52
+        明細表_dgv.Columns(25).DefaultCellStyle.Format = "#,##0"
53
+    End Sub
54
+    Private Sub Set_訂單明細1()
55
+        Dim ds2 As New DataSet
56
+        訂單明細_dgv.DataSource = Nothing : ds2.Clear()
57
+        訂單明細_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
58
+        訂單明細_dgv.ColumnHeadersHeight = 25
59
+        訂單明細_dgv.AllowUserToAddRows = False
60
+        SQL_出貨明細()
61
+        da.SelectCommand.CommandTimeout = 900 : da.Fill(ds2) : 訂單明細_dgv.DataSource = ds2.Tables(0) : conn.Close()
62
+
63
+        訂單明細_dgv.Columns(0).FillWeight = 90 : 訂單明細_dgv.Columns(1).FillWeight = 90 : 訂單明細_dgv.Columns(2).FillWeight = 90 : 訂單明細_dgv.Columns(3).FillWeight = 90
61 64
     End Sub
62 65
     Private Sub ComboBox1下拉表單資料載入()
63
-        Try
64
-            SQL_下拉出貨明細表()
65
-            下拉选择_cb.Items.Clear() : While (dr.Read()) : 下拉选择_cb.Items.Add(dr("年份季度")) : End While
66
-        Catch ex As Exception
67
-            MsgBox(ex.Message)
68
-        End Try
66
+        SQL_下拉出貨明細表() : 下拉选择_cb.Items.Clear() : While (dr.Read()) : 下拉选择_cb.Items.Add(dr("年份季度")) : End While
69 67
     End Sub
70 68
     Private Sub ComboBox5下拉表單資料載入()
71
-        Try
72
-            SQL_下拉出貨明細表1()
73
-            下拉选择2_cb.Items.Clear() : While (dr.Read()) : 下拉选择2_cb.Items.Add(dr("生產工廠")) : End While
74
-        Catch ex As Exception
75
-            MsgBox(ex.Message)
76
-        End Try
69
+        SQL_下拉出貨明細表1() : 下拉选择2_cb.Items.Clear() : While (dr.Read()) : 下拉选择2_cb.Items.Add(dr("生產工廠")) : End While
77 70
     End Sub
78 71
     Private Sub ComboBox6下拉表單資料載入()
79
-        Try
80
-            SQL_下拉出貨明細表2()
81
-            下拉选择1_cb.Items.Clear() : While (dr.Read()) : 下拉选择1_cb.Items.Add(dr("訂單種類")) : End While
82
-        Catch ex As Exception
83
-            MsgBox(ex.Message)
84
-        End Try
72
+        SQL_下拉出貨明細表2() : 下拉选择1_cb.Items.Clear() : While (dr.Read()) : 下拉选择1_cb.Items.Add(dr("訂單種類")) : End While
73
+    End Sub
74
+    Private Sub ComboBox2下拉表單資料載入()
75
+        SQL_下拉風格明細()
76
+        季度_cb.Items.Clear() : 季度1_cb.Items.Clear() : While (dr.Read()) : 季度_cb.Items.Add(dr("年份季度")) : 季度1_cb.Items.Add(dr("年份季度")) : End While
85 77
     End Sub
86 78
     Private Sub 出貨明細表_Load(sender As Object, e As EventArgs) Handles MyBase.Load
87
-        Try
88
-            Me.MdiParent = TENDEN_MES_SYS : Me.WindowState = 2 : Me.AutoScroll = True
89
-            訂單資料庫選擇.ShowDialog()
90
-            驗貨報告編號_tb.Enabled = False : 明細是否建檔_cb.Enabled = False : 開啟訂單明細表_bt.Enabled = False
91
-            ComboBox1下拉表單資料載入() : ComboBox5下拉表單資料載入() : ComboBox6下拉表單資料載入()
92
-            kkk1 = "WHERE (" & 訂單資料表(1) & ".CXL IS NULL or " & 訂單資料表(1) & ".CXL = 0)"
93
-            Set_訂單清單()
94
-            If TENDEN_MES_SYS.Size.Width > 1440 And TENDEN_MES_SYS.Size.Height > 900 Then
95
-                字體_NUD.Value = 9
96
-            ElseIf TENDEN_MES_SYS.Size.Width <= 1440 And TENDEN_MES_SYS.Size.Height <= 900 Then
97
-                字體_NUD.Value = 7.6
98
-            End If
99
-        Catch ex As Exception
100
-            MsgBox(ex.Message)
101
-        End Try
79
+        Me.MdiParent = TENDEN_MES_SYS : Me.WindowState = 2 : Me.AutoScroll = True
80
+        驗貨報告編號_tb.Enabled = False : 明細是否建檔_cb.Enabled = False : 開啟訂單明細表_bt.Enabled = False : 視窗2_pl.Visible = False
81
+        訂單資料庫選擇.ShowDialog()
82
+        ComboBox1下拉表單資料載入() : ComboBox5下拉表單資料載入() : ComboBox6下拉表單資料載入() : ComboBox2下拉表單資料載入() : PA = "" : Set_訂單明細1()
83
+        kkk1 = "WHERE (" & 訂單資料表(1) & ".CXL IS NULL or " & 訂單資料表(1) & ".CXL = 0)"
84
+        Set_訂單清單()
85
+        If TENDEN_MES_SYS.Size.Width > 1440 And TENDEN_MES_SYS.Size.Height > 900 Then
86
+            字體_NUD.Value = 9
87
+        ElseIf TENDEN_MES_SYS.Size.Width <= 1440 And TENDEN_MES_SYS.Size.Height <= 900 Then
88
+            字體_NUD.Value = 7.6
89
+        End If
102 90
     End Sub
103 91
     Private Sub 出貨明細表_SizeChanged(sender As Object, e As EventArgs) Handles MyBase.SizeChanged
104
-        Try
105
-            If TENDEN_MES_SYS.Size.Width > 1440 And TENDEN_MES_SYS.Size.Height > 900 Then
106
-                字體_NUD.Value = 9
107
-            ElseIf TENDEN_MES_SYS.Size.Width <= 1440 And TENDEN_MES_SYS.Size.Height <= 900 Then
108
-                字體_NUD.Value = 7.6
109
-            End If
110
-        Catch ex As Exception
111
-            MsgBox(ex.Message)
112
-        End Try
92
+        If TENDEN_MES_SYS.Size.Width > 1440 And TENDEN_MES_SYS.Size.Height > 900 Then
93
+            字體_NUD.Value = 9
94
+        ElseIf TENDEN_MES_SYS.Size.Width <= 1440 And TENDEN_MES_SYS.Size.Height <= 900 Then
95
+            字體_NUD.Value = 7.6
96
+        End If
113 97
     End Sub
114 98
     Private Sub 字體_NUD_ValueChanged(sender As Object, e As EventArgs) Handles 字體_NUD.ValueChanged
115
-        Try
116
-            訂單明細表_dgv.RowsDefaultCellStyle.Font = New System.Drawing.Font("微軟正黑體", 字體_NUD.Value)
117
-            明細表_dgv.RowsDefaultCellStyle.Font = New System.Drawing.Font("微軟正黑體", 字體_NUD.Value)
118
-        Catch ex As Exception
119
-            MsgBox(ex.Message)
120
-        End Try
121
-    End Sub
122
-    Private Sub DataGridView1_CellClick(ByVal sender As Object, ByVal e As DataGridViewCellEventArgs) Handles 訂單明細表_dgv.CellClick
123
-        Try
124
-            If e.RowIndex = -1 Then : Else
125
-                驗貨報告編號_tb.Text = 訂單明細表_dgv(1, e.RowIndex).Value.ToString : 明細是否建檔_cb.Checked = 訂單明細表_dgv(15, e.RowIndex).Value.ToString
126
-                天盾訂單號_tb.Text = 訂單明細表_dgv("訂單流水號", e.RowIndex).Value.ToString : 客戶訂單號_tb.Text = 訂單明細表_dgv("客戶訂單號", e.RowIndex).Value.ToString
99
+        訂單明細表_dgv.RowsDefaultCellStyle.Font = New System.Drawing.Font("微軟正黑體", 字體_NUD.Value)
100
+        明細表_dgv.RowsDefaultCellStyle.Font = New System.Drawing.Font("微軟正黑體", 字體_NUD.Value)
101
+    End Sub
102
+    Private Sub 訂單明細_dgv_CellClick(ByVal sender As Object, ByVal e As DataGridViewCellEventArgs) Handles 訂單明細_dgv.CellClick
103
+        客戶訂單號1_tb.Text = 訂單明細_dgv(2, e.RowIndex).Value.ToString : 天盾訂單號1_tb.Text = 訂單明細_dgv(0, e.RowIndex).Value.ToString
104
+        季度_cb.Text = 訂單明細_dgv(1, e.RowIndex).Value.ToString
105
+    End Sub
106
+    Private Sub 訂單明細表_dgv_CellClick(ByVal sender As Object, ByVal e As DataGridViewCellEventArgs) Handles 訂單明細表_dgv.CellClick
107
+        If e.RowIndex = -1 Then : Else
108
+            驗貨報告編號_tb.Text = 訂單明細表_dgv(1, e.RowIndex).Value.ToString : 明細是否建檔_cb.Checked = 訂單明細表_dgv(15, e.RowIndex).Value.ToString
109
+            天盾訂單號_tb.Text = 訂單明細表_dgv("訂單流水號", e.RowIndex).Value.ToString : 客戶訂單號_tb.Text = 訂單明細表_dgv("客戶訂單號", e.RowIndex).Value.ToString
127 110
 
128
-                If 明細是否建檔_cb.Checked = False Then : 開啟訂單明細表_bt.Enabled = False : Else : 開啟訂單明細表_bt.Enabled = True : End If
129
-                PA = 訂單明細表_dgv("TVW", e.RowIndex).Value.ToString : PA1 = 訂單明細表_dgv(16, e.RowIndex).Value.ToString : PA2 = 訂單明細表_dgv(5, e.RowIndex).Value.ToString
130
-                If 訂單明細表_dgv(5, e.RowIndex).Value = "" Then
131
-                    SQL_讀取訂單明細表圖片() : 驗貨報告_pb.Image = Nothing
111
+            If 明細是否建檔_cb.Checked = False Then : 開啟訂單明細表_bt.Enabled = False : Else : 開啟訂單明細表_bt.Enabled = True : End If
112
+            PA = 訂單明細表_dgv("TVW", e.RowIndex).Value.ToString : PA1 = 訂單明細表_dgv(16, e.RowIndex).Value.ToString : PA2 = 訂單明細表_dgv(5, e.RowIndex).Value.ToString
113
+            If 訂單明細表_dgv(5, e.RowIndex).Value = "" Then
114
+                SQL_讀取訂單明細表圖片() : 驗貨報告_pb.Image = Nothing
115
+                While dr.Read() = True
116
+                    Dim unused As Byte() = New Byte(-1) {} : Dim bytes As Byte() = DirectCast(dr.Item("圖片"), Byte())
117
+                    Dim oStream As New MemoryStream(bytes) : 驗貨報告_pb.Image = Bitmap.FromStream(oStream)
118
+                End While
119
+            Else
120
+                SQL_讀取訂單明細表圖片1()
121
+                If dr.Read() Then
122
+                    SQL_讀取訂單明細表圖片1() : 驗貨報告_pb.Image = Nothing
132 123
                     While dr.Read() = True
133
-                        Dim unused As Byte() = New Byte(-1) {} : Dim bytes As Byte() = DirectCast(dr.Item("圖片"), Byte())
124
+                        Dim unused2 As Byte() = New Byte(-1) {} : Dim bytes As Byte() = DirectCast(dr.Item("圖片"), Byte())
134 125
                         Dim oStream As New MemoryStream(bytes) : 驗貨報告_pb.Image = Bitmap.FromStream(oStream)
135 126
                     End While
136 127
                 Else
137
-                    SQL_讀取訂單明細表圖片1()
138
-                    If dr.Read() Then
139
-                        SQL_讀取訂單明細表圖片1() : 驗貨報告_pb.Image = Nothing
140
-                        While dr.Read() = True
141
-                            Dim unused2 As Byte() = New Byte(-1) {} : Dim bytes As Byte() = DirectCast(dr.Item("圖片"), Byte())
142
-                            Dim oStream As New MemoryStream(bytes) : 驗貨報告_pb.Image = Bitmap.FromStream(oStream)
143
-                        End While
144
-                    Else
145
-                        SQL_讀取訂單明細表圖片() : 驗貨報告_pb.Image = Nothing
146
-                        While dr.Read() = True
147
-                            Dim unused1 As Byte() = New Byte(-1) {} : Dim bytes As Byte() = DirectCast(dr.Item("圖片"), Byte())
148
-                            Dim oStream As New MemoryStream(bytes) : 驗貨報告_pb.Image = Bitmap.FromStream(oStream)
149
-                        End While
150
-                    End If
128
+                    SQL_讀取訂單明細表圖片() : 驗貨報告_pb.Image = Nothing
129
+                    While dr.Read() = True
130
+                        Dim unused1 As Byte() = New Byte(-1) {} : Dim bytes As Byte() = DirectCast(dr.Item("圖片"), Byte())
131
+                        Dim oStream As New MemoryStream(bytes) : 驗貨報告_pb.Image = Bitmap.FromStream(oStream)
132
+                    End While
151 133
                 End If
152
-                conn.Close() : 驗貨報告_pb.SizeMode = 4
153
-                '------------驗貨報告讀取--------------------------------------------------------------------------------------------
134
+            End If
135
+            conn.Close() : 驗貨報告_pb.SizeMode = 4
136
+            '------------驗貨報告讀取--------------------------------------------------------------------------------------------
154 137
 
155
-                PA1 = 訂單明細表_dgv("驗報圖庫", e.RowIndex).Value.ToString : PA2 = 訂單明細表_dgv("驗貨報告圖片", e.RowIndex).Value.ToString
156
-                SQL_讀取訂單明細表圖片2() : 驗貨報告圖庫_pb.Image = Nothing
157
-                While dr.Read() = True
158
-                    Dim unused3 As Byte() = New Byte(-1) {} : Dim bytes As Byte() = DirectCast(dr.Item("驗貨報告"), Byte())
159
-                    Dim oStream As New MemoryStream(bytes) : 驗貨報告圖庫_pb.Image = Bitmap.FromStream(oStream)
160
-                End While
161
-                conn.Close() : 驗貨報告圖庫_pb.SizeMode = 4 : 圖片傳遞 = 驗貨報告圖庫_pb.Image
138
+            PA1 = 訂單明細表_dgv("驗報圖庫", e.RowIndex).Value.ToString : PA2 = 訂單明細表_dgv("驗貨報告圖片", e.RowIndex).Value.ToString
139
+            SQL_讀取訂單明細表圖片2() : 驗貨報告圖庫_pb.Image = Nothing
140
+            While dr.Read() = True
141
+                Dim unused3 As Byte() = New Byte(-1) {} : Dim bytes As Byte() = DirectCast(dr.Item("驗貨報告"), Byte())
142
+                Dim oStream As New MemoryStream(bytes) : 驗貨報告圖庫_pb.Image = Bitmap.FromStream(oStream)
143
+            End While
144
+            conn.Close() : 驗貨報告圖庫_pb.SizeMode = 4 : 圖片傳遞 = 驗貨報告圖庫_pb.Image
162 145
 
163
-                驗貨報告 = 訂單明細表_dgv(16, e.RowIndex).Value.ToString : Set_訂單明細()
164
-            End If
165
-        Catch ex As Exception
166
-            MsgBox(ex.Message)
167
-        End Try
168
-    End Sub
169
-    Private Sub DataGridView1_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles 訂單明細表_dgv.RowPostPaint
170
-        Try
171
-            Dim linePen As New Pen(Color.Blue, 2)
172
-            If e.RowIndex = 訂單明細表_dgv.Rows.Count - 1 Then
146
+            驗貨報告 = 訂單明細表_dgv(16, e.RowIndex).Value.ToString : Set_訂單明細()
147
+        End If
148
+    End Sub
149
+    Private Sub 訂單明細表_dgv_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles 訂單明細表_dgv.RowPostPaint
150
+        Dim linePen As New Pen(Color.Blue, 2)
151
+        If e.RowIndex = 訂單明細表_dgv.Rows.Count - 1 Then
152
+            Exit Sub
153
+        Else
154
+            If 訂單明細表_dgv(1, e.RowIndex).Value.ToString <> 訂單明細表_dgv(1, e.RowIndex + 1).Value.ToString Then
155
+                Dim startX As Integer = IIf(訂單明細表_dgv.RowHeadersVisible, 訂單明細表_dgv.RowHeadersWidth, 0)
156
+                Dim startY As Integer = e.RowBounds.Top + e.RowBounds.Height - 1
157
+                Dim endX As Integer = startX + 訂單明細表_dgv.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - 訂單明細表_dgv.HorizontalScrollingOffset
158
+                e.Graphics.DrawLine(linePen, startX, startY, endX, startY)
173 159
                 Exit Sub
174
-            Else
175
-                If 訂單明細表_dgv(1, e.RowIndex).Value.ToString <> 訂單明細表_dgv(1, e.RowIndex + 1).Value.ToString Then
176
-                    Dim startX As Integer = IIf(訂單明細表_dgv.RowHeadersVisible, 訂單明細表_dgv.RowHeadersWidth, 0)
177
-                    Dim startY As Integer = e.RowBounds.Top + e.RowBounds.Height - 1
178
-                    Dim endX As Integer = startX + 訂單明細表_dgv.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - 訂單明細表_dgv.HorizontalScrollingOffset
179
-                    e.Graphics.DrawLine(linePen, startX, startY, endX, startY)
180
-                    Exit Sub
181
-                End If
182 160
             End If
183
-        Catch ex As Exception
184
-            MsgBox(ex.Message)
185
-        End Try
161
+        End If
186 162
     End Sub
187 163
     Private Sub Button9_Click(sender As Object, e As EventArgs) Handles 搜尋_bt.Click
188 164
         PA = InputBox("請輸入要查詢的資料") : Set_訂單清單() : PA = ""
@@ -265,43 +241,27 @@ Public Class 出貨明細表
265 241
             kkk5 = " AND " & 訂單資料表(1) & ".工廠回復交期 BETWEEN '" & Format(日期2_dtp.Value, "yyyy/MM/dd") & "' AND '" & Format(日期3_dtp.Value, "yyyy/MM/dd") & "' "
266 242
         Else : kkk5 = "" : End If
267 243
     End Sub
268
-    Private Sub DateTimePicker4_ValueChanged(sender As Object, e As EventArgs) Handles 日期3_dtp.ValueChanged
269
-        Try
270
-            If FTY1_cb.Checked = True Then
271
-                kkk5 = " AND " & 訂單資料表(1) & ".工廠回復交期 BETWEEN '" & Format(日期2_dtp.Value, "yyyy/MM/dd") & "' AND '" & Format(日期3_dtp.Value, "yyyy/MM/dd") & "' "
272
-            Else : kkk5 = "" : End If
273
-        Catch ex As Exception
274
-            MsgBox(ex.Message)
275
-        End Try
276
-    End Sub
277
-    Private Sub DateTimePicker5_ValueChanged(sender As Object, e As EventArgs) Handles 日期4_dtp.ValueChanged
278
-        Try
279
-            If RLF1_cb.Checked = True Then
280
-                kkk6 = " AND 貨款匯入出款明細表.實際離廠日 BETWEEN '" & Format(日期4_dtp.Value, "yyyy/MM/dd") & "' AND '" & Format(日期5_dtp.Value, "yyyy/MM/dd") & "' "
281
-            Else : kkk6 = "" : End If
282
-        Catch ex As Exception
283
-            MsgBox(ex.Message)
284
-        End Try
244
+    Private Sub 日期3_dtp_ValueChanged(sender As Object, e As EventArgs) Handles 日期3_dtp.ValueChanged
245
+        If FTY1_cb.Checked = True Then
246
+            kkk5 = " AND " & 訂單資料表(1) & ".工廠回復交期 BETWEEN '" & Format(日期2_dtp.Value, "yyyy/MM/dd") & "' AND '" & Format(日期3_dtp.Value, "yyyy/MM/dd") & "' "
247
+        Else : kkk5 = "" : End If
248
+    End Sub
249
+    Private Sub 日期4_dtp_ValueChanged(sender As Object, e As EventArgs) Handles 日期4_dtp.ValueChanged
250
+        If RLF1_cb.Checked = True Then
251
+            kkk6 = " AND 貨款匯入出款明細表.實際離廠日 BETWEEN '" & Format(日期4_dtp.Value, "yyyy/MM/dd") & "' AND '" & Format(日期5_dtp.Value, "yyyy/MM/dd") & "' "
252
+        Else : kkk6 = "" : End If
285 253
     End Sub
286 254
     Private Sub DateTimePicker6_ValueChanged(sender As Object, e As EventArgs) Handles 日期5_dtp.ValueChanged
287
-        Try
288
-            If RLF1_cb.Checked = True Then
289
-                kkk6 = " AND 貨款匯入出款明細表.實際離廠日 BETWEEN '" & Format(日期4_dtp.Value, "yyyy/MM/dd") & "' AND '" & Format(日期5_dtp.Value, "yyyy/MM/dd") & "' "
290
-            Else : kkk6 = "" : End If
291
-        Catch ex As Exception
292
-            MsgBox(ex.Message)
293
-        End Try
255
+        If RLF1_cb.Checked = True Then
256
+            kkk6 = " AND 貨款匯入出款明細表.實際離廠日 BETWEEN '" & Format(日期4_dtp.Value, "yyyy/MM/dd") & "' AND '" & Format(日期5_dtp.Value, "yyyy/MM/dd") & "' "
257
+        Else : kkk6 = "" : End If
294 258
     End Sub
295 259
     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles 列印成EXCEL_bt.Click
296 260
         列印_出貨明細表.ShowDialog()
297 261
     End Sub
298 262
     Private Sub 資料庫選擇1_bt_Click(sender As Object, e As EventArgs) Handles 資料庫選擇1_bt.Click
299
-        Try
300
-            SQL_訂單資料表選擇_VIONIC() : kkk1 = "WHERE (" & 訂單資料表(1) & ".CXL IS NULL or " & 訂單資料表(1) & ".CXL = 0)"
301
-            Set_訂單清單()
302
-        Catch ex As Exception
303
-            MsgBox(ex.Message)
304
-        End Try
263
+        SQL_訂單資料表選擇_VIONIC() : kkk1 = "WHERE (" & 訂單資料表(1) & ".CXL IS NULL or " & 訂單資料表(1) & ".CXL = 0)"
264
+        Set_訂單清單()
305 265
     End Sub
306 266
     Private Sub 刪除_bt_Click(sender As Object, e As EventArgs) Handles 刪除_bt.Click
307 267
         Dim aa As MsgBoxResult = MsgBox("確定要刪除該筆資料?", MsgBoxStyle.OkCancel)
@@ -315,12 +275,35 @@ Public Class 出貨明細表
315 275
         End If
316 276
         Set_訂單清單() : Set_訂單明細()
317 277
     End Sub
278
+    Private Sub 修改_bt_Click(sender As Object, e As EventArgs) Handles 修改_bt.Click
279
+        If 視窗2_pl.Visible = False Then : 視窗2_pl.Location = New System.Drawing.Point(372, 126) : 視窗2_pl.Visible = True : Else : 視窗2_pl.Visible = False : End If
280
+    End Sub
281
+    Private Sub CanceL2_bt_Click(sender As Object, e As EventArgs) Handles CanceL2_bt.Click
282
+        If 視窗2_pl.Visible = False Then : 視窗2_pl.Visible = True : 視窗2_pl.BringToFront() : Else
283
+            視窗2_pl.Visible = False : End If
284
+    End Sub
318 285
     Private Sub 資料庫選擇2_bt_Click(sender As Object, e As EventArgs) Handles 資料庫選擇2_bt.Click
319
-        Try
320
-            SQL_訂單資料表選擇_非VIONIC() : kkk1 = "WHERE (" & 訂單資料表(1) & ".CXL IS NULL or " & 訂單資料表(1) & ".CXL = 0)"
321
-            Set_訂單清單()
322
-        Catch ex As Exception
323
-            MsgBox(ex.Message)
324
-        End Try
286
+        SQL_訂單資料表選擇_非VIONIC() : kkk1 = "WHERE (" & 訂單資料表(1) & ".CXL IS NULL or " & 訂單資料表(1) & ".CXL = 0)"
287
+        Set_訂單清單()
288
+    End Sub
289
+    Private Sub 搜尋1_bt_Click(sender As Object, e As EventArgs) Handles 搜尋1_bt.Click
290
+        PA = 搜尋_tb.Text : Set_訂單明細1()
291
+    End Sub
292
+    Private Sub 存檔_bt_Click(sender As Object, e As EventArgs) Handles 存檔_bt.Click
293
+        If 季度1_cb.Text = "" Or 季度_cb.Text = "" Or 客戶訂單號1_tb.Text = "" Or 天盾訂單號1_tb.Text = "" Then : MsgBox("請正確選擇資料後再做修改!!") : Else
294
+            SQL_修改季節資料() : MsgBox("修改完成!!") : Set_訂單明細1() : Set_訂單清單()
295
+        End If
296
+    End Sub
297
+
298
+    Dim OldX, OldY As Long
299
+    Dim drag As Boolean
300
+    Private Sub 視窗2_pl_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles 視窗2_pl.MouseDown
301
+        If e.Button = MouseButtons.Left Then : OldX = e.X : OldY = e.Y : drag = True : End If
302
+    End Sub
303
+    Private Sub 視窗2_pl_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles 視窗2_pl.MouseMove
304
+        If drag Then : 視窗2_pl.Left = 視窗2_pl.Left + e.X - OldX : 視窗2_pl.Top = 視窗2_pl.Top + e.Y - OldY : End If
305
+    End Sub
306
+    Private Sub 視窗2_pl_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles 視窗2_pl.MouseUp
307
+        drag = False
325 308
     End Sub
326 309
 End Class

Loading…
Peruuta
Tallenna