Przeglądaj źródła

版本號 : 2020072201

新增內容
1、財務帳本拆分
2、出貨明細可改實際離廠日資料
3、量產訂單可由輸入介面修改形體名稱與形體號碼

Signed-off-by: B70340 <b70340@gmail.com>
B70340 5 lat temu
rodzic
commit
103ba4cc72
38 zmienionych plików z 1179 dodań i 817 usunięć
  1. BIN
      .vs/WINPROFIT-ERP-SYS/v16/.suo
  2. 13
    0
      SHENKANG-MES-SYS/MyModule/SQL_Module.vb
  3. 71
    0
      SHENKANG-MES-SYS/MyModule/SQL_財務管理系統.vb
  4. 18
    0
      SHENKANG-MES-SYS/MyModule/SQL_資料庫系統管理.vb
  5. 8
    4
      SHENKANG-MES-SYS/MyModule/全域變數.vb
  6. 4
    1
      SHENKANG-MES-SYS/WINPROFIT-ERP-SYS.vbproj
  7. 1
    1
      SHENKANG-MES-SYS/bin/Debug/WINPROFIT-ERP-SYS.application
  8. BIN
      SHENKANG-MES-SYS/bin/Debug/WINPROFIT-ERP-SYS.exe
  9. 2
    2
      SHENKANG-MES-SYS/bin/Debug/WINPROFIT-ERP-SYS.exe.manifest
  10. BIN
      SHENKANG-MES-SYS/bin/Debug/WINPROFIT-ERP-SYS.pdb
  11. BIN
      SHENKANG-MES-SYS/bin/Debug/app.publish/WINPROFIT-ERP-SYS.exe
  12. BIN
      SHENKANG-MES-SYS/obj/Debug/DesignTimeResolveAssemblyReferences.cache
  13. BIN
      SHENKANG-MES-SYS/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  14. 1
    1
      SHENKANG-MES-SYS/obj/Debug/WINPROFIT-ERP-SYS.application
  15. BIN
      SHENKANG-MES-SYS/obj/Debug/WINPROFIT-ERP-SYS.exe
  16. 2
    2
      SHENKANG-MES-SYS/obj/Debug/WINPROFIT-ERP-SYS.exe.manifest
  17. BIN
      SHENKANG-MES-SYS/obj/Debug/WINPROFIT-ERP-SYS.pdb
  18. 1
    1
      SHENKANG-MES-SYS/obj/Debug/WINPROFIT-ERP-SYS.vbproj.CoreCompileInputs.cache
  19. 12
    2
      SHENKANG-MES-SYS/obj/Debug/WINPROFIT-ERP-SYS.vbproj.FileListAbsolute.txt
  20. BIN
      SHENKANG-MES-SYS/obj/Debug/WINPROFIT-ERP-SYS.vbproj.GenerateResource.cache
  21. BIN
      SHENKANG-MES-SYS/obj/Debug/WINPROFIT-ERP-SYS.vbprojAssemblyReference.cache
  22. BIN
      SHENKANG-MES-SYS/obj/Debug/WINPROFIT-ERP-SYS.vbprojResolveAssemblyReference.cache
  23. 1
    1
      SHENKANG-MES-SYS/製鞋技術管理系統/楦頭規格表.Designer.vb
  24. 69
    28
      SHENKANG-MES-SYS/財務管理系統/零用金支付單一覽表.Designer.vb
  25. 60
    52
      SHENKANG-MES-SYS/財務管理系統/零用金支付單一覽表.vb
  26. 84
    43
      SHENKANG-MES-SYS/財務管理系統/零用金支付審核.Designer.vb
  27. 60
    64
      SHENKANG-MES-SYS/財務管理系統/零用金支付審核.vb
  28. 69
    67
      SHENKANG-MES-SYS/財務管理系統/零用金支付核准.Designer.vb
  29. 59
    75
      SHENKANG-MES-SYS/財務管理系統/零用金支付核准.vb
  30. 124
    83
      SHENKANG-MES-SYS/財務管理系統/零用金支付申請.Designer.vb
  31. 108
    136
      SHENKANG-MES-SYS/財務管理系統/零用金支付申請.vb
  32. 219
    99
      SHENKANG-MES-SYS/資料庫管理系統/系統編碼規則_1.Designer.vb
  33. 112
    145
      SHENKANG-MES-SYS/資料庫管理系統/系統編碼規則_1.vb
  34. 39
    3
      SHENKANG-MES-SYS/量產訂單管理系統/量產出貨明細表.Designer.vb
  35. 14
    5
      SHENKANG-MES-SYS/量產訂單管理系統/量產出貨明細表.vb
  36. 5
    2
      SHENKANG-MES-SYS/量產訂單管理系統/量產訂單控制表.vb
  37. 13
    0
      SHENKANG-MES-SYS/量產訂單管理系統/量產訂單輸入.Designer.vb
  38. 10
    0
      SHENKANG-MES-SYS/量產訂單管理系統/量產訂單輸入.vb

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


+ 13
- 0
SHENKANG-MES-SYS/MyModule/SQL_Module.vb Wyświetl plik

@@ -0,0 +1,13 @@
1
+Imports System.Data.SqlClient
2
+Module SQL_Module
3
+    Public ConString As String : Public SQL1 As String : Public conn As New SqlConnection : Public cmd As New SqlCommand : Public dr As SqlDataReader : Public da As New SqlDataAdapter
4
+    Friend Sub ConnOpen()
5
+        conn.Close() : If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
6
+    End Sub
7
+    Friend Sub CmdSet_For_DGV()
8
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd
9
+    End Sub
10
+    Friend Sub CmdSet_For_dr()
11
+        cmd.CommandText = SQL1 : cmd.Connection = conn : dr = cmd.ExecuteReader
12
+    End Sub
13
+End Module

+ 71
- 0
SHENKANG-MES-SYS/MyModule/SQL_財務管理系統.vb Wyświetl plik

@@ -0,0 +1,71 @@
1
+Module SQL_財務管理系統
2
+    Friend Sub SQL_財務帳清單()
3
+        ConnOpen() : SQL1 = "SELECT 流水號, 項次, 用途, 金額, 備註 FROM 零用金支付明細 WHERE 流水號 LIKE N'" & PA1 & "' ORDER BY 項次" : CmdSet_For_DGV()
4
+    End Sub
5
+    Friend Sub SQL_財務單據()
6
+        If PA = "一級未審核" Then
7
+            If 登入人部門 = "NA" Then
8
+                KKKJJ = " WHERE (零用金支付表.審核人 LIKE N'') AND (零用金支付表.帳本編號 LIKE '" & PA19 & "') ORDER BY 零用金支付表.流水號 DESC"
9
+            Else
10
+                KKKJJ = " WHERE (零用金支付表.申請人 LIKE N'" & gUserName & "') AND (零用金支付表.審核人 LIKE N'') AND (零用金支付表.帳本編號 LIKE '" & PA19 & "') 
11
+                          ORDER BY 零用金支付表.流水號 DESC"
12
+            End If
13
+        ElseIf PA = "一級作廢" Then
14
+            If 登入人部門 = "NA" Then
15
+                KKKJJ = " WHERE (零用金支付表.審核人 LIKE N'作廢%') AND (零用金支付表.帳本編號 LIKE '" & PA19 & "') ORDER BY 零用金支付表.流水號 DESC"
16
+            Else
17
+                KKKJJ = " WHERE (零用金支付表.申請人 LIKE N'" & gUserName & "') AND (零用金支付表.審核人 LIKE N'作廢%') AND (零用金支付表.帳本編號 LIKE '" & PA19 & "') 
18
+                          ORDER BY 零用金支付表.流水號 DESC"
19
+            End If
20
+        ElseIf PA = "二級未核准" Then
21
+            If 登入人部門 = "NA" Then
22
+                KKKJJ = " WHERE (審核人 NOT LIKE N'作廢%') AND (審核人 NOT LIKE N'') AND (核准人 LIKE N'') AND (帳本編號 LIKE '" & PA19 & "') ORDER BY 流水號 DESC"
23
+            Else
24
+                KKKJJ = " WHERE (零用金支付表.申請人 LIKE N'" & gUserName & "') AND (零用金支付表.審核人 NOT LIKE N'作廢%') AND (零用金支付表.審核人 NOT LIKE N'')  AND 
25
+                                (零用金支付表.核准人 LIKE N'') AND (零用金支付表.帳本編號 LIKE '" & PA19 & "') 
26
+                          ORDER BY 零用金支付表.流水號 DESC"
27
+            End If
28
+        ElseIf PA = "二級作廢" Then
29
+            If 登入人部門 = "NA" Then
30
+                KKKJJ = " WHERE (零用金支付表.審核人 NOT LIKE N'作廢%') AND (零用金支付表.審核人 NOT LIKE N'')  AND (零用金支付表.核准人 LIKE N'作廢%') AND 
31
+                                (零用金支付表.帳本編號 LIKE '" & PA19 & "') ORDER BY 流水號 DESC"
32
+            Else
33
+                KKKJJ = " WHERE (零用金支付表.申請人 LIKE N'" & gUserName & "') AND (零用金支付表.審核人 NOT LIKE N'作廢%') AND (零用金支付表.審核人 NOT LIKE N'')  AND 
34
+                                (零用金支付表.核准人 LIKE N'作廢%') AND (零用金支付表.帳本編號 LIKE '" & PA19 & "') 
35
+                          ORDER BY 零用金支付表.流水號 DESC"
36
+            End If
37
+        ElseIf PA = "審核介面_一級未審核" Then
38
+            If 登入人部門 = "NA" Then
39
+                KKKJJ = " WHERE (零用金支付表.審核人 LIKE N'') AND (零用金支付表.帳本編號 LIKE '" & PA19 & "') ORDER BY 零用金支付表.流水號 DESC"
40
+            Else
41
+                KKKJJ = " WHERE (零用金支付表.部門 LIKE N'" & 登入人部門 & "%') AND (零用金支付表.審核人 LIKE N'') AND (零用金支付表.帳本編號 LIKE '" & PA19 & "') 
42
+                          ORDER BY 零用金支付表.流水號 DESC"
43
+            End If
44
+        ElseIf PA = "審核介面_一級作廢" Then
45
+            If 登入人部門 = "NA" Then
46
+                KKKJJ = " WHERE (零用金支付表.審核人 LIKE N'作廢%') AND (零用金支付表.帳本編號 LIKE '" & PA19 & "') ORDER BY 零用金支付表.流水號 DESC"
47
+            Else
48
+                KKKJJ = " WHERE (零用金支付表.部門 LIKE N'" & 登入人部門 & "%') AND (零用金支付表.審核人 LIKE N'作廢%') AND (零用金支付表.帳本編號 LIKE '" & PA19 & "') 
49
+                          ORDER BY 零用金支付表.流水號 DESC"
50
+            End If
51
+        End If
52
+        ConnOpen()
53
+        SQL1 = "SELECT      零用金支付表.流水號, 零用金支付表.部門, 零用金支付表.申請人, LEFT(零用金支付表.申請日期, 10) 
54
+                            AS 申請日期, 零用金支付表.審核人, LEFT(零用金支付表.審核日期, 10) AS 審核日期, 
55
+                            零用金支付表.核准人, LEFT(零用金支付表.核准日期, 10) AS 核准日期, 零用金支付表.備註, 
56
+                            財務帳本編號.帳本名稱 AS 帳本
57
+                FROM        零用金支付表 INNER JOIN
58
+                            財務帳本編號 ON 零用金支付表.帳本編號 = 財務帳本編號.編號 " & KKKJJ & ""
59
+        CmdSet_For_DGV()
60
+    End Sub
61
+    Friend Sub SQL_帳本下拉清單()
62
+        ConnOpen() : SQL1 = "SELECT 編號, 帳本名稱 FROM 財務帳本編號 ORDER BY 編號" : CmdSet_For_dr()
63
+    End Sub
64
+    Friend Sub SQL_財務單據刪除()
65
+        ConnOpen() : SQL1 = "DELETE FROM 零用金支付表 WHERE (流水號 LIKE N'" & PA & "')" : CmdSet_For_dr()
66
+        ConnOpen() : SQL1 = "DELETE FROM 零用金支付明細 WHERE (流水號 LIKE N'" & PA & "')" : CmdSet_For_dr()
67
+    End Sub
68
+    Friend Sub SQL_零用金支付表最後一筆資料()
69
+        ConnOpen() : SQL1 = "SELECT TOP (1)  流水號 FROM 零用金支付表 WHERE ( 流水號 LIKE N'" & PA & "')" : CmdSet_For_dr()
70
+    End Sub
71
+End Module

+ 18
- 0
SHENKANG-MES-SYS/MyModule/SQL_資料庫系統管理.vb Wyświetl plik

@@ -0,0 +1,18 @@
1
+Module SQL_資料庫系統管理
2
+    '-------------------------系統編碼規則_1----------------------------------------------------------------------------------------------------------------------------------------------
3
+    Friend Sub SQL_帳本查詢()
4
+        ConnOpen() : SQL1 = "SELECT 編號, 帳本名稱 FROM 財務帳本編號 WHERE 帳本名稱 LIKE N'" & PA & "' ORDER BY 編號" : CmdSet_For_dr()
5
+    End Sub
6
+    Friend Sub SQL_帳本流水號最後一筆()
7
+        ConnOpen() : SQL1 = "Select TOP (1) 編號 FROM 財務帳本編號 ORDER BY 編號 DESC" : CmdSet_For_dr()
8
+    End Sub
9
+    Friend Sub SQL_帳本新增()
10
+        SQL1 = "INSERT INTO 財務帳本編號 (編號, 帳本名稱) VALUES (N'" & PA1 & "', N'" & PA & "')"
11
+    End Sub
12
+    Friend Sub SQL_帳本修改()
13
+        SQL1 = "UPDATE 財務帳本編號 SET 帳本名稱 = N'" & PA & "' WHERE 編號 LIKE N'" & 系統編碼規則_1.帳本編號_tb.Text & "'"
14
+    End Sub
15
+    Friend Sub SQL_帳本刪除()
16
+        SQL1 = "DELETE FROM 財務帳本編號 WHERE (編號 = N'" & 系統編碼規則_1.帳本編號_tb.Text & "')"
17
+    End Sub
18
+End Module

SHENKANG-MES-SYS/MyModule/MyModule.vb → SHENKANG-MES-SYS/MyModule/全域變數.vb Wyświetl plik

@@ -1,6 +1,6 @@
1
-Module MyModule
1
+Module 全域變數
2 2
     '----系統登入-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
3
-    Public g_conn_type As String = "" : Public ConString As String : Public gUserName As String : Public 登入人部門 As String : Public 員工編號 As String = ""
3
+    Public g_conn_type As String = "" : Public gUserName As String : Public 登入人部門 As String : Public 員工編號 As String = ""
4 4
     Public Target As String : Public Target1 As String : Public Target2 As String : Public FTP帳號 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 String ': Public BB(99) As Boolean :  
6 6
     Public 登入判斷 As Boolean
@@ -9,11 +9,15 @@
9 9
                                  CC51, CC52, CC53, CC54, CC55, CC56, CC57, CC58, CC59, CC60, CC61, CC62, CC63, CC64, CC65, CC66, CC67, CC68, CC69, CC70, CC71, CC72, CC73, CC74, CC75, CC76, CC77, CC78, 
10 10
                                  CC79, CC80, CC81, CC82, CC83, CC84, CC85, CC86, CC87, CC88, CC89, CC90, CC91, CC92, CC93, CC94, CC95 FROM"
11 11
     '----系統版本-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
12
-    Public 版本 As String = "2020052301"
12
+    Public 版本 As String = "2020072201"
13 13
     '----系統用全域變數-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
14
-    Public SQL1 As String : Public 列印用SQL As String = "" : Public 列印用SQL1 As String = "" : Public 列印用SQL2 As String = "" : Public PA As String = "" : Public 驗貨報告 As String
14
+    Public PA As String = "" : Public PA1 As String = "" : Public PA2 As String = "" : Public PA3 As String = "" : Public PA4 As String = "" : Public PA5 As String = "" : Public PA6 As String = ""
15
+    Public PA7 As String = "" : Public PA8 As String = "" : Public PA9 As String = "" : Public PA10 As String = "" : Public PA11 As String = "" : Public PA12 As String = "" : Public PA13 As String = ""
16
+    Public PA14 As String = "" : Public PA15 As String = "" : Public PA16 As String = "" : Public PA17 As String = "" : Public PA18 As String = "" : Public PA19 As String = ""
17
+    Public 列印用SQL As String = "" : Public 列印用SQL1 As String = "" : Public 列印用SQL2 As String = "" : Public 驗貨報告 As String
15 18
     Public OD(45) As String : Public 簽核圖片編號 As String = ""
16 19
     Public 平均數 As Integer : Public 最終數 As Integer = 0 : Public 資料數 As Integer = 0
20
+    Public KKKJJ As String : Public KKKJJ2 As String : Public KKKJJ3 As String
17 21
     '----樣品系統用分類-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
18 22
     Public 樣品進度表分類1 As String : Public 樣品進度表分類2 As String : Public 樣品進度表分類3 As String : Public 樣品進度表分類4 As String : Public 樣品進度表分類5 As String
19 23
     Public 樣品備註 As String

+ 4
- 1
SHENKANG-MES-SYS/WINPROFIT-ERP-SYS.vbproj Wyświetl plik

@@ -113,6 +113,9 @@
113 113
     <Import Include="System.Threading.Tasks" />
114 114
   </ItemGroup>
115 115
   <ItemGroup>
116
+    <Compile Include="MyModule\SQL_Module.vb" />
117
+    <Compile Include="MyModule\SQL_財務管理系統.vb" />
118
+    <Compile Include="MyModule\SQL_資料庫系統管理.vb" />
116 119
     <Compile Include="SplashScreen1.Designer.vb">
117 120
       <DependentUpon>SplashScreen1.vb</DependentUpon>
118 121
     </Compile>
@@ -287,7 +290,7 @@
287 290
     <Compile Include="WINPROFIT-ERP-SYS.vb">
288 291
       <SubType>Form</SubType>
289 292
     </Compile>
290
-    <Compile Include="MyModule\MyModule.vb" />
293
+    <Compile Include="MyModule\全域變數.vb" />
291 294
     <Compile Include="請採購館洗系統\一般物料請購單一覽表.Designer.vb">
292 295
       <DependentUpon>一般物料請購單一覽表.vb</DependentUpon>
293 296
     </Compile>

+ 1
- 1
SHENKANG-MES-SYS/bin/Debug/WINPROFIT-ERP-SYS.application Wyświetl plik

@@ -14,7 +14,7 @@
14 14
           <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
15 15
         </dsig:Transforms>
16 16
         <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
17
-        <dsig:DigestValue>wwaEN2lERQSUXoQYOASNtjyY50WwZt2lv3LPvIP5V4E=</dsig:DigestValue>
17
+        <dsig:DigestValue>iG9uqrG26rbd7WcHjUEQxxnl+ENKzjvczZxe+tS3DOY=</dsig:DigestValue>
18 18
       </hash>
19 19
     </dependentAssembly>
20 20
   </dependency>

BIN
SHENKANG-MES-SYS/bin/Debug/WINPROFIT-ERP-SYS.exe Wyświetl plik


+ 2
- 2
SHENKANG-MES-SYS/bin/Debug/WINPROFIT-ERP-SYS.exe.manifest Wyświetl plik

@@ -43,14 +43,14 @@
43 43
     </dependentAssembly>
44 44
   </dependency>
45 45
   <dependency>
46
-    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="WINPROFIT-ERP-SYS.exe" size="5361080">
46
+    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="WINPROFIT-ERP-SYS.exe" size="5374904">
47 47
       <assemblyIdentity name="WINPROFIT-ERP-SYS" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
48 48
       <hash>
49 49
         <dsig:Transforms>
50 50
           <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
51 51
         </dsig:Transforms>
52 52
         <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
53
-        <dsig:DigestValue>IjNPo+wcVa7x6VP8K4XkYaN7Wy6XL0yJxXqByK/2lnY=</dsig:DigestValue>
53
+        <dsig:DigestValue>YrO0pC4m3tjz/kzUdyfsDbajTTjFR/g6q7J5Jg8bV6Q=</dsig:DigestValue>
54 54
       </hash>
55 55
     </dependentAssembly>
56 56
   </dependency>

BIN
SHENKANG-MES-SYS/bin/Debug/WINPROFIT-ERP-SYS.pdb Wyświetl plik


BIN
SHENKANG-MES-SYS/bin/Debug/app.publish/WINPROFIT-ERP-SYS.exe Wyświetl plik


BIN
SHENKANG-MES-SYS/obj/Debug/DesignTimeResolveAssemblyReferences.cache Wyświetl plik


BIN
SHENKANG-MES-SYS/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache Wyświetl plik


+ 1
- 1
SHENKANG-MES-SYS/obj/Debug/WINPROFIT-ERP-SYS.application Wyświetl plik

@@ -14,7 +14,7 @@
14 14
           <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
15 15
         </dsig:Transforms>
16 16
         <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
17
-        <dsig:DigestValue>wwaEN2lERQSUXoQYOASNtjyY50WwZt2lv3LPvIP5V4E=</dsig:DigestValue>
17
+        <dsig:DigestValue>iG9uqrG26rbd7WcHjUEQxxnl+ENKzjvczZxe+tS3DOY=</dsig:DigestValue>
18 18
       </hash>
19 19
     </dependentAssembly>
20 20
   </dependency>

BIN
SHENKANG-MES-SYS/obj/Debug/WINPROFIT-ERP-SYS.exe Wyświetl plik


+ 2
- 2
SHENKANG-MES-SYS/obj/Debug/WINPROFIT-ERP-SYS.exe.manifest Wyświetl plik

@@ -43,14 +43,14 @@
43 43
     </dependentAssembly>
44 44
   </dependency>
45 45
   <dependency>
46
-    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="WINPROFIT-ERP-SYS.exe" size="5361080">
46
+    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="WINPROFIT-ERP-SYS.exe" size="5374904">
47 47
       <assemblyIdentity name="WINPROFIT-ERP-SYS" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
48 48
       <hash>
49 49
         <dsig:Transforms>
50 50
           <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
51 51
         </dsig:Transforms>
52 52
         <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
53
-        <dsig:DigestValue>IjNPo+wcVa7x6VP8K4XkYaN7Wy6XL0yJxXqByK/2lnY=</dsig:DigestValue>
53
+        <dsig:DigestValue>YrO0pC4m3tjz/kzUdyfsDbajTTjFR/g6q7J5Jg8bV6Q=</dsig:DigestValue>
54 54
       </hash>
55 55
     </dependentAssembly>
56 56
   </dependency>

BIN
SHENKANG-MES-SYS/obj/Debug/WINPROFIT-ERP-SYS.pdb Wyświetl plik


+ 1
- 1
SHENKANG-MES-SYS/obj/Debug/WINPROFIT-ERP-SYS.vbproj.CoreCompileInputs.cache Wyświetl plik

@@ -1 +1 @@
1
-5fcd95726caf68b74cc6f95392aa65a8824c3357
1
+fc118b45a263188a9c2608194efcbeb61646589b

+ 12
- 2
SHENKANG-MES-SYS/obj/Debug/WINPROFIT-ERP-SYS.vbproj.FileListAbsolute.txt Wyświetl plik

@@ -87,7 +87,6 @@ G:\WINPROFIT-ERP-SYS\SHENKANG-MES-SYS\bin\Debug\WINPROFIT-ERP-SYS.exe.config
87 87
 G:\WINPROFIT-ERP-SYS\SHENKANG-MES-SYS\bin\Debug\WINPROFIT-ERP-SYS.exe
88 88
 G:\WINPROFIT-ERP-SYS\SHENKANG-MES-SYS\bin\Debug\WINPROFIT-ERP-SYS.pdb
89 89
 G:\WINPROFIT-ERP-SYS\SHENKANG-MES-SYS\bin\Debug\WINPROFIT-ERP-SYS.xml
90
-G:\WINPROFIT-ERP-SYS\SHENKANG-MES-SYS\obj\Debug\WINPROFIT-ERP-SYS.vbprojResolveAssemblyReference.cache
91 90
 G:\WINPROFIT-ERP-SYS\SHENKANG-MES-SYS\obj\Debug\WINPROFIT_ERP_SYS.FTP資料夾管理.resources
92 91
 G:\WINPROFIT-ERP-SYS\SHENKANG-MES-SYS\obj\Debug\WINPROFIT_ERP_SYS.LoginForm1.resources
93 92
 G:\WINPROFIT-ERP-SYS\SHENKANG-MES-SYS\obj\Debug\WINPROFIT_ERP_SYS.WINPROFIT_ERP_SYS.resources
@@ -122,7 +121,6 @@ G:\WINPROFIT-ERP-SYS\SHENKANG-MES-SYS\obj\Debug\WINPROFIT_ERP_SYS.簽名檔管
122 121
 G:\WINPROFIT-ERP-SYS\SHENKANG-MES-SYS\obj\Debug\WINPROFIT_ERP_SYS.系統使用者管理.resources
123 122
 G:\WINPROFIT-ERP-SYS\SHENKANG-MES-SYS\obj\Debug\WINPROFIT_ERP_SYS.系統執行檔版本管理.resources
124 123
 G:\WINPROFIT-ERP-SYS\SHENKANG-MES-SYS\obj\Debug\WINPROFIT_ERP_SYS.系統編碼規則_1.resources
125
-G:\WINPROFIT-ERP-SYS\SHENKANG-MES-SYS\obj\Debug\WINPROFIT_ERP_SYS.連線選擇.resources
126 124
 G:\WINPROFIT-ERP-SYS\SHENKANG-MES-SYS\obj\Debug\WINPROFIT_ERP_SYS.Resources.resources
127 125
 G:\WINPROFIT-ERP-SYS\SHENKANG-MES-SYS\obj\Debug\WINPROFIT_ERP_SYS.部件清單控制表.resources
128 126
 G:\WINPROFIT-ERP-SYS\SHENKANG-MES-SYS\obj\Debug\WINPROFIT_ERP_SYS.零用金支付_對帳表.resources
@@ -634,3 +632,15 @@ F:\WINPROFIT-ERP-SYS\SHENKANG-MES-SYS\obj\Debug\WINPROFIT_ERP_SYS.訂單價格
634 632
 F:\WINPROFIT-ERP-SYS\SHENKANG-MES-SYS\obj\Debug\WINPROFIT_ERP_SYS.計算機.resources
635 633
 F:\WINPROFIT-ERP-SYS\SHENKANG-MES-SYS\obj\Debug\WINPROFIT_ERP_SYS.成本資料庫管理.resources
636 634
 F:\WINPROFIT-ERP-SYS\SHENKANG-MES-SYS\obj\Debug\WINPROFIT_ERP_SYS.列印_量產訂單控制表.resources
635
+G:\WINPROFIT-ERP-SYS\SHENKANG-MES-SYS\obj\Debug\WINPROFIT-ERP-SYS.vbprojAssemblyReference.cache
636
+G:\WINPROFIT-ERP-SYS\SHENKANG-MES-SYS\obj\Debug\WINPROFIT_ERP_SYS.SplashScreen1.resources
637
+G:\WINPROFIT-ERP-SYS\SHENKANG-MES-SYS\obj\Debug\WINPROFIT_ERP_SYS.列印_量產訂單控制表.resources
638
+G:\WINPROFIT-ERP-SYS\SHENKANG-MES-SYS\obj\Debug\WINPROFIT_ERP_SYS.成本資料庫管理.resources
639
+G:\WINPROFIT-ERP-SYS\SHENKANG-MES-SYS\obj\Debug\WINPROFIT_ERP_SYS.網段.resources
640
+G:\WINPROFIT-ERP-SYS\SHENKANG-MES-SYS\obj\Debug\WINPROFIT_ERP_SYS.中皮結構_中底作法.resources
641
+G:\WINPROFIT-ERP-SYS\SHENKANG-MES-SYS\obj\Debug\WINPROFIT_ERP_SYS.樣品標籤批量列印.resources
642
+G:\WINPROFIT-ERP-SYS\SHENKANG-MES-SYS\obj\Debug\WINPROFIT_ERP_SYS.製鞋技術資料庫除錯.resources
643
+G:\WINPROFIT-ERP-SYS\SHENKANG-MES-SYS\obj\Debug\WINPROFIT_ERP_SYS.訂單價格利潤明細表.resources
644
+G:\WINPROFIT-ERP-SYS\SHENKANG-MES-SYS\obj\Debug\WINPROFIT_ERP_SYS.計算機.resources
645
+G:\WINPROFIT-ERP-SYS\SHENKANG-MES-SYS\obj\Debug\WINPROFIT_ERP_SYS.量產出貨明細表.resources
646
+G:\WINPROFIT-ERP-SYS\SHENKANG-MES-SYS\obj\Debug\WINPROFIT_ERP_SYS.量產訂單輸入.resources

BIN
SHENKANG-MES-SYS/obj/Debug/WINPROFIT-ERP-SYS.vbproj.GenerateResource.cache Wyświetl plik


BIN
SHENKANG-MES-SYS/obj/Debug/WINPROFIT-ERP-SYS.vbprojAssemblyReference.cache Wyświetl plik


BIN
SHENKANG-MES-SYS/obj/Debug/WINPROFIT-ERP-SYS.vbprojResolveAssemblyReference.cache Wyświetl plik


+ 1
- 1
SHENKANG-MES-SYS/製鞋技術管理系統/楦頭規格表.Designer.vb Wyświetl plik

@@ -1577,7 +1577,7 @@ Partial Class 楦頭規格表
1577 1577
         '
1578 1578
         Me.ComboBox5.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
1579 1579
         Me.ComboBox5.FormattingEnabled = True
1580
-        Me.ComboBox5.Items.AddRange(New Object() {"AT", "ET", "MT", " "})
1580
+        Me.ComboBox5.Items.AddRange(New Object() {"AT", "ET", "MT", "SK", " "})
1581 1581
         Me.ComboBox5.Location = New System.Drawing.Point(92, 25)
1582 1582
         Me.ComboBox5.Name = "ComboBox5"
1583 1583
         Me.ComboBox5.Size = New System.Drawing.Size(109, 24)

+ 69
- 28
SHENKANG-MES-SYS/財務管理系統/零用金支付單一覽表.Designer.vb Wyświetl plik

@@ -25,8 +25,8 @@ Partial Class 零用金支付單一覽表
25 25
         Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
26 26
         Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
27 27
         Me.Label6 = New System.Windows.Forms.Label()
28
-        Me.DataGridView4 = New System.Windows.Forms.DataGridView()
29
-        Me.DataGridView1 = New System.Windows.Forms.DataGridView()
28
+        Me.已審核_dgv = New System.Windows.Forms.DataGridView()
29
+        Me.明細_dgv = New System.Windows.Forms.DataGridView()
30 30
         Me.Label3 = New System.Windows.Forms.Label()
31 31
         Me.TextBox3 = New System.Windows.Forms.TextBox()
32 32
         Me.Label2 = New System.Windows.Forms.Label()
@@ -52,8 +52,11 @@ Partial Class 零用金支付單一覽表
52 52
         Me.Label10 = New System.Windows.Forms.Label()
53 53
         Me.Button1 = New System.Windows.Forms.Button()
54 54
         Me.CheckBox1 = New System.Windows.Forms.CheckBox()
55
-        CType(Me.DataGridView4, System.ComponentModel.ISupportInitialize).BeginInit()
56
-        CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).BeginInit()
55
+        Me.帳本編號_cb = New System.Windows.Forms.ComboBox()
56
+        Me.帳本名稱_cb = New System.Windows.Forms.ComboBox()
57
+        Me.Label11 = New System.Windows.Forms.Label()
58
+        CType(Me.已審核_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
59
+        CType(Me.明細_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
57 60
         CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
58 61
         Me.SuspendLayout()
59 62
         '
@@ -66,29 +69,29 @@ Partial Class 零用金支付單一覽表
66 69
         Me.Label6.TabIndex = 746
67 70
         Me.Label6.Text = "總經理已核准的零用金支付單"
68 71
         '
69
-        'DataGridView4
72
+        '已審核_dgv
70 73
         '
71 74
         DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
72
-        Me.DataGridView4.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
73
-        Me.DataGridView4.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
74
-        Me.DataGridView4.Location = New System.Drawing.Point(12, 37)
75
-        Me.DataGridView4.Name = "DataGridView4"
76
-        Me.DataGridView4.RowHeadersWidth = 5
77
-        Me.DataGridView4.RowTemplate.Height = 24
78
-        Me.DataGridView4.Size = New System.Drawing.Size(947, 927)
79
-        Me.DataGridView4.TabIndex = 745
75
+        Me.已審核_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
76
+        Me.已審核_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
77
+        Me.已審核_dgv.Location = New System.Drawing.Point(12, 37)
78
+        Me.已審核_dgv.Name = "已審核_dgv"
79
+        Me.已審核_dgv.RowHeadersWidth = 5
80
+        Me.已審核_dgv.RowTemplate.Height = 24
81
+        Me.已審核_dgv.Size = New System.Drawing.Size(947, 927)
82
+        Me.已審核_dgv.TabIndex = 745
80 83
         '
81
-        'DataGridView1
84
+        '明細_dgv
82 85
         '
83 86
         DataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
84
-        Me.DataGridView1.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2
85
-        Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
86
-        Me.DataGridView1.Location = New System.Drawing.Point(965, 187)
87
-        Me.DataGridView1.Name = "DataGridView1"
88
-        Me.DataGridView1.RowHeadersWidth = 5
89
-        Me.DataGridView1.RowTemplate.Height = 24
90
-        Me.DataGridView1.Size = New System.Drawing.Size(937, 777)
91
-        Me.DataGridView1.TabIndex = 763
87
+        Me.明細_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2
88
+        Me.明細_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
89
+        Me.明細_dgv.Location = New System.Drawing.Point(965, 187)
90
+        Me.明細_dgv.Name = "明細_dgv"
91
+        Me.明細_dgv.RowHeadersWidth = 5
92
+        Me.明細_dgv.RowTemplate.Height = 24
93
+        Me.明細_dgv.Size = New System.Drawing.Size(937, 777)
94
+        Me.明細_dgv.TabIndex = 763
92 95
         '
93 96
         'Label3
94 97
         '
@@ -318,11 +321,46 @@ Partial Class 零用金支付單一覽表
318 321
         Me.CheckBox1.TabIndex = 811
319 322
         Me.CheckBox1.UseVisualStyleBackColor = True
320 323
         '
324
+        '帳本編號_cb
325
+        '
326
+        Me.帳本編號_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
327
+        Me.帳本編號_cb.ForeColor = System.Drawing.Color.Green
328
+        Me.帳本編號_cb.FormattingEnabled = True
329
+        Me.帳本編號_cb.Items.AddRange(New Object() {"", "LANDED BRANDED", "FIRST COST"})
330
+        Me.帳本編號_cb.Location = New System.Drawing.Point(419, 48)
331
+        Me.帳本編號_cb.Name = "帳本編號_cb"
332
+        Me.帳本編號_cb.Size = New System.Drawing.Size(145, 24)
333
+        Me.帳本編號_cb.TabIndex = 1000
334
+        '
335
+        '帳本名稱_cb
336
+        '
337
+        Me.帳本名稱_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
338
+        Me.帳本名稱_cb.ForeColor = System.Drawing.Color.Green
339
+        Me.帳本名稱_cb.FormattingEnabled = True
340
+        Me.帳本名稱_cb.Items.AddRange(New Object() {"", "LANDED BRANDED", "FIRST COST"})
341
+        Me.帳本名稱_cb.Location = New System.Drawing.Point(419, 6)
342
+        Me.帳本名稱_cb.Name = "帳本名稱_cb"
343
+        Me.帳本名稱_cb.Size = New System.Drawing.Size(145, 24)
344
+        Me.帳本名稱_cb.TabIndex = 999
345
+        '
346
+        'Label11
347
+        '
348
+        Me.Label11.AutoSize = True
349
+        Me.Label11.ForeColor = System.Drawing.Color.Green
350
+        Me.Label11.Location = New System.Drawing.Point(381, 9)
351
+        Me.Label11.Name = "Label11"
352
+        Me.Label11.Size = New System.Drawing.Size(32, 16)
353
+        Me.Label11.TabIndex = 998
354
+        Me.Label11.Text = "帳本"
355
+        '
321 356
         '零用金支付單一覽表
322 357
         '
323 358
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
324 359
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
325 360
         Me.ClientSize = New System.Drawing.Size(1914, 971)
361
+        Me.Controls.Add(Me.帳本編號_cb)
362
+        Me.Controls.Add(Me.帳本名稱_cb)
363
+        Me.Controls.Add(Me.Label11)
326 364
         Me.Controls.Add(Me.CheckBox1)
327 365
         Me.Controls.Add(Me.Button1)
328 366
         Me.Controls.Add(Me.TextBox7)
@@ -342,7 +380,7 @@ Partial Class 零用金支付單一覽表
342 380
         Me.Controls.Add(Me.TextBox13)
343 381
         Me.Controls.Add(Me.Label4)
344 382
         Me.Controls.Add(Me.TextBox4)
345
-        Me.Controls.Add(Me.DataGridView1)
383
+        Me.Controls.Add(Me.明細_dgv)
346 384
         Me.Controls.Add(Me.Label3)
347 385
         Me.Controls.Add(Me.TextBox3)
348 386
         Me.Controls.Add(Me.Label2)
@@ -350,13 +388,13 @@ Partial Class 零用金支付單一覽表
350 388
         Me.Controls.Add(Me.Label1)
351 389
         Me.Controls.Add(Me.TextBox1)
352 390
         Me.Controls.Add(Me.Label6)
353
-        Me.Controls.Add(Me.DataGridView4)
391
+        Me.Controls.Add(Me.已審核_dgv)
354 392
         Me.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
355 393
         Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
356 394
         Me.Name = "零用金支付單一覽表"
357 395
         Me.Text = "零用金支付單一覽表"
358
-        CType(Me.DataGridView4, System.ComponentModel.ISupportInitialize).EndInit()
359
-        CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).EndInit()
396
+        CType(Me.已審核_dgv, System.ComponentModel.ISupportInitialize).EndInit()
397
+        CType(Me.明細_dgv, System.ComponentModel.ISupportInitialize).EndInit()
360 398
         CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
361 399
         Me.ResumeLayout(False)
362 400
         Me.PerformLayout()
@@ -364,8 +402,8 @@ Partial Class 零用金支付單一覽表
364 402
     End Sub
365 403
 
366 404
     Friend WithEvents Label6 As Label
367
-    Friend WithEvents DataGridView4 As DataGridView
368
-    Friend WithEvents DataGridView1 As DataGridView
405
+    Friend WithEvents 已審核_dgv As DataGridView
406
+    Friend WithEvents 明細_dgv As DataGridView
369 407
     Friend WithEvents Label3 As Label
370 408
     Friend WithEvents TextBox3 As TextBox
371 409
     Friend WithEvents Label2 As Label
@@ -391,4 +429,7 @@ Partial Class 零用金支付單一覽表
391 429
     Friend WithEvents Label10 As Label
392 430
     Friend WithEvents Button1 As Button
393 431
     Friend WithEvents CheckBox1 As CheckBox
432
+    Friend WithEvents 帳本編號_cb As ComboBox
433
+    Friend WithEvents 帳本名稱_cb As ComboBox
434
+    Friend WithEvents Label11 As Label
394 435
 End Class

+ 60
- 52
SHENKANG-MES-SYS/財務管理系統/零用金支付單一覽表.vb Wyświetl plik

@@ -1,41 +1,35 @@
1 1
 Option Strict Off
2
-Imports System.Data.SqlClient
3 2
 Imports System.IO
4 3
 Public Class 零用金支付單一覽表
5
-    Dim conn As New SqlConnection
6
-    Dim da As New SqlDataAdapter
7
-    Dim cmd As New SqlCommand
8
-    Dim ds As New DataSet : Dim ds1 As New DataSet : Dim ds2 As New DataSet : Dim ds3 As New DataSet : Dim ds4 As New DataSet
9
-    Dim dr As SqlDataReader
4
+    ReadOnly ds As New DataSet : ReadOnly ds1 As New DataSet : ReadOnly ds2 As New DataSet : ReadOnly ds3 As New DataSet : ReadOnly ds4 As New DataSet
10 5
     Dim DTP As String
11
-    Private Sub Set_使用者清單()
12
-        DataGridView1.DataSource = Nothing : ds.Clear()
13
-        DataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
14
-        DataGridView1.ColumnHeadersHeight = 25
15
-        DataGridView1.AllowUserToAddRows = False
16
-        If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
17
-        SQL1 = "SELECT 流水號, 項次, 用途, 金額, 備註 FROM 零用金支付明細 WHERE 流水號 LIKE N'" & TextBox1.Text & "' ORDER BY 項次"
18
-        列印用SQL2 = SQL1
19
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds) : DataGridView1.DataSource = ds.Tables(0) : conn.Close() : Set_grid()
20
-    End Sub
21
-    Private Sub Set_grid()
22
-        DataGridView1.Columns(0).Visible = False : DataGridView1.Columns(1).Width = 80 : DataGridView1.Columns(2).Width = 342 : DataGridView1.Columns(3).Width = 140 : DataGridView1.Columns(4).Width = 350
23
-        DataGridView1.Columns(3).DefaultCellStyle.Format = "#,##0.00"
24
-        DataGridView1.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
25
-        DataGridView1.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
26
-        DataGridView1.EditMode = DataGridViewEditMode.EditOnEnter
6
+    Private Sub Set_財務單清單()
7
+        明細_dgv.DataSource = Nothing : ds.Clear()
8
+        明細_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
9
+        明細_dgv.ColumnHeadersHeight = 25
10
+        明細_dgv.AllowUserToAddRows = False
11
+
12
+        PA1 = TextBox1.Text : SQL_財務帳清單() : 列印用SQL2 = SQL1
13
+        da.Fill(ds) : 明細_dgv.DataSource = ds.Tables(0) : conn.Close()
14
+
15
+        明細_dgv.Columns(0).Visible = False : 明細_dgv.Columns(1).Width = 80 : 明細_dgv.Columns(2).Width = 342
16
+        明細_dgv.Columns(3).Width = 140 : 明細_dgv.Columns(4).Width = 350
17
+        明細_dgv.Columns(3).DefaultCellStyle.Format = "#,##0.00"
18
+        明細_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
19
+        明細_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
20
+        明細_dgv.EditMode = DataGridViewEditMode.EditOnEnter
27 21
 
28 22
         TextBox7.Text = "0.00"
29
-        For i As Integer = 0 To DataGridView1.Rows.Count - 1
30
-            TextBox7.Text = Val(TextBox7.Text) + DataGridView1.Rows(i).Cells("金額").Value
23
+        For i As Integer = 0 To 明細_dgv.Rows.Count - 1
24
+            TextBox7.Text = Val(TextBox7.Text) + 明細_dgv.Rows(i).Cells("金額").Value
31 25
         Next i
32 26
         TextBox7.Text = Format(Val(TextBox7.Text), "#,##0.00")
33 27
     End Sub
34 28
     Private Sub Set_清單3()
35
-        DataGridView4.DataSource = Nothing : ds3.Clear()
36
-        DataGridView4.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
37
-        DataGridView4.ColumnHeadersHeight = 25
38
-        DataGridView4.AllowUserToAddRows = False
29
+        已審核_dgv.DataSource = Nothing : ds3.Clear()
30
+        已審核_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
31
+        已審核_dgv.ColumnHeadersHeight = 25
32
+        已審核_dgv.AllowUserToAddRows = False
39 33
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
40 34
         If 登入人部門 = "NA" Then
41 35
             SQL1 = "SELECT 零用金支付表.流水號, 零用金支付表.部門, 零用金支付表.申請人, LEFT(零用金支付表.申請日期, 10) AS 申請日期, 
@@ -45,7 +39,7 @@ Public Class 零用金支付單一覽表
45 39
                     FROM 零用金支付表 INNER JOIN
46 40
                            零用金支付明細 ON 零用金支付表.流水號 = 零用金支付明細.流水號
47 41
                     WHERE (零用金支付表.審核人 NOT LIKE N'作廢%') AND (零用金支付表.審核人 NOT LIKE N'') AND 
48
-                            (零用金支付表.核准人 NOT LIKE N'作廢%') AND (零用金支付表.核准人 NOT LIKE N'')
42
+                            (零用金支付表.核准人 NOT LIKE N'作廢%') AND (零用金支付表.核准人 NOT LIKE N'') AND (帳本編號 LIKE '" & 帳本編號_cb.Text & "')
49 43
                     GROUP BY 零用金支付表.流水號, 零用金支付表.部門, 零用金支付表.申請人, LEFT(零用金支付表.申請日期, 10), 
50 44
                             零用金支付表.審核人, LEFT(零用金支付表.審核日期, 10), 零用金支付表.核准人, LEFT(零用金支付表.核准日期, 10), 
51 45
                             零用金支付表.核准圖檔, 零用金支付表.簽名編碼, 零用金支付明細.出納
@@ -58,42 +52,46 @@ Public Class 零用金支付單一覽表
58 52
                     FROM 零用金支付表 INNER JOIN
59 53
                            零用金支付明細 ON 零用金支付表.流水號 = 零用金支付明細.流水號
60 54
                     WHERE (零用金支付表.申請人 LIKE N'" & gUserName & "') AND (零用金支付表.審核人 NOT LIKE N'作廢%') AND (零用金支付表.審核人 NOT LIKE N'') AND 
61
-                          (零用金支付表.核准人 NOT LIKE N'作廢%') AND (零用金支付表.核准人 NOT LIKE N'')
55
+                          (零用金支付表.核准人 NOT LIKE N'作廢%') AND (零用金支付表.核准人 NOT LIKE N'') AND (帳本編號 LIKE '" & 帳本編號_cb.Text & "')
62 56
                     GROUP BY 零用金支付表.流水號, 零用金支付表.部門, 零用金支付表.申請人, LEFT(零用金支付表.申請日期, 10), 
63 57
                             零用金支付表.審核人, LEFT(零用金支付表.審核日期, 10), 零用金支付表.核准人, LEFT(零用金支付表.核准日期, 10), 
64 58
                             零用金支付表.核准圖檔, 零用金支付表.簽名編碼, 零用金支付明細.出納
65 59
                     ORDER BY 零用金支付表.流水號 DESC"
66 60
         End If
67
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds3) : DataGridView4.DataSource = ds3.Tables(0) : conn.Close() : Set_grid3()
61
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds3) : 已審核_dgv.DataSource = ds3.Tables(0) : conn.Close() : Set_grid3()
68 62
     End Sub
69 63
     Private Sub Set_grid3()
70
-        DataGridView4.Columns(0).Width = 120 : DataGridView4.Columns(1).Width = 114 : DataGridView4.Columns(2).Visible = False : DataGridView4.Columns(3).Width = 115 : DataGridView4.Columns(4).Width = 115
71
-        DataGridView4.Columns(5).Width = 115 : DataGridView4.Columns(6).Width = 115 : DataGridView4.Columns(7).Width = 115 : DataGridView4.Columns(8).Visible = False
72
-        DataGridView4.Columns(9).Visible = False : DataGridView4.Columns(10).Width = 113
73
-        For i As Integer = 0 To DataGridView4.Rows.Count - 1
74
-            If DataGridView4.Rows(i).Cells("已出納").Value Is DBNull.Value Then
75
-                DataGridView4.Rows(i).Cells("已出納").Value = False
64
+        已審核_dgv.Columns(0).Width = 120 : 已審核_dgv.Columns(1).Width = 114 : 已審核_dgv.Columns(2).Visible = False : 已審核_dgv.Columns(3).Width = 115 : 已審核_dgv.Columns(4).Width = 115
65
+        已審核_dgv.Columns(5).Width = 115 : 已審核_dgv.Columns(6).Width = 115 : 已審核_dgv.Columns(7).Width = 115 : 已審核_dgv.Columns(8).Visible = False
66
+        已審核_dgv.Columns(9).Visible = False : 已審核_dgv.Columns(10).Width = 113
67
+        For i As Integer = 0 To 已審核_dgv.Rows.Count - 1
68
+            If 已審核_dgv.Rows(i).Cells("已出納").Value Is DBNull.Value Then
69
+                已審核_dgv.Rows(i).Cells("已出納").Value = False
76 70
             End If
77 71
         Next
78 72
     End Sub
73
+    Private Sub ComboBox1下拉表單資料載入()
74
+        SQL_帳本下拉清單()
75
+        帳本名稱_cb.Items.Clear() : 帳本編號_cb.Items.Clear() : While (dr.Read()) : 帳本名稱_cb.Items.Add(dr("帳本名稱")) : 帳本編號_cb.Items.Add(dr("編號")) : End While : conn.Close()
76
+    End Sub
79 77
     Private Sub 零用金支付單列印_Load(sender As Object, e As EventArgs) Handles MyBase.Load
80 78
         Me.MdiParent = WINPROFIT_ERP_SYS : Me.WindowState = 2 : Me.AutoScroll = True
81
-        TextBox6.Visible = False
82
-        Set_清單3()
79
+        TextBox6.Visible = False : 帳本編號_cb.Visible = False
80
+        ComboBox1下拉表單資料載入() : 帳本名稱_cb.SelectedIndex = 0 : PA19 = 帳本編號_cb.Text : Set_清單3()
83 81
     End Sub
84
-    Private Sub DataGridView4_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles DataGridView4.CellClick
82
+    Private Sub DataGridView4_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 已審核_dgv.CellClick
85 83
         If e.RowIndex = -1 Then : Else
86
-            TextBox1.Text = DataGridView4(0, e.RowIndex).Value.ToString : TextBox2.Text = DataGridView4(1, e.RowIndex).Value.ToString : TextBox3.Text = DataGridView4(2, e.RowIndex).Value.ToString
87
-            TextBox4.Text = DataGridView4(4, e.RowIndex).Value.ToString : TextBox5.Text = DataGridView4(6, e.RowIndex).Value.ToString : TextBox13.Text = DataGridView4(9, e.RowIndex).Value.ToString
88
-            TextBox6.Text = DataGridView4(8, e.RowIndex).Value.ToString : CheckBox1.Checked = DataGridView4(10, e.RowIndex).Value
89
-            DateTimePicker1.Value = DataGridView4(3, e.RowIndex).Value.ToString : DateTimePicker2.Value = DataGridView4(5, e.RowIndex).Value.ToString
90
-            DateTimePicker3.Value = DataGridView4(7, e.RowIndex).Value.ToString
91
-            列印用SQL = DataGridView4(0, e.RowIndex).Value.ToString
84
+            TextBox1.Text = 已審核_dgv(0, e.RowIndex).Value.ToString : TextBox2.Text = 已審核_dgv(1, e.RowIndex).Value.ToString : TextBox3.Text = 已審核_dgv(2, e.RowIndex).Value.ToString
85
+            TextBox4.Text = 已審核_dgv(4, e.RowIndex).Value.ToString : TextBox5.Text = 已審核_dgv(6, e.RowIndex).Value.ToString : TextBox13.Text = 已審核_dgv(9, e.RowIndex).Value.ToString
86
+            TextBox6.Text = 已審核_dgv(8, e.RowIndex).Value.ToString : CheckBox1.Checked = 已審核_dgv(10, e.RowIndex).Value
87
+            DateTimePicker1.Value = 已審核_dgv(3, e.RowIndex).Value.ToString : DateTimePicker2.Value = 已審核_dgv(5, e.RowIndex).Value.ToString
88
+            DateTimePicker3.Value = 已審核_dgv(7, e.RowIndex).Value.ToString
89
+            列印用SQL = 已審核_dgv(0, e.RowIndex).Value.ToString
92 90
             簽核圖片編號 = TextBox6.Text
93 91
 
94
-            Set_使用者清單()
92
+            Set_財務單清單()
95 93
             If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
96
-            SQL1 = "SELECT 簽名檔圖片 FROM 簽名檔管理 WHERE 圖片流水號 LIKE N'" & DataGridView4(8, e.RowIndex).Value.ToString & "'"
94
+            SQL1 = "SELECT 簽名檔圖片 FROM 簽名檔管理 WHERE 圖片流水號 LIKE N'" & 已審核_dgv(8, e.RowIndex).Value.ToString & "'"
97 95
             cmd.Connection = conn : cmd.CommandText = SQL1 : dr = cmd.ExecuteReader
98 96
             While dr.Read() = True
99 97
                 Dim bytes As Byte() = New Byte(-1) {}
@@ -117,15 +115,25 @@ Public Class 零用金支付單一覽表
117 115
     End Sub
118 116
     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
119 117
         Set_日期格式轉換()
120
-        For i As Integer = 0 To DataGridView4.Rows.Count - 1
121
-            資料數 = DataGridView4.Rows.Count : MyModule1.進度條()
118
+        For i As Integer = 0 To 已審核_dgv.Rows.Count - 1
119
+            資料數 = 已審核_dgv.Rows.Count : MyModule1.進度條()
122 120
             If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
123
-            SQL1 = "UPDATE 零用金支付明細 SET 出納 = N'" & DataGridView4.Rows(i).Cells("已出納").Value & "' WHERE 流水號 LIKE N'" & DataGridView4.Rows(i).Cells("流水號").Value & "'"
121
+            SQL1 = "UPDATE 零用金支付明細 SET 出納 = N'" & 已審核_dgv.Rows(i).Cells("已出納").Value & "' WHERE 流水號 LIKE N'" & 已審核_dgv.Rows(i).Cells("流水號").Value & "'"
124 122
             cmd.Connection = conn : cmd.CommandText = SQL1 : cmd.ExecuteNonQuery() : conn.Close()
125 123
             If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
126
-            SQL1 = "UPDATE 零用金支付表 SET 出納 = N'" & gUserName & "', 出納日期 = '" & DTP & "' WHERE 流水號 LIKE N'" & DataGridView4.Rows(i).Cells("流水號").Value & "'"
124
+            SQL1 = "UPDATE 零用金支付表 SET 出納 = N'" & gUserName & "', 出納日期 = '" & DTP & "' WHERE 流水號 LIKE N'" & 已審核_dgv.Rows(i).Cells("流水號").Value & "'"
127 125
             cmd.Connection = conn : cmd.CommandText = SQL1 : cmd.ExecuteNonQuery() : conn.Close()
128 126
         Next : WINPROFIT_ERP_SYS.ToolStripProgressBar1.Value = 0 : 最終數 = 0
129 127
         MsgBox("存檔完成")
130 128
     End Sub
129
+    Private Sub 帳本名稱_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 帳本名稱_cb.SelectedIndexChanged
130
+        帳本編號_cb.SelectedIndex = 帳本名稱_cb.SelectedIndex : PA19 = 帳本編號_cb.Text : Set_清單3()
131
+        TextBox4.Text = "" : TextBox5.Text = "" : TextBox13.Text = "" : TextBox6.Text = ""
132
+        TextBox1.Text = "" : TextBox2.Text = "" : TextBox3.Text = "" : Set_財務單清單()
133
+    End Sub
134
+    Private Sub 帳本編號_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 帳本編號_cb.SelectedIndexChanged
135
+        帳本名稱_cb.SelectedIndex = 帳本編號_cb.SelectedIndex : PA19 = 帳本編號_cb.Text : Set_清單3()
136
+        TextBox4.Text = "" : TextBox5.Text = "" : TextBox13.Text = "" : TextBox6.Text = ""
137
+        TextBox1.Text = "" : TextBox2.Text = "" : TextBox3.Text = "" : Set_財務單清單()
138
+    End Sub
131 139
 End Class

+ 84
- 43
SHENKANG-MES-SYS/財務管理系統/零用金支付審核.Designer.vb Wyświetl plik

@@ -27,23 +27,26 @@ Partial Class 零用金支付審核
27 27
         Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
28 28
         Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
29 29
         Me.Label5 = New System.Windows.Forms.Label()
30
-        Me.DataGridView3 = New System.Windows.Forms.DataGridView()
30
+        Me.一級作廢_dgv = New System.Windows.Forms.DataGridView()
31 31
         Me.Label4 = New System.Windows.Forms.Label()
32
-        Me.DataGridView2 = New System.Windows.Forms.DataGridView()
32
+        Me.一級未審核_dgv = New System.Windows.Forms.DataGridView()
33 33
         Me.Label3 = New System.Windows.Forms.Label()
34 34
         Me.TextBox3 = New System.Windows.Forms.TextBox()
35 35
         Me.Label2 = New System.Windows.Forms.Label()
36 36
         Me.TextBox2 = New System.Windows.Forms.TextBox()
37 37
         Me.Label1 = New System.Windows.Forms.Label()
38 38
         Me.TextBox1 = New System.Windows.Forms.TextBox()
39
-        Me.DataGridView1 = New System.Windows.Forms.DataGridView()
39
+        Me.明細_dgv = New System.Windows.Forms.DataGridView()
40 40
         Me.Button2 = New System.Windows.Forms.Button()
41 41
         Me.Button1 = New System.Windows.Forms.Button()
42 42
         Me.TextBox5 = New System.Windows.Forms.TextBox()
43 43
         Me.Label8 = New System.Windows.Forms.Label()
44
-        CType(Me.DataGridView3, System.ComponentModel.ISupportInitialize).BeginInit()
45
-        CType(Me.DataGridView2, System.ComponentModel.ISupportInitialize).BeginInit()
46
-        CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).BeginInit()
44
+        Me.帳本編號_cb = New System.Windows.Forms.ComboBox()
45
+        Me.帳本名稱_cb = New System.Windows.Forms.ComboBox()
46
+        Me.Label9 = New System.Windows.Forms.Label()
47
+        CType(Me.一級作廢_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
48
+        CType(Me.一級未審核_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
49
+        CType(Me.明細_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
47 50
         Me.SuspendLayout()
48 51
         '
49 52
         'Label5
@@ -55,17 +58,17 @@ Partial Class 零用金支付審核
55 58
         Me.Label5.TabIndex = 742
56 59
         Me.Label5.Text = "主管作廢的零用金支付單"
57 60
         '
58
-        'DataGridView3
61
+        '一級作廢_dgv
59 62
         '
60 63
         DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
61
-        Me.DataGridView3.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
62
-        Me.DataGridView3.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
63
-        Me.DataGridView3.Location = New System.Drawing.Point(12, 529)
64
-        Me.DataGridView3.Name = "DataGridView3"
65
-        Me.DataGridView3.RowHeadersWidth = 5
66
-        Me.DataGridView3.RowTemplate.Height = 24
67
-        Me.DataGridView3.Size = New System.Drawing.Size(944, 435)
68
-        Me.DataGridView3.TabIndex = 741
64
+        Me.一級作廢_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
65
+        Me.一級作廢_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
66
+        Me.一級作廢_dgv.Location = New System.Drawing.Point(12, 529)
67
+        Me.一級作廢_dgv.Name = "一級作廢_dgv"
68
+        Me.一級作廢_dgv.RowHeadersWidth = 5
69
+        Me.一級作廢_dgv.RowTemplate.Height = 24
70
+        Me.一級作廢_dgv.Size = New System.Drawing.Size(944, 435)
71
+        Me.一級作廢_dgv.TabIndex = 741
69 72
         '
70 73
         'Label4
71 74
         '
@@ -76,17 +79,17 @@ Partial Class 零用金支付審核
76 79
         Me.Label4.TabIndex = 740
77 80
         Me.Label4.Text = "未審核的零用金支付單"
78 81
         '
79
-        'DataGridView2
82
+        '一級未審核_dgv
80 83
         '
81 84
         DataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
82
-        Me.DataGridView2.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2
83
-        Me.DataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
84
-        Me.DataGridView2.Location = New System.Drawing.Point(12, 37)
85
-        Me.DataGridView2.Name = "DataGridView2"
86
-        Me.DataGridView2.RowHeadersWidth = 5
87
-        Me.DataGridView2.RowTemplate.Height = 24
88
-        Me.DataGridView2.Size = New System.Drawing.Size(944, 450)
89
-        Me.DataGridView2.TabIndex = 739
85
+        Me.一級未審核_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2
86
+        Me.一級未審核_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
87
+        Me.一級未審核_dgv.Location = New System.Drawing.Point(12, 37)
88
+        Me.一級未審核_dgv.Name = "一級未審核_dgv"
89
+        Me.一級未審核_dgv.RowHeadersWidth = 5
90
+        Me.一級未審核_dgv.RowTemplate.Height = 24
91
+        Me.一級未審核_dgv.Size = New System.Drawing.Size(944, 450)
92
+        Me.一級未審核_dgv.TabIndex = 739
90 93
         '
91 94
         'Label3
92 95
         '
@@ -136,19 +139,19 @@ Partial Class 零用金支付審核
136 139
         Me.TextBox1.Size = New System.Drawing.Size(282, 23)
137 140
         Me.TextBox1.TabIndex = 743
138 141
         '
139
-        'DataGridView1
142
+        '明細_dgv
140 143
         '
141 144
         DataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
142
-        Me.DataGridView1.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
143
-        Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
144
-        Me.DataGridView1.Location = New System.Drawing.Point(965, 126)
145
-        Me.DataGridView1.Name = "DataGridView1"
146
-        Me.DataGridView1.RowHeadersWidth = 5
145
+        Me.明細_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
146
+        Me.明細_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
147
+        Me.明細_dgv.Location = New System.Drawing.Point(965, 126)
148
+        Me.明細_dgv.Name = "明細_dgv"
149
+        Me.明細_dgv.RowHeadersWidth = 5
147 150
         DataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
148
-        Me.DataGridView1.RowsDefaultCellStyle = DataGridViewCellStyle4
149
-        Me.DataGridView1.RowTemplate.Height = 24
150
-        Me.DataGridView1.Size = New System.Drawing.Size(937, 838)
151
-        Me.DataGridView1.TabIndex = 749
151
+        Me.明細_dgv.RowsDefaultCellStyle = DataGridViewCellStyle4
152
+        Me.明細_dgv.RowTemplate.Height = 24
153
+        Me.明細_dgv.Size = New System.Drawing.Size(937, 838)
154
+        Me.明細_dgv.TabIndex = 749
152 155
         '
153 156
         'Button2
154 157
         '
@@ -188,16 +191,51 @@ Partial Class 零用金支付審核
188 191
         Me.Label8.TabIndex = 769
189 192
         Me.Label8.Text = "總金額"
190 193
         '
194
+        '帳本編號_cb
195
+        '
196
+        Me.帳本編號_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
197
+        Me.帳本編號_cb.ForeColor = System.Drawing.Color.Green
198
+        Me.帳本編號_cb.FormattingEnabled = True
199
+        Me.帳本編號_cb.Items.AddRange(New Object() {"", "LANDED BRANDED", "FIRST COST"})
200
+        Me.帳本編號_cb.Location = New System.Drawing.Point(805, 49)
201
+        Me.帳本編號_cb.Name = "帳本編號_cb"
202
+        Me.帳本編號_cb.Size = New System.Drawing.Size(145, 24)
203
+        Me.帳本編號_cb.TabIndex = 997
204
+        '
205
+        '帳本名稱_cb
206
+        '
207
+        Me.帳本名稱_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
208
+        Me.帳本名稱_cb.ForeColor = System.Drawing.Color.Green
209
+        Me.帳本名稱_cb.FormattingEnabled = True
210
+        Me.帳本名稱_cb.Items.AddRange(New Object() {"", "LANDED BRANDED", "FIRST COST"})
211
+        Me.帳本名稱_cb.Location = New System.Drawing.Point(805, 7)
212
+        Me.帳本名稱_cb.Name = "帳本名稱_cb"
213
+        Me.帳本名稱_cb.Size = New System.Drawing.Size(145, 24)
214
+        Me.帳本名稱_cb.TabIndex = 996
215
+        '
216
+        'Label9
217
+        '
218
+        Me.Label9.AutoSize = True
219
+        Me.Label9.ForeColor = System.Drawing.Color.Green
220
+        Me.Label9.Location = New System.Drawing.Point(767, 10)
221
+        Me.Label9.Name = "Label9"
222
+        Me.Label9.Size = New System.Drawing.Size(32, 16)
223
+        Me.Label9.TabIndex = 995
224
+        Me.Label9.Text = "帳本"
225
+        '
191 226
         '零用金支付審核
192 227
         '
193 228
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
194 229
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
195 230
         Me.ClientSize = New System.Drawing.Size(1914, 971)
231
+        Me.Controls.Add(Me.帳本編號_cb)
232
+        Me.Controls.Add(Me.帳本名稱_cb)
233
+        Me.Controls.Add(Me.Label9)
196 234
         Me.Controls.Add(Me.TextBox5)
197 235
         Me.Controls.Add(Me.Label8)
198 236
         Me.Controls.Add(Me.Button2)
199 237
         Me.Controls.Add(Me.Button1)
200
-        Me.Controls.Add(Me.DataGridView1)
238
+        Me.Controls.Add(Me.明細_dgv)
201 239
         Me.Controls.Add(Me.Label3)
202 240
         Me.Controls.Add(Me.TextBox3)
203 241
         Me.Controls.Add(Me.Label2)
@@ -205,34 +243,37 @@ Partial Class 零用金支付審核
205 243
         Me.Controls.Add(Me.Label1)
206 244
         Me.Controls.Add(Me.TextBox1)
207 245
         Me.Controls.Add(Me.Label5)
208
-        Me.Controls.Add(Me.DataGridView3)
246
+        Me.Controls.Add(Me.一級作廢_dgv)
209 247
         Me.Controls.Add(Me.Label4)
210
-        Me.Controls.Add(Me.DataGridView2)
248
+        Me.Controls.Add(Me.一級未審核_dgv)
211 249
         Me.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
212 250
         Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
213 251
         Me.Name = "零用金支付審核"
214 252
         Me.Text = "零用金支付審核"
215
-        CType(Me.DataGridView3, System.ComponentModel.ISupportInitialize).EndInit()
216
-        CType(Me.DataGridView2, System.ComponentModel.ISupportInitialize).EndInit()
217
-        CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).EndInit()
253
+        CType(Me.一級作廢_dgv, System.ComponentModel.ISupportInitialize).EndInit()
254
+        CType(Me.一級未審核_dgv, System.ComponentModel.ISupportInitialize).EndInit()
255
+        CType(Me.明細_dgv, System.ComponentModel.ISupportInitialize).EndInit()
218 256
         Me.ResumeLayout(False)
219 257
         Me.PerformLayout()
220 258
 
221 259
     End Sub
222 260
 
223 261
     Friend WithEvents Label5 As Label
224
-    Friend WithEvents DataGridView3 As DataGridView
262
+    Friend WithEvents 一級作廢_dgv As DataGridView
225 263
     Friend WithEvents Label4 As Label
226
-    Friend WithEvents DataGridView2 As DataGridView
264
+    Friend WithEvents 一級未審核_dgv As DataGridView
227 265
     Friend WithEvents Label3 As Label
228 266
     Friend WithEvents TextBox3 As TextBox
229 267
     Friend WithEvents Label2 As Label
230 268
     Friend WithEvents TextBox2 As TextBox
231 269
     Friend WithEvents Label1 As Label
232 270
     Friend WithEvents TextBox1 As TextBox
233
-    Friend WithEvents DataGridView1 As DataGridView
271
+    Friend WithEvents 明細_dgv As DataGridView
234 272
     Friend WithEvents Button2 As Button
235 273
     Friend WithEvents Button1 As Button
236 274
     Friend WithEvents TextBox5 As TextBox
237 275
     Friend WithEvents Label8 As Label
276
+    Friend WithEvents 帳本編號_cb As ComboBox
277
+    Friend WithEvents 帳本名稱_cb As ComboBox
278
+    Friend WithEvents Label9 As Label
238 279
 End Class

+ 60
- 64
SHENKANG-MES-SYS/財務管理系統/零用金支付審核.vb Wyświetl plik

@@ -1,87 +1,75 @@
1 1
 Option Strict Off
2
-Imports System.Data.SqlClient
3 2
 Public Class 零用金支付審核
4
-    Dim conn As New SqlConnection
5
-    Dim da As New SqlDataAdapter
6
-    Dim cmd As New SqlCommand
7 3
     Dim ds As New DataSet : Dim ds1 As New DataSet : Dim ds2 As New DataSet
8
-    Dim dr As SqlDataReader
9 4
     Dim DTP As String
10
-    Private Sub Set_使用者清單()
11
-        DataGridView1.DataSource = Nothing : ds.Clear()
12
-        DataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
13
-        DataGridView1.ColumnHeadersHeight = 25
14
-        DataGridView1.AllowUserToAddRows = False
15
-        DataGridView1.RowTemplate.Height = 35
16
-        If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
17
-        SQL1 = "SELECT 流水號, 項次, 用途, 金額, 備註 FROM 零用金支付明細 WHERE 流水號 LIKE N'" & TextBox1.Text & "' ORDER BY 項次"
18
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds) : DataGridView1.DataSource = ds.Tables(0) : conn.Close() : Set_grid()
19
-    End Sub
20
-    Private Sub Set_grid()
21
-        DataGridView1.Columns(0).Visible = False : DataGridView1.Columns(1).Width = 80 : DataGridView1.Columns(2).Width = 342 : DataGridView1.Columns(3).Width = 140 : DataGridView1.Columns(4).Width = 350
22
-        DataGridView1.Columns(3).DefaultCellStyle.Format = "#,##0.00"
23
-        DataGridView1.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
24
-        DataGridView1.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
25
-        DataGridView1.EditMode = DataGridViewEditMode.EditOnEnter
5
+    Private Sub Set_財務單清單()
6
+        明細_dgv.DataSource = Nothing : ds.Clear()
7
+        明細_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
8
+        明細_dgv.ColumnHeadersHeight = 25
9
+        明細_dgv.AllowUserToAddRows = False
10
+        明細_dgv.RowTemplate.Height = 35
11
+
12
+        PA1 = TextBox1.Text : SQL_財務帳清單()
13
+        da.Fill(ds) : 明細_dgv.DataSource = ds.Tables(0) : conn.Close()
14
+
15
+        明細_dgv.Columns(0).Visible = False : 明細_dgv.Columns(1).Width = 80 : 明細_dgv.Columns(2).Width = 342 : 明細_dgv.Columns(3).Width = 140 : 明細_dgv.Columns(4).Width = 350
16
+        明細_dgv.Columns(3).DefaultCellStyle.Format = "#,##0.00"
17
+        明細_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
18
+        明細_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
19
+        明細_dgv.EditMode = DataGridViewEditMode.EditOnEnter
26 20
 
27 21
         TextBox5.Text = "0.00"
28
-        For i As Integer = 0 To DataGridView1.Rows.Count - 1
29
-            TextBox5.Text = Val(TextBox5.Text) + DataGridView1.Rows(i).Cells("金額").Value
22
+        For i As Integer = 0 To 明細_dgv.Rows.Count - 1
23
+            TextBox5.Text = Val(TextBox5.Text) + 明細_dgv.Rows(i).Cells("金額").Value
30 24
         Next i
31 25
         TextBox5.Text = Format(Val(TextBox5.Text), "#,##0.00")
32 26
     End Sub
33 27
     Private Sub Set_清單1()
34
-        DataGridView2.DataSource = Nothing : ds1.Clear()
35
-        DataGridView2.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
36
-        DataGridView2.ColumnHeadersHeight = 25
37
-        DataGridView2.AllowUserToAddRows = False
38
-        If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
39
-        If gUserName = "李協叡" Or 登入人部門 = "NA" Then
40
-            SQL1 = "SELECT 流水號, 部門, 申請人, LEFT(申請日期, 10) AS 申請日期, 審核人, LEFT(審核日期, 10) AS 審核日期, 核准人, LEFT(核准日期, 10) AS 核准日期 FROM 零用金支付表 " &
41
-                   "WHERE (審核人 LIKE N'') ORDER BY 流水號 DESC"
42
-        Else
43
-            SQL1 = "SELECT 流水號, 部門, 申請人, LEFT(申請日期, 10) AS 申請日期, 審核人, LEFT(審核日期, 10) AS 審核日期, 核准人, LEFT(核准日期, 10) AS 核准日期 FROM 零用金支付表 " &
44
-                   "WHERE (部門 LIKE N'" & 登入人部門 & "%') AND (審核人 LIKE N'') ORDER BY 流水號 DESC"
45
-        End If
46
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds1) : DataGridView2.DataSource = ds1.Tables(0) : conn.Close() : Set_grid1()
47
-    End Sub
48
-    Private Sub Set_grid1()
49
-        DataGridView2.Columns(0).Width = 120 : DataGridView2.Columns(1).Width = 114 : DataGridView2.Columns(2).Width = 114 : DataGridView2.Columns(3).Width = 115 : DataGridView2.Columns(4).Width = 115
50
-        DataGridView2.Columns(5).Width = 115 : DataGridView2.Columns(6).Width = 115 : DataGridView2.Columns(7).Width = 115
28
+        一級未審核_dgv.DataSource = Nothing : ds1.Clear()
29
+        一級未審核_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
30
+        一級未審核_dgv.ColumnHeadersHeight = 25
31
+        一級未審核_dgv.AllowUserToAddRows = False
32
+
33
+        PA = "審核介面_一級未審核" : SQL_財務單據()
34
+        da.Fill(ds1) : 一級未審核_dgv.DataSource = ds1.Tables(0) : conn.Close()
35
+
36
+        一級未審核_dgv.Columns(0).Width = 120 : 一級未審核_dgv.Columns(1).Width = 114 : 一級未審核_dgv.Columns(2).Width = 114 : 一級未審核_dgv.Columns(3).Width = 115
37
+        一級未審核_dgv.Columns(4).Width = 115 : 一級未審核_dgv.Columns(5).Width = 115 : 一級未審核_dgv.Columns(6).Width = 115 : 一級未審核_dgv.Columns(7).Width = 115
38
+        一級未審核_dgv.Columns(8).Visible = False : 一級未審核_dgv.Columns(9).Visible = False
51 39
     End Sub
52 40
     Private Sub Set_清單2()
53
-        DataGridView3.DataSource = Nothing : ds2.Clear()
54
-        DataGridView3.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
55
-        DataGridView3.ColumnHeadersHeight = 25
56
-        DataGridView3.AllowUserToAddRows = False
57
-        If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
58
-        If gUserName = "李協叡" Then
59
-            SQL1 = "SELECT 流水號, 部門, 申請人, LEFT(申請日期, 10) AS 申請日期, 審核人, LEFT(審核日期, 10) AS 審核日期, 核准人, LEFT(核准日期, 10) AS 核准日期, 備註 FROM 零用金支付表 " &
60
-                   "WHERE (審核人 LIKE N'作廢%') ORDER BY 流水號 DESC"
61
-        Else
62
-            SQL1 = "SELECT 流水號, 部門, 申請人, LEFT(申請日期, 10) AS 申請日期, 審核人, LEFT(審核日期, 10) AS 審核日期, 核准人, LEFT(核准日期, 10) AS 核准日期, 備註 FROM 零用金支付表 " &
63
-                   "WHERE (部門 LIKE N'" & 登入人部門 & "%') AND (審核人 LIKE N'作廢%') ORDER BY 流水號 DESC"
64
-        End If
65
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds2) : DataGridView3.DataSource = ds2.Tables(0) : conn.Close() : Set_grid2()
41
+        一級作廢_dgv.DataSource = Nothing : ds2.Clear()
42
+        一級作廢_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
43
+        一級作廢_dgv.ColumnHeadersHeight = 25
44
+        一級作廢_dgv.AllowUserToAddRows = False
45
+
46
+        PA = "審核介面_一級作廢" : SQL_財務單據()
47
+        da.Fill(ds2) : 一級作廢_dgv.DataSource = ds2.Tables(0) : conn.Close()
48
+
49
+        一級作廢_dgv.Columns(0).Width = 120 : 一級作廢_dgv.Columns(1).Width = 114 : 一級作廢_dgv.Columns(2).Width = 114 : 一級作廢_dgv.Columns(3).Width = 115
50
+        一級作廢_dgv.Columns(4).Width = 115 : 一級作廢_dgv.Columns(5).Width = 115 : 一級作廢_dgv.Columns(6).Visible = False : 一級作廢_dgv.Columns(7).Visible = False
51
+        一級作廢_dgv.Columns(8).Width = 230 : 一級作廢_dgv.Columns(9).Visible = False
66 52
     End Sub
67
-    Private Sub Set_grid2()
68
-        DataGridView3.Columns(0).Width = 120 : DataGridView3.Columns(1).Width = 114 : DataGridView3.Columns(2).Width = 114 : DataGridView3.Columns(3).Width = 115 : DataGridView3.Columns(4).Width = 115
69
-        DataGridView3.Columns(5).Width = 115 : DataGridView3.Columns(6).Visible = False : DataGridView3.Columns(7).Visible = False : DataGridView3.Columns(8).Width = 230
53
+    Private Sub ComboBox1下拉表單資料載入()
54
+        SQL_帳本下拉清單()
55
+        帳本名稱_cb.Items.Clear() : 帳本編號_cb.Items.Clear() : While (dr.Read()) : 帳本名稱_cb.Items.Add(dr("帳本名稱")) : 帳本編號_cb.Items.Add(dr("編號")) : End While : conn.Close()
70 56
     End Sub
71 57
     Private Sub 零用金支付審核_Load(sender As Object, e As EventArgs) Handles MyBase.Load
72 58
         Me.MdiParent = WINPROFIT_ERP_SYS : Me.WindowState = 2 : Me.AutoScroll = True
59
+        帳本編號_cb.Visible = False
60
+        ComboBox1下拉表單資料載入() : 帳本名稱_cb.SelectedIndex = 0 : PA19 = 帳本編號_cb.Text
73 61
         Set_清單1() : Set_清單2()
74 62
     End Sub
75
-    Private Sub DataGridView2_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles DataGridView2.CellClick
63
+    Private Sub DataGridView2_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 一級未審核_dgv.CellClick
76 64
         If e.RowIndex = -1 Then : Else
77
-            TextBox1.Text = DataGridView2(0, e.RowIndex).Value.ToString : TextBox2.Text = DataGridView2(1, e.RowIndex).Value.ToString : TextBox3.Text = DataGridView2(2, e.RowIndex).Value.ToString
78
-            Set_使用者清單() : Button1.Enabled = True : Button2.Enabled = True
65
+            TextBox1.Text = 一級未審核_dgv(0, e.RowIndex).Value.ToString : TextBox2.Text = 一級未審核_dgv(1, e.RowIndex).Value.ToString : TextBox3.Text = 一級未審核_dgv(2, e.RowIndex).Value.ToString
66
+            Set_財務單清單() : Button1.Enabled = True : Button2.Enabled = True
79 67
         End If
80 68
     End Sub
81
-    Private Sub DataGridView3_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles DataGridView3.CellClick
69
+    Private Sub DataGridView3_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 一級作廢_dgv.CellClick
82 70
         If e.RowIndex = -1 Then : Else
83
-            TextBox1.Text = DataGridView3(0, e.RowIndex).Value.ToString : TextBox2.Text = DataGridView3(1, e.RowIndex).Value.ToString : TextBox3.Text = DataGridView3(2, e.RowIndex).Value.ToString
84
-            Set_使用者清單() : Button1.Enabled = False : Button2.Enabled = False
71
+            TextBox1.Text = 一級作廢_dgv(0, e.RowIndex).Value.ToString : TextBox2.Text = 一級作廢_dgv(1, e.RowIndex).Value.ToString : TextBox3.Text = 一級作廢_dgv(2, e.RowIndex).Value.ToString
72
+            Set_財務單清單() : Button1.Enabled = False : Button2.Enabled = False
85 73
         End If
86 74
     End Sub
87 75
     Private Sub Set_日期格式轉換()
@@ -100,7 +88,7 @@ Public Class 零用金支付審核
100 88
             MsgBox("審核完畢")
101 89
             Set_清單1() : Set_清單2()
102 90
             TextBox1.Text = "" : TextBox2.Text = "" : TextBox3.Text = ""
103
-            DataGridView1.DataSource = Nothing : ds.Clear()
91
+            明細_dgv.DataSource = Nothing : ds.Clear()
104 92
         End If
105 93
     End Sub
106 94
     Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
@@ -120,8 +108,16 @@ Public Class 零用金支付審核
120 108
                 MsgBox("審核完畢") : PA = ""
121 109
                 Set_清單1() : Set_清單2()
122 110
                 TextBox1.Text = "" : TextBox2.Text = "" : TextBox3.Text = ""
123
-                DataGridView1.DataSource = Nothing : ds.Clear()
111
+                明細_dgv.DataSource = Nothing : ds.Clear()
124 112
             End If
125 113
         End If
126 114
     End Sub
115
+    Private Sub 帳本名稱_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 帳本名稱_cb.SelectedIndexChanged
116
+        帳本編號_cb.SelectedIndex = 帳本名稱_cb.SelectedIndex : PA19 = 帳本編號_cb.Text : Set_清單1() : Set_清單2()
117
+        TextBox1.Text = "" : TextBox2.Text = "" : TextBox3.Text = "" : Set_財務單清單()
118
+    End Sub
119
+    Private Sub 帳本編號_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 帳本編號_cb.SelectedIndexChanged
120
+        帳本名稱_cb.SelectedIndex = 帳本編號_cb.SelectedIndex : PA19 = 帳本編號_cb.Text : Set_清單1() : Set_清單2()
121
+        TextBox1.Text = "" : TextBox2.Text = "" : TextBox3.Text = "" : Set_財務單清單()
122
+    End Sub
127 123
 End Class

+ 69
- 67
SHENKANG-MES-SYS/財務管理系統/零用金支付核准.Designer.vb Wyświetl plik

@@ -22,15 +22,15 @@ Partial Class 零用金支付核准
22 22
     '請勿使用程式碼編輯器進行修改。
23 23
     <System.Diagnostics.DebuggerStepThrough()>
24 24
     Private Sub InitializeComponent()
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()
28
-        Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
25
+        Dim DataGridViewCellStyle9 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
26
+        Dim DataGridViewCellStyle10 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
27
+        Dim DataGridViewCellStyle11 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
28
+        Dim DataGridViewCellStyle12 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
29 29
         Me.Label7 = New System.Windows.Forms.Label()
30
-        Me.DataGridView5 = New System.Windows.Forms.DataGridView()
30
+        Me.二級作廢_dgv = New System.Windows.Forms.DataGridView()
31 31
         Me.Label6 = New System.Windows.Forms.Label()
32
-        Me.DataGridView4 = New System.Windows.Forms.DataGridView()
33
-        Me.DataGridView1 = New System.Windows.Forms.DataGridView()
32
+        Me.二級未核准_dgv = New System.Windows.Forms.DataGridView()
33
+        Me.明細_dgv = New System.Windows.Forms.DataGridView()
34 34
         Me.Label3 = New System.Windows.Forms.Label()
35 35
         Me.TextBox3 = New System.Windows.Forms.TextBox()
36 36
         Me.Label2 = New System.Windows.Forms.Label()
@@ -44,14 +44,14 @@ Partial Class 零用金支付核准
44 44
         Me.TextBox13 = New System.Windows.Forms.TextBox()
45 45
         Me.Button2 = New System.Windows.Forms.Button()
46 46
         Me.PictureBox1 = New System.Windows.Forms.PictureBox()
47
-        Me.DataGridView2 = New System.Windows.Forms.DataGridView()
47
+        Me.簽名檔_dgv = New System.Windows.Forms.DataGridView()
48 48
         Me.TextBox5 = New System.Windows.Forms.TextBox()
49 49
         Me.Label8 = New System.Windows.Forms.Label()
50
-        CType(Me.DataGridView5, System.ComponentModel.ISupportInitialize).BeginInit()
51
-        CType(Me.DataGridView4, System.ComponentModel.ISupportInitialize).BeginInit()
52
-        CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).BeginInit()
50
+        CType(Me.二級作廢_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
51
+        CType(Me.二級未核准_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
52
+        CType(Me.明細_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
53 53
         CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
54
-        CType(Me.DataGridView2, System.ComponentModel.ISupportInitialize).BeginInit()
54
+        CType(Me.簽名檔_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
55 55
         Me.SuspendLayout()
56 56
         '
57 57
         'Label7
@@ -63,17 +63,18 @@ Partial Class 零用金支付核准
63 63
         Me.Label7.TabIndex = 746
64 64
         Me.Label7.Text = "總經理作廢的零用金支付單"
65 65
         '
66
-        'DataGridView5
66
+        '二級作廢_dgv
67 67
         '
68
-        DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
69
-        Me.DataGridView5.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
70
-        Me.DataGridView5.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
71
-        Me.DataGridView5.Location = New System.Drawing.Point(12, 524)
72
-        Me.DataGridView5.Name = "DataGridView5"
73
-        Me.DataGridView5.RowHeadersWidth = 5
74
-        Me.DataGridView5.RowTemplate.Height = 24
75
-        Me.DataGridView5.Size = New System.Drawing.Size(947, 440)
76
-        Me.DataGridView5.TabIndex = 745
68
+        DataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
69
+        Me.二級作廢_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle9
70
+        Me.二級作廢_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
71
+        Me.二級作廢_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
72
+        Me.二級作廢_dgv.Location = New System.Drawing.Point(12, 524)
73
+        Me.二級作廢_dgv.Name = "二級作廢_dgv"
74
+        Me.二級作廢_dgv.RowHeadersWidth = 5
75
+        Me.二級作廢_dgv.RowTemplate.Height = 24
76
+        Me.二級作廢_dgv.Size = New System.Drawing.Size(947, 440)
77
+        Me.二級作廢_dgv.TabIndex = 745
77 78
         '
78 79
         'Label6
79 80
         '
@@ -84,31 +85,32 @@ Partial Class 零用金支付核准
84 85
         Me.Label6.TabIndex = 744
85 86
         Me.Label6.Text = "總經理未核准的零用金支付單"
86 87
         '
87
-        'DataGridView4
88
-        '
89
-        DataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
90
-        Me.DataGridView4.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2
91
-        Me.DataGridView4.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
92
-        Me.DataGridView4.Location = New System.Drawing.Point(12, 36)
93
-        Me.DataGridView4.Name = "DataGridView4"
94
-        Me.DataGridView4.RowHeadersWidth = 5
95
-        Me.DataGridView4.RowTemplate.Height = 24
96
-        Me.DataGridView4.Size = New System.Drawing.Size(947, 451)
97
-        Me.DataGridView4.TabIndex = 743
98
-        '
99
-        'DataGridView1
100
-        '
101
-        DataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
102
-        Me.DataGridView1.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
103
-        Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
104
-        Me.DataGridView1.Location = New System.Drawing.Point(965, 170)
105
-        Me.DataGridView1.Name = "DataGridView1"
106
-        Me.DataGridView1.RowHeadersWidth = 5
107
-        DataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
108
-        Me.DataGridView1.RowsDefaultCellStyle = DataGridViewCellStyle4
109
-        Me.DataGridView1.RowTemplate.Height = 24
110
-        Me.DataGridView1.Size = New System.Drawing.Size(937, 794)
111
-        Me.DataGridView1.TabIndex = 756
88
+        '二級未核准_dgv
89
+        '
90
+        DataGridViewCellStyle10.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
91
+        Me.二級未核准_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle10
92
+        Me.二級未核准_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
93
+        Me.二級未核准_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
94
+        Me.二級未核准_dgv.Location = New System.Drawing.Point(15, 35)
95
+        Me.二級未核准_dgv.Name = "二級未核准_dgv"
96
+        Me.二級未核准_dgv.RowHeadersWidth = 5
97
+        Me.二級未核准_dgv.RowTemplate.Height = 24
98
+        Me.二級未核准_dgv.Size = New System.Drawing.Size(947, 451)
99
+        Me.二級未核准_dgv.TabIndex = 743
100
+        '
101
+        '明細_dgv
102
+        '
103
+        DataGridViewCellStyle11.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
104
+        Me.明細_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle11
105
+        Me.明細_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
106
+        Me.明細_dgv.Location = New System.Drawing.Point(965, 170)
107
+        Me.明細_dgv.Name = "明細_dgv"
108
+        Me.明細_dgv.RowHeadersWidth = 5
109
+        DataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
110
+        Me.明細_dgv.RowsDefaultCellStyle = DataGridViewCellStyle12
111
+        Me.明細_dgv.RowTemplate.Height = 24
112
+        Me.明細_dgv.Size = New System.Drawing.Size(937, 794)
113
+        Me.明細_dgv.TabIndex = 756
112 114
         '
113 115
         'Label3
114 116
         '
@@ -229,15 +231,15 @@ Partial Class 零用金支付核准
229 231
         Me.PictureBox1.TabIndex = 758
230 232
         Me.PictureBox1.TabStop = False
231 233
         '
232
-        'DataGridView2
234
+        '簽名檔_dgv
233 235
         '
234
-        Me.DataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
235
-        Me.DataGridView2.Location = New System.Drawing.Point(1479, 6)
236
-        Me.DataGridView2.Name = "DataGridView2"
237
-        Me.DataGridView2.RowHeadersWidth = 5
238
-        Me.DataGridView2.RowTemplate.Height = 24
239
-        Me.DataGridView2.Size = New System.Drawing.Size(198, 157)
240
-        Me.DataGridView2.TabIndex = 757
236
+        Me.簽名檔_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
237
+        Me.簽名檔_dgv.Location = New System.Drawing.Point(1479, 6)
238
+        Me.簽名檔_dgv.Name = "簽名檔_dgv"
239
+        Me.簽名檔_dgv.RowHeadersWidth = 5
240
+        Me.簽名檔_dgv.RowTemplate.Height = 24
241
+        Me.簽名檔_dgv.Size = New System.Drawing.Size(198, 157)
242
+        Me.簽名檔_dgv.TabIndex = 757
241 243
         '
242 244
         'TextBox5
243 245
         '
@@ -269,8 +271,8 @@ Partial Class 零用金支付核准
269 271
         Me.Controls.Add(Me.TextBox13)
270 272
         Me.Controls.Add(Me.Button2)
271 273
         Me.Controls.Add(Me.PictureBox1)
272
-        Me.Controls.Add(Me.DataGridView2)
273
-        Me.Controls.Add(Me.DataGridView1)
274
+        Me.Controls.Add(Me.簽名檔_dgv)
275
+        Me.Controls.Add(Me.明細_dgv)
274 276
         Me.Controls.Add(Me.Label3)
275 277
         Me.Controls.Add(Me.TextBox3)
276 278
         Me.Controls.Add(Me.Label2)
@@ -278,28 +280,27 @@ Partial Class 零用金支付核准
278 280
         Me.Controls.Add(Me.Label1)
279 281
         Me.Controls.Add(Me.TextBox1)
280 282
         Me.Controls.Add(Me.Label7)
281
-        Me.Controls.Add(Me.DataGridView5)
283
+        Me.Controls.Add(Me.二級作廢_dgv)
282 284
         Me.Controls.Add(Me.Label6)
283
-        Me.Controls.Add(Me.DataGridView4)
285
+        Me.Controls.Add(Me.二級未核准_dgv)
284 286
         Me.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
285 287
         Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
286 288
         Me.Name = "零用金支付核准"
287 289
         Me.Text = "零用金支付核准"
288
-        CType(Me.DataGridView5, System.ComponentModel.ISupportInitialize).EndInit()
289
-        CType(Me.DataGridView4, System.ComponentModel.ISupportInitialize).EndInit()
290
-        CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).EndInit()
290
+        CType(Me.二級作廢_dgv, System.ComponentModel.ISupportInitialize).EndInit()
291
+        CType(Me.二級未核准_dgv, System.ComponentModel.ISupportInitialize).EndInit()
292
+        CType(Me.明細_dgv, System.ComponentModel.ISupportInitialize).EndInit()
291 293
         CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
292
-        CType(Me.DataGridView2, System.ComponentModel.ISupportInitialize).EndInit()
294
+        CType(Me.簽名檔_dgv, System.ComponentModel.ISupportInitialize).EndInit()
293 295
         Me.ResumeLayout(False)
294 296
         Me.PerformLayout()
295 297
 
296 298
     End Sub
297 299
 
298 300
     Friend WithEvents Label7 As Label
299
-    Friend WithEvents DataGridView5 As DataGridView
301
+    Friend WithEvents 二級作廢_dgv As DataGridView
300 302
     Friend WithEvents Label6 As Label
301
-    Friend WithEvents DataGridView4 As DataGridView
302
-    Friend WithEvents DataGridView1 As DataGridView
303
+    Friend WithEvents 明細_dgv As DataGridView
303 304
     Friend WithEvents Label3 As Label
304 305
     Friend WithEvents TextBox3 As TextBox
305 306
     Friend WithEvents Label2 As Label
@@ -313,7 +314,8 @@ Partial Class 零用金支付核准
313 314
     Friend WithEvents TextBox13 As TextBox
314 315
     Friend WithEvents Button2 As Button
315 316
     Friend WithEvents PictureBox1 As PictureBox
316
-    Friend WithEvents DataGridView2 As DataGridView
317
+    Friend WithEvents 簽名檔_dgv As DataGridView
317 318
     Friend WithEvents TextBox5 As TextBox
318 319
     Friend WithEvents Label8 As Label
320
+    Friend WithEvents 二級未核准_dgv As DataGridView
319 321
 End Class

+ 59
- 75
SHENKANG-MES-SYS/財務管理系統/零用金支付核准.vb Wyświetl plik

@@ -1,86 +1,70 @@
1 1
 Option Strict Off
2
-Imports System.Data.SqlClient
3 2
 Imports System.IO
4 3
 Public Class 零用金支付核准
5
-    Dim conn As New SqlConnection
6
-    Dim da As New SqlDataAdapter
7
-    Dim cmd As New SqlCommand
8
-    Dim ds As New DataSet : Dim ds1 As New DataSet : Dim ds2 As New DataSet : Dim ds3 As New DataSet : Dim ds4 As New DataSet
9
-    Dim dr As SqlDataReader
4
+    Dim ds As New DataSet : Dim ds2 As New DataSet : Dim ds3 As New DataSet : Dim ds4 As New DataSet
10 5
     Dim DTP As String : Dim DTP2 As String
11 6
     Dim QQW(11) As String : Dim II As Integer
12
-    Private Sub Set_使用者清單()
13
-        DataGridView1.DataSource = Nothing : ds.Clear()
14
-        DataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
15
-        DataGridView1.ColumnHeadersHeight = 25
16
-        DataGridView1.AllowUserToAddRows = False
17
-        DataGridView1.RowTemplate.Height = 35
18
-        If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
19
-        SQL1 = "SELECT 流水號, 項次, 用途, 金額, 備註 FROM 零用金支付明細 WHERE 流水號 LIKE N'" & TextBox1.Text & "' ORDER BY 項次"
20
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds) : DataGridView1.DataSource = ds.Tables(0) : conn.Close() : Set_grid()
21
-    End Sub
22
-    Private Sub Set_grid()
23
-        DataGridView1.Columns(0).Visible = False : DataGridView1.Columns(1).Width = 80 : DataGridView1.Columns(2).Width = 342 : DataGridView1.Columns(3).Width = 140 : DataGridView1.Columns(4).Width = 350
24
-        DataGridView1.Columns(3).DefaultCellStyle.Format = "#,##0.00"
25
-        DataGridView1.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
26
-        DataGridView1.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
27
-        DataGridView1.EditMode = DataGridViewEditMode.EditOnEnter
7
+    Private Sub Set_財務單清單()
8
+        明細_dgv.DataSource = Nothing : ds.Clear()
9
+        明細_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
10
+        明細_dgv.ColumnHeadersHeight = 25
11
+        明細_dgv.AllowUserToAddRows = False
12
+        明細_dgv.RowTemplate.Height = 35
13
+
14
+        PA1 = TextBox1.Text : SQL_財務帳清單()
15
+        da.Fill(ds) : 明細_dgv.DataSource = ds.Tables(0) : conn.Close()
16
+
17
+        明細_dgv.Columns(0).Visible = False : 明細_dgv.Columns(1).Width = 80 : 明細_dgv.Columns(2).Width = 342 : 明細_dgv.Columns(3).Width = 140
18
+        明細_dgv.Columns(4).Width = 350
19
+        明細_dgv.Columns(3).DefaultCellStyle.Format = "#,##0.00"
20
+        明細_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 明細_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
21
+        明細_dgv.EditMode = DataGridViewEditMode.EditOnEnter
28 22
 
29 23
         TextBox5.Text = "0.00"
30
-        For i As Integer = 0 To DataGridView1.Rows.Count - 1
31
-            TextBox5.Text = Val(TextBox5.Text) + DataGridView1.Rows(i).Cells("金額").Value
24
+        For i As Integer = 0 To 明細_dgv.Rows.Count - 1
25
+            TextBox5.Text = Val(TextBox5.Text) + 明細_dgv.Rows(i).Cells("金額").Value
32 26
         Next i
33 27
         TextBox5.Text = Format(Val(TextBox5.Text), "#,##0.00")
34 28
     End Sub
35 29
     Private Sub Set_清單3()
36
-        DataGridView4.DataSource = Nothing : ds3.Clear()
37
-        DataGridView4.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
38
-        DataGridView4.ColumnHeadersHeight = 25
39
-        DataGridView4.AllowUserToAddRows = False
40
-        If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
41
-        SQL1 = "SELECT 流水號, 部門, 申請人, LEFT(申請日期, 10) AS 申請日期, 審核人, LEFT(審核日期, 10) AS 審核日期, 核准人, LEFT(核准日期, 10) AS 核准日期 FROM 零用金支付表 " &
42
-                   "WHERE (審核人 NOT LIKE N'作廢%') AND (審核人 NOT LIKE N'')  AND (核准人 LIKE N'') ORDER BY 流水號 DESC"
43
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds3) : DataGridView4.DataSource = ds3.Tables(0) : conn.Close() : Set_grid3()
44
-    End Sub
45
-    Private Sub Set_grid3()
46
-        DataGridView4.Columns(0).Width = 120 : DataGridView4.Columns(1).Width = 114 : DataGridView4.Columns(2).Width = 114 : DataGridView4.Columns(3).Width = 115 : DataGridView4.Columns(4).Width = 115
47
-        DataGridView4.Columns(5).Width = 115 : DataGridView4.Columns(6).Width = 115 : DataGridView4.Columns(7).Width = 115
30
+        二級未核准_dgv.DataSource = Nothing : ds3.Clear()
31
+        二級未核准_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
32
+        二級未核准_dgv.ColumnHeadersHeight = 25
33
+        二級未核准_dgv.AllowUserToAddRows = False
34
+
35
+        PA19 = "%%" : PA = "二級未核准" : SQL_財務單據()
36
+        da.Fill(ds3) : 二級未核准_dgv.DataSource = ds3.Tables(0) : conn.Close()
37
+
38
+        二級未核准_dgv.Columns(0).FillWeight = 120 : 二級未核准_dgv.Columns(1).FillWeight = 114 : 二級未核准_dgv.Columns(2).FillWeight = 114 : 二級未核准_dgv.Columns(3).FillWeight = 115
39
+        二級未核准_dgv.Columns(4).FillWeight = 115 : 二級未核准_dgv.Columns(5).FillWeight = 115 : 二級未核准_dgv.Columns(6).FillWeight = 115 : 二級未核准_dgv.Columns(7).FillWeight = 115
40
+        二級未核准_dgv.Columns(8).Visible = False : 二級未核准_dgv.Columns(9).FillWeight = 90
48 41
     End Sub
49 42
     Private Sub Set_清單4()
50
-        DataGridView5.DataSource = Nothing : ds4.Clear()
51
-        DataGridView5.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
52
-        DataGridView5.ColumnHeadersHeight = 25
53
-        DataGridView5.AllowUserToAddRows = False
54
-        If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
55
-        SQL1 = "SELECT 流水號, 部門, 申請人, LEFT(申請日期, 10) AS 申請日期, 審核人, LEFT(審核日期, 10) AS 審核日期, 核准人, LEFT(核准日期, 10) AS 核准日期 FROM 零用金支付表 " &
56
-                   "WHERE (審核人 NOT LIKE N'作廢%') AND (審核人 NOT LIKE N'')  AND (核准人 LIKE N'作廢%') ORDER BY 流水號 DESC"
57
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds4) : DataGridView5.DataSource = ds4.Tables(0) : conn.Close() : Set_grid4()
58
-    End Sub
59
-    Private Sub Set_grid4()
60
-        DataGridView5.Columns(0).Width = 120 : DataGridView5.Columns(1).Width = 114 : DataGridView5.Columns(2).Width = 114 : DataGridView5.Columns(3).Width = 115 : DataGridView5.Columns(4).Width = 115
61
-        DataGridView5.Columns(5).Width = 115 : DataGridView5.Columns(6).Width = 115 : DataGridView5.Columns(7).Width = 115
62
-    End Sub
63
-    Private Sub Set_DGV4載入前設定()
64
-        DataGridView2.DataSource = Nothing : ds2.Clear()
65
-        DataGridView2.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
66
-        DataGridView2.ColumnHeadersHeight = 25
67
-        DataGridView2.AllowUserToAddRows = False
68
-        If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
69
-    End Sub
70
-    Private Sub Set_DGV4載入後設定()
71
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds2) : DataGridView2.DataSource = ds2.Tables(0) : conn.Close() : Set_grid1()
43
+        二級作廢_dgv.DataSource = Nothing : ds4.Clear()
44
+        二級作廢_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
45
+        二級作廢_dgv.ColumnHeadersHeight = 25
46
+        二級作廢_dgv.AllowUserToAddRows = False
47
+
48
+        PA19 = "%%" : PA = "二級作廢" : SQL_財務單據()
49
+        da.Fill(ds4) : 二級作廢_dgv.DataSource = ds4.Tables(0) : conn.Close()
50
+
51
+        二級作廢_dgv.Columns(0).FillWeight = 120 : 二級作廢_dgv.Columns(1).FillWeight = 114 : 二級作廢_dgv.Columns(2).FillWeight = 114 : 二級作廢_dgv.Columns(3).FillWeight = 115
52
+        二級作廢_dgv.Columns(4).FillWeight = 115 : 二級作廢_dgv.Columns(5).FillWeight = 115 : 二級作廢_dgv.Columns(6).FillWeight = 115 : 二級作廢_dgv.Columns(7).FillWeight = 115
53
+        二級作廢_dgv.Columns(8).Visible = False : 二級作廢_dgv.Columns(9).FillWeight = 90
72 54
     End Sub
73 55
     Private Sub Set_清單()
74
-        Set_DGV4載入前設定()
56
+        簽名檔_dgv.DataSource = Nothing : ds2.Clear()
57
+        簽名檔_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
58
+        簽名檔_dgv.ColumnHeadersHeight = 25
59
+        簽名檔_dgv.AllowUserToAddRows = False
60
+        If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
75 61
         If gUserName = "李協叡" Then
76 62
             SQL1 = "SELECT 圖片流水號 AS 圖檔編碼, 簽名檔人名 FROM 簽名檔管理 ORDER BY 圖片流水號"
77 63
         Else
78 64
             SQL1 = "SELECT 圖片流水號 AS 圖檔編碼, 簽名檔人名 FROM 簽名檔管理 WHERE 簽名檔人名 LIKE N'" & gUserName & "' ORDER BY 圖片流水號"
79 65
         End If
80
-        Set_DGV4載入後設定()
81
-    End Sub
82
-    Private Sub Set_grid1()
83
-        DataGridView2.Columns(0).Width = 110 : DataGridView2.Columns(1).Width = 63
66
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds2) : 簽名檔_dgv.DataSource = ds2.Tables(0) : conn.Close()
67
+        簽名檔_dgv.Columns(0).Width = 110 : 簽名檔_dgv.Columns(1).Width = 63
84 68
     End Sub
85 69
     Private Sub 零用金支付核准_Load(sender As Object, e As EventArgs) Handles MyBase.Load
86 70
         Me.MdiParent = WINPROFIT_ERP_SYS : Me.WindowState = 2 : Me.AutoScroll = True
@@ -95,11 +79,11 @@ Public Class 零用金支付核准
95 79
     Public Sub Delay(ByRef Interval As Double)  'Interval单位为毫秒
96 80
         Dim time As DateTime = DateTime.Now : Dim Span As Double = Interval * 1234 : While ((DateTime.Now.Ticks - time.Ticks) < Span) : Application.DoEvents() : End While
97 81
     End Sub
98
-    Private Sub DataGridView2_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles DataGridView2.CellClick
82
+    Private Sub DataGridView2_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 簽名檔_dgv.CellClick
99 83
         If e.RowIndex = -1 Then : Else
100
-            TextBox14.Text = DataGridView2(0, e.RowIndex).Value.ToString
84
+            TextBox14.Text = 簽名檔_dgv(0, e.RowIndex).Value.ToString
101 85
             If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
102
-            SQL1 = "SELECT 簽名檔圖片 FROM 簽名檔管理 WHERE 圖片流水號 LIKE N'" & DataGridView2(0, e.RowIndex).Value.ToString & "'"
86
+            SQL1 = "SELECT 簽名檔圖片 FROM 簽名檔管理 WHERE 圖片流水號 LIKE N'" & 簽名檔_dgv(0, e.RowIndex).Value.ToString & "'"
103 87
             cmd.Connection = conn : cmd.CommandText = SQL1 : dr = cmd.ExecuteReader
104 88
             While dr.Read() = True
105 89
                 Dim bytes As Byte() = New Byte(-1) {}
@@ -110,7 +94,7 @@ Public Class 零用金支付核准
110 94
             conn.Close()
111 95
             PictureBox1.SizeMode = 4
112 96
             For QAZ = 0 To 999
113
-                QQW(0) = Strings.Right(DataGridView2(0, e.RowIndex).Value.ToString, 2) : QQW(1) = Strings.Right(Year(Today), 2) : QQW(2) = Strings.Left(Year(Today), 2) : QQW(3) = Month(Today) + 9
97
+                QQW(0) = Strings.Right(簽名檔_dgv(0, e.RowIndex).Value.ToString, 2) : QQW(1) = Strings.Right(Year(Today), 2) : QQW(2) = Strings.Left(Year(Today), 2) : QQW(3) = Month(Today) + 9
114 98
                 QQW(4) = Strings.Right(QQW(0), 1) : QQW(5) = Strings.Left(QQW(0), 1) : QQW(6) = Strings.Right(QQW(1), 1) : QQW(7) = Strings.Left(QQW(1), 1) : QQW(8) = Strings.Right(QQW(2), 1)
115 99
                 QQW(9) = Strings.Left(QQW(2), 1) : QQW(10) = Strings.Right(QQW(3), 1) : QQW(11) = Strings.Left(QQW(3), 1)
116 100
                 For RT = 4 To 11
@@ -132,16 +116,16 @@ Public Class 零用金支付核准
132 116
             Next
133 117
         End If
134 118
     End Sub
135
-    Private Sub DataGridView4_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles DataGridView4.CellClick
119
+    Private Sub DataGridView4_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 二級未核准_dgv.CellClick
136 120
         If e.RowIndex = -1 Then : Else
137
-            TextBox1.Text = DataGridView4(0, e.RowIndex).Value.ToString : TextBox2.Text = DataGridView4(1, e.RowIndex).Value.ToString : TextBox3.Text = DataGridView4(2, e.RowIndex).Value.ToString
138
-            Set_使用者清單()
121
+            TextBox1.Text = 二級未核准_dgv(0, e.RowIndex).Value.ToString : TextBox2.Text = 二級未核准_dgv(1, e.RowIndex).Value.ToString : TextBox3.Text = 二級未核准_dgv(2, e.RowIndex).Value.ToString
122
+            Set_財務單清單()
139 123
         End If
140 124
     End Sub
141
-    Private Sub DataGridView5_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles DataGridView5.CellClick
125
+    Private Sub DataGridView5_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 二級作廢_dgv.CellClick
142 126
         If e.RowIndex = -1 Then : Else
143
-            TextBox1.Text = DataGridView5(0, e.RowIndex).Value.ToString : TextBox2.Text = DataGridView5(1, e.RowIndex).Value.ToString : TextBox3.Text = DataGridView5(2, e.RowIndex).Value.ToString
144
-            Set_使用者清單()
127
+            TextBox1.Text = 二級作廢_dgv(0, e.RowIndex).Value.ToString : TextBox2.Text = 二級作廢_dgv(1, e.RowIndex).Value.ToString : TextBox3.Text = 二級作廢_dgv(2, e.RowIndex).Value.ToString
128
+            Set_財務單清單()
145 129
         End If
146 130
     End Sub
147 131
     Private Sub Set_日期格式轉換()
@@ -162,7 +146,7 @@ Public Class 零用金支付核准
162 146
                 MsgBox("單據  " & TextBox1.Text & "  核准完成")
163 147
                 Set_清單3() : Set_清單4()
164 148
                 TextBox1.Text = "" : TextBox2.Text = "" : TextBox3.Text = "" : TextBox13.Text = "" : TextBox14.Text = ""
165
-                DataGridView1.DataSource = Nothing : ds.Clear()
149
+                明細_dgv.DataSource = Nothing : ds.Clear()
166 150
             End If
167 151
         End If
168 152
     End Sub
@@ -180,7 +164,7 @@ Public Class 零用金支付核准
180 164
                 MsgBox("單據  " & TextBox1.Text & "  已作廢")
181 165
                 Set_清單3() : Set_清單4()
182 166
                 TextBox1.Text = "" : TextBox2.Text = "" : TextBox3.Text = "" : TextBox13.Text = "" : TextBox14.Text = ""
183
-                DataGridView1.DataSource = Nothing : ds.Clear()
167
+                明細_dgv.DataSource = Nothing : ds.Clear()
184 168
             End If
185 169
         End If
186 170
     End Sub

+ 124
- 83
SHENKANG-MES-SYS/財務管理系統/零用金支付申請.Designer.vb Wyświetl plik

@@ -23,19 +23,19 @@ Partial Class 零用金支付申請
23 23
     <System.Diagnostics.DebuggerStepThrough()>
24 24
     Private Sub InitializeComponent()
25 25
         Me.components = New System.ComponentModel.Container()
26
-        Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
27
-        Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
28
-        Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
29
-        Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
30
-        Dim DataGridViewCellStyle5 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
31
-        Dim DataGridViewCellStyle6 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
26
+        Dim DataGridViewCellStyle13 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
27
+        Dim DataGridViewCellStyle14 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
28
+        Dim DataGridViewCellStyle15 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
29
+        Dim DataGridViewCellStyle16 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
30
+        Dim DataGridViewCellStyle17 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
31
+        Dim DataGridViewCellStyle18 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
32 32
         Me.TextBox1 = New System.Windows.Forms.TextBox()
33 33
         Me.Label1 = New System.Windows.Forms.Label()
34 34
         Me.Label2 = New System.Windows.Forms.Label()
35 35
         Me.TextBox2 = New System.Windows.Forms.TextBox()
36 36
         Me.Label3 = New System.Windows.Forms.Label()
37 37
         Me.TextBox3 = New System.Windows.Forms.TextBox()
38
-        Me.DataGridView1 = New System.Windows.Forms.DataGridView()
38
+        Me.明細_dgv = New System.Windows.Forms.DataGridView()
39 39
         Me.Button1 = New System.Windows.Forms.Button()
40 40
         Me.Button2 = New System.Windows.Forms.Button()
41 41
         Me.Label28 = New System.Windows.Forms.Label()
@@ -45,24 +45,27 @@ Partial Class 零用金支付申請
45 45
         Me.TextBox4 = New System.Windows.Forms.TextBox()
46 46
         Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
47 47
         Me.Label62 = New System.Windows.Forms.Label()
48
-        Me.DataGridView2 = New System.Windows.Forms.DataGridView()
48
+        Me.一級未審核_dgv = New System.Windows.Forms.DataGridView()
49 49
         Me.Label4 = New System.Windows.Forms.Label()
50 50
         Me.Label5 = New System.Windows.Forms.Label()
51
-        Me.DataGridView3 = New System.Windows.Forms.DataGridView()
51
+        Me.一級作廢_dgv = New System.Windows.Forms.DataGridView()
52 52
         Me.Label6 = New System.Windows.Forms.Label()
53
-        Me.DataGridView4 = New System.Windows.Forms.DataGridView()
53
+        Me.二級未核准_dgv = New System.Windows.Forms.DataGridView()
54 54
         Me.Label7 = New System.Windows.Forms.Label()
55
-        Me.DataGridView5 = New System.Windows.Forms.DataGridView()
55
+        Me.二級作廢_dgv = New System.Windows.Forms.DataGridView()
56 56
         Me.Button3 = New System.Windows.Forms.Button()
57 57
         Me.Button4 = New System.Windows.Forms.Button()
58 58
         Me.Button5 = New System.Windows.Forms.Button()
59 59
         Me.TextBox5 = New System.Windows.Forms.TextBox()
60 60
         Me.Label8 = New System.Windows.Forms.Label()
61
-        CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).BeginInit()
62
-        CType(Me.DataGridView2, System.ComponentModel.ISupportInitialize).BeginInit()
63
-        CType(Me.DataGridView3, System.ComponentModel.ISupportInitialize).BeginInit()
64
-        CType(Me.DataGridView4, System.ComponentModel.ISupportInitialize).BeginInit()
65
-        CType(Me.DataGridView5, System.ComponentModel.ISupportInitialize).BeginInit()
61
+        Me.帳本名稱_cb = New System.Windows.Forms.ComboBox()
62
+        Me.Label9 = New System.Windows.Forms.Label()
63
+        Me.帳本編號_cb = New System.Windows.Forms.ComboBox()
64
+        CType(Me.明細_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
65
+        CType(Me.一級未審核_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
66
+        CType(Me.一級作廢_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
67
+        CType(Me.二級未核准_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
68
+        CType(Me.二級作廢_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
66 69
         Me.SuspendLayout()
67 70
         '
68 71
         'TextBox1
@@ -113,19 +116,19 @@ Partial Class 零用金支付申請
113 116
         Me.TextBox3.Size = New System.Drawing.Size(395, 23)
114 117
         Me.TextBox3.TabIndex = 4
115 118
         '
116
-        'DataGridView1
119
+        '明細_dgv
117 120
         '
118
-        DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
119
-        Me.DataGridView1.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
120
-        Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
121
-        Me.DataGridView1.Location = New System.Drawing.Point(965, 157)
122
-        Me.DataGridView1.Name = "DataGridView1"
123
-        Me.DataGridView1.RowHeadersWidth = 5
124
-        DataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
125
-        Me.DataGridView1.RowsDefaultCellStyle = DataGridViewCellStyle2
126
-        Me.DataGridView1.RowTemplate.Height = 24
127
-        Me.DataGridView1.Size = New System.Drawing.Size(937, 807)
128
-        Me.DataGridView1.TabIndex = 589
121
+        DataGridViewCellStyle13.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
122
+        Me.明細_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle13
123
+        Me.明細_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
124
+        Me.明細_dgv.Location = New System.Drawing.Point(965, 157)
125
+        Me.明細_dgv.Name = "明細_dgv"
126
+        Me.明細_dgv.RowHeadersWidth = 5
127
+        DataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
128
+        Me.明細_dgv.RowsDefaultCellStyle = DataGridViewCellStyle14
129
+        Me.明細_dgv.RowTemplate.Height = 24
130
+        Me.明細_dgv.Size = New System.Drawing.Size(937, 807)
131
+        Me.明細_dgv.TabIndex = 589
129 132
         '
130 133
         'Button1
131 134
         '
@@ -207,17 +210,17 @@ Partial Class 零用金支付申請
207 210
         Me.Label62.Text = "資料尚未存檔"
208 211
         Me.Label62.Visible = False
209 212
         '
210
-        'DataGridView2
213
+        '一級未審核_dgv
211 214
         '
212
-        DataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
213
-        Me.DataGridView2.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
214
-        Me.DataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
215
-        Me.DataGridView2.Location = New System.Drawing.Point(12, 41)
216
-        Me.DataGridView2.Name = "DataGridView2"
217
-        Me.DataGridView2.RowHeadersWidth = 5
218
-        Me.DataGridView2.RowTemplate.Height = 24
219
-        Me.DataGridView2.Size = New System.Drawing.Size(947, 204)
220
-        Me.DataGridView2.TabIndex = 735
215
+        DataGridViewCellStyle15.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
216
+        Me.一級未審核_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle15
217
+        Me.一級未審核_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
218
+        Me.一級未審核_dgv.Location = New System.Drawing.Point(12, 41)
219
+        Me.一級未審核_dgv.Name = "一級未審核_dgv"
220
+        Me.一級未審核_dgv.RowHeadersWidth = 5
221
+        Me.一級未審核_dgv.RowTemplate.Height = 24
222
+        Me.一級未審核_dgv.Size = New System.Drawing.Size(947, 204)
223
+        Me.一級未審核_dgv.TabIndex = 735
221 224
         '
222 225
         'Label4
223 226
         '
@@ -237,17 +240,17 @@ Partial Class 零用金支付申請
237 240
         Me.Label5.TabIndex = 738
238 241
         Me.Label5.Text = "主管作廢的零用金支付單"
239 242
         '
240
-        'DataGridView3
243
+        '一級作廢_dgv
241 244
         '
242
-        DataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
243
-        Me.DataGridView3.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle4
244
-        Me.DataGridView3.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
245
-        Me.DataGridView3.Location = New System.Drawing.Point(12, 523)
246
-        Me.DataGridView3.Name = "DataGridView3"
247
-        Me.DataGridView3.RowHeadersWidth = 5
248
-        Me.DataGridView3.RowTemplate.Height = 24
249
-        Me.DataGridView3.Size = New System.Drawing.Size(947, 204)
250
-        Me.DataGridView3.TabIndex = 737
245
+        DataGridViewCellStyle16.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
246
+        Me.一級作廢_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle16
247
+        Me.一級作廢_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
248
+        Me.一級作廢_dgv.Location = New System.Drawing.Point(12, 523)
249
+        Me.一級作廢_dgv.Name = "一級作廢_dgv"
250
+        Me.一級作廢_dgv.RowHeadersWidth = 5
251
+        Me.一級作廢_dgv.RowTemplate.Height = 24
252
+        Me.一級作廢_dgv.Size = New System.Drawing.Size(947, 204)
253
+        Me.一級作廢_dgv.TabIndex = 737
251 254
         '
252 255
         'Label6
253 256
         '
@@ -258,17 +261,17 @@ Partial Class 零用金支付申請
258 261
         Me.Label6.TabIndex = 740
259 262
         Me.Label6.Text = "總經理未核准的零用金支付單"
260 263
         '
261
-        'DataGridView4
264
+        '二級未核准_dgv
262 265
         '
263
-        DataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
264
-        Me.DataGridView4.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle5
265
-        Me.DataGridView4.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
266
-        Me.DataGridView4.Location = New System.Drawing.Point(12, 282)
267
-        Me.DataGridView4.Name = "DataGridView4"
268
-        Me.DataGridView4.RowHeadersWidth = 5
269
-        Me.DataGridView4.RowTemplate.Height = 24
270
-        Me.DataGridView4.Size = New System.Drawing.Size(947, 204)
271
-        Me.DataGridView4.TabIndex = 739
266
+        DataGridViewCellStyle17.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
267
+        Me.二級未核准_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle17
268
+        Me.二級未核准_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
269
+        Me.二級未核准_dgv.Location = New System.Drawing.Point(12, 282)
270
+        Me.二級未核准_dgv.Name = "二級未核准_dgv"
271
+        Me.二級未核准_dgv.RowHeadersWidth = 5
272
+        Me.二級未核准_dgv.RowTemplate.Height = 24
273
+        Me.二級未核准_dgv.Size = New System.Drawing.Size(947, 204)
274
+        Me.二級未核准_dgv.TabIndex = 739
272 275
         '
273 276
         'Label7
274 277
         '
@@ -279,17 +282,17 @@ Partial Class 零用金支付申請
279 282
         Me.Label7.TabIndex = 742
280 283
         Me.Label7.Text = "總經理作廢的零用金支付單"
281 284
         '
282
-        'DataGridView5
285
+        '二級作廢_dgv
283 286
         '
284
-        DataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
285
-        Me.DataGridView5.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle6
286
-        Me.DataGridView5.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
287
-        Me.DataGridView5.Location = New System.Drawing.Point(12, 760)
288
-        Me.DataGridView5.Name = "DataGridView5"
289
-        Me.DataGridView5.RowHeadersWidth = 5
290
-        Me.DataGridView5.RowTemplate.Height = 24
291
-        Me.DataGridView5.Size = New System.Drawing.Size(947, 204)
292
-        Me.DataGridView5.TabIndex = 741
287
+        DataGridViewCellStyle18.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
288
+        Me.二級作廢_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle18
289
+        Me.二級作廢_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
290
+        Me.二級作廢_dgv.Location = New System.Drawing.Point(12, 760)
291
+        Me.二級作廢_dgv.Name = "二級作廢_dgv"
292
+        Me.二級作廢_dgv.RowHeadersWidth = 5
293
+        Me.二級作廢_dgv.RowTemplate.Height = 24
294
+        Me.二級作廢_dgv.Size = New System.Drawing.Size(947, 204)
295
+        Me.二級作廢_dgv.TabIndex = 741
293 296
         '
294 297
         'Button3
295 298
         '
@@ -340,24 +343,59 @@ Partial Class 零用金支付申請
340 343
         Me.Label8.TabIndex = 776
341 344
         Me.Label8.Text = "總金額"
342 345
         '
346
+        '帳本名稱_cb
347
+        '
348
+        Me.帳本名稱_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
349
+        Me.帳本名稱_cb.ForeColor = System.Drawing.Color.Green
350
+        Me.帳本名稱_cb.FormattingEnabled = True
351
+        Me.帳本名稱_cb.Items.AddRange(New Object() {"", "LANDED BRANDED", "FIRST COST"})
352
+        Me.帳本名稱_cb.Location = New System.Drawing.Point(811, 11)
353
+        Me.帳本名稱_cb.Name = "帳本名稱_cb"
354
+        Me.帳本名稱_cb.Size = New System.Drawing.Size(145, 24)
355
+        Me.帳本名稱_cb.TabIndex = 993
356
+        '
357
+        'Label9
358
+        '
359
+        Me.Label9.AutoSize = True
360
+        Me.Label9.ForeColor = System.Drawing.Color.Green
361
+        Me.Label9.Location = New System.Drawing.Point(773, 14)
362
+        Me.Label9.Name = "Label9"
363
+        Me.Label9.Size = New System.Drawing.Size(32, 16)
364
+        Me.Label9.TabIndex = 992
365
+        Me.Label9.Text = "帳本"
366
+        '
367
+        '帳本編號_cb
368
+        '
369
+        Me.帳本編號_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
370
+        Me.帳本編號_cb.ForeColor = System.Drawing.Color.Green
371
+        Me.帳本編號_cb.FormattingEnabled = True
372
+        Me.帳本編號_cb.Items.AddRange(New Object() {"", "LANDED BRANDED", "FIRST COST"})
373
+        Me.帳本編號_cb.Location = New System.Drawing.Point(811, 53)
374
+        Me.帳本編號_cb.Name = "帳本編號_cb"
375
+        Me.帳本編號_cb.Size = New System.Drawing.Size(145, 24)
376
+        Me.帳本編號_cb.TabIndex = 994
377
+        '
343 378
         '零用金支付申請
344 379
         '
345 380
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
346 381
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
347 382
         Me.ClientSize = New System.Drawing.Size(1914, 971)
383
+        Me.Controls.Add(Me.帳本編號_cb)
384
+        Me.Controls.Add(Me.帳本名稱_cb)
385
+        Me.Controls.Add(Me.Label9)
348 386
         Me.Controls.Add(Me.TextBox5)
349 387
         Me.Controls.Add(Me.Label8)
350 388
         Me.Controls.Add(Me.Button5)
351 389
         Me.Controls.Add(Me.Button4)
352 390
         Me.Controls.Add(Me.Button3)
353 391
         Me.Controls.Add(Me.Label7)
354
-        Me.Controls.Add(Me.DataGridView5)
392
+        Me.Controls.Add(Me.二級作廢_dgv)
355 393
         Me.Controls.Add(Me.Label6)
356
-        Me.Controls.Add(Me.DataGridView4)
394
+        Me.Controls.Add(Me.二級未核准_dgv)
357 395
         Me.Controls.Add(Me.Label5)
358
-        Me.Controls.Add(Me.DataGridView3)
396
+        Me.Controls.Add(Me.一級作廢_dgv)
359 397
         Me.Controls.Add(Me.Label4)
360
-        Me.Controls.Add(Me.DataGridView2)
398
+        Me.Controls.Add(Me.一級未審核_dgv)
361 399
         Me.Controls.Add(Me.Label62)
362 400
         Me.Controls.Add(Me.TextBox4)
363 401
         Me.Controls.Add(Me.Label28)
@@ -366,7 +404,7 @@ Partial Class 零用金支付申請
366 404
         Me.Controls.Add(Me.Button6)
367 405
         Me.Controls.Add(Me.Button2)
368 406
         Me.Controls.Add(Me.Button1)
369
-        Me.Controls.Add(Me.DataGridView1)
407
+        Me.Controls.Add(Me.明細_dgv)
370 408
         Me.Controls.Add(Me.Label3)
371 409
         Me.Controls.Add(Me.TextBox3)
372 410
         Me.Controls.Add(Me.Label2)
@@ -377,11 +415,11 @@ Partial Class 零用金支付申請
377 415
         Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
378 416
         Me.Name = "零用金支付申請"
379 417
         Me.Text = "零用金支付申請"
380
-        CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).EndInit()
381
-        CType(Me.DataGridView2, System.ComponentModel.ISupportInitialize).EndInit()
382
-        CType(Me.DataGridView3, System.ComponentModel.ISupportInitialize).EndInit()
383
-        CType(Me.DataGridView4, System.ComponentModel.ISupportInitialize).EndInit()
384
-        CType(Me.DataGridView5, System.ComponentModel.ISupportInitialize).EndInit()
418
+        CType(Me.明細_dgv, System.ComponentModel.ISupportInitialize).EndInit()
419
+        CType(Me.一級未審核_dgv, System.ComponentModel.ISupportInitialize).EndInit()
420
+        CType(Me.一級作廢_dgv, System.ComponentModel.ISupportInitialize).EndInit()
421
+        CType(Me.二級未核准_dgv, System.ComponentModel.ISupportInitialize).EndInit()
422
+        CType(Me.二級作廢_dgv, System.ComponentModel.ISupportInitialize).EndInit()
385 423
         Me.ResumeLayout(False)
386 424
         Me.PerformLayout()
387 425
 
@@ -393,7 +431,7 @@ Partial Class 零用金支付申請
393 431
     Friend WithEvents TextBox2 As TextBox
394 432
     Friend WithEvents Label3 As Label
395 433
     Friend WithEvents TextBox3 As TextBox
396
-    Friend WithEvents DataGridView1 As DataGridView
434
+    Friend WithEvents 明細_dgv As DataGridView
397 435
     Friend WithEvents Button1 As Button
398 436
     Friend WithEvents Button2 As Button
399 437
     Friend WithEvents Label28 As Label
@@ -403,17 +441,20 @@ Partial Class 零用金支付申請
403 441
     Friend WithEvents TextBox4 As TextBox
404 442
     Friend WithEvents Timer1 As Timer
405 443
     Friend WithEvents Label62 As Label
406
-    Friend WithEvents DataGridView2 As DataGridView
444
+    Friend WithEvents 一級未審核_dgv As DataGridView
407 445
     Friend WithEvents Label4 As Label
408 446
     Friend WithEvents Label5 As Label
409
-    Friend WithEvents DataGridView3 As DataGridView
447
+    Friend WithEvents 一級作廢_dgv As DataGridView
410 448
     Friend WithEvents Label6 As Label
411
-    Friend WithEvents DataGridView4 As DataGridView
449
+    Friend WithEvents 二級未核准_dgv As DataGridView
412 450
     Friend WithEvents Label7 As Label
413
-    Friend WithEvents DataGridView5 As DataGridView
451
+    Friend WithEvents 二級作廢_dgv As DataGridView
414 452
     Friend WithEvents Button3 As Button
415 453
     Friend WithEvents Button4 As Button
416 454
     Friend WithEvents Button5 As Button
417 455
     Friend WithEvents TextBox5 As TextBox
418 456
     Friend WithEvents Label8 As Label
457
+    Friend WithEvents 帳本名稱_cb As ComboBox
458
+    Friend WithEvents Label9 As Label
459
+    Friend WithEvents 帳本編號_cb As ComboBox
419 460
 End Class

+ 108
- 136
SHENKANG-MES-SYS/財務管理系統/零用金支付申請.vb Wyświetl plik

@@ -1,161 +1,129 @@
1 1
 Option Strict Off
2
-Imports System.Data.SqlClient
3 2
 Public Class 零用金支付申請
4
-    Dim conn As New SqlConnection
5
-    Dim da As New SqlDataAdapter
6
-    Dim cmd As New SqlCommand
7 3
     Dim ds As New DataSet : Dim ds1 As New DataSet : Dim ds2 As New DataSet : Dim ds3 As New DataSet : Dim ds4 As New DataSet
8
-    Dim dr As SqlDataReader
9 4
     Dim DTP As String : Dim DTP1 As String : Dim 新項次 As String
10 5
     Dim NUM1 As Integer
11
-    Private Sub Set_使用者清單()
12
-        DataGridView1.DataSource = Nothing : ds.Clear()
13
-        DataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
14
-        DataGridView1.ColumnHeadersHeight = 25
15
-        DataGridView1.AllowUserToAddRows = False
16
-        DataGridView1.RowTemplate.Height = 35
17
-        If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
18
-        SQL1 = "SELECT 流水號, 項次, 用途, 金額, 備註 FROM 零用金支付明細 WHERE 流水號 LIKE N'" & TextBox1.Text & "' ORDER BY 項次"
19
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds) : DataGridView1.DataSource = ds.Tables(0) : conn.Close() : Set_grid()
20
-    End Sub
21
-    Private Sub Set_grid()
22
-        DataGridView1.Columns(0).Visible = False : DataGridView1.Columns(1).Width = 80 : DataGridView1.Columns(2).Width = 342 : DataGridView1.Columns(3).Width = 140 : DataGridView1.Columns(4).Width = 350
23
-        DataGridView1.Columns(3).DefaultCellStyle.Format = "#,##0.00"
24
-        DataGridView1.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
25
-        DataGridView1.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
26
-        DataGridView1.EditMode = DataGridViewEditMode.EditOnEnter
6
+    Private Sub Set_財務單清單()
7
+        明細_dgv.DataSource = Nothing : ds.Clear()
8
+        明細_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
9
+        明細_dgv.ColumnHeadersHeight = 25
10
+        明細_dgv.AllowUserToAddRows = False
11
+        明細_dgv.RowTemplate.Height = 35
12
+
13
+        PA1 = TextBox1.Text : SQL_財務帳清單()
14
+        da.Fill(ds) : 明細_dgv.DataSource = ds.Tables(0) : conn.Close()
27 15
 
16
+        明細_dgv.Columns(0).Visible = False : 明細_dgv.Columns(1).Width = 80 : 明細_dgv.Columns(2).Width = 342 : 明細_dgv.Columns(3).Width = 140 : 明細_dgv.Columns(4).Width = 350
17
+        明細_dgv.Columns(3).DefaultCellStyle.Format = "#,##0.00"
18
+        明細_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 明細_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
19
+        明細_dgv.EditMode = DataGridViewEditMode.EditOnEnter
28 20
         TextBox5.Text = "0.00"
29
-        For i As Integer = 0 To DataGridView1.Rows.Count - 1
30
-            TextBox5.Text = Val(TextBox5.Text) + DataGridView1.Rows(i).Cells("金額").Value
21
+        For i As Integer = 0 To 明細_dgv.Rows.Count - 1
22
+            TextBox5.Text = Val(TextBox5.Text) + 明細_dgv.Rows(i).Cells("金額").Value
31 23
         Next i
32 24
         TextBox5.Text = Format(Val(TextBox5.Text), "#,##0.00")
33 25
     End Sub
34 26
     Private Sub Set_清單1()
35
-        DataGridView2.DataSource = Nothing : ds1.Clear()
36
-        DataGridView2.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
37
-        DataGridView2.ColumnHeadersHeight = 25
38
-        DataGridView2.AllowUserToAddRows = False
39
-        If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
40
-        If 登入人部門 = "NA" Then
41
-            SQL1 = "SELECT 流水號, 部門, 申請人, LEFT(申請日期, 10) AS 申請日期, 審核人, LEFT(審核日期, 10) AS 審核日期, 核准人, LEFT(核准日期, 10) AS 核准日期 FROM 零用金支付表 " &
42
-                   "WHERE (審核人 LIKE N'') ORDER BY 流水號 DESC"
43
-        Else
44
-            SQL1 = "SELECT 流水號, 部門, 申請人, LEFT(申請日期, 10) AS 申請日期, 審核人, LEFT(審核日期, 10) AS 審核日期, 核准人, LEFT(核准日期, 10) AS 核准日期 FROM 零用金支付表 " &
45
-                   "WHERE (申請人 LIKE N'" & gUserName & "') AND (審核人 LIKE N'') ORDER BY 流水號 DESC"
46
-        End If
47
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds1) : DataGridView2.DataSource = ds1.Tables(0) : conn.Close() : Set_grid1()
48
-    End Sub
49
-    Private Sub Set_grid1()
50
-        DataGridView2.Columns(0).Width = 120 : DataGridView2.Columns(1).Width = 114 : DataGridView2.Columns(2).Width = 114 : DataGridView2.Columns(3).Width = 115 : DataGridView2.Columns(4).Width = 115
51
-        DataGridView2.Columns(5).Width = 115 : DataGridView2.Columns(6).Width = 115 : DataGridView2.Columns(7).Width = 115
27
+        一級未審核_dgv.DataSource = Nothing : ds1.Clear()
28
+        一級未審核_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
29
+        一級未審核_dgv.ColumnHeadersHeight = 25
30
+        一級未審核_dgv.AllowUserToAddRows = False
31
+
32
+        PA = "一級未審核" : SQL_財務單據()
33
+        da.Fill(ds1) : 一級未審核_dgv.DataSource = ds1.Tables(0) : conn.Close()
34
+
35
+        一級未審核_dgv.Columns(0).Width = 120 : 一級未審核_dgv.Columns(1).Width = 114 : 一級未審核_dgv.Columns(2).Width = 114 : 一級未審核_dgv.Columns(3).Width = 115
36
+        一級未審核_dgv.Columns(4).Width = 115 : 一級未審核_dgv.Columns(5).Width = 115 : 一級未審核_dgv.Columns(6).Width = 115 : 一級未審核_dgv.Columns(7).Width = 115
37
+        一級未審核_dgv.Columns(8).Visible = False : 一級未審核_dgv.Columns(9).Visible = False
52 38
     End Sub
53 39
     Private Sub Set_清單2()
54
-        DataGridView3.DataSource = Nothing : ds2.Clear()
55
-        DataGridView3.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
56
-        DataGridView3.ColumnHeadersHeight = 25
57
-        DataGridView3.AllowUserToAddRows = False
58
-        If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
59
-        If 登入人部門 = "NA" Then
60
-            SQL1 = "SELECT 流水號, 部門, 申請人, LEFT(申請日期, 10) AS 申請日期, 審核人, LEFT(審核日期, 10) AS 審核日期, 核准人, LEFT(核准日期, 10) AS 核准日期 FROM 零用金支付表 " &
61
-                   "WHERE (審核人 LIKE N'作廢%') ORDER BY 流水號 DESC"
62
-        Else
63
-            SQL1 = "SELECT 流水號, 部門, 申請人, LEFT(申請日期, 10) AS 申請日期, 審核人, LEFT(審核日期, 10) AS 審核日期, 核准人, LEFT(核准日期, 10) AS 核准日期 FROM 零用金支付表 " &
64
-                   "WHERE (申請人 LIKE N'" & gUserName & "') AND (審核人 LIKE N'作廢%') ORDER BY 流水號 DESC"
65
-        End If
66
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds2) : DataGridView3.DataSource = ds2.Tables(0) : conn.Close() : Set_grid2()
67
-    End Sub
68
-    Private Sub Set_grid2()
69
-        DataGridView3.Columns(0).Width = 120 : DataGridView3.Columns(1).Width = 114 : DataGridView3.Columns(2).Width = 114 : DataGridView3.Columns(3).Width = 115 : DataGridView3.Columns(4).Width = 115
70
-        DataGridView3.Columns(5).Width = 115 : DataGridView3.Columns(6).Width = 115 : DataGridView3.Columns(7).Width = 115
40
+        一級作廢_dgv.DataSource = Nothing : ds2.Clear()
41
+        一級作廢_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
42
+        一級作廢_dgv.ColumnHeadersHeight = 25
43
+        一級作廢_dgv.AllowUserToAddRows = False
44
+
45
+        PA = "一級作廢" : SQL_財務單據()
46
+        da.Fill(ds2) : 一級作廢_dgv.DataSource = ds2.Tables(0) : conn.Close()
47
+
48
+        一級作廢_dgv.Columns(0).Width = 120 : 一級作廢_dgv.Columns(1).Width = 114 : 一級作廢_dgv.Columns(2).Width = 114 : 一級作廢_dgv.Columns(3).Width = 115
49
+        一級作廢_dgv.Columns(4).Width = 115 : 一級作廢_dgv.Columns(5).Width = 115 : 一級作廢_dgv.Columns(6).Width = 115 : 一級作廢_dgv.Columns(7).Width = 115
50
+        一級作廢_dgv.Columns(8).Visible = False : 一級作廢_dgv.Columns(9).Visible = False
71 51
     End Sub
72 52
     Private Sub Set_清單3()
73
-        DataGridView4.DataSource = Nothing : ds3.Clear()
74
-        DataGridView4.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
75
-        DataGridView4.ColumnHeadersHeight = 25
76
-        DataGridView4.AllowUserToAddRows = False
77
-        If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
78
-        If 登入人部門 = "NA" Then
79
-            SQL1 = "SELECT 流水號, 部門, 申請人, LEFT(申請日期, 10) AS 申請日期, 審核人, LEFT(審核日期, 10) AS 審核日期, 核准人, LEFT(核准日期, 10) AS 核准日期 FROM 零用金支付表 " &
80
-                   "WHERE (審核人 NOT LIKE N'作廢%') AND (審核人 NOT LIKE N'')  AND (核准人 LIKE N'') ORDER BY 流水號 DESC"
81
-        Else
82
-            SQL1 = "SELECT 流水號, 部門, 申請人, LEFT(申請日期, 10) AS 申請日期, 審核人, LEFT(審核日期, 10) AS 審核日期, 核准人, LEFT(核准日期, 10) AS 核准日期 FROM 零用金支付表 " &
83
-                   "WHERE (申請人 LIKE N'" & gUserName & "') AND (審核人 NOT LIKE N'作廢%') AND (審核人 NOT LIKE N'')  AND (核准人 LIKE N'') ORDER BY 流水號 DESC"
84
-        End If
85
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds3) : DataGridView4.DataSource = ds3.Tables(0) : conn.Close() : Set_grid3()
86
-    End Sub
87
-    Private Sub Set_grid3()
88
-        DataGridView4.Columns(0).Width = 120 : DataGridView4.Columns(1).Width = 114 : DataGridView4.Columns(2).Width = 114 : DataGridView4.Columns(3).Width = 115 : DataGridView4.Columns(4).Width = 115
89
-        DataGridView4.Columns(5).Width = 115 : DataGridView4.Columns(6).Width = 115 : DataGridView4.Columns(7).Width = 115
53
+        二級未核准_dgv.DataSource = Nothing : ds3.Clear()
54
+        二級未核准_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
55
+        二級未核准_dgv.ColumnHeadersHeight = 25
56
+        二級未核准_dgv.AllowUserToAddRows = False
57
+
58
+        PA = "二級未核准" : SQL_財務單據()
59
+        da.Fill(ds3) : 二級未核准_dgv.DataSource = ds3.Tables(0) : conn.Close()
60
+
61
+        二級未核准_dgv.Columns(0).Width = 120 : 二級未核准_dgv.Columns(1).Width = 114 : 二級未核准_dgv.Columns(2).Width = 114 : 二級未核准_dgv.Columns(3).Width = 115
62
+        二級未核准_dgv.Columns(4).Width = 115 : 二級未核准_dgv.Columns(5).Width = 115 : 二級未核准_dgv.Columns(6).Width = 115 : 二級未核准_dgv.Columns(7).Width = 115
63
+        二級未核准_dgv.Columns(8).Visible = False : 二級未核准_dgv.Columns(9).Visible = False
90 64
     End Sub
91 65
     Private Sub Set_清單4()
92
-        DataGridView5.DataSource = Nothing : ds4.Clear()
93
-        DataGridView5.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
94
-        DataGridView5.ColumnHeadersHeight = 25
95
-        DataGridView5.AllowUserToAddRows = False
96
-        If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
97
-        If 登入人部門 = "NA" Then
98
-            SQL1 = "SELECT 流水號, 部門, 申請人, LEFT(申請日期, 10) AS 申請日期, 審核人, LEFT(審核日期, 10) AS 審核日期, 核准人, LEFT(核准日期, 10) AS 核准日期 FROM 零用金支付表 " &
99
-                   "WHERE (審核人 NOT LIKE N'作廢%') AND (審核人 NOT LIKE N'')  AND (核准人 LIKE N'作廢%') ORDER BY 流水號 DESC"
100
-        Else
101
-            SQL1 = "SELECT 流水號, 部門, 申請人, LEFT(申請日期, 10) AS 申請日期, 審核人, LEFT(審核日期, 10) AS 審核日期, 核准人, LEFT(核准日期, 10) AS 核准日期 FROM 零用金支付表 " &
102
-                   "WHERE (申請人 LIKE N'" & gUserName & "') AND (審核人 NOT LIKE N'作廢%') AND (審核人 NOT LIKE N'')  AND (核准人 LIKE N'作廢%') ORDER BY 流水號 DESC"
103
-        End If
104
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds4) : DataGridView5.DataSource = ds4.Tables(0) : conn.Close() : Set_grid4()
105
-    End Sub
106
-    Private Sub Set_grid4()
107
-        DataGridView5.Columns(0).Width = 120 : DataGridView5.Columns(1).Width = 114 : DataGridView5.Columns(2).Width = 114 : DataGridView5.Columns(3).Width = 115 : DataGridView5.Columns(4).Width = 115
108
-        DataGridView5.Columns(5).Width = 115 : DataGridView5.Columns(6).Width = 115 : DataGridView5.Columns(7).Width = 115
66
+        二級作廢_dgv.DataSource = Nothing : ds4.Clear()
67
+        二級作廢_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
68
+        二級作廢_dgv.ColumnHeadersHeight = 25
69
+        二級作廢_dgv.AllowUserToAddRows = False
70
+
71
+        PA = "二級作廢" : SQL_財務單據()
72
+        da.Fill(ds4) : 二級作廢_dgv.DataSource = ds4.Tables(0) : conn.Close()
73
+
74
+        二級作廢_dgv.Columns(0).Width = 120 : 二級作廢_dgv.Columns(1).Width = 114 : 二級作廢_dgv.Columns(2).Width = 114 : 二級作廢_dgv.Columns(3).Width = 115
75
+        二級作廢_dgv.Columns(4).Width = 115 : 二級作廢_dgv.Columns(5).Width = 115 : 二級作廢_dgv.Columns(6).Width = 115 : 二級作廢_dgv.Columns(7).Width = 115
76
+        二級作廢_dgv.Columns(8).Visible = False : 二級作廢_dgv.Columns(9).Visible = False
109 77
     End Sub
110 78
     Private Sub Set_日期格式轉換()
111 79
         DTP = Format(Today(), "yyyy/MM/dd") & "-" & Format(TimeOfDay(), "hh:mm:ss") : DTP1 = Format(Today(), "yyyyMMdd")
112 80
     End Sub
81
+    Private Sub ComboBox1下拉表單資料載入()
82
+        SQL_帳本下拉清單()
83
+        帳本名稱_cb.Items.Clear() : 帳本編號_cb.Items.Clear() : While (dr.Read()) : 帳本名稱_cb.Items.Add(dr("帳本名稱")) : 帳本編號_cb.Items.Add(dr("編號")) : End While : conn.Close()
84
+    End Sub
113 85
     Private Sub 零用金支付申請_Load(sender As Object, e As EventArgs) Handles MyBase.Load
114 86
         Me.MdiParent = WINPROFIT_ERP_SYS : Me.WindowState = 2 : Me.AutoScroll = True
115 87
         Button2.Enabled = False : Button6.Enabled = False : Button15.Enabled = False : Button3.Enabled = False : Button4.Enabled = False : Button5.Enabled = False
116
-        TextBox1.Enabled = False : TextBox2.Enabled = False : TextBox3.Enabled = False : TextBox4.Enabled = False
88
+        TextBox1.Enabled = False : TextBox2.Enabled = False : TextBox3.Enabled = False : TextBox4.Enabled = False : 帳本編號_cb.Visible = False
89
+        ComboBox1下拉表單資料載入() : 帳本名稱_cb.SelectedIndex = 0 : PA19 = 帳本編號_cb.Text
117 90
         Set_清單1() : Set_清單2() : Set_清單3() : Set_清單4()
118 91
     End Sub
119 92
     Private Sub 零用金支付申請_Unload(sender As Object, e As EventArgs) Handles MyBase.Closing
120 93
         If Button2.Enabled = True Then
121
-            If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
122
-            SQL1 = "DELETE FROM 零用金支付表 WHERE (流水號 LIKE N'" & TextBox1.Text & "')"
123
-            cmd.CommandText = SQL1 : cmd.Connection = conn : cmd.ExecuteNonQuery() : conn.Close()
124
-            If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
125
-            SQL1 = "DELETE FROM 零用金支付明細 WHERE (流水號 LIKE N'" & TextBox1.Text & "')"
126
-            cmd.CommandText = SQL1 : cmd.Connection = conn : cmd.ExecuteNonQuery() : conn.Close()
94
+            PA = TextBox1.Text : SQL_財務單據刪除() : conn.Close()
127 95
         End If
128 96
     End Sub
129 97
     Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
130 98
         If Label62.Visible = True Then : Label62.Visible = False : Else : Label62.Visible = True : End If
131 99
     End Sub
132
-    Private Sub DataGridView1_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles DataGridView1.CellClick
100
+    Private Sub DataGridView1_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 明細_dgv.CellClick
133 101
         If e.RowIndex = -1 Then : Else
134
-            TextBox4.Text = DataGridView1(1, e.RowIndex).Value.ToString
102
+            TextBox4.Text = 明細_dgv(1, e.RowIndex).Value.ToString
135 103
         End If
136 104
     End Sub
137
-    Private Sub DataGridView2_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles DataGridView2.CellClick
105
+    Private Sub DataGridView2_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 一級未審核_dgv.CellClick
138 106
         If e.RowIndex = -1 Then : Else
139
-            TextBox1.Text = DataGridView2(0, e.RowIndex).Value.ToString : TextBox2.Text = DataGridView2(1, e.RowIndex).Value.ToString : TextBox3.Text = DataGridView2(2, e.RowIndex).Value.ToString
140
-            Button3.Enabled = True : Button5.Enabled = True : Set_使用者清單()
107
+            TextBox1.Text = 一級未審核_dgv(0, e.RowIndex).Value.ToString : TextBox2.Text = 一級未審核_dgv(1, e.RowIndex).Value.ToString : TextBox3.Text = 一級未審核_dgv(2, e.RowIndex).Value.ToString
108
+            Button3.Enabled = True : Button5.Enabled = True : Set_財務單清單()
141 109
         End If
142 110
     End Sub
143
-    Private Sub DataGridView3_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles DataGridView3.CellClick
111
+    Private Sub DataGridView3_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 一級作廢_dgv.CellClick
144 112
         If e.RowIndex = -1 Then : Else
145
-            TextBox1.Text = DataGridView3(0, e.RowIndex).Value.ToString : TextBox2.Text = DataGridView3(1, e.RowIndex).Value.ToString : TextBox3.Text = DataGridView3(2, e.RowIndex).Value.ToString
146
-            Button3.Enabled = False : Button5.Enabled = False : Set_使用者清單()
113
+            TextBox1.Text = 一級作廢_dgv(0, e.RowIndex).Value.ToString : TextBox2.Text = 一級作廢_dgv(1, e.RowIndex).Value.ToString : TextBox3.Text = 一級作廢_dgv(2, e.RowIndex).Value.ToString
114
+            Button3.Enabled = False : Button5.Enabled = False : Set_財務單清單()
147 115
         End If
148 116
     End Sub
149
-    Private Sub DataGridView4_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles DataGridView4.CellClick
117
+    Private Sub DataGridView4_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 二級未核准_dgv.CellClick
150 118
         If e.RowIndex = -1 Then : Else
151
-            TextBox1.Text = DataGridView4(0, e.RowIndex).Value.ToString : TextBox2.Text = DataGridView4(1, e.RowIndex).Value.ToString : TextBox3.Text = DataGridView4(2, e.RowIndex).Value.ToString
152
-            Button3.Enabled = False : Button5.Enabled = False : Set_使用者清單()
119
+            TextBox1.Text = 二級未核准_dgv(0, e.RowIndex).Value.ToString : TextBox2.Text = 二級未核准_dgv(1, e.RowIndex).Value.ToString : TextBox3.Text = 二級未核准_dgv(2, e.RowIndex).Value.ToString
120
+            Button3.Enabled = False : Button5.Enabled = False : Set_財務單清單()
153 121
         End If
154 122
     End Sub
155
-    Private Sub DataGridView5_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles DataGridView5.CellClick
123
+    Private Sub DataGridView5_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 二級作廢_dgv.CellClick
156 124
         If e.RowIndex = -1 Then : Else
157
-            TextBox1.Text = DataGridView5(0, e.RowIndex).Value.ToString : TextBox2.Text = DataGridView5(1, e.RowIndex).Value.ToString : TextBox3.Text = DataGridView5(2, e.RowIndex).Value.ToString
158
-            Button3.Enabled = False : Button5.Enabled = False : Set_使用者清單()
125
+            TextBox1.Text = 二級作廢_dgv(0, e.RowIndex).Value.ToString : TextBox2.Text = 二級作廢_dgv(1, e.RowIndex).Value.ToString : TextBox3.Text = 二級作廢_dgv(2, e.RowIndex).Value.ToString
126
+            Button3.Enabled = False : Button5.Enabled = False : Set_財務單清單()
159 127
         End If
160 128
     End Sub
161 129
     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
@@ -166,28 +134,24 @@ Public Class 零用金支付申請
166 134
             NUM1 = 0 + i
167 135
             If NUM1 < 10 Then : TextBox1.Text = "PC-" & DTP1 & "-00" & NUM1
168 136
             ElseIf NUM1 > 9 And NUM1 < 100 Then : TextBox1.Text = "PC-" & DTP1 & "-0" & NUM1
169
-            ElseIf NUM1 > 99 Then : TextBox1.Text = "PC-" & DTP1 & "-" & NUM1
170
-            End If
171
-            conn.Close()
172
-            If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
173
-            SQL1 = "SELECT TOP (1)  流水號 FROM 零用金支付表 WHERE ( 流水號 LIKE N'" & TextBox1.Text & "')"
174
-            cmd.Connection = conn : cmd.CommandText = SQL1 : dr = cmd.ExecuteReader
137
+            ElseIf NUM1 > 99 Then : TextBox1.Text = "PC-" & DTP1 & "-" & NUM1 : End If
138
+            PA = TextBox1.Text : SQL_零用金支付表最後一筆資料()
175 139
             If dr.Read() Then : Else : i = 999 : conn.Close() : End If : conn.Close()
176 140
         Next
177 141
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
178
-        SQL1 = "INSERT INTO 零用金支付表 (流水號, 部門, 申請人, 申請日期, 審核人, 審核日期, 核准人, 核准日期, 會計, 作帳日期, 出納, 出納日期, 核准圖檔, 簽名編碼, 備註) " &
179
-               "VALUES (N'" & TextBox1.Text & "',N'" & 登入人部門 & "',N'" & gUserName & "',N'" & DTP & "',N'',N'',N'',N'',N'',N'',N'',N'',N'',N'',N'')"
142
+        SQL1 = "INSERT INTO 零用金支付表 (流水號, 部門, 申請人, 申請日期, 審核人, 審核日期, 核准人, 核准日期, 會計, 作帳日期, 出納, 出納日期, 核准圖檔, 簽名編碼, 備註, 帳本編號) " &
143
+               "VALUES (N'" & PA & "',N'" & 登入人部門 & "',N'" & gUserName & "',N'" & DTP & "',N'',N'',N'',N'',N'',N'',N'',N'',N'',N'',N'',N'" & 帳本編號_cb.Text & "')"
180 144
         cmd.Connection = conn : cmd.CommandText = SQL1 : cmd.ExecuteNonQuery()
181 145
         TextBox2.Text = 登入人部門 : TextBox3.Text = gUserName
182
-        DataGridView1.DataSource = Nothing : ds.Clear()
146
+        明細_dgv.DataSource = Nothing : ds.Clear()
183 147
         conn.Close()
184 148
     End Sub
185 149
     Private Sub 存檔()
186
-        For i As Integer = 0 To DataGridView1.Rows.Count - 1
187
-            資料數 = DataGridView1.Rows.Count : MyModule1.進度條()
150
+        For i As Integer = 0 To 明細_dgv.Rows.Count - 1
151
+            資料數 = 明細_dgv.Rows.Count : MyModule1.進度條()
188 152
             If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
189
-            SQL1 = "UPDATE 零用金支付明細 SET  用途 = N'" & DataGridView1.Rows(i).Cells("用途").Value & "', 金額 = N'" & DataGridView1.Rows(i).Cells("金額").Value &
190
-                   "', 備註 = N'" & DataGridView1.Rows(i).Cells("備註").Value & "' WHERE (流水號 LIKE N'" & TextBox1.Text & "' AND 項次 LIKE N'" & DataGridView1.Rows(i).Cells("項次").Value & "')"
153
+            SQL1 = "UPDATE 零用金支付明細 SET  用途 = N'" & 明細_dgv.Rows(i).Cells("用途").Value & "', 金額 = N'" & 明細_dgv.Rows(i).Cells("金額").Value &
154
+                   "', 備註 = N'" & 明細_dgv.Rows(i).Cells("備註").Value & "' WHERE (流水號 LIKE N'" & TextBox1.Text & "' AND 項次 LIKE N'" & 明細_dgv.Rows(i).Cells("項次").Value & "')"
191 155
             cmd.CommandText = SQL1 : cmd.ExecuteNonQuery() : conn.Close()
192 156
         Next : WINPROFIT_ERP_SYS.ToolStripProgressBar1.Value = 0 : 最終數 = 0
193 157
     End Sub
@@ -205,7 +169,7 @@ Public Class 零用金支付申請
205 169
         SQL1 = "INSERT INTO 零用金支付明細 (流水號, 用途, 金額, 備註, 項次) " &
206 170
                "VALUES (N'" & TextBox1.Text & "',N'',N'0',N'',N'" & 新項次 & "')"
207 171
         cmd.Connection = conn : cmd.CommandText = SQL1 : cmd.ExecuteNonQuery()
208
-        Set_使用者清單()
172
+        Set_財務單清單()
209 173
     End Sub
210 174
     Private Sub Button15_Click(sender As Object, e As EventArgs) Handles Button15.Click
211 175
         If TextBox4.Text = "" Then
@@ -215,16 +179,16 @@ Public Class 零用金支付申請
215 179
             If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
216 180
             SQL1 = "DELETE FROM 零用金支付明細 WHERE (流水號 LIKE N'" & TextBox1.Text & "' AND 項次 LIKE N'" & TextBox4.Text & "')"
217 181
             cmd.CommandText = SQL1 : cmd.Connection = conn : cmd.ExecuteNonQuery() : conn.Close()
218
-            Set_使用者清單()
182
+            Set_財務單清單()
219 183
             Dim NUM1 As Integer = 0
220
-            For i As Integer = 0 To DataGridView1.Rows.Count - 1
184
+            For i As Integer = 0 To 明細_dgv.Rows.Count - 1
221 185
                 NUM1 = NUM1 + 1 : If NUM1 < 10 Then : 新項次 = "0" & NUM1 : ElseIf NUM1 > 9 And NUM1 < 100 Then : 新項次 = NUM1 : End If
222 186
                 If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
223
-                SQL1 = "UPDATE 零用金支付明細 SET 項次 = N'" & 新項次 & "' WHERE (流水號 LIKE N'" & TextBox1.Text & "' AND 項次 LIKE N'" & DataGridView1.Rows(i).Cells("項次").Value & "')"
187
+                SQL1 = "UPDATE 零用金支付明細 SET 項次 = N'" & 新項次 & "' WHERE (流水號 LIKE N'" & TextBox1.Text & "' AND 項次 LIKE N'" & 明細_dgv.Rows(i).Cells("項次").Value & "')"
224 188
                 cmd.CommandText = SQL1 : cmd.ExecuteNonQuery()
225 189
                 conn.Close()
226 190
             Next
227
-            Set_使用者清單()
191
+            Set_財務單清單()
228 192
         End If
229 193
     End Sub
230 194
     Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
@@ -232,7 +196,7 @@ Public Class 零用金支付申請
232 196
         Button1.Enabled = True : Button2.Enabled = False : Button6.Enabled = False : Button15.Enabled = False
233 197
         存檔()
234 198
         TextBox1.Text = "" : TextBox2.Text = "" : TextBox3.Text = "" : TextBox4.Text = ""
235
-        DataGridView1.DataSource = Nothing : ds.Clear()
199
+        明細_dgv.DataSource = Nothing : ds.Clear()
236 200
         MsgBox("申請完成,請通知主管審核。")
237 201
         Set_清單1() : Set_清單2() : Set_清單3() : Set_清單4()
238 202
     End Sub
@@ -241,11 +205,11 @@ Public Class 零用金支付申請
241 205
     End Sub
242 206
     Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
243 207
         Button3.Enabled = True : Button4.Enabled = False : Button6.Enabled = False : Button15.Enabled = False
244
-        For i As Integer = 0 To DataGridView1.Rows.Count - 1
245
-            資料數 = DataGridView1.Rows.Count : MyModule1.進度條()
208
+        For i As Integer = 0 To 明細_dgv.Rows.Count - 1
209
+            資料數 = 明細_dgv.Rows.Count : MyModule1.進度條()
246 210
             If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
247
-            SQL1 = "UPDATE 零用金支付明細 SET  用途 = N'" & DataGridView1.Rows(i).Cells("用途").Value & "', 金額 = N'" & DataGridView1.Rows(i).Cells("金額").Value &
248
-                   "', 備註 = N'" & DataGridView1.Rows(i).Cells("備註").Value & "' WHERE (流水號 LIKE N'" & TextBox1.Text & "' AND 項次 LIKE N'" & DataGridView1.Rows(i).Cells("項次").Value & "')"
211
+            SQL1 = "UPDATE 零用金支付明細 SET  用途 = N'" & 明細_dgv.Rows(i).Cells("用途").Value & "', 金額 = N'" & 明細_dgv.Rows(i).Cells("金額").Value &
212
+                   "', 備註 = N'" & 明細_dgv.Rows(i).Cells("備註").Value & "' WHERE (流水號 LIKE N'" & TextBox1.Text & "' AND 項次 LIKE N'" & 明細_dgv.Rows(i).Cells("項次").Value & "')"
249 213
             cmd.CommandText = SQL1 : cmd.ExecuteNonQuery() : conn.Close()
250 214
         Next : WINPROFIT_ERP_SYS.ToolStripProgressBar1.Value = 0 : 最終數 = 0
251 215
     End Sub
@@ -260,8 +224,16 @@ Public Class 零用金支付申請
260 224
             SQL1 = "DELETE FROM 零用金支付明細 WHERE (流水號 LIKE N'" & TextBox1.Text & "')"
261 225
             cmd.CommandText = SQL1 : cmd.Connection = conn : cmd.ExecuteNonQuery() : conn.Close()
262 226
             TextBox1.Text = "" : TextBox2.Text = "" : TextBox3.Text = "" : TextBox4.Text = ""
263
-            DataGridView1.DataSource = Nothing : ds.Clear()
227
+            明細_dgv.DataSource = Nothing : ds.Clear()
264 228
             Set_清單1() : Set_清單2() : Set_清單3() : Set_清單4()
265 229
         End If
266 230
     End Sub
231
+    Private Sub 帳本名稱_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 帳本名稱_cb.SelectedIndexChanged
232
+        帳本編號_cb.SelectedIndex = 帳本名稱_cb.SelectedIndex : PA19 = 帳本編號_cb.Text : Set_清單1() : Set_清單2() : Set_清單3() : Set_清單4()
233
+        TextBox1.Text = "" : TextBox2.Text = "" : TextBox3.Text = "" : Set_財務單清單()
234
+    End Sub
235
+    Private Sub 帳本編號_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 帳本編號_cb.SelectedIndexChanged
236
+        帳本名稱_cb.SelectedIndex = 帳本編號_cb.SelectedIndex : PA19 = 帳本編號_cb.Text : Set_清單1() : Set_清單2() : Set_清單3() : Set_清單4()
237
+        TextBox1.Text = "" : TextBox2.Text = "" : TextBox3.Text = "" : Set_財務單清單()
238
+    End Sub
267 239
 End Class

+ 219
- 99
SHENKANG-MES-SYS/資料庫管理系統/系統編碼規則_1.Designer.vb Wyświetl plik

@@ -31,16 +31,17 @@ Partial Class 系統編碼規則_1
31 31
         Dim DataGridViewCellStyle7 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
32 32
         Dim DataGridViewCellStyle8 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
33 33
         Dim DataGridViewCellStyle9 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
34
+        Dim DataGridViewCellStyle10 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
34 35
         Me.Label3 = New System.Windows.Forms.Label()
35 36
         Me.GroupBox3 = New System.Windows.Forms.GroupBox()
36
-        Me.DataGridView3 = New System.Windows.Forms.DataGridView()
37
+        Me.部件大項_dgv = New System.Windows.Forms.DataGridView()
37 38
         Me.Button7 = New System.Windows.Forms.Button()
38 39
         Me.Label5 = New System.Windows.Forms.Label()
39 40
         Me.Button8 = New System.Windows.Forms.Button()
40 41
         Me.Button9 = New System.Windows.Forms.Button()
41 42
         Me.TextBox4 = New System.Windows.Forms.TextBox()
42 43
         Me.GroupBox2 = New System.Windows.Forms.GroupBox()
43
-        Me.DataGridView2 = New System.Windows.Forms.DataGridView()
44
+        Me.貼標大項_dgv = New System.Windows.Forms.DataGridView()
44 45
         Me.Button1 = New System.Windows.Forms.Button()
45 46
         Me.Label4 = New System.Windows.Forms.Label()
46 47
         Me.Button5 = New System.Windows.Forms.Button()
@@ -54,21 +55,21 @@ Partial Class 系統編碼規則_1
54 55
         Me.Button21 = New System.Windows.Forms.Button()
55 56
         Me.TextBox8 = New System.Windows.Forms.TextBox()
56 57
         Me.GroupBox1 = New System.Windows.Forms.GroupBox()
57
-        Me.DataGridView1 = New System.Windows.Forms.DataGridView()
58
+        Me.部門_dgv = New System.Windows.Forms.DataGridView()
58 59
         Me.Button2 = New System.Windows.Forms.Button()
59 60
         Me.Label1 = New System.Windows.Forms.Label()
60 61
         Me.Button3 = New System.Windows.Forms.Button()
61 62
         Me.Button4 = New System.Windows.Forms.Button()
62 63
         Me.TextBox1 = New System.Windows.Forms.TextBox()
63 64
         Me.GroupBox4 = New System.Windows.Forms.GroupBox()
64
-        Me.DataGridView4 = New System.Windows.Forms.DataGridView()
65
+        Me.職稱_dgv = New System.Windows.Forms.DataGridView()
65 66
         Me.Button10 = New System.Windows.Forms.Button()
66 67
         Me.Label2 = New System.Windows.Forms.Label()
67 68
         Me.Button11 = New System.Windows.Forms.Button()
68 69
         Me.Button12 = New System.Windows.Forms.Button()
69 70
         Me.TextBox2 = New System.Windows.Forms.TextBox()
70 71
         Me.GroupBox5 = New System.Windows.Forms.GroupBox()
71
-        Me.DataGridView5 = New System.Windows.Forms.DataGridView()
72
+        Me.請假類別_dgv = New System.Windows.Forms.DataGridView()
72 73
         Me.Button13 = New System.Windows.Forms.Button()
73 74
         Me.Label6 = New System.Windows.Forms.Label()
74 75
         Me.Button14 = New System.Windows.Forms.Button()
@@ -82,37 +83,48 @@ Partial Class 系統編碼規則_1
82 83
         Me.Button18 = New System.Windows.Forms.Button()
83 84
         Me.TextBox6 = New System.Windows.Forms.TextBox()
84 85
         Me.GroupBox8 = New System.Windows.Forms.GroupBox()
85
-        Me.DataGridView8 = New System.Windows.Forms.DataGridView()
86
+        Me.模具結構_dgv = New System.Windows.Forms.DataGridView()
86 87
         Me.Button22 = New System.Windows.Forms.Button()
87 88
         Me.Label8 = New System.Windows.Forms.Label()
88 89
         Me.Button23 = New System.Windows.Forms.Button()
89 90
         Me.Button24 = New System.Windows.Forms.Button()
90 91
         Me.TextBox7 = New System.Windows.Forms.TextBox()
91 92
         Me.GroupBox9 = New System.Windows.Forms.GroupBox()
92
-        Me.DataGridView9 = New System.Windows.Forms.DataGridView()
93
+        Me.模具材料_dgv = New System.Windows.Forms.DataGridView()
93 94
         Me.Button25 = New System.Windows.Forms.Button()
94 95
         Me.Label10 = New System.Windows.Forms.Label()
95 96
         Me.Button26 = New System.Windows.Forms.Button()
96 97
         Me.Button27 = New System.Windows.Forms.Button()
97 98
         Me.TextBox9 = New System.Windows.Forms.TextBox()
99
+        Me.GroupBox10 = New System.Windows.Forms.GroupBox()
100
+        Me.帳本_tb = New System.Windows.Forms.TextBox()
101
+        Me.Label11 = New System.Windows.Forms.Label()
102
+        Me.帳本編號_tb = New System.Windows.Forms.TextBox()
103
+        Me.Label12 = New System.Windows.Forms.Label()
104
+        Me.帳本_刪除_bt = New System.Windows.Forms.Button()
105
+        Me.帳本_新增_bt = New System.Windows.Forms.Button()
106
+        Me.帳本_修改_bt = New System.Windows.Forms.Button()
107
+        Me.帳本_dgv = New System.Windows.Forms.DataGridView()
98 108
         Me.GroupBox3.SuspendLayout()
99
-        CType(Me.DataGridView3, System.ComponentModel.ISupportInitialize).BeginInit()
109
+        CType(Me.部件大項_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
100 110
         Me.GroupBox2.SuspendLayout()
101
-        CType(Me.DataGridView2, System.ComponentModel.ISupportInitialize).BeginInit()
111
+        CType(Me.貼標大項_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
102 112
         Me.GroupBox7.SuspendLayout()
103 113
         CType(Me.DataGridView7, System.ComponentModel.ISupportInitialize).BeginInit()
104 114
         Me.GroupBox1.SuspendLayout()
105
-        CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).BeginInit()
115
+        CType(Me.部門_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
106 116
         Me.GroupBox4.SuspendLayout()
107
-        CType(Me.DataGridView4, System.ComponentModel.ISupportInitialize).BeginInit()
117
+        CType(Me.職稱_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
108 118
         Me.GroupBox5.SuspendLayout()
109
-        CType(Me.DataGridView5, System.ComponentModel.ISupportInitialize).BeginInit()
119
+        CType(Me.請假類別_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
110 120
         Me.GroupBox6.SuspendLayout()
111 121
         CType(Me.DataGridView6, System.ComponentModel.ISupportInitialize).BeginInit()
112 122
         Me.GroupBox8.SuspendLayout()
113
-        CType(Me.DataGridView8, System.ComponentModel.ISupportInitialize).BeginInit()
123
+        CType(Me.模具結構_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
114 124
         Me.GroupBox9.SuspendLayout()
115
-        CType(Me.DataGridView9, System.ComponentModel.ISupportInitialize).BeginInit()
125
+        CType(Me.模具材料_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
126
+        Me.GroupBox10.SuspendLayout()
127
+        CType(Me.帳本_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
116 128
         Me.SuspendLayout()
117 129
         '
118 130
         'Label3
@@ -128,7 +140,7 @@ Partial Class 系統編碼規則_1
128 140
         '
129 141
         'GroupBox3
130 142
         '
131
-        Me.GroupBox3.Controls.Add(Me.DataGridView3)
143
+        Me.GroupBox3.Controls.Add(Me.部件大項_dgv)
132 144
         Me.GroupBox3.Controls.Add(Me.Button7)
133 145
         Me.GroupBox3.Controls.Add(Me.Label5)
134 146
         Me.GroupBox3.Controls.Add(Me.Button8)
@@ -141,17 +153,17 @@ Partial Class 系統編碼規則_1
141 153
         Me.GroupBox3.TabStop = False
142 154
         Me.GroupBox3.Text = "部件大項分類"
143 155
         '
144
-        'DataGridView3
156
+        '部件大項_dgv
145 157
         '
146 158
         DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
147
-        Me.DataGridView3.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
148
-        Me.DataGridView3.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
149
-        Me.DataGridView3.Location = New System.Drawing.Point(6, 141)
150
-        Me.DataGridView3.Name = "DataGridView3"
151
-        Me.DataGridView3.RowHeadersWidth = 5
152
-        Me.DataGridView3.RowTemplate.Height = 24
153
-        Me.DataGridView3.Size = New System.Drawing.Size(125, 311)
154
-        Me.DataGridView3.TabIndex = 222
159
+        Me.部件大項_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
160
+        Me.部件大項_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
161
+        Me.部件大項_dgv.Location = New System.Drawing.Point(6, 141)
162
+        Me.部件大項_dgv.Name = "部件大項_dgv"
163
+        Me.部件大項_dgv.RowHeadersWidth = 5
164
+        Me.部件大項_dgv.RowTemplate.Height = 24
165
+        Me.部件大項_dgv.Size = New System.Drawing.Size(125, 311)
166
+        Me.部件大項_dgv.TabIndex = 222
155 167
         '
156 168
         'Button7
157 169
         '
@@ -204,7 +216,7 @@ Partial Class 系統編碼規則_1
204 216
         '
205 217
         'GroupBox2
206 218
         '
207
-        Me.GroupBox2.Controls.Add(Me.DataGridView2)
219
+        Me.GroupBox2.Controls.Add(Me.貼標大項_dgv)
208 220
         Me.GroupBox2.Controls.Add(Me.Button1)
209 221
         Me.GroupBox2.Controls.Add(Me.Label4)
210 222
         Me.GroupBox2.Controls.Add(Me.Button5)
@@ -217,17 +229,17 @@ Partial Class 系統編碼規則_1
217 229
         Me.GroupBox2.TabStop = False
218 230
         Me.GroupBox2.Text = "貼標對應名稱清單"
219 231
         '
220
-        'DataGridView2
232
+        '貼標大項_dgv
221 233
         '
222 234
         DataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
223
-        Me.DataGridView2.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2
224
-        Me.DataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
225
-        Me.DataGridView2.Location = New System.Drawing.Point(6, 141)
226
-        Me.DataGridView2.Name = "DataGridView2"
227
-        Me.DataGridView2.RowHeadersWidth = 5
228
-        Me.DataGridView2.RowTemplate.Height = 24
229
-        Me.DataGridView2.Size = New System.Drawing.Size(125, 311)
230
-        Me.DataGridView2.TabIndex = 222
235
+        Me.貼標大項_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2
236
+        Me.貼標大項_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
237
+        Me.貼標大項_dgv.Location = New System.Drawing.Point(6, 141)
238
+        Me.貼標大項_dgv.Name = "貼標大項_dgv"
239
+        Me.貼標大項_dgv.RowHeadersWidth = 5
240
+        Me.貼標大項_dgv.RowTemplate.Height = 24
241
+        Me.貼標大項_dgv.Size = New System.Drawing.Size(125, 311)
242
+        Me.貼標大項_dgv.TabIndex = 222
231 243
         '
232 244
         'Button1
233 245
         '
@@ -356,7 +368,7 @@ Partial Class 系統編碼規則_1
356 368
         '
357 369
         'GroupBox1
358 370
         '
359
-        Me.GroupBox1.Controls.Add(Me.DataGridView1)
371
+        Me.GroupBox1.Controls.Add(Me.部門_dgv)
360 372
         Me.GroupBox1.Controls.Add(Me.Button2)
361 373
         Me.GroupBox1.Controls.Add(Me.Label1)
362 374
         Me.GroupBox1.Controls.Add(Me.Button3)
@@ -369,17 +381,17 @@ Partial Class 系統編碼規則_1
369 381
         Me.GroupBox1.TabStop = False
370 382
         Me.GroupBox1.Text = "部門清單管理"
371 383
         '
372
-        'DataGridView1
384
+        '部門_dgv
373 385
         '
374 386
         DataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
375
-        Me.DataGridView1.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle4
376
-        Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
377
-        Me.DataGridView1.Location = New System.Drawing.Point(6, 141)
378
-        Me.DataGridView1.Name = "DataGridView1"
379
-        Me.DataGridView1.RowHeadersWidth = 5
380
-        Me.DataGridView1.RowTemplate.Height = 24
381
-        Me.DataGridView1.Size = New System.Drawing.Size(125, 311)
382
-        Me.DataGridView1.TabIndex = 222
387
+        Me.部門_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle4
388
+        Me.部門_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
389
+        Me.部門_dgv.Location = New System.Drawing.Point(6, 141)
390
+        Me.部門_dgv.Name = "部門_dgv"
391
+        Me.部門_dgv.RowHeadersWidth = 5
392
+        Me.部門_dgv.RowTemplate.Height = 24
393
+        Me.部門_dgv.Size = New System.Drawing.Size(125, 311)
394
+        Me.部門_dgv.TabIndex = 222
383 395
         '
384 396
         'Button2
385 397
         '
@@ -432,7 +444,7 @@ Partial Class 系統編碼規則_1
432 444
         '
433 445
         'GroupBox4
434 446
         '
435
-        Me.GroupBox4.Controls.Add(Me.DataGridView4)
447
+        Me.GroupBox4.Controls.Add(Me.職稱_dgv)
436 448
         Me.GroupBox4.Controls.Add(Me.Button10)
437 449
         Me.GroupBox4.Controls.Add(Me.Label2)
438 450
         Me.GroupBox4.Controls.Add(Me.Button11)
@@ -445,17 +457,17 @@ Partial Class 系統編碼規則_1
445 457
         Me.GroupBox4.TabStop = False
446 458
         Me.GroupBox4.Text = "職稱清單管理"
447 459
         '
448
-        'DataGridView4
460
+        '職稱_dgv
449 461
         '
450 462
         DataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
451
-        Me.DataGridView4.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle5
452
-        Me.DataGridView4.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
453
-        Me.DataGridView4.Location = New System.Drawing.Point(6, 141)
454
-        Me.DataGridView4.Name = "DataGridView4"
455
-        Me.DataGridView4.RowHeadersWidth = 5
456
-        Me.DataGridView4.RowTemplate.Height = 24
457
-        Me.DataGridView4.Size = New System.Drawing.Size(125, 311)
458
-        Me.DataGridView4.TabIndex = 222
463
+        Me.職稱_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle5
464
+        Me.職稱_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
465
+        Me.職稱_dgv.Location = New System.Drawing.Point(6, 141)
466
+        Me.職稱_dgv.Name = "職稱_dgv"
467
+        Me.職稱_dgv.RowHeadersWidth = 5
468
+        Me.職稱_dgv.RowTemplate.Height = 24
469
+        Me.職稱_dgv.Size = New System.Drawing.Size(125, 311)
470
+        Me.職稱_dgv.TabIndex = 222
459 471
         '
460 472
         'Button10
461 473
         '
@@ -508,7 +520,7 @@ Partial Class 系統編碼規則_1
508 520
         '
509 521
         'GroupBox5
510 522
         '
511
-        Me.GroupBox5.Controls.Add(Me.DataGridView5)
523
+        Me.GroupBox5.Controls.Add(Me.請假類別_dgv)
512 524
         Me.GroupBox5.Controls.Add(Me.Button13)
513 525
         Me.GroupBox5.Controls.Add(Me.Label6)
514 526
         Me.GroupBox5.Controls.Add(Me.Button14)
@@ -521,17 +533,17 @@ Partial Class 系統編碼規則_1
521 533
         Me.GroupBox5.TabStop = False
522 534
         Me.GroupBox5.Text = "請假類別管理"
523 535
         '
524
-        'DataGridView5
536
+        '請假類別_dgv
525 537
         '
526 538
         DataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
527
-        Me.DataGridView5.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle6
528
-        Me.DataGridView5.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
529
-        Me.DataGridView5.Location = New System.Drawing.Point(6, 141)
530
-        Me.DataGridView5.Name = "DataGridView5"
531
-        Me.DataGridView5.RowHeadersWidth = 5
532
-        Me.DataGridView5.RowTemplate.Height = 24
533
-        Me.DataGridView5.Size = New System.Drawing.Size(125, 311)
534
-        Me.DataGridView5.TabIndex = 222
539
+        Me.請假類別_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle6
540
+        Me.請假類別_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
541
+        Me.請假類別_dgv.Location = New System.Drawing.Point(6, 141)
542
+        Me.請假類別_dgv.Name = "請假類別_dgv"
543
+        Me.請假類別_dgv.RowHeadersWidth = 5
544
+        Me.請假類別_dgv.RowTemplate.Height = 24
545
+        Me.請假類別_dgv.Size = New System.Drawing.Size(125, 311)
546
+        Me.請假類別_dgv.TabIndex = 222
535 547
         '
536 548
         'Button13
537 549
         '
@@ -660,7 +672,7 @@ Partial Class 系統編碼規則_1
660 672
         '
661 673
         'GroupBox8
662 674
         '
663
-        Me.GroupBox8.Controls.Add(Me.DataGridView8)
675
+        Me.GroupBox8.Controls.Add(Me.模具結構_dgv)
664 676
         Me.GroupBox8.Controls.Add(Me.Button22)
665 677
         Me.GroupBox8.Controls.Add(Me.Label8)
666 678
         Me.GroupBox8.Controls.Add(Me.Button23)
@@ -673,17 +685,17 @@ Partial Class 系統編碼規則_1
673 685
         Me.GroupBox8.TabStop = False
674 686
         Me.GroupBox8.Text = "模具開發用結構清單"
675 687
         '
676
-        'DataGridView8
688
+        '模具結構_dgv
677 689
         '
678 690
         DataGridViewCellStyle8.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
679
-        Me.DataGridView8.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle8
680
-        Me.DataGridView8.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
681
-        Me.DataGridView8.Location = New System.Drawing.Point(6, 141)
682
-        Me.DataGridView8.Name = "DataGridView8"
683
-        Me.DataGridView8.RowHeadersWidth = 5
684
-        Me.DataGridView8.RowTemplate.Height = 24
685
-        Me.DataGridView8.Size = New System.Drawing.Size(125, 311)
686
-        Me.DataGridView8.TabIndex = 222
691
+        Me.模具結構_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle8
692
+        Me.模具結構_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
693
+        Me.模具結構_dgv.Location = New System.Drawing.Point(6, 141)
694
+        Me.模具結構_dgv.Name = "模具結構_dgv"
695
+        Me.模具結構_dgv.RowHeadersWidth = 5
696
+        Me.模具結構_dgv.RowTemplate.Height = 24
697
+        Me.模具結構_dgv.Size = New System.Drawing.Size(125, 311)
698
+        Me.模具結構_dgv.TabIndex = 222
687 699
         '
688 700
         'Button22
689 701
         '
@@ -736,7 +748,7 @@ Partial Class 系統編碼規則_1
736 748
         '
737 749
         'GroupBox9
738 750
         '
739
-        Me.GroupBox9.Controls.Add(Me.DataGridView9)
751
+        Me.GroupBox9.Controls.Add(Me.模具材料_dgv)
740 752
         Me.GroupBox9.Controls.Add(Me.Button25)
741 753
         Me.GroupBox9.Controls.Add(Me.Label10)
742 754
         Me.GroupBox9.Controls.Add(Me.Button26)
@@ -749,17 +761,17 @@ Partial Class 系統編碼規則_1
749 761
         Me.GroupBox9.TabStop = False
750 762
         Me.GroupBox9.Text = "模具開發用材質清單"
751 763
         '
752
-        'DataGridView9
764
+        '模具材料_dgv
753 765
         '
754 766
         DataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
755
-        Me.DataGridView9.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle9
756
-        Me.DataGridView9.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
757
-        Me.DataGridView9.Location = New System.Drawing.Point(6, 141)
758
-        Me.DataGridView9.Name = "DataGridView9"
759
-        Me.DataGridView9.RowHeadersWidth = 5
760
-        Me.DataGridView9.RowTemplate.Height = 24
761
-        Me.DataGridView9.Size = New System.Drawing.Size(125, 311)
762
-        Me.DataGridView9.TabIndex = 222
767
+        Me.模具材料_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle9
768
+        Me.模具材料_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
769
+        Me.模具材料_dgv.Location = New System.Drawing.Point(6, 141)
770
+        Me.模具材料_dgv.Name = "模具材料_dgv"
771
+        Me.模具材料_dgv.RowHeadersWidth = 5
772
+        Me.模具材料_dgv.RowTemplate.Height = 24
773
+        Me.模具材料_dgv.Size = New System.Drawing.Size(125, 311)
774
+        Me.模具材料_dgv.TabIndex = 222
763 775
         '
764 776
         'Button25
765 777
         '
@@ -810,11 +822,107 @@ Partial Class 系統編碼規則_1
810 822
         Me.TextBox9.Size = New System.Drawing.Size(87, 23)
811 823
         Me.TextBox9.TabIndex = 227
812 824
         '
825
+        'GroupBox10
826
+        '
827
+        Me.GroupBox10.Controls.Add(Me.帳本_tb)
828
+        Me.GroupBox10.Controls.Add(Me.Label11)
829
+        Me.GroupBox10.Controls.Add(Me.帳本編號_tb)
830
+        Me.GroupBox10.Controls.Add(Me.Label12)
831
+        Me.GroupBox10.Controls.Add(Me.帳本_刪除_bt)
832
+        Me.GroupBox10.Controls.Add(Me.帳本_新增_bt)
833
+        Me.GroupBox10.Controls.Add(Me.帳本_修改_bt)
834
+        Me.GroupBox10.Controls.Add(Me.帳本_dgv)
835
+        Me.GroupBox10.Location = New System.Drawing.Point(762, 39)
836
+        Me.GroupBox10.Name = "GroupBox10"
837
+        Me.GroupBox10.Size = New System.Drawing.Size(238, 462)
838
+        Me.GroupBox10.TabIndex = 254
839
+        Me.GroupBox10.TabStop = False
840
+        Me.GroupBox10.Text = "財務帳本編號"
841
+        '
842
+        '帳本_tb
843
+        '
844
+        Me.帳本_tb.Location = New System.Drawing.Point(135, 16)
845
+        Me.帳本_tb.Name = "帳本_tb"
846
+        Me.帳本_tb.Size = New System.Drawing.Size(95, 23)
847
+        Me.帳本_tb.TabIndex = 677
848
+        '
849
+        'Label11
850
+        '
851
+        Me.Label11.AutoSize = True
852
+        Me.Label11.Location = New System.Drawing.Point(103, 20)
853
+        Me.Label11.Name = "Label11"
854
+        Me.Label11.Size = New System.Drawing.Size(32, 16)
855
+        Me.Label11.TabIndex = 676
856
+        Me.Label11.Text = "職別"
857
+        '
858
+        '帳本編號_tb
859
+        '
860
+        Me.帳本編號_tb.Location = New System.Drawing.Point(41, 17)
861
+        Me.帳本編號_tb.Name = "帳本編號_tb"
862
+        Me.帳本編號_tb.Size = New System.Drawing.Size(60, 23)
863
+        Me.帳本編號_tb.TabIndex = 675
864
+        '
865
+        'Label12
866
+        '
867
+        Me.Label12.AutoSize = True
868
+        Me.Label12.Location = New System.Drawing.Point(9, 20)
869
+        Me.Label12.Name = "Label12"
870
+        Me.Label12.Size = New System.Drawing.Size(32, 16)
871
+        Me.Label12.TabIndex = 674
872
+        Me.Label12.Text = "編號"
873
+        '
874
+        '帳本_刪除_bt
875
+        '
876
+        Me.帳本_刪除_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
877
+        Me.帳本_刪除_bt.ForeColor = System.Drawing.Color.Red
878
+        Me.帳本_刪除_bt.Location = New System.Drawing.Point(156, 45)
879
+        Me.帳本_刪除_bt.Name = "帳本_刪除_bt"
880
+        Me.帳本_刪除_bt.Size = New System.Drawing.Size(74, 25)
881
+        Me.帳本_刪除_bt.TabIndex = 673
882
+        Me.帳本_刪除_bt.Text = "刪除"
883
+        Me.帳本_刪除_bt.UseVisualStyleBackColor = True
884
+        '
885
+        '帳本_新增_bt
886
+        '
887
+        Me.帳本_新增_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
888
+        Me.帳本_新增_bt.ForeColor = System.Drawing.Color.Blue
889
+        Me.帳本_新增_bt.Location = New System.Drawing.Point(6, 45)
890
+        Me.帳本_新增_bt.Name = "帳本_新增_bt"
891
+        Me.帳本_新增_bt.Size = New System.Drawing.Size(74, 25)
892
+        Me.帳本_新增_bt.TabIndex = 671
893
+        Me.帳本_新增_bt.Text = "新增"
894
+        Me.帳本_新增_bt.UseVisualStyleBackColor = True
895
+        '
896
+        '帳本_修改_bt
897
+        '
898
+        Me.帳本_修改_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
899
+        Me.帳本_修改_bt.ForeColor = System.Drawing.Color.DarkGreen
900
+        Me.帳本_修改_bt.Location = New System.Drawing.Point(81, 45)
901
+        Me.帳本_修改_bt.Name = "帳本_修改_bt"
902
+        Me.帳本_修改_bt.Size = New System.Drawing.Size(74, 25)
903
+        Me.帳本_修改_bt.TabIndex = 672
904
+        Me.帳本_修改_bt.Text = "修改"
905
+        Me.帳本_修改_bt.UseVisualStyleBackColor = True
906
+        '
907
+        '帳本_dgv
908
+        '
909
+        DataGridViewCellStyle10.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
910
+        Me.帳本_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle10
911
+        Me.帳本_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
912
+        Me.帳本_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
913
+        Me.帳本_dgv.Location = New System.Drawing.Point(6, 76)
914
+        Me.帳本_dgv.Name = "帳本_dgv"
915
+        Me.帳本_dgv.RowHeadersWidth = 5
916
+        Me.帳本_dgv.RowTemplate.Height = 24
917
+        Me.帳本_dgv.Size = New System.Drawing.Size(224, 376)
918
+        Me.帳本_dgv.TabIndex = 663
919
+        '
813 920
         '系統編碼規則_1
814 921
         '
815 922
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
816 923
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
817 924
         Me.ClientSize = New System.Drawing.Size(1914, 971)
925
+        Me.Controls.Add(Me.GroupBox10)
818 926
         Me.Controls.Add(Me.GroupBox9)
819 927
         Me.Controls.Add(Me.GroupBox8)
820 928
         Me.Controls.Add(Me.GroupBox6)
@@ -828,34 +936,37 @@ Partial Class 系統編碼規則_1
828 936
         Me.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
829 937
         Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
830 938
         Me.Name = "系統編碼規則_1"
831
-        Me.Text = "系統編碼規則_1"
939
+        Me.Text = "系統編碼原則"
832 940
         Me.GroupBox3.ResumeLayout(False)
833 941
         Me.GroupBox3.PerformLayout()
834
-        CType(Me.DataGridView3, System.ComponentModel.ISupportInitialize).EndInit()
942
+        CType(Me.部件大項_dgv, System.ComponentModel.ISupportInitialize).EndInit()
835 943
         Me.GroupBox2.ResumeLayout(False)
836 944
         Me.GroupBox2.PerformLayout()
837
-        CType(Me.DataGridView2, System.ComponentModel.ISupportInitialize).EndInit()
945
+        CType(Me.貼標大項_dgv, System.ComponentModel.ISupportInitialize).EndInit()
838 946
         Me.GroupBox7.ResumeLayout(False)
839 947
         Me.GroupBox7.PerformLayout()
840 948
         CType(Me.DataGridView7, System.ComponentModel.ISupportInitialize).EndInit()
841 949
         Me.GroupBox1.ResumeLayout(False)
842 950
         Me.GroupBox1.PerformLayout()
843
-        CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).EndInit()
951
+        CType(Me.部門_dgv, System.ComponentModel.ISupportInitialize).EndInit()
844 952
         Me.GroupBox4.ResumeLayout(False)
845 953
         Me.GroupBox4.PerformLayout()
846
-        CType(Me.DataGridView4, System.ComponentModel.ISupportInitialize).EndInit()
954
+        CType(Me.職稱_dgv, System.ComponentModel.ISupportInitialize).EndInit()
847 955
         Me.GroupBox5.ResumeLayout(False)
848 956
         Me.GroupBox5.PerformLayout()
849
-        CType(Me.DataGridView5, System.ComponentModel.ISupportInitialize).EndInit()
957
+        CType(Me.請假類別_dgv, System.ComponentModel.ISupportInitialize).EndInit()
850 958
         Me.GroupBox6.ResumeLayout(False)
851 959
         Me.GroupBox6.PerformLayout()
852 960
         CType(Me.DataGridView6, System.ComponentModel.ISupportInitialize).EndInit()
853 961
         Me.GroupBox8.ResumeLayout(False)
854 962
         Me.GroupBox8.PerformLayout()
855
-        CType(Me.DataGridView8, System.ComponentModel.ISupportInitialize).EndInit()
963
+        CType(Me.模具結構_dgv, System.ComponentModel.ISupportInitialize).EndInit()
856 964
         Me.GroupBox9.ResumeLayout(False)
857 965
         Me.GroupBox9.PerformLayout()
858
-        CType(Me.DataGridView9, System.ComponentModel.ISupportInitialize).EndInit()
966
+        CType(Me.模具材料_dgv, System.ComponentModel.ISupportInitialize).EndInit()
967
+        Me.GroupBox10.ResumeLayout(False)
968
+        Me.GroupBox10.PerformLayout()
969
+        CType(Me.帳本_dgv, System.ComponentModel.ISupportInitialize).EndInit()
859 970
         Me.ResumeLayout(False)
860 971
         Me.PerformLayout()
861 972
 
@@ -863,14 +974,14 @@ Partial Class 系統編碼規則_1
863 974
 
864 975
     Friend WithEvents Label3 As Label
865 976
     Friend WithEvents GroupBox3 As GroupBox
866
-    Friend WithEvents DataGridView3 As DataGridView
977
+    Friend WithEvents 部件大項_dgv As DataGridView
867 978
     Friend WithEvents Button7 As Button
868 979
     Friend WithEvents Label5 As Label
869 980
     Friend WithEvents Button8 As Button
870 981
     Friend WithEvents Button9 As Button
871 982
     Friend WithEvents TextBox4 As TextBox
872 983
     Friend WithEvents GroupBox2 As GroupBox
873
-    Friend WithEvents DataGridView2 As DataGridView
984
+    Friend WithEvents 貼標大項_dgv As DataGridView
874 985
     Friend WithEvents Button1 As Button
875 986
     Friend WithEvents Label4 As Label
876 987
     Friend WithEvents Button5 As Button
@@ -884,21 +995,21 @@ Partial Class 系統編碼規則_1
884 995
     Friend WithEvents Button21 As Button
885 996
     Friend WithEvents TextBox8 As TextBox
886 997
     Friend WithEvents GroupBox1 As GroupBox
887
-    Friend WithEvents DataGridView1 As DataGridView
998
+    Friend WithEvents 部門_dgv As DataGridView
888 999
     Friend WithEvents Button2 As Button
889 1000
     Friend WithEvents Label1 As Label
890 1001
     Friend WithEvents Button3 As Button
891 1002
     Friend WithEvents Button4 As Button
892 1003
     Friend WithEvents TextBox1 As TextBox
893 1004
     Friend WithEvents GroupBox4 As GroupBox
894
-    Friend WithEvents DataGridView4 As DataGridView
1005
+    Friend WithEvents 職稱_dgv As DataGridView
895 1006
     Friend WithEvents Button10 As Button
896 1007
     Friend WithEvents Label2 As Label
897 1008
     Friend WithEvents Button11 As Button
898 1009
     Friend WithEvents Button12 As Button
899 1010
     Friend WithEvents TextBox2 As TextBox
900 1011
     Friend WithEvents GroupBox5 As GroupBox
901
-    Friend WithEvents DataGridView5 As DataGridView
1012
+    Friend WithEvents 請假類別_dgv As DataGridView
902 1013
     Friend WithEvents Button13 As Button
903 1014
     Friend WithEvents Label6 As Label
904 1015
     Friend WithEvents Button14 As Button
@@ -912,17 +1023,26 @@ Partial Class 系統編碼規則_1
912 1023
     Friend WithEvents Button18 As Button
913 1024
     Friend WithEvents TextBox6 As TextBox
914 1025
     Friend WithEvents GroupBox8 As GroupBox
915
-    Friend WithEvents DataGridView8 As DataGridView
1026
+    Friend WithEvents 模具結構_dgv As DataGridView
916 1027
     Friend WithEvents Button22 As Button
917 1028
     Friend WithEvents Label8 As Label
918 1029
     Friend WithEvents Button23 As Button
919 1030
     Friend WithEvents Button24 As Button
920 1031
     Friend WithEvents TextBox7 As TextBox
921 1032
     Friend WithEvents GroupBox9 As GroupBox
922
-    Friend WithEvents DataGridView9 As DataGridView
1033
+    Friend WithEvents 模具材料_dgv As DataGridView
923 1034
     Friend WithEvents Button25 As Button
924 1035
     Friend WithEvents Label10 As Label
925 1036
     Friend WithEvents Button26 As Button
926 1037
     Friend WithEvents Button27 As Button
927 1038
     Friend WithEvents TextBox9 As TextBox
1039
+    Friend WithEvents GroupBox10 As GroupBox
1040
+    Friend WithEvents 帳本_tb As TextBox
1041
+    Friend WithEvents Label11 As Label
1042
+    Friend WithEvents 帳本編號_tb As TextBox
1043
+    Friend WithEvents Label12 As Label
1044
+    Friend WithEvents 帳本_刪除_bt As Button
1045
+    Friend WithEvents 帳本_新增_bt As Button
1046
+    Friend WithEvents 帳本_修改_bt As Button
1047
+    Friend WithEvents 帳本_dgv As DataGridView
928 1048
 End Class

+ 112
- 145
SHENKANG-MES-SYS/資料庫管理系統/系統編碼規則_1.vb Wyświetl plik

@@ -1,201 +1,142 @@
1 1
 Option Strict Off
2 2
 Imports System.Data.SqlClient
3 3
 Public Class 系統編碼規則_1
4
-    Dim conn As New SqlConnection
5
-    Dim da As New SqlDataAdapter
6
-    Dim cmd As New SqlCommand
7
-    Dim ds As New DataSet : Dim ds1 As New DataSet : Dim ds2 As New DataSet : Dim ds3 As New DataSet : Dim ds4 As New DataSet : Dim ds5 As New DataSet : Dim ds6 As New DataSet : Dim ds7 As New DataSet
8
-    Dim ds8 As New DataSet
9
-    Dim dr As SqlDataReader
10
-    Private Sub Set_DGV1載入前設定()
11
-        DataGridView1.DataSource = Nothing : ds.Clear()
12
-        DataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
13
-        DataGridView1.ColumnHeadersHeight = 25
14
-        DataGridView1.AllowUserToAddRows = False
4
+    ReadOnly ds As New DataSet : ReadOnly ds1 As New DataSet : ReadOnly ds2 As New DataSet : ReadOnly ds3 As New DataSet : ReadOnly ds4 As New DataSet : ReadOnly ds5 As New DataSet
5
+    ReadOnly ds6 As New DataSet : ReadOnly ds7 As New DataSet : ReadOnly ds8 As New DataSet : ReadOnly ds9 As New DataSet
6
+    Dim EDR As Integer = 0 : Dim ESTR As String
7
+    Private Sub Set_帳本清單()
8
+        帳本_dgv.DataSource = Nothing : ds9.Clear()
9
+        帳本_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
10
+        帳本_dgv.ColumnHeadersHeight = 25
11
+        帳本_dgv.AllowUserToAddRows = False
15 12
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
16
-    End Sub
17
-    Private Sub Set_DGV1載入後設定()
18
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds) : DataGridView1.DataSource = ds.Tables(0) : conn.Close()
13
+        SQL1 = "SELECT 編號, 帳本名稱 FROM 財務帳本編號 ORDER BY 編號"
14
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds9) : 帳本_dgv.DataSource = ds9.Tables(0) : conn.Close()
15
+        帳本_dgv.Columns(0).Width = 100 : 帳本_dgv.Columns(1).Width = 100
19 16
     End Sub
20 17
     Private Sub Set_部門清單()
21
-        Set_DGV1載入前設定()
22
-        SQL1 = "SELECT 部門 FROM METOO部門清單"
23
-        Set_DGV1載入後設定() : Set_grid()
24
-    End Sub
25
-    Private Sub Set_grid()
26
-        DataGridView1.Columns(0).Width = 100
27
-    End Sub
28
-    Private Sub Set_DGV2載入前設定()
29
-        DataGridView2.DataSource = Nothing : ds1.Clear()
30
-        DataGridView2.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
31
-        DataGridView2.ColumnHeadersHeight = 25
32
-        DataGridView2.AllowUserToAddRows = False
18
+        部門_dgv.DataSource = Nothing : ds.Clear()
19
+        部門_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
20
+        部門_dgv.ColumnHeadersHeight = 25
21
+        部門_dgv.AllowUserToAddRows = False
33 22
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
34
-    End Sub
35
-    Private Sub Set_DGV2載入後設定()
36
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds1) : DataGridView2.DataSource = ds1.Tables(0) : conn.Close()
23
+        SQL1 = "SELECT 部門 FROM METOO部門清單"
24
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds) : 部門_dgv.DataSource = ds.Tables(0) : conn.Close()
25
+        部門_dgv.Columns(0).Width = 100
37 26
     End Sub
38 27
     Private Sub Set_清單2()
39
-        Set_DGV2載入前設定()
40
-        SQL1 = "SELECT 貼標對應名稱 FROM 貼標對應名稱清單"
41
-        Set_DGV2載入後設定() : Set_grid1()
42
-    End Sub
43
-    Private Sub Set_grid1()
44
-        DataGridView2.Columns(0).Width = 100
45
-    End Sub
46
-    Private Sub Set_DGV3載入前設定()
47
-        DataGridView3.DataSource = Nothing : ds2.Clear()
48
-        DataGridView3.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
49
-        DataGridView3.ColumnHeadersHeight = 25
50
-        DataGridView3.AllowUserToAddRows = False
28
+        貼標大項_dgv.DataSource = Nothing : ds1.Clear()
29
+        貼標大項_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
30
+        貼標大項_dgv.ColumnHeadersHeight = 25
31
+        貼標大項_dgv.AllowUserToAddRows = False
51 32
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
52
-    End Sub
53
-    Private Sub Set_DGV3載入後設定()
54
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds2) : DataGridView3.DataSource = ds2.Tables(0) : conn.Close()
33
+        SQL1 = "SELECT 貼標對應名稱 FROM 貼標對應名稱清單"
34
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds1) : 貼標大項_dgv.DataSource = ds1.Tables(0) : conn.Close()
35
+        貼標大項_dgv.Columns(0).Width = 100
55 36
     End Sub
56 37
     Private Sub Set_清單1()
57
-        Set_DGV3載入前設定()
58
-        SQL1 = "SELECT 部件類別 FROM 部件大項分類 ORDER BY   部件類別"
59
-        Set_DGV3載入後設定() : Set_grid2()
60
-    End Sub
61
-    Private Sub Set_grid2()
62
-        DataGridView3.Columns(0).Width = 100
63
-    End Sub
64
-    Private Sub Set_DGV4載入前設定()
65
-        DataGridView4.DataSource = Nothing : ds3.Clear()
66
-        DataGridView4.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
67
-        DataGridView4.ColumnHeadersHeight = 25
68
-        DataGridView4.AllowUserToAddRows = False
38
+        部件大項_dgv.DataSource = Nothing : ds2.Clear()
39
+        部件大項_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
40
+        部件大項_dgv.ColumnHeadersHeight = 25
41
+        部件大項_dgv.AllowUserToAddRows = False
69 42
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
70
-    End Sub
71
-    Private Sub Set_DGV4載入後設定()
72
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds3) : DataGridView4.DataSource = ds3.Tables(0) : conn.Close()
43
+        SQL1 = "SELECT 部件類別 FROM 部件大項分類 ORDER BY   部件類別"
44
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds2) : 部件大項_dgv.DataSource = ds2.Tables(0) : conn.Close()
45
+        部件大項_dgv.Columns(0).Width = 100
73 46
     End Sub
74 47
     Private Sub Set_職稱清單()
75
-        Set_DGV4載入前設定()
76
-        SQL1 = "SELECT 職稱 FROM METOO職稱清單 ORDER BY 職稱"
77
-        Set_DGV4載入後設定() : Set_grid3()
78
-    End Sub
79
-    Private Sub Set_grid3()
80
-        DataGridView4.Columns(0).Width = 100
81
-    End Sub
82
-    Private Sub Set_DGV5載入前設定()
83
-        DataGridView5.DataSource = Nothing : ds4.Clear()
84
-        DataGridView5.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
85
-        DataGridView5.ColumnHeadersHeight = 25
86
-        DataGridView5.AllowUserToAddRows = False
48
+        職稱_dgv.DataSource = Nothing : ds3.Clear()
49
+        職稱_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
50
+        職稱_dgv.ColumnHeadersHeight = 25
51
+        職稱_dgv.AllowUserToAddRows = False
87 52
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
88
-    End Sub
89
-    Private Sub Set_DGV5載入後設定()
90
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds4) : DataGridView5.DataSource = ds4.Tables(0) : conn.Close()
53
+        SQL1 = "SELECT 職稱 FROM METOO職稱清單 ORDER BY 職稱"
54
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds3) : 職稱_dgv.DataSource = ds3.Tables(0) : conn.Close()
55
+        職稱_dgv.Columns(0).Width = 100
91 56
     End Sub
92 57
     Private Sub Set_請假類別清單()
93
-        Set_DGV5載入前設定()
58
+        請假類別_dgv.DataSource = Nothing : ds4.Clear()
59
+        請假類別_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
60
+        請假類別_dgv.ColumnHeadersHeight = 25
61
+        請假類別_dgv.AllowUserToAddRows = False
62
+        If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
94 63
         SQL1 = "SELECT 請假類別 FROM METOO請假類別 ORDER BY 請假類別"
95
-        Set_DGV5載入後設定() : Set_grid4()
64
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds4) : 請假類別_dgv.DataSource = ds4.Tables(0) : conn.Close()
65
+        請假類別_dgv.Columns(0).Width = 100
96 66
     End Sub
97
-    Private Sub Set_grid4()
98
-        DataGridView5.Columns(0).Width = 100
99
-    End Sub
100
-    Private Sub Set_DGV6載入前設定()
67
+    Private Sub Set_廠商類別()
101 68
         DataGridView6.DataSource = Nothing : ds5.Clear()
102 69
         DataGridView6.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
103 70
         DataGridView6.ColumnHeadersHeight = 25
104 71
         DataGridView6.AllowUserToAddRows = False
105 72
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
106
-    End Sub
107
-    Private Sub Set_DGV6載入後設定()
108
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds5) : DataGridView6.DataSource = ds5.Tables(0) : conn.Close()
109
-    End Sub
110
-    Private Sub Set_廠商類別()
111
-        Set_DGV6載入前設定()
112 73
         SQL1 = "SELECT 廠商類別 FROM 廠商類別 ORDER BY 廠商類別"
113
-        Set_DGV6載入後設定() : Set_grid5()
114
-    End Sub
115
-    Private Sub Set_grid5()
74
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds5) : DataGridView6.DataSource = ds5.Tables(0) : conn.Close()
116 75
         DataGridView6.Columns(0).Width = 100
117 76
     End Sub
118
-    Private Sub Set_DGV7載入前設定()
77
+    Private Sub Set_年度清單()
119 78
         DataGridView7.DataSource = Nothing : ds6.Clear()
120 79
         DataGridView7.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
121 80
         DataGridView7.ColumnHeadersHeight = 25
122 81
         DataGridView7.AllowUserToAddRows = False
123 82
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
124
-    End Sub
125
-    Private Sub Set_DGV7載入後設定()
126
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds6) : DataGridView7.DataSource = ds6.Tables(0) : conn.Close()
127
-    End Sub
128
-    Private Sub Set_年度清單()
129
-        Set_DGV7載入前設定()
130 83
         SQL1 = "SELECT  年份 FROM 年份清單 ORDER BY 年份 DESC"
131
-        Set_DGV7載入後設定() : Set_grid6()
132
-    End Sub
133
-    Private Sub Set_grid6()
84
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds6) : DataGridView7.DataSource = ds6.Tables(0) : conn.Close()
134 85
         DataGridView7.Columns(0).Width = 100
135 86
     End Sub
136
-    Private Sub Set_DGV8載入前設定()
137
-        DataGridView8.DataSource = Nothing : ds7.Clear()
138
-        DataGridView8.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
139
-        DataGridView8.ColumnHeadersHeight = 25
140
-        DataGridView8.AllowUserToAddRows = False
141
-        If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
142
-    End Sub
143
-    Private Sub Set_DGV8載入後設定()
144
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds7) : DataGridView8.DataSource = ds7.Tables(0) : conn.Close()
145
-    End Sub
146 87
     Private Sub Set_模具開發用結構清單()
147
-        Set_DGV8載入前設定()
148
-        SQL1 = "SELECT  結構 FROM 模具開發用結構清單 ORDER BY 結構"
149
-        Set_DGV8載入後設定() : Set_grid7()
150
-    End Sub
151
-    Private Sub Set_grid7()
152
-        DataGridView8.Columns(0).Width = 100
153
-    End Sub
154
-    Private Sub Set_DGV9載入前設定()
155
-        DataGridView9.DataSource = Nothing : ds8.Clear()
156
-        DataGridView9.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
157
-        DataGridView9.ColumnHeadersHeight = 25
158
-        DataGridView9.AllowUserToAddRows = False
88
+        模具結構_dgv.DataSource = Nothing : ds7.Clear()
89
+        模具結構_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
90
+        模具結構_dgv.ColumnHeadersHeight = 25
91
+        模具結構_dgv.AllowUserToAddRows = False
159 92
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
160
-    End Sub
161
-    Private Sub Set_DGV9載入後設定()
162
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds8) : DataGridView9.DataSource = ds8.Tables(0) : conn.Close()
93
+        SQL1 = "SELECT  結構 FROM 模具開發用結構清單 ORDER BY 結構"
94
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds7) : 模具結構_dgv.DataSource = ds7.Tables(0) : conn.Close()
95
+        模具結構_dgv.Columns(0).Width = 100
163 96
     End Sub
164 97
     Private Sub Set_模具開發用材質清單()
165
-        Set_DGV9載入前設定()
98
+        模具材料_dgv.DataSource = Nothing : ds8.Clear()
99
+        模具材料_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
100
+        模具材料_dgv.ColumnHeadersHeight = 25
101
+        模具材料_dgv.AllowUserToAddRows = False
102
+        If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
166 103
         SQL1 = "SELECT  材質 FROM 模具開發用材質清單 ORDER BY 材質"
167
-        Set_DGV9載入後設定() : Set_grid8()
168
-    End Sub
169
-    Private Sub Set_grid8()
170
-        DataGridView9.Columns(0).Width = 100
104
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds8) : 模具材料_dgv.DataSource = ds8.Tables(0) : conn.Close()
105
+        模具材料_dgv.Columns(0).Width = 100
171 106
     End Sub
172 107
     Private Sub 系統編碼規則_1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
173 108
         Me.MdiParent = WINPROFIT_ERP_SYS : Me.WindowState = 2 : Me.AutoScroll = True
174
-        Set_清單1() : Set_清單2() : Set_年度清單() : Set_部門清單() : Set_職稱清單() : Set_請假類別清單() : Set_廠商類別() : Set_模具開發用結構清單() : Set_模具開發用材質清單()
109
+        Set_清單1() : Set_清單2() : Set_年度清單() : Set_部門清單() : Set_職稱清單() : Set_請假類別清單() : Set_廠商類別()
110
+        Set_模具開發用結構清單() : Set_模具開發用材質清單() : Set_帳本清單()
175 111
     End Sub
176
-    Private Sub DataGridView1_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles DataGridView1.CellClick
112
+    Private Sub 帳本_dgv_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 帳本_dgv.CellClick
177 113
         If e.RowIndex = -1 Then : Else
178
-            TextBox1.Text = DataGridView1(0, e.RowIndex).Value.ToString
114
+            帳本編號_tb.Text = 帳本_dgv("編號", e.RowIndex).Value.ToString : 帳本_tb.Text = 帳本_dgv("帳本名稱", e.RowIndex).Value.ToString
179 115
         End If
180 116
     End Sub
181
-    Private Sub DataGridView2_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles DataGridView2.CellClick
117
+    Private Sub DataGridView1_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 部門_dgv.CellClick
182 118
         If e.RowIndex = -1 Then : Else
183
-            TextBox3.Text = DataGridView2(0, e.RowIndex).Value.ToString
119
+            TextBox1.Text = 部門_dgv(0, e.RowIndex).Value.ToString
184 120
         End If
185 121
     End Sub
186
-    Private Sub DataGridView3_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles DataGridView3.CellClick
122
+    Private Sub DataGridView2_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 貼標大項_dgv.CellClick
187 123
         If e.RowIndex = -1 Then : Else
188
-            TextBox4.Text = DataGridView3(0, e.RowIndex).Value.ToString
124
+            TextBox3.Text = 貼標大項_dgv(0, e.RowIndex).Value.ToString
189 125
         End If
190 126
     End Sub
191
-    Private Sub DataGridView4_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles DataGridView4.CellClick
127
+    Private Sub DataGridView3_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 部件大項_dgv.CellClick
192 128
         If e.RowIndex = -1 Then : Else
193
-            TextBox2.Text = DataGridView4(0, e.RowIndex).Value.ToString
129
+            TextBox4.Text = 部件大項_dgv(0, e.RowIndex).Value.ToString
194 130
         End If
195 131
     End Sub
196
-    Private Sub DataGridView5_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles DataGridView5.CellClick
132
+    Private Sub DataGridView4_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 職稱_dgv.CellClick
197 133
         If e.RowIndex = -1 Then : Else
198
-            TextBox5.Text = DataGridView5(0, e.RowIndex).Value.ToString
134
+            TextBox2.Text = 職稱_dgv(0, e.RowIndex).Value.ToString
135
+        End If
136
+    End Sub
137
+    Private Sub DataGridView5_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 請假類別_dgv.CellClick
138
+        If e.RowIndex = -1 Then : Else
139
+            TextBox5.Text = 請假類別_dgv(0, e.RowIndex).Value.ToString
199 140
         End If
200 141
     End Sub
201 142
     Private Sub DataGridView6_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles DataGridView6.CellClick
@@ -208,14 +149,14 @@ Public Class 系統編碼規則_1
208 149
             TextBox8.Text = DataGridView7(0, e.RowIndex).Value.ToString
209 150
         End If
210 151
     End Sub
211
-    Private Sub DataGridView8_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles DataGridView8.CellClick
152
+    Private Sub DataGridView8_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 模具結構_dgv.CellClick
212 153
         If e.RowIndex = -1 Then : Else
213
-            TextBox7.Text = DataGridView8(0, e.RowIndex).Value.ToString
154
+            TextBox7.Text = 模具結構_dgv(0, e.RowIndex).Value.ToString
214 155
         End If
215 156
     End Sub
216
-    Private Sub DataGridView9_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles DataGridView9.CellClick
157
+    Private Sub DataGridView9_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 模具材料_dgv.CellClick
217 158
         If e.RowIndex = -1 Then : Else
218
-            TextBox9.Text = DataGridView9(0, e.RowIndex).Value.ToString
159
+            TextBox9.Text = 模具材料_dgv(0, e.RowIndex).Value.ToString
219 160
         End If
220 161
     End Sub
221 162
     Private Sub SET_新增按鈕程式共用2()
@@ -238,7 +179,8 @@ Public Class 系統編碼規則_1
238 179
         式共用1()
239 180
     End Sub
240 181
     Private Sub 式共用1()
241
-        Set_清單1() : Set_清單2() : Set_年度清單() : Set_部門清單() : Set_職稱清單() : Set_請假類別清單() : Set_廠商類別() : Set_模具開發用結構清單() : Set_模具開發用材質清單() : PA = ""
182
+        Set_清單1() : Set_清單2() : Set_年度清單() : Set_部門清單() : Set_職稱清單() : Set_請假類別清單() : Set_廠商類別()
183
+        Set_帳本清單() : Set_模具開發用結構清單() : Set_模具開發用材質清單() : PA = ""
242 184
     End Sub
243 185
     Private Sub 式共用2()
244 186
         conn.Close() : dr.Close()
@@ -517,4 +459,29 @@ Public Class 系統編碼規則_1
517 459
     Private Sub Button27_Click(sender As Object, e As EventArgs) Handles Button27.Click
518 460
         SQL1 = "DELETE FROM 模具開發用材質清單 WHERE (材質 = N'" & TextBox9.Text & "')" : SET_刪除按鈕程式共用1()
519 461
     End Sub
462
+    '------------------------------------------------------------------------------------------------------------------------------------
463
+    Private Sub 帳本_新增_bt_Click(sender As Object, e As EventArgs) Handles 帳本_新增_bt.Click, Button5.Click
464
+        PA = InputBox("請輸入要新增的帳本") : SQL_帳本查詢()
465
+        If dr.Read() Then : MsgBox("資料重複,請從新輸入或檢查") : conn.Close() : dr.Close()
466
+        Else
467
+            '----------------------自动生成流水号-------------------------------------------------------------------------
468
+            SQL_帳本流水號最後一筆()
469
+            If dr.Read() Then : EDR = Double.Parse(Strings.Right(dr("編號").ToString, 3)) : Else : EDR = 0 : End If : conn.Close() : EDR += 1
470
+            If EDR < 10 Then : ESTR = "LN" & "00" & EDR
471
+            ElseIf EDR > 9 And EDR < 100 Then : ESTR = "LN" & "0" & EDR
472
+            ElseIf EDR > 99 Then : ESTR = "LN" & EDR : End If : PA1 = ESTR
473
+            式共用2() : SQL_帳本新增() : SET_新增按鈕程式共用2()
474
+        End If : 式共用1()
475
+    End Sub
476
+    Private Sub 帳本_修改_bt_Click(sender As Object, e As EventArgs) Handles 帳本_修改_bt.Click
477
+        If 帳本編號_tb.Text = "" Or 帳本_tb.Text = "" Then : MsgBox("資料有缺或有誤,請重新檢查")
478
+        Else
479
+            PA = InputBox("請輸入要修改的職別")
480
+            If PA = "" Then : MsgBox("沒有輸入修改內容")
481
+            Else : 式共用3() : SQL_帳本修改() : SET_修改按鈕程式共用1() : End If
482
+        End If : 式共用1()
483
+    End Sub
484
+    Private Sub 帳本_刪除_bt_Click(sender As Object, e As EventArgs) Handles 帳本_刪除_bt.Click
485
+        SQL_帳本刪除() : SET_刪除按鈕程式共用1()
486
+    End Sub
520 487
 End Class

+ 39
- 3
SHENKANG-MES-SYS/量產訂單管理系統/量產出貨明細表.Designer.vb Wyświetl plik

@@ -22,7 +22,7 @@ Partial Class 量產出貨明細表
22 22
     '請勿使用程式碼編輯器進行修改。
23 23
     <System.Diagnostics.DebuggerStepThrough()> _
24 24
     Private Sub InitializeComponent()
25
-        Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
25
+        Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
26 26
         Me.Button1 = New System.Windows.Forms.Button()
27 27
         Me.CheckBox4 = New System.Windows.Forms.CheckBox()
28 28
         Me.Label4 = New System.Windows.Forms.Label()
@@ -58,6 +58,9 @@ Partial Class 量產出貨明細表
58 58
         Me.Button9 = New System.Windows.Forms.Button()
59 59
         Me.DataGridView1 = New System.Windows.Forms.DataGridView()
60 60
         Me.CheckBox1 = New System.Windows.Forms.CheckBox()
61
+        Me.資料流水號_tb = New System.Windows.Forms.TextBox()
62
+        Me.實際離場_dtp = New System.Windows.Forms.DateTimePicker()
63
+        Me.實際離場日修改_bt = New System.Windows.Forms.Button()
61 64
         CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).BeginInit()
62 65
         CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
63 66
         CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -371,8 +374,8 @@ Partial Class 量產出貨明細表
371 374
         '
372 375
         'DataGridView1
373 376
         '
374
-        DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
375
-        Me.DataGridView1.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
377
+        DataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
378
+        Me.DataGridView1.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
376 379
         Me.DataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
377 380
         Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
378 381
         Me.DataGridView1.Location = New System.Drawing.Point(344, 99)
@@ -392,11 +395,41 @@ Partial Class 量產出貨明細表
392 395
         Me.CheckBox1.Text = "明細是否建檔"
393 396
         Me.CheckBox1.UseVisualStyleBackColor = True
394 397
         '
398
+        '資料流水號_tb
399
+        '
400
+        Me.資料流水號_tb.Location = New System.Drawing.Point(1336, 12)
401
+        Me.資料流水號_tb.Name = "資料流水號_tb"
402
+        Me.資料流水號_tb.Size = New System.Drawing.Size(100, 23)
403
+        Me.資料流水號_tb.TabIndex = 580
404
+        '
405
+        '實際離場_dtp
406
+        '
407
+        Me.實際離場_dtp.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
408
+        Me.實際離場_dtp.Location = New System.Drawing.Point(1336, 41)
409
+        Me.實際離場_dtp.Name = "實際離場_dtp"
410
+        Me.實際離場_dtp.Size = New System.Drawing.Size(100, 23)
411
+        Me.實際離場_dtp.TabIndex = 581
412
+        '
413
+        '實際離場日修改_bt
414
+        '
415
+        Me.實際離場日修改_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
416
+        Me.實際離場日修改_bt.ForeColor = System.Drawing.Color.Black
417
+        Me.實際離場日修改_bt.Location = New System.Drawing.Point(1336, 69)
418
+        Me.實際離場日修改_bt.Name = "實際離場日修改_bt"
419
+        Me.實際離場日修改_bt.RightToLeft = System.Windows.Forms.RightToLeft.No
420
+        Me.實際離場日修改_bt.Size = New System.Drawing.Size(100, 24)
421
+        Me.實際離場日修改_bt.TabIndex = 582
422
+        Me.實際離場日修改_bt.Text = "實際離廠日修改"
423
+        Me.實際離場日修改_bt.UseVisualStyleBackColor = True
424
+        '
395 425
         '量產出貨明細表
396 426
         '
397 427
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
398 428
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
399 429
         Me.ClientSize = New System.Drawing.Size(1914, 971)
430
+        Me.Controls.Add(Me.實際離場日修改_bt)
431
+        Me.Controls.Add(Me.實際離場_dtp)
432
+        Me.Controls.Add(Me.資料流水號_tb)
400 433
         Me.Controls.Add(Me.Button1)
401 434
         Me.Controls.Add(Me.CheckBox4)
402 435
         Me.Controls.Add(Me.Label4)
@@ -479,4 +512,7 @@ Partial Class 量產出貨明細表
479 512
     Friend WithEvents Button9 As Button
480 513
     Friend WithEvents DataGridView1 As DataGridView
481 514
     Friend WithEvents CheckBox1 As CheckBox
515
+    Friend WithEvents 資料流水號_tb As TextBox
516
+    Friend WithEvents 實際離場_dtp As DateTimePicker
517
+    Friend WithEvents 實際離場日修改_bt As Button
482 518
 End Class

+ 14
- 5
SHENKANG-MES-SYS/量產訂單管理系統/量產出貨明細表.vb Wyświetl plik

@@ -26,7 +26,7 @@ Public Class 量產出貨明細表
26 26
                             貨款匯入出款明細表.楦型, 貨款匯入出款明細表.訂單數量, 貨款匯入出款明細表.出貨數量, 訂單控制表.備註, 
27 27
                             訂單控制表.生產工廠, 訂單控制表.訂單種類, 訂單控制表.工廠回復交期, 訂單控制表.客戶交期 AS 交期開始, 
28 28
                             訂單控制表.客戶交期1 AS 交期結束, 貨款匯入出款明細表.實際離廠日, 訂單控制表.明細建檔, 
29
-                            訂單控制表.驗貨報告圖片 
29
+                            訂單控制表.驗貨報告圖片, 貨款匯入出款明細表.資料流水號 
30 30
                     FROM    貨款匯入出款明細表 LEFT OUTER JOIN 訂單控制表 ON 貨款匯入出款明細表.資料流水號 = 訂單控制表.資料流水號 
31 31
                    " & kkk1 & kkk2 & kkk3 & kkk4 & kkk5 & kkk6 & "  " &
32 32
                    "ORDER BY 貨款匯入出款明細表.訂單流水號 DESC, 貨款匯入出款明細表.形體號, 貨款匯入出款明細表.顏色, 貨款匯入出款明細表.楦型"
@@ -36,7 +36,7 @@ Public Class 量產出貨明細表
36 36
                             貨款匯入出款明細表.楦型, 貨款匯入出款明細表.訂單數量, 貨款匯入出款明細表.出貨數量, 訂單控制表.備註, 
37 37
                             訂單控制表.生產工廠, 訂單控制表.訂單種類, 訂單控制表.工廠回復交期, 訂單控制表.客戶交期 AS 交期開始, 
38 38
                             訂單控制表.客戶交期1 AS 交期結束, 貨款匯入出款明細表.實際離廠日, 訂單控制表.明細建檔, 
39
-                            訂單控制表.驗貨報告圖片 
39
+                            訂單控制表.驗貨報告圖片, 貨款匯入出款明細表.資料流水號 
40 40
                     FROM    貨款匯入出款明細表 LEFT OUTER JOIN 訂單控制表 ON 貨款匯入出款明細表.資料流水號 = 訂單控制表.資料流水號
41 41
                    " & kkk1 & kkk2 & kkk3 & kkk4 & kkk5 & kkk6 & "
42 42
                      AND (貨款匯入出款明細表.訂單流水號 LIKE '%" & PA & "%' OR 貨款匯入出款明細表.客戶訂單號 LIKE '%" & PA & "%' OR 貨款匯入出款明細表.形體號 LIKE '%" & PA & "%' 
@@ -51,7 +51,7 @@ Public Class 量產出貨明細表
51 51
         DataGridView1.Columns(4).FillWeight = 200 : DataGridView1.Columns(5).FillWeight = 130 : DataGridView1.Columns(6).FillWeight = 60 : DataGridView1.Columns(7).FillWeight = 80
52 52
         DataGridView1.Columns(8).FillWeight = 80 : DataGridView1.Columns(9).FillWeight = 235 : DataGridView1.Columns(10).Visible = False : DataGridView1.Columns(11).FillWeight = 80
53 53
         DataGridView1.Columns(12).FillWeight = 80 : DataGridView1.Columns(13).FillWeight = 80 : DataGridView1.Columns(14).FillWeight = 80 : DataGridView1.Columns(15).FillWeight = 90
54
-        DataGridView1.Columns(16).FillWeight = 90 : DataGridView1.Columns(17).Visible = False
54
+        DataGridView1.Columns(16).FillWeight = 90 : DataGridView1.Columns(17).Visible = False : DataGridView1.Columns(18).Visible = False
55 55
 
56 56
         DataGridView1.Columns(7).DefaultCellStyle.Format = "#,##0"
57 57
         DataGridView1.Columns(7).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
@@ -103,8 +103,8 @@ Public Class 量產出貨明細表
103 103
     End Sub
104 104
     Private Sub DataGridView1_CellClick(ByVal sender As Object, ByVal e As DataGridViewCellEventArgs) Handles DataGridView1.CellClick
105 105
         If e.RowIndex = -1 Then : Else
106
-            TextBox1.Text = DataGridView1(1, e.RowIndex).Value.ToString
107
-            CheckBox1.Checked = DataGridView1(16, e.RowIndex).Value.ToString
106
+            TextBox1.Text = DataGridView1(1, e.RowIndex).Value.ToString : 資料流水號_tb.Text = DataGridView1("資料流水號", e.RowIndex).Value.ToString
107
+            CheckBox1.Checked = DataGridView1(16, e.RowIndex).Value.ToString : 實際離場_dtp.Value = DataGridView1("實際離廠日", e.RowIndex).Value
108 108
             If CheckBox1.Checked = False Then : Button30.Enabled = False : Else : Button30.Enabled = True : End If
109 109
 
110 110
             PictureBox1.Image = Nothing : conn.Close()
@@ -284,4 +284,13 @@ Public Class 量產出貨明細表
284 284
         MsgBox("下次開發。")
285 285
         '列印_出貨明細表.ShowDialog()
286 286
     End Sub
287
+    Private Sub 實際離場日修改_bt_Click(sender As Object, e As EventArgs) Handles 實際離場日修改_bt.Click
288
+        If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
289
+        SQL1 = "UPDATE 訂單控制表 SET 實際離廠日 = N'" & Format(實際離場_dtp.Value, "yyyy/MM/dd") & "' WHERE 資料流水號 LIKE N'" & 資料流水號_tb.Text & "'"
290
+        cmd.CommandText = SQL1 : cmd.Connection = conn : cmd.ExecuteNonQuery() : conn.Close()
291
+        If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
292
+        SQL1 = "UPDATE 貨款匯入出款明細表 SET 實際離廠日 = N'" & Format(實際離場_dtp.Value, "yyyy/MM/dd") & "' WHERE 資料流水號 LIKE N'" & 資料流水號_tb.Text & "'"
293
+        cmd.CommandText = SQL1 : cmd.Connection = conn : cmd.ExecuteNonQuery() : conn.Close()
294
+        Set_訂單清單()
295
+    End Sub
287 296
 End Class

+ 5
- 2
SHENKANG-MES-SYS/量產訂單管理系統/量產訂單控制表.vb Wyświetl plik

@@ -168,6 +168,9 @@ Public Class 量產訂單控制表
168 168
         Me.MdiParent = WINPROFIT_ERP_SYS : Me.WindowState = 2 : Me.AutoScroll = True
169 169
         DataGridView2.Visible = False : TextBox13.Enabled = False : Button3.Enabled = False
170 170
         Set_清單3()
171
+        If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
172
+        SQL1 = "DELETE FROM 貨款匯入出款明細表 WHERE (出貨數量 = 0)"
173
+        cmd.Connection = conn : cmd.CommandText = SQL1 : dr = cmd.ExecuteReader : conn.Close()
171 174
     End Sub
172 175
     Private Sub DataGridView3_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles DataGridView3.CellClick
173 176
         If e.RowIndex = -1 Then : Else
@@ -342,7 +345,7 @@ Public Class 量產訂單控制表
342 345
                                        驗貨時間, 實際離廠日, 資料流水號, 明細建檔, LEATHER, LEA_Note, CXL, CXLTime, 出貨數量, PO_S_Date, Requested_XF, Confirm_XF, Revised_XF, Special_Packaging, 
343 346
                                        Remarks, 出貨地, 楦頭號, 材質, 長期試穿, 面料, 副料, 中底, 鞋墊, 大底, 跟, 工廠進度表備註1, 七號模具, 工廠進度表備註2, 國標測試, 客戶包裝確認, 東莞業務備註, 
344 347
                                        驗貨報告圖片 FROM 訂單控制表 
345
-                                WHERE (資料流水號 = '" & TextBox2.Text & "')"
348
+                                WHERE (資料流水號 = '" & TextBox2.Text & "') AND (CXL <> 1)"
346 349
                         cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds1) : DataGridView2.DataSource = ds1.Tables(0) : conn.Close()
347 350
 
348 351
                         For i As Integer = 0 To DataGridView2.Rows.Count - 1
@@ -402,7 +405,7 @@ Public Class 量產訂單控制表
402 405
                                    驗貨時間, 實際離廠日, 資料流水號, 明細建檔, LEATHER, LEA_Note, CXL, CXLTime, 出貨數量, PO_S_Date, Requested_XF, Confirm_XF, Revised_XF, Special_Packaging, 
403 406
                                    Remarks, 出貨地, 楦頭號, 材質, 長期試穿, 面料, 副料, 中底, 鞋墊, 大底, 跟, 工廠進度表備註1, 七號模具, 工廠進度表備註2, 國標測試, 客戶包裝確認, 東莞業務備註, 
404 407
                                    驗貨報告圖片 FROM 訂單控制表 
405
-                            WHERE (訂單流水號 = '" & TextBox12.Text & "')"
408
+                            WHERE (訂單流水號 = '" & TextBox12.Text & "') AND (CXL <> 1)"
406 409
                     cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds1) : DataGridView2.DataSource = ds1.Tables(0) : conn.Close()
407 410
 
408 411
                     For i As Integer = 0 To DataGridView2.Rows.Count - 1

+ 13
- 0
SHENKANG-MES-SYS/量產訂單管理系統/量產訂單輸入.Designer.vb Wyświetl plik

@@ -109,6 +109,7 @@ Partial Class 量產訂單輸入
109 109
         Me.Button9 = New System.Windows.Forms.Button()
110 110
         Me.DateTimePicker5 = New System.Windows.Forms.DateTimePicker()
111 111
         Me.DateTimePicker6 = New System.Windows.Forms.DateTimePicker()
112
+        Me.Button18 = New System.Windows.Forms.Button()
112 113
         CType(Me.DataGridView4, System.ComponentModel.ISupportInitialize).BeginInit()
113 114
         CType(Me.DataGridView5, System.ComponentModel.ISupportInitialize).BeginInit()
114 115
         CType(Me.DataGridView2, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -921,11 +922,22 @@ Partial Class 量產訂單輸入
921 922
         Me.DateTimePicker6.Size = New System.Drawing.Size(142, 23)
922 923
         Me.DateTimePicker6.TabIndex = 1002
923 924
         '
925
+        'Button18
926
+        '
927
+        Me.Button18.ForeColor = System.Drawing.Color.Blue
928
+        Me.Button18.Location = New System.Drawing.Point(801, 106)
929
+        Me.Button18.Name = "Button18"
930
+        Me.Button18.Size = New System.Drawing.Size(115, 24)
931
+        Me.Button18.TabIndex = 1003
932
+        Me.Button18.Text = "修改形體"
933
+        Me.Button18.UseVisualStyleBackColor = True
934
+        '
924 935
         '量產訂單輸入
925 936
         '
926 937
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
927 938
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
928 939
         Me.ClientSize = New System.Drawing.Size(1914, 971)
940
+        Me.Controls.Add(Me.Button18)
929 941
         Me.Controls.Add(Me.DateTimePicker6)
930 942
         Me.Controls.Add(Me.DateTimePicker5)
931 943
         Me.Controls.Add(Me.Button9)
@@ -1098,4 +1110,5 @@ Partial Class 量產訂單輸入
1098 1110
     Friend WithEvents Button9 As Button
1099 1111
     Friend WithEvents DateTimePicker5 As DateTimePicker
1100 1112
     Friend WithEvents DateTimePicker6 As DateTimePicker
1113
+    Friend WithEvents Button18 As Button
1101 1114
 End Class

+ 10
- 0
SHENKANG-MES-SYS/量產訂單管理系統/量產訂單輸入.vb Wyświetl plik

@@ -503,4 +503,14 @@ Public Class 量產訂單輸入
503 503
     Private Sub Button9_Click(sender As Object, e As EventArgs) Handles Button9.Click
504 504
         清單修改.Close() : 訂單顏色修改 = True : 清單修改.ShowDialog() : Set_清單1() : 訂單顏色修改 = False
505 505
     End Sub
506
+
507
+    Private Sub Button18_Click(sender As Object, e As EventArgs) Handles Button18.Click
508
+        If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
509
+        SQL1 = "UPDATE 訂單控制表 SET 型體號碼 = N'" & ComboBox11.Text & "', GOODBOX = N'" & ComboBox12.Text & "' WHERE 資料流水號 LIKE '" & TextBox15.Text & "'"
510
+        cmd.Connection = conn : cmd.CommandText = SQL1 : cmd.ExecuteNonQuery() : conn.Close()
511
+        If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
512
+        SQL1 = "UPDATE 訂單明細表 SET ItemNumber = N'" & ComboBox11.Text & "', ProductName = N'" & ComboBox12.Text & "' WHERE 資料流水號 LIKE '" & TextBox15.Text & "'"
513
+        cmd.Connection = conn : cmd.CommandText = SQL1 : cmd.ExecuteNonQuery() : conn.Close()
514
+        Set_清單3() : Set_清單4()
515
+    End Sub
506 516
 End Class

Ładowanie…
Anuluj
Zapisz