Browse Source

修改基础样式

callm 5 months ago
parent
commit
40e22ced1e
100 changed files with 716 additions and 1064 deletions
  1. 4 4
      UAS_MES_JH/CustomControl/AccordionMenu/AccordionMenu.cs
  2. 5 5
      UAS_MES_JH/CustomControl/AccordionMenu/NavagationBar.cs
  3. 0 6
      UAS_MES_JH/CustomControl/BaseForm/BaseForm.cs
  4. 0 7
      UAS_MES_JH/CustomControl/ButtonUtil/ChooseAllButton.cs
  5. 1 8
      UAS_MES_JH/CustomControl/ButtonUtil/DeleteButton.cs
  6. 2 2
      UAS_MES_JH/CustomControl/ButtonUtil/LockMakeCode.cs
  7. 2 2
      UAS_MES_JH/CustomControl/ButtonUtil/NormalButton.cs
  8. 3 8
      UAS_MES_JH/CustomControl/ClickPicBox/LockIcon.cs
  9. 0 6
      UAS_MES_JH/CustomControl/ComBoxWithFocus/ComBoxWithFocus.cs
  10. 0 4
      UAS_MES_JH/CustomControl/ComBoxWithFocus/ComboxWithTip.cs
  11. 2 8
      UAS_MES_JH/CustomControl/ComBoxWithFocus/PrinterCombox.cs
  12. 1 7
      UAS_MES_JH/CustomControl/ComBoxWithFocus/SerialPortCombox.cs
  13. 2 8
      UAS_MES_JH/CustomControl/CustomCheckBox/AutoPrintCheckBox.cs
  14. 1 8
      UAS_MES_JH/CustomControl/CustomCheckBox/CustomCheckBox.cs
  15. 1 7
      UAS_MES_JH/CustomControl/CustomCheckBox/LockCheckBox.cs
  16. 1 2
      UAS_MES_JH/CustomControl/CustomTabControl/CustomTabControl.cs
  17. 2 2
      UAS_MES_JH/CustomControl/CustomTabControl/ThemedColors.cs
  18. 0 5
      UAS_MES_JH/CustomControl/DataGrid_View/DataGridViewWithCheckBox.cs
  19. 2 10
      UAS_MES_JH/CustomControl/DataGrid_View/DataGridViewWithFilter.cs
  20. 1 8
      UAS_MES_JH/CustomControl/DataGrid_View/DataGridViewWithSerialNum.cs
  21. 1 1
      UAS_MES_JH/CustomControl/HeadBar/HeadBar.cs
  22. 329 334
      UAS_MES_JH/CustomControl/ListViewExpand/ListViewExpand.cs
  23. 0 1
      UAS_MES_JH/CustomControl/Pagination/Pagination.cs
  24. 0 1
      UAS_MES_JH/CustomControl/Pagination/PaginationDbFind.cs
  25. 1 8
      UAS_MES_JH/CustomControl/PowerControlForm/PowerControlForm.cs
  26. 0 3
      UAS_MES_JH/CustomControl/SetLoading/LoadingCircle.cs
  27. 1 6
      UAS_MES_JH/CustomControl/TextBoxWithIcon/BlurSearch.cs
  28. 0 1
      UAS_MES_JH/CustomControl/TextBoxWithIcon/MaCodeSearchTextBox.cs
  29. 0 1
      UAS_MES_JH/CustomControl/TextBoxWithIcon/MaCodeTextBox.cs
  30. 2 4
      UAS_MES_JH/CustomControl/TextBoxWithIcon/NumOnlyTextBox.cs
  31. 1 5
      UAS_MES_JH/CustomControl/TextBoxWithIcon/RoundTextBox.cs
  32. 2 7
      UAS_MES_JH/CustomControl/TextBoxWithIcon/SNCodeEnterTextBox.cs
  33. 0 1
      UAS_MES_JH/CustomControl/TextBoxWithIcon/SearchTextBox.cs
  34. 1 8
      UAS_MES_JH/CustomControl/TextBoxWithIcon/SnCollectionBox.cs
  35. 0 5
      UAS_MES_JH/CustomControl/TextBoxWithIcon/SourceStepCount.cs
  36. 3 2
      UAS_MES_JH/CustomControl/TextBoxWithIcon/TextAreaForm.cs
  37. 0 6
      UAS_MES_JH/CustomControl/TextBoxWithIcon/TextBoxNumOnly.cs
  38. 0 7
      UAS_MES_JH/CustomControl/TimePickerWithCombo/TimePickerWithCombo.cs
  39. 5 7
      UAS_MES_JH/DataOperate/AccessDBHelper.cs
  40. 1 1
      UAS_MES_JH/DataOperate/DataHelper.cs
  41. 10 12
      UAS_MES_JH/DataOperate/ExcelHandler.cs
  42. 1 6
      UAS_MES_JH/Entity/Status.cs
  43. 4 4
      UAS_MES_JH/Entity/SystemInf.cs
  44. 1 6
      UAS_MES_JH/Enum/EMouseState.cs
  45. 0 3
      UAS_MES_JH/Form1.Designer.cs
  46. 3 4
      UAS_MES_JH/Form1.cs
  47. 2 7
      UAS_MES_JH/FunctionCode/Employee/Employee_ChooseUserToGroup.cs
  48. 0 6
      UAS_MES_JH/FunctionCode/Employee/Employee_Data.cs
  49. 0 6
      UAS_MES_JH/FunctionCode/Employee/Employee_NewGroup.cs
  50. 2 3
      UAS_MES_JH/FunctionCode/Employee/Employee_Power.cs
  51. 0 5
      UAS_MES_JH/FunctionCode/Employee/Employee_PowerSarch.cs
  52. 25 30
      UAS_MES_JH/FunctionCode/Make/Make_CancleSndown.cs
  53. 5 6
      UAS_MES_JH/FunctionCode/Make/Make_CheckNoRelpace.cs
  54. 7 10
      UAS_MES_JH/FunctionCode/Make/Make_CheckQrcode.cs
  55. 0 4
      UAS_MES_JH/FunctionCode/Make/Make_CollectBTMAC.cs
  56. 20 24
      UAS_MES_JH/FunctionCode/Make/Make_CollectElec.cs
  57. 4 8
      UAS_MES_JH/FunctionCode/Make/Make_CollectLcd.cs
  58. 5 8
      UAS_MES_JH/FunctionCode/Make/Make_CollectNetCode.cs
  59. 3 7
      UAS_MES_JH/FunctionCode/Make/Make_CollectSoft.cs
  60. 13 14
      UAS_MES_JH/FunctionCode/Make/Make_ColorBoxLabelPrint.cs
  61. 20 20
      UAS_MES_JH/FunctionCode/Make/Make_ColorBoxLabelPrint2.cs
  62. 16 17
      UAS_MES_JH/FunctionCode/Make/Make_ColorBoxLabelPrint3.cs
  63. 5 6
      UAS_MES_JH/FunctionCode/Make/Make_ColorBoxLoadPrint.cs
  64. 50 51
      UAS_MES_JH/FunctionCode/Make/Make_ColorBoxWeigh.cs
  65. 0 4
      UAS_MES_JH/FunctionCode/Make/Make_CustomLabelPrint.cs
  66. 0 4
      UAS_MES_JH/FunctionCode/Make/Make_Decompose.cs
  67. 2 6
      UAS_MES_JH/FunctionCode/Make/Make_Decompose_Ex.cs
  68. 5 8
      UAS_MES_JH/FunctionCode/Make/Make_FeedingCollection.cs
  69. 12 13
      UAS_MES_JH/FunctionCode/Make/Make_FuselageLabelPrint.cs
  70. 0 3
      UAS_MES_JH/FunctionCode/Make/Make_GetReMakeSN.cs
  71. 1 5
      UAS_MES_JH/FunctionCode/Make/Make_ImeiCheck.cs
  72. 19 21
      UAS_MES_JH/FunctionCode/Make/Make_LabelCheck.cs
  73. 8 9
      UAS_MES_JH/FunctionCode/Make/Make_LabelPrint.cs
  74. 0 4
      UAS_MES_JH/FunctionCode/Make/Make_MakeCancelDown.cs
  75. 1 5
      UAS_MES_JH/FunctionCode/Make/Make_MakeDown.cs
  76. 1 6
      UAS_MES_JH/FunctionCode/Make/Make_NewBadCode.cs
  77. 0 5
      UAS_MES_JH/FunctionCode/Make/Make_NewBadCode_DE.cs
  78. 0 4
      UAS_MES_JH/FunctionCode/Make/Make_NewMatainInf.cs
  79. 0 1
      UAS_MES_JH/FunctionCode/Make/Make_PositionStock.cs
  80. 6 9
      UAS_MES_JH/FunctionCode/Make/Make_RePrintLabel.cs
  81. 0 4
      UAS_MES_JH/FunctionCode/Make/Make_Repair.cs
  82. 0 3
      UAS_MES_JH/FunctionCode/Make/Make_SeqProgramTransform.cs
  83. 0 1
      UAS_MES_JH/FunctionCode/Make/Make_SeqTransform.cs
  84. 1 4
      UAS_MES_JH/FunctionCode/Make/Make_SmtTestCollection.cs
  85. 8 13
      UAS_MES_JH/FunctionCode/Make/Make_Sndown.cs
  86. 7 8
      UAS_MES_JH/FunctionCode/Make/Make_SpecialCartonPack.cs
  87. 0 6
      UAS_MES_JH/FunctionCode/Make/Make_SplitBoard.cs
  88. 7 10
      UAS_MES_JH/FunctionCode/Make/Make_TestCollection.cs
  89. 12 23
      UAS_MES_JH/FunctionCode/Make/Make_TestCollectionColor.cs
  90. 23 29
      UAS_MES_JH/FunctionCode/Make/Make_TestCollectionlux.cs
  91. 17 28
      UAS_MES_JH/FunctionCode/Make/Make_TestCollectionqrcode2.cs
  92. 9 12
      UAS_MES_JH/FunctionCode/Make/Make_UpdateCollectCode.cs
  93. 3 5
      UAS_MES_JH/FunctionCode/OQC/OQC_BatchResultJudge.cs
  94. 0 3
      UAS_MES_JH/FunctionCode/OQC/OQC_CheckNoSplit.cs
  95. 0 2
      UAS_MES_JH/FunctionCode/OQC/OQC_Inspection.cs
  96. 0 1
      UAS_MES_JH/FunctionCode/OQC/OQC_PlanMaintain.cs
  97. 1 3
      UAS_MES_JH/FunctionCode/OQC/OQC_SamplingDataCollection.cs
  98. 0 5
      UAS_MES_JH/FunctionCode/Packing/Packing_BigBoxWeight.cs
  99. 0 2
      UAS_MES_JH/FunctionCode/Packing/Packing_CartonBoxSNWeigh.cs
  100. 0 2
      UAS_MES_JH/FunctionCode/Packing/Packing_CartonBoxWeigh.cs

+ 4 - 4
UAS_MES_JH/CustomControl/AccordionMenu/AccordionMenu.cs

@@ -1,13 +1,13 @@
 using System;
-using System.Drawing;
-using System.Windows.Forms;
 using System.Collections;
-using System.Reflection;
+using System.Collections.Generic;
 using System.Data;
+using System.Drawing;
+using System.Reflection;
 using System.Text;
+using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;
-using System.Collections.Generic;
 
 namespace UAS_MES_NEW.CustomControl.AccordionMenu
 {

+ 5 - 5
UAS_MES_JH/CustomControl/AccordionMenu/NavagationBar.cs

@@ -1,14 +1,14 @@
-using System;
+using DevExpress.XtraNavBar;
+using System;
+using System.Collections;
 using System.Collections.Generic;
-using System.Drawing;
 using System.Data;
+using System.Drawing;
+using System.Reflection;
 using System.Text;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;
-using DevExpress.XtraNavBar;
-using System.Collections;
-using System.Reflection;
 
 namespace UAS_MES_NEW.CustomControl.AccordionMenu
 {

+ 0 - 6
UAS_MES_JH/CustomControl/BaseForm/BaseForm.cs

@@ -1,10 +1,4 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 
 namespace UAS_MES_NEW.CustomControl.BaseForm

+ 0 - 7
UAS_MES_JH/CustomControl/ButtonUtil/ChooseAllButton.cs

@@ -1,11 +1,4 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
 using System.Windows.Forms;
 
 namespace UAS_MES_NEW.CustomControl.ButtonUtil

+ 1 - 8
UAS_MES_JH/CustomControl/ButtonUtil/DeleteButton.cs

@@ -1,11 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
-using System.Windows.Forms;
+using System.Windows.Forms;
 using UAS_MES_NEW.Properties;
 
 namespace UAS_MES_NEW.CustomControl.ButtonUtil

+ 2 - 2
UAS_MES_JH/CustomControl/ButtonUtil/LockMakeCode.cs

@@ -68,7 +68,7 @@ namespace UAS_MES_NEW.CustomControl.ButtonUtil
                 AllPower1 = value;
             }
         }
-       
+
         #endregion
 
         #region 构造函数
@@ -277,7 +277,7 @@ namespace UAS_MES_NEW.CustomControl.ButtonUtil
             }
         }
 
- 
+
 
         #endregion
 

+ 2 - 2
UAS_MES_JH/CustomControl/ButtonUtil/NormalButton.cs

@@ -69,7 +69,7 @@ namespace UAS_MES_NEW.CustomControl.ButtonUtil
                 AllPower1 = value;
             }
         }
-       
+
         #endregion
 
         #region 构造函数
@@ -278,7 +278,7 @@ namespace UAS_MES_NEW.CustomControl.ButtonUtil
             }
         }
 
- 
+
 
         #endregion
 

+ 3 - 8
UAS_MES_JH/CustomControl/ClickPicBox/LockIcon.cs

@@ -1,10 +1,4 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 
 namespace UAS_MES_NEW.CustomControl.ClickPicBox
@@ -37,8 +31,9 @@ namespace UAS_MES_NEW.CustomControl.ClickPicBox
                 Image = Properties.Resources.lock_open_24px;
                 Locked = false;
             }
-            else {
-                Image = Properties.Resources.lock_lock_24px ;
+            else
+            {
+                Image = Properties.Resources.lock_lock_24px;
                 Locked = true;
             }
         }

+ 0 - 6
UAS_MES_JH/CustomControl/ComBoxWithFocus/ComBoxWithFocus.cs

@@ -1,11 +1,5 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
 using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
 using System.Windows.Forms;
 
 namespace UAS_MES_NEW.CustomControl.ComBoxWithFocus

+ 0 - 4
UAS_MES_JH/CustomControl/ComBoxWithFocus/ComboxWithTip.cs

@@ -1,9 +1,5 @@
 using System;
-using System.Collections.Generic;
 using System.ComponentModel;
-using System.Diagnostics;
-using System.Linq;
-using System.Text;
 
 namespace UAS_MES_NEW.CustomControl.ComBoxWithFocus
 {

+ 2 - 8
UAS_MES_JH/CustomControl/ComBoxWithFocus/PrinterCombox.cs

@@ -1,12 +1,6 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
-using System.Windows.Forms;
 using System.Drawing.Printing;
+using System.Windows.Forms;
 
 namespace UAS_MES_NEW.CustomControl.ComBoxWithFocus
 {
@@ -21,7 +15,7 @@ namespace UAS_MES_NEW.CustomControl.ComBoxWithFocus
         {
             get
             {
-                return PrinterList.Text; 
+                return PrinterList.Text;
             }
 
             set

+ 1 - 7
UAS_MES_JH/CustomControl/ComBoxWithFocus/SerialPortCombox.cs

@@ -1,12 +1,6 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
-using System.Windows.Forms;
 using System.IO.Ports;
+using System.Windows.Forms;
 
 namespace UAS_MES_NEW.CustomControl.ComBoxWithFocus
 {

+ 2 - 8
UAS_MES_JH/CustomControl/CustomCheckBox/AutoPrintCheckBox.cs

@@ -1,19 +1,13 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
-using UAS_MES_NEW.Entity;
 using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
 
 namespace UAS_MES_NEW.CustomControl.CustomCheckBox
 {
     public partial class AutoPrintCheckBox : UserControl
     {
-         
+
         public AutoPrintCheckBox()
         {
             InitializeComponent();

+ 1 - 8
UAS_MES_JH/CustomControl/CustomCheckBox/CustomCheckBox.cs

@@ -1,11 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
-using System.Windows.Forms;
+using System.Windows.Forms;
 
 namespace UAS_MES_NEW.CustomControl.CustomCheckBox
 {

+ 1 - 7
UAS_MES_JH/CustomControl/CustomCheckBox/LockCheckBox.cs

@@ -1,13 +1,7 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
-using UAS_MES_NEW.PublicMethod;
 using UAS_MES_NEW.CustomControl.TextBoxWithIcon;
+using UAS_MES_NEW.PublicMethod;
 
 namespace UAS_MES_NEW.CustomControl.CustomCheckBox
 {

+ 1 - 2
UAS_MES_JH/CustomControl/CustomTabControl/CustomTabControl.cs

@@ -1,9 +1,8 @@
 using System;
 using System.Drawing;
-using System.Windows.Forms;
 using System.Drawing.Drawing2D;
-using UAS_MES_NEW;
 using System.Runtime.InteropServices;
+using System.Windows.Forms;
 
 namespace UAS_MES_NEW.CustomControl
 {

+ 2 - 2
UAS_MES_JH/CustomControl/CustomTabControl/ThemedColors.cs

@@ -1,6 +1,6 @@
-using System.Windows.Forms;
+using System.Drawing;
+using System.Windows.Forms;
 using System.Windows.Forms.VisualStyles;
-using System.Drawing;
 
 
 namespace UAS_MES_NEW

+ 0 - 5
UAS_MES_JH/CustomControl/DataGrid_View/DataGridViewWithCheckBox.cs

@@ -1,10 +1,5 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
 using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 
 namespace UAS_MES_NEW.CustomControl.DataGrid_View

+ 2 - 10
UAS_MES_JH/CustomControl/DataGrid_View/DataGridViewWithFilter.cs

@@ -1,18 +1,10 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Forms;
+using System.Windows.Forms;
 
 namespace UAS_MES_NEW.CustomControl.DataGrid_View
 {
     public partial class DataGridViewWithFilter : DataGridView
     {
-       
+
         public DataGridViewWithFilter()
         {
             InitializeComponent();

+ 1 - 8
UAS_MES_JH/CustomControl/DataGrid_View/DataGridViewWithSerialNum.cs

@@ -1,11 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using System.Drawing;
 using System.Windows.Forms;
 
 namespace UAS_MES_NEW.CustomControl.DataGrid_View

+ 1 - 1
UAS_MES_JH/CustomControl/HeadBar/HeadBar.cs

@@ -4,8 +4,8 @@ using System.Runtime.InteropServices;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;
-using UAS_MES_NEW.PublicMethod;
 using UAS_MES_NEW.PublicForm;
+using UAS_MES_NEW.PublicMethod;
 
 namespace UAS_MES_NEW.CustomControl
 {

+ 329 - 334
UAS_MES_JH/CustomControl/ListViewExpand/ListViewExpand.cs

@@ -1,367 +1,362 @@
 using System;
-using System.Collections.Generic;
 using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
-using System.Windows.Forms;
 using System.Reflection;
 using System.Runtime.InteropServices;
+using System.Windows.Forms;
 
 namespace UAS_MES_NEW.CustomControl.ListViewExpand
 {
     public partial class ListViewExpand : ListView
     {
-            private const int LVM_FIRST = 0x1000;                    // ListView messages  
-            private const int LVM_SETGROUPINFO = (LVM_FIRST + 147);  // ListView messages Setinfo on Group  
-            private const int WM_LBUTTONUP = 0x0202;                 // Windows message left button  
-
-            private delegate void CallBackSetGroupState(ListViewGroup lstvwgrp, ListViewGroupState state);
-            private delegate void CallbackSetGroupString(ListViewGroup lstvwgrp, string value);
-
-            /// <summary>  
-            /// Sends the specified message to a window or windows. The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.   
-            /// To send a message and return immediately, use the SendMessageCallback or SendNotifyMessage function. To post a message to a thread's message queue and return immediately, use the PostMessage or PostThreadMessage function.  
-            /// </summary>  
-            /// <param name="hWnd">  
-            /// [in] Handle to the window whose window procedure will receive the message.   
-            /// If this parameter is HWND_BROADCAST, the message is sent to all top-level windows in the system, including disabled or invisible unowned windows, overlapped windows, and pop-up windows; but the message is not sent to child windows.   
-            /// Microsoft Windows Vista and later. Message sending is subject to User Interface Privilege Isolation (UIPI). The thread of a process can send messages only to message queues of threads in processes of lesser or equal integrity level.  
-            /// </param>  
-            /// <param name="uMsg">[in] Specifies the message to be sent.</param>  
-            /// <param name="wParam">[in] Specifies additional message-specific information.</param>  
-            /// <param name="lParam">[in] Type of LVGROUP, Specifies additional message-specific information.</param>  
-            /// <returns>  
-            /// Microsoft Windows Vista and later. When a message is blocked by UIPI the last error, retrieved with GetLastError, is set to 5 (access denied).  
-            /// Applications that need to communicate using HWND_BROADCAST should use the RegisterWindowMessage function to obtain a unique message for inter-application communication.  
-            /// The system only does marshalling for system messages (those in the range 0 to (WM_USER-1)). To send other messages (those >= WM_USER) to another process, you must do custom marshalling.  
-            /// If the specified window was created by the calling thread, the window procedure is called immediately as a subroutine. If the specified window was created by a different thread, the system switches to that thread and calls the appropriate window procedure. Messages sent between threads are processed only when the receiving thread executes message retrieval code. The sending thread is blocked until the receiving thread processes the message. However, the sending thread will process incoming nonqueued messages while waiting for its message to be processed. To prevent this, use SendMessageTimeout with SMTO_BLOCK set. For more information on nonqueued messages, see Nonqueued Messages.  
-            /// Windows 95/98/Me: SendMessageW is supported by the Microsoft Layer for Unicode (MSLU). To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems.  
-            /// </returns>  
-            [DllImport("User32.dll"), Description("Sends the specified message to a window or windows. The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message. To send a message and return immediately, use the SendMessageCallback or SendNotifyMessage function. To post a message to a thread's message queue and return immediately, use the PostMessage or PostThreadMessage function.")]
-            private static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, IntPtr lParam);
-
-            private static int? GetGroupID(ListViewGroup lstvwgrp)
+        private const int LVM_FIRST = 0x1000;                    // ListView messages  
+        private const int LVM_SETGROUPINFO = (LVM_FIRST + 147);  // ListView messages Setinfo on Group  
+        private const int WM_LBUTTONUP = 0x0202;                 // Windows message left button  
+
+        private delegate void CallBackSetGroupState(ListViewGroup lstvwgrp, ListViewGroupState state);
+        private delegate void CallbackSetGroupString(ListViewGroup lstvwgrp, string value);
+
+        /// <summary>  
+        /// Sends the specified message to a window or windows. The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.   
+        /// To send a message and return immediately, use the SendMessageCallback or SendNotifyMessage function. To post a message to a thread's message queue and return immediately, use the PostMessage or PostThreadMessage function.  
+        /// </summary>  
+        /// <param name="hWnd">  
+        /// [in] Handle to the window whose window procedure will receive the message.   
+        /// If this parameter is HWND_BROADCAST, the message is sent to all top-level windows in the system, including disabled or invisible unowned windows, overlapped windows, and pop-up windows; but the message is not sent to child windows.   
+        /// Microsoft Windows Vista and later. Message sending is subject to User Interface Privilege Isolation (UIPI). The thread of a process can send messages only to message queues of threads in processes of lesser or equal integrity level.  
+        /// </param>  
+        /// <param name="uMsg">[in] Specifies the message to be sent.</param>  
+        /// <param name="wParam">[in] Specifies additional message-specific information.</param>  
+        /// <param name="lParam">[in] Type of LVGROUP, Specifies additional message-specific information.</param>  
+        /// <returns>  
+        /// Microsoft Windows Vista and later. When a message is blocked by UIPI the last error, retrieved with GetLastError, is set to 5 (access denied).  
+        /// Applications that need to communicate using HWND_BROADCAST should use the RegisterWindowMessage function to obtain a unique message for inter-application communication.  
+        /// The system only does marshalling for system messages (those in the range 0 to (WM_USER-1)). To send other messages (those >= WM_USER) to another process, you must do custom marshalling.  
+        /// If the specified window was created by the calling thread, the window procedure is called immediately as a subroutine. If the specified window was created by a different thread, the system switches to that thread and calls the appropriate window procedure. Messages sent between threads are processed only when the receiving thread executes message retrieval code. The sending thread is blocked until the receiving thread processes the message. However, the sending thread will process incoming nonqueued messages while waiting for its message to be processed. To prevent this, use SendMessageTimeout with SMTO_BLOCK set. For more information on nonqueued messages, see Nonqueued Messages.  
+        /// Windows 95/98/Me: SendMessageW is supported by the Microsoft Layer for Unicode (MSLU). To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems.  
+        /// </returns>  
+        [DllImport("User32.dll"), Description("Sends the specified message to a window or windows. The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message. To send a message and return immediately, use the SendMessageCallback or SendNotifyMessage function. To post a message to a thread's message queue and return immediately, use the PostMessage or PostThreadMessage function.")]
+        private static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, IntPtr lParam);
+
+        private static int? GetGroupID(ListViewGroup lstvwgrp)
+        {
+            int? rtnval = null;
+            Type GrpTp = lstvwgrp.GetType();
+            if (GrpTp != null)
             {
-                int? rtnval = null;
-                Type GrpTp = lstvwgrp.GetType();
-                if (GrpTp != null)
+                PropertyInfo pi = GrpTp.GetProperty("ID", BindingFlags.NonPublic | BindingFlags.Instance);
+                if (pi != null)
                 {
-                    PropertyInfo pi = GrpTp.GetProperty("ID", BindingFlags.NonPublic | BindingFlags.Instance);
-                    if (pi != null)
+                    object tmprtnval = pi.GetValue(lstvwgrp, null);
+                    if (tmprtnval != null)
                     {
-                        object tmprtnval = pi.GetValue(lstvwgrp, null);
-                        if (tmprtnval != null)
-                        {
-                            rtnval = tmprtnval as int?;
-                        }
+                        rtnval = tmprtnval as int?;
                     }
                 }
-                return rtnval;
             }
+            return rtnval;
+        }
 
-            private static void setGrpState(ListViewGroup lstvwgrp, ListViewGroupState state)
+        private static void setGrpState(ListViewGroup lstvwgrp, ListViewGroupState state)
+        {
+            if (Environment.OSVersion.Version.Major < 6)   //Only Vista and forward allows collaps of ListViewGroups  
+                return;
+            if (lstvwgrp == null || lstvwgrp.ListView == null)
+                return;
+            if (lstvwgrp.ListView.InvokeRequired)
+                lstvwgrp.ListView.Invoke(new CallBackSetGroupState(setGrpState), lstvwgrp, state);
+            else
             {
-                if (Environment.OSVersion.Version.Major < 6)   //Only Vista and forward allows collaps of ListViewGroups  
-                    return;
-                if (lstvwgrp == null || lstvwgrp.ListView == null)
-                    return;
-                if (lstvwgrp.ListView.InvokeRequired)
-                    lstvwgrp.ListView.Invoke(new CallBackSetGroupState(setGrpState), lstvwgrp, state);
-                else
-                {
-                    int? GrpId = GetGroupID(lstvwgrp);
-                    int gIndex = lstvwgrp.ListView.Groups.IndexOf(lstvwgrp);
-                    LVGROUP group = new LVGROUP();
-                    group.CbSize = Marshal.SizeOf(group);
-                    group.State = state;
-                    group.Mask = ListViewGroupMask.State;
-
-                    IntPtr ip = Marshal.AllocHGlobal(group.CbSize);
-                    Marshal.StructureToPtr(group, ip, false);
+                int? GrpId = GetGroupID(lstvwgrp);
+                int gIndex = lstvwgrp.ListView.Groups.IndexOf(lstvwgrp);
+                LVGROUP group = new LVGROUP();
+                group.CbSize = Marshal.SizeOf(group);
+                group.State = state;
+                group.Mask = ListViewGroupMask.State;
 
-                    if (GrpId != null)
-                    {
-                        group.IGroupId = GrpId.Value;
-                        SendMessage(lstvwgrp.ListView.Handle, LVM_SETGROUPINFO, GrpId.Value, ip);
-                        SendMessage(lstvwgrp.ListView.Handle, LVM_SETGROUPINFO, GrpId.Value, ip);
-                    }
-                    else
-                    {
-                        group.IGroupId = gIndex;
-                        SendMessage(lstvwgrp.ListView.Handle, LVM_SETGROUPINFO, gIndex, ip);
-                        SendMessage(lstvwgrp.ListView.Handle, LVM_SETGROUPINFO, gIndex, ip);
-                    }
+                IntPtr ip = Marshal.AllocHGlobal(group.CbSize);
+                Marshal.StructureToPtr(group, ip, false);
 
-                    lstvwgrp.ListView.Refresh();
+                if (GrpId != null)
+                {
+                    group.IGroupId = GrpId.Value;
+                    SendMessage(lstvwgrp.ListView.Handle, LVM_SETGROUPINFO, GrpId.Value, ip);
+                    SendMessage(lstvwgrp.ListView.Handle, LVM_SETGROUPINFO, GrpId.Value, ip);
+                }
+                else
+                {
+                    group.IGroupId = gIndex;
+                    SendMessage(lstvwgrp.ListView.Handle, LVM_SETGROUPINFO, gIndex, ip);
+                    SendMessage(lstvwgrp.ListView.Handle, LVM_SETGROUPINFO, gIndex, ip);
                 }
-            }
-
-
-            public void SetGroupState(ListViewGroupState state)
-            {
-                foreach (ListViewGroup lvg in this.Groups)
-                    setGrpState(lvg, state);
-            }
-
 
-            protected override void WndProc(ref Message m)
-            {
-                if (m.Msg == WM_LBUTTONUP)
-                    base.DefWndProc(ref m);
-                base.WndProc(ref m);
+                lstvwgrp.ListView.Refresh();
             }
         }
 
 
-        /// <summary>  
-        /// LVGROUP StructureUsed to set and retrieve groups.  
-        /// </summary>  
-        /// <example>  
-        /// LVGROUP myLVGROUP = new LVGROUP();  
-        /// myLVGROUP.CbSize    // is of managed type uint  
-        /// myLVGROUP.Mask  // is of managed type uint  
-        /// myLVGROUP.PszHeader // is of managed type string  
-        /// myLVGROUP.CchHeader // is of managed type int  
-        /// myLVGROUP.PszFooter // is of managed type string  
-        /// myLVGROUP.CchFooter // is of managed type int  
-        /// myLVGROUP.IGroupId  // is of managed type int  
-        /// myLVGROUP.StateMask // is of managed type uint  
-        /// myLVGROUP.State // is of managed type uint  
-        /// myLVGROUP.UAlign    // is of managed type uint  
-        /// myLVGROUP.PszSubtitle   // is of managed type IntPtr  
-        /// myLVGROUP.CchSubtitle   // is of managed type uint  
-        /// myLVGROUP.PszTask   // is of managed type string  
-        /// myLVGROUP.CchTask   // is of managed type uint  
-        /// myLVGROUP.PszDescriptionTop // is of managed type string  
-        /// myLVGROUP.CchDescriptionTop // is of managed type uint  
-        /// myLVGROUP.PszDescriptionBottom  // is of managed type string  
-        /// myLVGROUP.CchDescriptionBottom  // is of managed type uint  
-        /// myLVGROUP.ITitleImage   // is of managed type int  
-        /// myLVGROUP.IExtendedImage    // is of managed type int  
-        /// myLVGROUP.IFirstItem    // is of managed type int  
-        /// myLVGROUP.CItems    // is of managed type IntPtr  
-        /// myLVGROUP.PszSubsetTitle    // is of managed type IntPtr  
-        /// myLVGROUP.CchSubsetTitle    // is of managed type IntPtr  
-        /// </example>  
-        /// <remarks>  
-        /// The LVGROUP structure was created by Paw Jershauge  
-        /// Created: Jan. 2008.  
-        /// The LVGROUP structure code is based on information from Microsoft's MSDN2 website.  
-        /// The structure is generated via an automated converter and is as is.  
-        /// The structure may or may not hold errors inside the code, so use at own risk.  
-        /// Reference url: http://msdn.microsoft.com/en-us/library/bb774769(VS.85).aspx  
-        /// </remarks>  
-        [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode), Description("LVGROUP StructureUsed to set and retrieve groups.")]
-        public struct LVGROUP
+        public void SetGroupState(ListViewGroupState state)
         {
-            /// <summary>  
-            /// Size of this structure, in bytes.  
-            /// </summary>  
-            [Description("Size of this structure, in bytes.")]
-            public int CbSize;
-
-            /// <summary>  
-            /// Mask that specifies which members of the structure are valid input. One or more of the following values:LVGF_NONENo other items are valid.  
-            /// </summary>  
-            [Description("Mask that specifies which members of the structure are valid input. One or more of the following values:LVGF_NONE No other items are valid.")]
-            public ListViewGroupMask Mask;
-
-            /// <summary>  
-            /// Pointer to a null-terminated string that contains the header text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the header text.  
-            /// </summary>  
-            [Description("Pointer to a null-terminated string that contains the header text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the header text.")]
-            [MarshalAs(UnmanagedType.LPWStr)]
-            public string PszHeader;
-
-            /// <summary>  
-            /// Size in TCHARs of the buffer pointed to by the pszHeader member. If the structure is not receiving information about a group, this member is ignored.  
-            /// </summary>  
-            [Description("Size in TCHARs of the buffer pointed to by the pszHeader member. If the structure is not receiving information about a group, this member is ignored.")]
-            public int CchHeader;
-
-            /// <summary>  
-            /// Pointer to a null-terminated string that contains the footer text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the footer text.  
-            /// </summary>  
-            [Description("Pointer to a null-terminated string that contains the footer text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the footer text.")]
-            [MarshalAs(UnmanagedType.LPWStr)]
-            public string PszFooter;
-
-            /// <summary>  
-            /// Size in TCHARs of the buffer pointed to by the pszFooter member. If the structure is not receiving information about a group, this member is ignored.  
-            /// </summary>  
-            [Description("Size in TCHARs of the buffer pointed to by the pszFooter member. If the structure is not receiving information about a group, this member is ignored.")]
-            public int CchFooter;
-
-            /// <summary>  
-            /// ID of the group.  
-            /// </summary>  
-            [Description("ID of the group.")]
-            public int IGroupId;
-
-            /// <summary>  
-            /// Mask used with LVM_GETGROUPINFO (Microsoft Windows XP and Windows Vista) and LVM_SETGROUPINFO (Windows Vista only) to specify which flags in the state value are being retrieved or set.  
-            /// </summary>  
-            [Description("Mask used with LVM_GETGROUPINFO (Microsoft Windows XP and Windows Vista) and LVM_SETGROUPINFO (Windows Vista only) to specify which flags in the state value are being retrieved or set.")]
-            public int StateMask;
-
-            /// <summary>  
-            /// Flag that can have one of the following values:LVGS_NORMALGroups are expanded, the group name is displayed, and all items in the group are displayed.  
-            /// </summary>  
-            [Description("Flag that can have one of the following values:LVGS_NORMAL Groups are expanded, the group name is displayed, and all items in the group are displayed.")]
-            public ListViewGroupState State;
-
-            /// <summary>  
-            /// Indicates the alignment of the header or footer text for the group. It can have one or more of the following values. Use one of the header flags. Footer flags are optional. Windows XP: Footer flags are reserved.LVGA_FOOTER_CENTERReserved.  
-            /// </summary>  
-            [Description("Indicates the alignment of the header or footer text for the group. It can have one or more of the following values. Use one of the header flags. Footer flags are optional. Windows XP: Footer flags are reserved.LVGA_FOOTER_CENTERReserved.")]
-            public uint UAlign;
-
-            /// <summary>  
-            /// Windows Vista. Pointer to a null-terminated string that contains the subtitle text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the subtitle text. This element is drawn under the header text.  
-            /// </summary>  
-            [Description("Windows Vista. Pointer to a null-terminated string that contains the subtitle text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the subtitle text. This element is drawn under the header text.")]
-            public IntPtr PszSubtitle;
-
-            /// <summary>  
-            /// Windows Vista. Size, in TCHARs, of the buffer pointed to by the pszSubtitle member. If the structure is not receiving information about a group, this member is ignored.  
-            /// </summary>  
-            [Description("Windows Vista. Size, in TCHARs, of the buffer pointed to by the pszSubtitle member. If the structure is not receiving information about a group, this member is ignored.")]
-            public uint CchSubtitle;
-
-            /// <summary>  
-            /// Windows Vista. Pointer to a null-terminated string that contains the text for a task link when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the task text. This item is drawn right-aligned opposite the header text. When clicked by the user, the task link generates an LVN_LINKCLICK notification.  
-            /// </summary>  
-            [Description("Windows Vista. Pointer to a null-terminated string that contains the text for a task link when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the task text. This item is drawn right-aligned opposite the header text. When clicked by the user, the task link generates an LVN_LINKCLICK notification.")]
-            [MarshalAs(UnmanagedType.LPWStr)]
-            public string PszTask;
-
-            /// <summary>  
-            /// Windows Vista. Size in TCHARs of the buffer pointed to by the pszTask member. If the structure is not receiving information about a group, this member is ignored.  
-            /// </summary>  
-            [Description("Windows Vista. Size in TCHARs of the buffer pointed to by the pszTask member. If the structure is not receiving information about a group, this member is ignored.")]
-            public uint CchTask;
-
-            /// <summary>  
-            /// Windows Vista. Pointer to a null-terminated string that contains the top description text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the top description text. This item is drawn opposite the title image when there is a title image, no extended image, and uAlign==LVGA_HEADER_CENTER.  
-            /// </summary>  
-            [Description("Windows Vista. Pointer to a null-terminated string that contains the top description text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the top description text. This item is drawn opposite the title image when there is a title image, no extended image, and uAlign==LVGA_HEADER_CENTER.")]
-            [MarshalAs(UnmanagedType.LPWStr)]
-            public string PszDescriptionTop;
-
-            /// <summary>  
-            /// Windows Vista. Size in TCHARs of the buffer pointed to by the pszDescriptionTop member. If the structure is not receiving information about a group, this member is ignored.  
-            /// </summary>  
-            [Description("Windows Vista. Size in TCHARs of the buffer pointed to by the pszDescriptionTop member. If the structure is not receiving information about a group, this member is ignored.")]
-            public uint CchDescriptionTop;
-
-            /// <summary>  
-            /// Windows Vista. Pointer to a null-terminated string that contains the bottom description text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the bottom description text. This item is drawn under the top description text when there is a title image, no extended image, and uAlign==LVGA_HEADER_CENTER.  
-            /// </summary>  
-            [Description("Windows Vista. Pointer to a null-terminated string that contains the bottom description text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the bottom description text. This item is drawn under the top description text when there is a title image, no extended image, and uAlign==LVGA_HEADER_CENTER.")]
-            [MarshalAs(UnmanagedType.LPWStr)]
-            public string PszDescriptionBottom;
-
-            /// <summary>  
-            /// Windows Vista. Size in TCHARs of the buffer pointed to by the pszDescriptionBottom member. If the structure is not receiving information about a group, this member is ignored.  
-            /// </summary>  
-            [Description("Windows Vista. Size in TCHARs of the buffer pointed to by the pszDescriptionBottom member. If the structure is not receiving information about a group, this member is ignored.")]
-            public uint CchDescriptionBottom;
-
-            /// <summary>  
-            /// Windows Vista. Index of the title image in the control imagelist.  
-            /// </summary>  
-            [Description("Windows Vista. Index of the title image in the control imagelist.")]
-            public int ITitleImage;
-
-            /// <summary>  
-            /// Windows Vista. Index of the extended image in the control imagelist.  
-            /// </summary>  
-            [Description("Windows Vista. Index of the extended image in the control imagelist.")]
-            public int IExtendedImage;
-
-            /// <summary>  
-            /// Windows Vista. Read-only.  
-            /// </summary>  
-            [Description("Windows Vista. Read-only.")]
-            public int IFirstItem;
-
-            /// <summary>  
-            /// Windows Vista. Read-only in non-owner data mode.  
-            /// </summary>  
-            [Description("Windows Vista. Read-only in non-owner data mode.")]
-            public IntPtr CItems;
-
-            /// <summary>  
-            /// Windows Vista. NULL if group is not a subset. Pointer to a null-terminated string that contains the subset title text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the subset title text.  
-            /// </summary>  
-            [Description("Windows Vista. NULL if group is not a subset. Pointer to a null-terminated string that contains the subset title text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the subset title text.")]
-            public IntPtr PszSubsetTitle;
-
-            /// <summary>  
-            /// Windows Vista. Size in TCHARs of the buffer pointed to by the pszSubsetTitle member. If the structure is not receiving information about a group, this member is ignored.  
-            /// </summary>  
-            [Description("Windows Vista. Size in TCHARs of the buffer pointed to by the pszSubsetTitle member. If the structure is not receiving information about a group, this member is ignored.")]
-            public IntPtr CchSubsetTitle;
+            foreach (ListViewGroup lvg in this.Groups)
+                setGrpState(lvg, state);
         }
 
-        public enum ListViewGroupMask
+
+        protected override void WndProc(ref Message m)
         {
-            None = 0x00000,
-            Header = 0x00001,
-            Footer = 0x00002,
-            State = 0x00004,
-            Align = 0x00008,
-            GroupId = 0x00010,
-            SubTitle = 0x00100,
-            Task = 0x00200,
-            DescriptionTop = 0x00400,
-            DescriptionBottom = 0x00800,
-            TitleImage = 0x01000,
-            ExtendedImage = 0x02000,
-            Items = 0x04000,
-            Subset = 0x08000,
-            SubsetItems = 0x10000
+            if (m.Msg == WM_LBUTTONUP)
+                base.DefWndProc(ref m);
+            base.WndProc(ref m);
         }
+    }
 
-        public enum ListViewGroupState
-        {
-            /// <summary>  
-            /// Groups are expanded, the group name is displayed, and all items in the group are displayed.  
-            /// </summary>  
-            Normal = 0,
-            /// <summary>  
-            /// The group is collapsed.  
-            /// </summary>  
-            Collapsed = 1,
-            /// <summary>  
-            /// The group is hidden.  
-            /// </summary>  
-            Hidden = 2,
-            /// <summary>  
-            /// Version 6.00 and Windows Vista. The group does not display a header.  
-            /// </summary>  
-            NoHeader = 4,
-            /// <summary>  
-            /// Version 6.00 and Windows Vista. The group can be collapsed.  
-            /// </summary>  
-            Collapsible = 8,
-            /// <summary>  
-            /// Version 6.00 and Windows Vista. The group has keyboard focus.  
-            /// </summary>  
-            Focused = 16,
-            /// <summary>  
-            /// Version 6.00 and Windows Vista. The group is selected.  
-            /// </summary>  
-            Selected = 32,
-            /// <summary>  
-            /// Version 6.00 and Windows Vista. The group displays only a portion of its items.  
-            /// </summary>  
-            SubSeted = 64,
-            /// <summary>  
-            /// Version 6.00 and Windows Vista. The subset link of the group has keyboard focus.  
-            /// </summary>  
-            SubSetLinkFocused = 128,
+
+    /// <summary>  
+    /// LVGROUP StructureUsed to set and retrieve groups.  
+    /// </summary>  
+    /// <example>  
+    /// LVGROUP myLVGROUP = new LVGROUP();  
+    /// myLVGROUP.CbSize    // is of managed type uint  
+    /// myLVGROUP.Mask  // is of managed type uint  
+    /// myLVGROUP.PszHeader // is of managed type string  
+    /// myLVGROUP.CchHeader // is of managed type int  
+    /// myLVGROUP.PszFooter // is of managed type string  
+    /// myLVGROUP.CchFooter // is of managed type int  
+    /// myLVGROUP.IGroupId  // is of managed type int  
+    /// myLVGROUP.StateMask // is of managed type uint  
+    /// myLVGROUP.State // is of managed type uint  
+    /// myLVGROUP.UAlign    // is of managed type uint  
+    /// myLVGROUP.PszSubtitle   // is of managed type IntPtr  
+    /// myLVGROUP.CchSubtitle   // is of managed type uint  
+    /// myLVGROUP.PszTask   // is of managed type string  
+    /// myLVGROUP.CchTask   // is of managed type uint  
+    /// myLVGROUP.PszDescriptionTop // is of managed type string  
+    /// myLVGROUP.CchDescriptionTop // is of managed type uint  
+    /// myLVGROUP.PszDescriptionBottom  // is of managed type string  
+    /// myLVGROUP.CchDescriptionBottom  // is of managed type uint  
+    /// myLVGROUP.ITitleImage   // is of managed type int  
+    /// myLVGROUP.IExtendedImage    // is of managed type int  
+    /// myLVGROUP.IFirstItem    // is of managed type int  
+    /// myLVGROUP.CItems    // is of managed type IntPtr  
+    /// myLVGROUP.PszSubsetTitle    // is of managed type IntPtr  
+    /// myLVGROUP.CchSubsetTitle    // is of managed type IntPtr  
+    /// </example>  
+    /// <remarks>  
+    /// The LVGROUP structure was created by Paw Jershauge  
+    /// Created: Jan. 2008.  
+    /// The LVGROUP structure code is based on information from Microsoft's MSDN2 website.  
+    /// The structure is generated via an automated converter and is as is.  
+    /// The structure may or may not hold errors inside the code, so use at own risk.  
+    /// Reference url: http://msdn.microsoft.com/en-us/library/bb774769(VS.85).aspx  
+    /// </remarks>  
+    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode), Description("LVGROUP StructureUsed to set and retrieve groups.")]
+    public struct LVGROUP
+    {
+        /// <summary>  
+        /// Size of this structure, in bytes.  
+        /// </summary>  
+        [Description("Size of this structure, in bytes.")]
+        public int CbSize;
+
+        /// <summary>  
+        /// Mask that specifies which members of the structure are valid input. One or more of the following values:LVGF_NONENo other items are valid.  
+        /// </summary>  
+        [Description("Mask that specifies which members of the structure are valid input. One or more of the following values:LVGF_NONE No other items are valid.")]
+        public ListViewGroupMask Mask;
+
+        /// <summary>  
+        /// Pointer to a null-terminated string that contains the header text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the header text.  
+        /// </summary>  
+        [Description("Pointer to a null-terminated string that contains the header text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the header text.")]
+        [MarshalAs(UnmanagedType.LPWStr)]
+        public string PszHeader;
+
+        /// <summary>  
+        /// Size in TCHARs of the buffer pointed to by the pszHeader member. If the structure is not receiving information about a group, this member is ignored.  
+        /// </summary>  
+        [Description("Size in TCHARs of the buffer pointed to by the pszHeader member. If the structure is not receiving information about a group, this member is ignored.")]
+        public int CchHeader;
+
+        /// <summary>  
+        /// Pointer to a null-terminated string that contains the footer text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the footer text.  
+        /// </summary>  
+        [Description("Pointer to a null-terminated string that contains the footer text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the footer text.")]
+        [MarshalAs(UnmanagedType.LPWStr)]
+        public string PszFooter;
+
+        /// <summary>  
+        /// Size in TCHARs of the buffer pointed to by the pszFooter member. If the structure is not receiving information about a group, this member is ignored.  
+        /// </summary>  
+        [Description("Size in TCHARs of the buffer pointed to by the pszFooter member. If the structure is not receiving information about a group, this member is ignored.")]
+        public int CchFooter;
+
+        /// <summary>  
+        /// ID of the group.  
+        /// </summary>  
+        [Description("ID of the group.")]
+        public int IGroupId;
+
+        /// <summary>  
+        /// Mask used with LVM_GETGROUPINFO (Microsoft Windows XP and Windows Vista) and LVM_SETGROUPINFO (Windows Vista only) to specify which flags in the state value are being retrieved or set.  
+        /// </summary>  
+        [Description("Mask used with LVM_GETGROUPINFO (Microsoft Windows XP and Windows Vista) and LVM_SETGROUPINFO (Windows Vista only) to specify which flags in the state value are being retrieved or set.")]
+        public int StateMask;
+
+        /// <summary>  
+        /// Flag that can have one of the following values:LVGS_NORMALGroups are expanded, the group name is displayed, and all items in the group are displayed.  
+        /// </summary>  
+        [Description("Flag that can have one of the following values:LVGS_NORMAL Groups are expanded, the group name is displayed, and all items in the group are displayed.")]
+        public ListViewGroupState State;
+
+        /// <summary>  
+        /// Indicates the alignment of the header or footer text for the group. It can have one or more of the following values. Use one of the header flags. Footer flags are optional. Windows XP: Footer flags are reserved.LVGA_FOOTER_CENTERReserved.  
+        /// </summary>  
+        [Description("Indicates the alignment of the header or footer text for the group. It can have one or more of the following values. Use one of the header flags. Footer flags are optional. Windows XP: Footer flags are reserved.LVGA_FOOTER_CENTERReserved.")]
+        public uint UAlign;
+
+        /// <summary>  
+        /// Windows Vista. Pointer to a null-terminated string that contains the subtitle text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the subtitle text. This element is drawn under the header text.  
+        /// </summary>  
+        [Description("Windows Vista. Pointer to a null-terminated string that contains the subtitle text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the subtitle text. This element is drawn under the header text.")]
+        public IntPtr PszSubtitle;
+
+        /// <summary>  
+        /// Windows Vista. Size, in TCHARs, of the buffer pointed to by the pszSubtitle member. If the structure is not receiving information about a group, this member is ignored.  
+        /// </summary>  
+        [Description("Windows Vista. Size, in TCHARs, of the buffer pointed to by the pszSubtitle member. If the structure is not receiving information about a group, this member is ignored.")]
+        public uint CchSubtitle;
+
+        /// <summary>  
+        /// Windows Vista. Pointer to a null-terminated string that contains the text for a task link when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the task text. This item is drawn right-aligned opposite the header text. When clicked by the user, the task link generates an LVN_LINKCLICK notification.  
+        /// </summary>  
+        [Description("Windows Vista. Pointer to a null-terminated string that contains the text for a task link when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the task text. This item is drawn right-aligned opposite the header text. When clicked by the user, the task link generates an LVN_LINKCLICK notification.")]
+        [MarshalAs(UnmanagedType.LPWStr)]
+        public string PszTask;
+
+        /// <summary>  
+        /// Windows Vista. Size in TCHARs of the buffer pointed to by the pszTask member. If the structure is not receiving information about a group, this member is ignored.  
+        /// </summary>  
+        [Description("Windows Vista. Size in TCHARs of the buffer pointed to by the pszTask member. If the structure is not receiving information about a group, this member is ignored.")]
+        public uint CchTask;
+
+        /// <summary>  
+        /// Windows Vista. Pointer to a null-terminated string that contains the top description text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the top description text. This item is drawn opposite the title image when there is a title image, no extended image, and uAlign==LVGA_HEADER_CENTER.  
+        /// </summary>  
+        [Description("Windows Vista. Pointer to a null-terminated string that contains the top description text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the top description text. This item is drawn opposite the title image when there is a title image, no extended image, and uAlign==LVGA_HEADER_CENTER.")]
+        [MarshalAs(UnmanagedType.LPWStr)]
+        public string PszDescriptionTop;
+
+        /// <summary>  
+        /// Windows Vista. Size in TCHARs of the buffer pointed to by the pszDescriptionTop member. If the structure is not receiving information about a group, this member is ignored.  
+        /// </summary>  
+        [Description("Windows Vista. Size in TCHARs of the buffer pointed to by the pszDescriptionTop member. If the structure is not receiving information about a group, this member is ignored.")]
+        public uint CchDescriptionTop;
+
+        /// <summary>  
+        /// Windows Vista. Pointer to a null-terminated string that contains the bottom description text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the bottom description text. This item is drawn under the top description text when there is a title image, no extended image, and uAlign==LVGA_HEADER_CENTER.  
+        /// </summary>  
+        [Description("Windows Vista. Pointer to a null-terminated string that contains the bottom description text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the bottom description text. This item is drawn under the top description text when there is a title image, no extended image, and uAlign==LVGA_HEADER_CENTER.")]
+        [MarshalAs(UnmanagedType.LPWStr)]
+        public string PszDescriptionBottom;
+
+        /// <summary>  
+        /// Windows Vista. Size in TCHARs of the buffer pointed to by the pszDescriptionBottom member. If the structure is not receiving information about a group, this member is ignored.  
+        /// </summary>  
+        [Description("Windows Vista. Size in TCHARs of the buffer pointed to by the pszDescriptionBottom member. If the structure is not receiving information about a group, this member is ignored.")]
+        public uint CchDescriptionBottom;
+
+        /// <summary>  
+        /// Windows Vista. Index of the title image in the control imagelist.  
+        /// </summary>  
+        [Description("Windows Vista. Index of the title image in the control imagelist.")]
+        public int ITitleImage;
+
+        /// <summary>  
+        /// Windows Vista. Index of the extended image in the control imagelist.  
+        /// </summary>  
+        [Description("Windows Vista. Index of the extended image in the control imagelist.")]
+        public int IExtendedImage;
+
+        /// <summary>  
+        /// Windows Vista. Read-only.  
+        /// </summary>  
+        [Description("Windows Vista. Read-only.")]
+        public int IFirstItem;
+
+        /// <summary>  
+        /// Windows Vista. Read-only in non-owner data mode.  
+        /// </summary>  
+        [Description("Windows Vista. Read-only in non-owner data mode.")]
+        public IntPtr CItems;
+
+        /// <summary>  
+        /// Windows Vista. NULL if group is not a subset. Pointer to a null-terminated string that contains the subset title text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the subset title text.  
+        /// </summary>  
+        [Description("Windows Vista. NULL if group is not a subset. Pointer to a null-terminated string that contains the subset title text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the subset title text.")]
+        public IntPtr PszSubsetTitle;
+
+        /// <summary>  
+        /// Windows Vista. Size in TCHARs of the buffer pointed to by the pszSubsetTitle member. If the structure is not receiving information about a group, this member is ignored.  
+        /// </summary>  
+        [Description("Windows Vista. Size in TCHARs of the buffer pointed to by the pszSubsetTitle member. If the structure is not receiving information about a group, this member is ignored.")]
+        public IntPtr CchSubsetTitle;
+    }
+
+    public enum ListViewGroupMask
+    {
+        None = 0x00000,
+        Header = 0x00001,
+        Footer = 0x00002,
+        State = 0x00004,
+        Align = 0x00008,
+        GroupId = 0x00010,
+        SubTitle = 0x00100,
+        Task = 0x00200,
+        DescriptionTop = 0x00400,
+        DescriptionBottom = 0x00800,
+        TitleImage = 0x01000,
+        ExtendedImage = 0x02000,
+        Items = 0x04000,
+        Subset = 0x08000,
+        SubsetItems = 0x10000
+    }
+
+    public enum ListViewGroupState
+    {
+        /// <summary>  
+        /// Groups are expanded, the group name is displayed, and all items in the group are displayed.  
+        /// </summary>  
+        Normal = 0,
+        /// <summary>  
+        /// The group is collapsed.  
+        /// </summary>  
+        Collapsed = 1,
+        /// <summary>  
+        /// The group is hidden.  
+        /// </summary>  
+        Hidden = 2,
+        /// <summary>  
+        /// Version 6.00 and Windows Vista. The group does not display a header.  
+        /// </summary>  
+        NoHeader = 4,
+        /// <summary>  
+        /// Version 6.00 and Windows Vista. The group can be collapsed.  
+        /// </summary>  
+        Collapsible = 8,
+        /// <summary>  
+        /// Version 6.00 and Windows Vista. The group has keyboard focus.  
+        /// </summary>  
+        Focused = 16,
+        /// <summary>  
+        /// Version 6.00 and Windows Vista. The group is selected.  
+        /// </summary>  
+        Selected = 32,
+        /// <summary>  
+        /// Version 6.00 and Windows Vista. The group displays only a portion of its items.  
+        /// </summary>  
+        SubSeted = 64,
+        /// <summary>  
+        /// Version 6.00 and Windows Vista. The subset link of the group has keyboard focus.  
+        /// </summary>  
+        SubSetLinkFocused = 128,
     }
 }

+ 0 - 1
UAS_MES_JH/CustomControl/Pagination/Pagination.cs

@@ -1,7 +1,6 @@
 using System;
 using System.Collections.Generic;
 using System.Data;
-using System.IO;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;

+ 0 - 1
UAS_MES_JH/CustomControl/Pagination/PaginationDbFind.cs

@@ -1,7 +1,6 @@
 using System;
 using System.Collections.Generic;
 using System.Data;
-using System.IO;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;

+ 1 - 8
UAS_MES_JH/CustomControl/PowerControlForm/PowerControlForm.cs

@@ -1,11 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
-using System.Windows.Forms;
+using System.Windows.Forms;
 
 namespace UAS_MES_NEW.CustomControl.PowerControlForm
 {

+ 0 - 3
UAS_MES_JH/CustomControl/SetLoading/LoadingCircle.cs

@@ -4,12 +4,9 @@
 //#####################################################################################
 
 using System;
-using System.Collections.Generic;
 using System.ComponentModel;
-using System.Data;
 using System.Drawing;
 using System.Drawing.Drawing2D;
-using System.Text;
 using System.Windows.Forms;
 
 namespace UAS_MES_NEW.CustomControl.SetLoading

+ 1 - 6
UAS_MES_JH/CustomControl/TextBoxWithIcon/BlurSearch.cs

@@ -1,10 +1,5 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
 using System.Data;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;
@@ -146,7 +141,7 @@ namespace UAS_MES_NEW.CustomControl.TextBoxWithIcon
                     }
                     //每次数据查询之后将索引重置
                     ItemSelectIndex = 0;
-                    ListBox.Height = ListBox.ItemHeight  *10;
+                    ListBox.Height = ListBox.ItemHeight * 10;
                     ListBox.Visible = true;
                     Height = ListBox.Height + EnterTextBox.Height;
                 }

+ 0 - 1
UAS_MES_JH/CustomControl/TextBoxWithIcon/MaCodeSearchTextBox.cs

@@ -1,5 +1,4 @@
 using System;
-using System.Collections.Generic;
 using System.Data;
 using System.Windows.Forms;
 using UAS_MES_NEW.CustomControl.CustomCheckBox;

+ 0 - 1
UAS_MES_JH/CustomControl/TextBoxWithIcon/MaCodeTextBox.cs

@@ -1,7 +1,6 @@
 using System;
 using System.Drawing;
 using System.Windows.Forms;
-using UAS_MES_NEW.PublicMethod;
 
 namespace UAS_MES_NEW.CustomControl.TextBoxWithIcon
 {

+ 2 - 4
UAS_MES_JH/CustomControl/TextBoxWithIcon/NumOnlyTextBox.cs

@@ -1,6 +1,4 @@
-using System;
-using System.Drawing;
-using System.Windows.Forms;
+using System.Windows.Forms;
 
 namespace UAS_MES_NEW.CustomControl.TextBoxWithIcon
 {
@@ -29,7 +27,7 @@ namespace UAS_MES_NEW.CustomControl.TextBoxWithIcon
         private void NumOnlyTextBox_KeyPress(object sender, KeyPressEventArgs e)
         {
             // 允许输入:数字、退格键(8)、全选(1)、复制(3)、粘贴(22)
-            if (!char.IsDigit(e.KeyChar) && e.KeyChar  != 8 && e.KeyChar != 1 && e.KeyChar != 3 && e.KeyChar != 22)
+            if (!char.IsDigit(e.KeyChar) && e.KeyChar != 8 && e.KeyChar != 1 && e.KeyChar != 3 && e.KeyChar != 22)
             {
                 e.Handled = true;
             }

+ 1 - 5
UAS_MES_JH/CustomControl/TextBoxWithIcon/RoundTextBox.cs

@@ -1,12 +1,8 @@
 using System;
-using System.Collections.Generic;
 using System.ComponentModel;
 using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
-using System.Windows.Forms;
 using System.Drawing.Drawing2D;
+using System.Windows.Forms;
 
 namespace UAS_MES_NEW.CustomControl.TextBoxWithIcon
 {

+ 2 - 7
UAS_MES_JH/CustomControl/TextBoxWithIcon/SNCodeEnterTextBox.cs

@@ -1,12 +1,7 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
 using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
-using System.Windows.Forms;
 using System.Runtime.InteropServices;
+using System.Windows.Forms;
 using UAS_MES_NEW.PublicMethod;
 
 namespace UAS_MES_NEW.CustomControl.TextBoxWithIcon
@@ -95,7 +90,7 @@ namespace UAS_MES_NEW.CustomControl.TextBoxWithIcon
                 this.SelectAll();
             //不允许开启大写扫描
             if (e.KeyCode == Keys.Enter)
-            { 
+            {
                 if (CapsLockStatus)
                 {
                     Text = "";

+ 0 - 1
UAS_MES_JH/CustomControl/TextBoxWithIcon/SearchTextBox.cs

@@ -1,5 +1,4 @@
 using System;
-using System.Collections.Generic;
 using System.Data;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;

+ 1 - 8
UAS_MES_JH/CustomControl/TextBoxWithIcon/SnCollectionBox.cs

@@ -1,11 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
-using System.Windows.Forms;
+using System.Windows.Forms;
 using UAS_MES_NEW.Entity;
 
 namespace UAS_MES_NEW.CustomControl.TextBoxWithIcon

+ 0 - 5
UAS_MES_JH/CustomControl/TextBoxWithIcon/SourceStepCount.cs

@@ -1,10 +1,5 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
 using System.Data;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;

+ 3 - 2
UAS_MES_JH/CustomControl/TextBoxWithIcon/TextAreaForm.cs

@@ -126,12 +126,13 @@ namespace UAS_MES_NEW.CustomControl.TextBoxWithIcon
         //清除按钮
         private void Clean_Click(object sender, EventArgs e)
         {
-            TextArea.Clear(); 
+            TextArea.Clear();
         }
 
         private void TextAreaForm_KeyDown(object sender, KeyEventArgs e)
         {
-            if (e.KeyData == Keys.Escape) {
+            if (e.KeyData == Keys.Escape)
+            {
                 this.Close();
                 this.Dispose();
             }

+ 0 - 6
UAS_MES_JH/CustomControl/TextBoxWithIcon/TextBoxNumOnly.cs

@@ -1,11 +1,5 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
 using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
 using System.Windows.Forms;
 
 namespace UAS_MES_NEW.CustomControl.TextBoxWithIcon

+ 0 - 7
UAS_MES_JH/CustomControl/TimePickerWithCombo/TimePickerWithCombo.cs

@@ -1,11 +1,4 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
 using System.Windows.Forms;
 
 namespace UAS_MES_NEW.CustomControl.TimePickerWithCombo

+ 5 - 7
UAS_MES_JH/DataOperate/AccessDBHelper.cs

@@ -2,9 +2,7 @@
 using System.Collections.Generic;
 using System.Data;
 using System.Data.OleDb;
-using System.Linq;
 using System.Text;
-using System.Windows;
 using System.Windows.Forms;
 
 namespace UAS_MES_NEW.DataOperate
@@ -24,7 +22,7 @@ namespace UAS_MES_NEW.DataOperate
         }
 
 
-        public AccessDBHelper(string fileName,string password)
+        public AccessDBHelper(string fileName, string password)
         {
             this._fileName = fileName;
             //this._connectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + fileName + ";Jet OLEDB:Database Password="+password+";";
@@ -82,7 +80,7 @@ namespace UAS_MES_NEW.DataOperate
             }
             catch (Exception ex)
             {
-                throw new Exception("sql語句: " + sql + " 執行失敗!"+ex.Message);
+                throw new Exception("sql語句: " + sql + " 執行失敗!" + ex.Message);
             }
             adapter.Dispose();
             return ds;
@@ -442,7 +440,7 @@ namespace UAS_MES_NEW.DataOperate
                     }
                 }
                 for (int i = 0; i < addpar.Length; i++)
-                    command.Parameters.Add(new OleDbParameter(addpar[i].ToString(),names[i]));
+                    command.Parameters.Add(new OleDbParameter(addpar[i].ToString(), names[i]));
             }
 
             switch (Type.ToUpper())
@@ -695,7 +693,7 @@ namespace UAS_MES_NEW.DataOperate
             //将第一个数组的下标固定为0作为循环添加的参数的名称
             for (int i = 1; i <= names[0].Length; i++)
             {
-                command.Parameters.Add(new OleDbParameter(names[0][i - 1].ToString(),names[i]));
+                command.Parameters.Add(new OleDbParameter(names[0][i - 1].ToString(), names[i]));
             }
             try
             {
@@ -718,7 +716,7 @@ namespace UAS_MES_NEW.DataOperate
             //将第一个数组的下标固定为0作为循环添加的参数的名称
             for (int i = 0; i < param.Length; i++)
             {
-                command.Parameters.Add(new OleDbParameter(param[i].ToString(),param1[i]));
+                command.Parameters.Add(new OleDbParameter(param[i].ToString(), param1[i]));
             }
             try
             {

+ 1 - 1
UAS_MES_JH/DataOperate/DataHelper.cs

@@ -254,7 +254,7 @@ namespace UAS_MES_NEW.DataOperate
             string sql = "select ";
             sql += AddField(Fields);
             sql += " from " + TableName + " where " + Condition;
-            
+
             command = new OracleCommand(sql, connection);
             Reconnect(command);
             OracleDataAdapter ad = new OracleDataAdapter(command);

+ 10 - 12
UAS_MES_JH/DataOperate/ExcelHandler.cs

@@ -1,14 +1,12 @@
-using System.IO;
-using System.Data;
-using System;
-using System.Text;
-using System.Drawing;
-using System.Collections.Generic;
-using NPOI.SS.UserModel;
-using NPOI.HSSF.UserModel;
-using NPOI.SS.Formula.Eval;
+using NPOI.HSSF.UserModel;
 using NPOI.HSSF.Util;
+using NPOI.SS.Formula.Eval;
+using NPOI.SS.UserModel;
 using NPOI.SS.Util;
+using System;
+using System.Data;
+using System.IO;
+using System.Text;
 
 namespace UAS_MES_NEW.DataOperate
 {
@@ -185,7 +183,7 @@ namespace UAS_MES_NEW.DataOperate
                     }
                 }
             }
-    
+
             return dt;
         }
 
@@ -311,7 +309,7 @@ namespace UAS_MES_NEW.DataOperate
                 }
                 else
                 {
-                    sheet.SetColumnWidth(i, dataLength*25);
+                    sheet.SetColumnWidth(i, dataLength * 25);
                 }
             }
             //首先画好第一行带颜色的,单独写出来,避免写在循环里面
@@ -349,7 +347,7 @@ namespace UAS_MES_NEW.DataOperate
                 for (int j = 0; j < columnNum; j++)
                 {
                     row1.CreateCell(j);
-                    row1.Cells[j].SetCellValue(DataTable.Rows[i].Cells[j].Value==null?"":DataTable.Rows[i].Cells[j].Value.ToString());
+                    row1.Cells[j].SetCellValue(DataTable.Rows[i].Cells[j].Value == null ? "" : DataTable.Rows[i].Cells[j].Value.ToString());
                     row1.GetCell(j).CellStyle.VerticalAlignment = VerticalAlignment.CENTER;
                 }
             }

+ 1 - 6
UAS_MES_JH/Entity/Status.cs

@@ -1,9 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace UAS_MES_NEW.Entity
+namespace UAS_MES_NEW.Entity
 {
     class Status
     {

+ 4 - 4
UAS_MES_JH/Entity/SystemInf.cs

@@ -36,11 +36,11 @@ namespace UAS_MES_NEW.Entity
         /// <summary>
         /// 打开的串口的名称
         /// </summary>
-        public static List<string> OpenPort=new List<string>();
+        public static List<string> OpenPort = new List<string>();
         /// <summary>
         /// 检测音频是否可用
         /// </summary>
-        public static bool CheckAudioEnable=true;
+        public static bool CheckAudioEnable = true;
         /// <summary>
         /// 导航宽度
         /// </summary>
@@ -60,7 +60,7 @@ namespace UAS_MES_NEW.Entity
         /// <summary>
         /// 缓存数据的文件夹
         /// </summary>
-        public static string CacheFolder= Environment.GetEnvironmentVariable("windir").Substring(0, 1)+@":\UAS_MES\CacheFile\";
+        public static string CacheFolder = Environment.GetEnvironmentVariable("windir").Substring(0, 1) + @":\UAS_MES\CacheFile\";
         /// <summary>
         /// 日志文件的缓存路径
         /// </summary>
@@ -68,7 +68,7 @@ namespace UAS_MES_NEW.Entity
         /// <summary>
         /// 缓存的XML文件的路径和名称
         /// </summary>
-        public static string CacheFilePath= Environment.GetEnvironmentVariable("windir").Substring(0, 1) + @":\UAS_MES\CacheFile\CacheInfo.xml";
+        public static string CacheFilePath = Environment.GetEnvironmentVariable("windir").Substring(0, 1) + @":\UAS_MES\CacheFile\CacheInfo.xml";
 
         public static bool UpperCollection = true;
 

+ 1 - 6
UAS_MES_JH/Enum/EMouseState.cs

@@ -1,9 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace UAS_MES_NEW.Enum
+namespace UAS_MES_NEW.Enum
 {
     public enum EMouseState
     {

+ 0 - 3
UAS_MES_JH/Form1.Designer.cs

@@ -45,7 +45,6 @@
             this.tabNavigationPage2 = new DevExpress.XtraBars.Navigation.TabNavigationPage();
             this.tabNavigationPage1 = new DevExpress.XtraBars.Navigation.TabNavigationPage();
             this.dataNavigator1 = new DevExpress.XtraEditors.DataNavigator();
-            this.sqlDataSource1 = new DevExpress.DataAccess.Sql.SqlDataSource(this.components);
             this.mruEdit1 = new DevExpress.XtraEditors.MRUEdit();
             this.enterTextBox2 = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.cameraControl1 = new DevExpress.XtraEditors.Camera.CameraControl();
@@ -216,7 +215,6 @@
             // 
             // sqlDataSource1
             // 
-            this.sqlDataSource1.Name = "sqlDataSource1";
             // 
             // mruEdit1
             // 
@@ -317,7 +315,6 @@
         private DevExpress.XtraBars.Navigation.TabNavigationPage tabNavigationPage1;
         private DevExpress.XtraBars.Navigation.TabNavigationPage tabNavigationPage2;
         private DevExpress.XtraEditors.DataNavigator dataNavigator1;
-        private DevExpress.DataAccess.Sql.SqlDataSource sqlDataSource1;
         private DevExpress.XtraEditors.MRUEdit mruEdit1;
         private DevExpress.XtraEditors.Camera.CameraControl cameraControl1;
         private DevExpress.XtraEditors.PictureEdit pictureEdit1;

+ 3 - 4
UAS_MES_JH/Form1.cs

@@ -3,7 +3,6 @@ using System.Collections.Generic;
 using System.Data;
 using System.Runtime.InteropServices;
 using System.Text;
-using System.Threading;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.PublicMethod;
@@ -31,7 +30,7 @@ namespace UAS_MES_NEW
         {
             InitializeComponent();
             datahelper = new DataHelper();
-            dt = (DataTable)datahelper.ExecuteSql("select id form loginfo","slect");
+            dt = (DataTable)datahelper.ExecuteSql("select id form loginfo", "slect");
             BindingSource bs = new BindingSource();
             bs.DataSource = dt;
             dataNavigator1.DataSource = bs;
@@ -54,7 +53,7 @@ namespace UAS_MES_NEW
             }
             int i = 3 << 1;
 
-            Console.WriteLine(i+"");
+            Console.WriteLine(i + "");
 
         }
 
@@ -137,7 +136,7 @@ namespace UAS_MES_NEW
 
         private void dataNavigator1_Click(object sender, EventArgs e)
         {
-           
+
         }
 
         private void dataNavigator1_ButtonClick(object sender, DevExpress.XtraEditors.NavigatorButtonClickEventArgs e)

+ 2 - 7
UAS_MES_JH/FunctionCode/Employee/Employee_ChooseUserToGroup.cs

@@ -1,11 +1,6 @@
 using System;
-using System.Collections;
 using System.Collections.Generic;
-using System.ComponentModel;
 using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 using UAS_MES_NEW.CustomControl.DataGrid_View;
 using UAS_MES_NEW.DataOperate;
@@ -97,10 +92,10 @@ namespace UAS_MES_NEW.Employee
                 string ConfirmAdd = MessageBox.Show(this.ParentForm, "确认添加所选人员到分组?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
                 if (ConfirmAdd == "Yes")
                 {
-                    string ug_id = dh.getFieldDataByCondition("CS$USERGROUP", "ug_id", "ug_code='"+ ug_code_title.Text + "'").ToString();
+                    string ug_id = dh.getFieldDataByCondition("CS$USERGROUP", "ug_id", "ug_code='" + ug_code_title.Text + "'").ToString();
                     sql.Clear();
                     sql.Append("insert into cs$empgroup (eg_id,eg_emcode,eg_groupcode,eg_name,eg_groupid)");
-                    sql.Append("values (cs$empgroup_seq.nextval,:em_code,'" + ug_code_title.Text + "','" + em_name3.Text + "','"+ ug_id + "')");
+                    sql.Append("values (cs$empgroup_seq.nextval,:em_code,'" + ug_code_title.Text + "','" + em_name3.Text + "','" + ug_id + "')");
                     dh.BatchInsert(sql.GetString(), new string[] { "em_code", }, MoveInUserCode.ToArray());
                     ScreenInGroup.PerformClick();
                     ScreenOutGroup.PerformClick();

+ 0 - 6
UAS_MES_JH/FunctionCode/Employee/Employee_Data.cs

@@ -1,10 +1,4 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;

+ 0 - 6
UAS_MES_JH/FunctionCode/Employee/Employee_NewGroup.cs

@@ -1,10 +1,4 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;

+ 2 - 3
UAS_MES_JH/FunctionCode/Employee/Employee_Power.cs

@@ -1,7 +1,6 @@
 using System;
 using System.Collections.Generic;
 using System.Data;
-using System.Text;
 using System.Threading;
 using System.Windows.Forms;
 using UAS_MES_NEW.CustomControl.DataGrid_View;
@@ -84,7 +83,7 @@ namespace UAS_MES_NEW.Employee
             //如果页面加载的时候通过传参的构造函数
             if (ug_code.Text != "")
                 Screen.PerformClick();
-          
+
         }
 
         private void Ug_code_Dbchage(object sender, EventArgs e)
@@ -117,7 +116,7 @@ namespace UAS_MES_NEW.Employee
             {
                 dh.ExecuteSql("delete from cs$usergrouppower where ugp_groupcode='" + ug_code.Text + "' and ugp_module='" + sn_module.Text + "'", "delete");
             }
-            string insertsql = "Insert into cs$usergrouppower (ugp_id,ugp_module,ugp_groupcode,ugp_caller,ugp_ifread,ugp_ifwrite,ugp_ifdelete,ugp_ifspecial,ugp_ifall) values(cs$usergrouppower_seq.nextval,'"+sn_module.Text+"','" + ug_code.Text + "',:ugp_caller,:ugp_ifread,:ugp_ifwrite,:ugp_ifdelete,:ugp_ifspecial,:ugp_ifall)";
+            string insertsql = "Insert into cs$usergrouppower (ugp_id,ugp_module,ugp_groupcode,ugp_caller,ugp_ifread,ugp_ifwrite,ugp_ifdelete,ugp_ifspecial,ugp_ifall) values(cs$usergrouppower_seq.nextval,'" + sn_module.Text + "','" + ug_code.Text + "',:ugp_caller,:ugp_ifread,:ugp_ifwrite,:ugp_ifdelete,:ugp_ifspecial,:ugp_ifall)";
             //获取变化了得DataSource
             DataTable ChangedDT = dt.GetChanges();
             if (ChangedDT != null)

+ 0 - 5
UAS_MES_JH/FunctionCode/Employee/Employee_PowerSarch.cs

@@ -1,10 +1,5 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
 using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;

+ 25 - 30
UAS_MES_JH/FunctionCode/Make/Make_CancleSndown.cs

@@ -1,10 +1,5 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
 using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
 using System.Threading;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
@@ -35,7 +30,7 @@ namespace UAS_MES_NEW.Make
         {
             asc.controllInitializeSize(this);
             dh = SystemInf.dh;
-          
+
 
             //工单号放大镜配置
             ma_code.TableName = "make left join product on ma_prodcode=pr_code";
@@ -51,8 +46,8 @@ namespace UAS_MES_NEW.Make
             linecode.DataSource = dt;
             linecode.Text = "";
 
-         
-            
+
+
 
         }
 
@@ -62,8 +57,8 @@ namespace UAS_MES_NEW.Make
         {
 
             Dbfind = ma_code.ReturnData;
-           // BaseUtil.SetFormValue(this.Controls, Dbfind);
-           // Query.PerformClick();
+            // BaseUtil.SetFormValue(this.Controls, Dbfind);
+            // Query.PerformClick();
         }
 
         private void Query_OnlineTraceBack_SizeChanged(object sender, EventArgs e)
@@ -75,17 +70,17 @@ namespace UAS_MES_NEW.Make
         {
             //if (dh.CheckExist("make", "ma_code='" + ma_code.Text + "'"))
             //{
-                string condition = BaseUtil.GetScreenSqlCondition(ma_code, linecode, ms_stepcode);
-                sql.Clear();
-                sql.Append("select md_id,md_sncode,md_macode,md_prodcode,md_linecode,md_stepcode,md_downdate,st_name,ms_outboxcode,v_outboxcode from makedown left join makeserial on md_msid = ms_id left join step on ms_nextstepcode = st_code left join mes_package_view on ms_makecode = v_makecode and ms_sncode = v_barcode and v_type = 3 ");
-                sql.Append(condition);
-                sql.Append("and md_downdate between to_date('" + BeginDate.Value.ToString("yyyy-MM-dd HH:mm:ss") + "', 'yyyy-mm-dd hh24:mi:ss') and to_date('" + EndDate.Value.ToString("yyyy-MM-dd HH:mm:ss") + "', 'yyyy-mm-dd hh24:mi:ss') and md_status = 0");
-                sql.Append(" order by md_id asc ");
-                DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-                BaseUtil.FillDgvWithDataTable(SnInf, dt);
-              
-                checkBox1.Checked = false;
-                Count.Text = "";
+            string condition = BaseUtil.GetScreenSqlCondition(ma_code, linecode, ms_stepcode);
+            sql.Clear();
+            sql.Append("select md_id,md_sncode,md_macode,md_prodcode,md_linecode,md_stepcode,md_downdate,st_name,ms_outboxcode,v_outboxcode from makedown left join makeserial on md_msid = ms_id left join step on ms_nextstepcode = st_code left join mes_package_view on ms_makecode = v_makecode and ms_sncode = v_barcode and v_type = 3 ");
+            sql.Append(condition);
+            sql.Append("and md_downdate between to_date('" + BeginDate.Value.ToString("yyyy-MM-dd HH:mm:ss") + "', 'yyyy-mm-dd hh24:mi:ss') and to_date('" + EndDate.Value.ToString("yyyy-MM-dd HH:mm:ss") + "', 'yyyy-mm-dd hh24:mi:ss') and md_status = 0");
+            sql.Append(" order by md_id asc ");
+            DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            BaseUtil.FillDgvWithDataTable(SnInf, dt);
+
+            checkBox1.Checked = false;
+            Count.Text = "";
             //}
             //else
             //{
@@ -95,7 +90,7 @@ namespace UAS_MES_NEW.Make
             //}
 
         }
- 
+
 
 
         private void normalButton1_Click(object sender, EventArgs e)
@@ -121,22 +116,22 @@ namespace UAS_MES_NEW.Make
                     Boolean flag = Convert.ToBoolean(checkCell.Value);
                     if (flag == true)
                     {
-                            sql.Clear();
-                            sql.Append("update makedown set md_status = -1,md_update = sysdate,md_upman = '"+User.UserCode+"' where md_id = "+ SnInf.Rows[i].Cells["md_id"].Value.ToString() + " ");
-                            //执行
-                            dh.ExecuteSql(sql.GetString(), "insert");
-                            check++;
+                        sql.Clear();
+                        sql.Append("update makedown set md_status = -1,md_update = sysdate,md_upman = '" + User.UserCode + "' where md_id = " + SnInf.Rows[i].Cells["md_id"].Value.ToString() + " ");
+                        //执行
+                        dh.ExecuteSql(sql.GetString(), "insert");
+                        check++;
                     }
                 }
                 MessageBox.Show(check + "条数据解除锁定成功");
                 Thread.Sleep(500);
-                Query_Click(null,null);
+                Query_Click(null, null);
             }
             catch (Exception EX)
             {
                 MessageBox.Show(EX.Message);
             }
-          
+
         }
 
         private void Query_OnlineTraceBack_FormClosing(object sender, FormClosingEventArgs e)
@@ -191,7 +186,7 @@ namespace UAS_MES_NEW.Make
 
         private void ma_code_UserControlTextChanged(object sender, EventArgs e)
         {
-            DataTable dt = (DataTable)dh.ExecuteSql(" select mcd_stepcode,mcd_stepname from MAKECRAFTDETAIL where mcd_macode = '" + ma_code.Text+"' order by mcd_detno asc  ", "select");
+            DataTable dt = (DataTable)dh.ExecuteSql(" select mcd_stepcode,mcd_stepname from MAKECRAFTDETAIL where mcd_macode = '" + ma_code.Text + "' order by mcd_detno asc  ", "select");
             ms_stepcode.DisplayMember = "mcd_stepname";
             ms_stepcode.ValueMember = "mcd_stepname";
             ms_stepcode.DataSource = dt;

+ 5 - 6
UAS_MES_JH/FunctionCode/Make/Make_CheckNoRelpace.cs

@@ -1,11 +1,10 @@
 using System;
-using System.Windows.Forms;
+using System.Data;
 using System.Drawing;
+using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
-using UAS_MES_NEW.PublicMethod;
 using UAS_MES_NEW.Entity;
-using System.Text;
-using System.Data;
+using UAS_MES_NEW.PublicMethod;
 
 namespace UAS_MES_NEW.Make
 {
@@ -57,10 +56,10 @@ namespace UAS_MES_NEW.Make
                         sql.Append("from make left join makecraftdetail on mcd_macode=ma_code left join makeserial on ms_makecode=ma_code ");
                         sql.Append("where ms_sncode=:sncode and ma_code=:makecode");
                         dh.BatchInsert(sql.GetString(), new string[] { "result", "inman", "sncode", "makecode" }, result, inman, sncode, makecode);
-                     
+
                     }
                     //记录MakeProcess和一般的操作日志
-                    LogicHandler.InsertMakeProcess(new_sncode.Text, dh.getFieldDataByCondition("MakeSerial", "ms_makecode", "ms_sncode='" + new_sncode.Text + "'").ToString(),User.UserSourceCode,"序列号转换操作", "变更序列号成功,备注:" + ReplaceReason.Text, User.UserName);
+                    LogicHandler.InsertMakeProcess(new_sncode.Text, dh.getFieldDataByCondition("MakeSerial", "ms_makecode", "ms_sncode='" + new_sncode.Text + "'").ToString(), User.UserSourceCode, "序列号转换操作", "变更序列号成功,备注:" + ReplaceReason.Text, User.UserName);
                     OperateResult.AppendText(">>序列号" + old_sncode.Text + "已成功替换为" + new_sncode.Text + "\n", Color.Green);
                 }
                 else

+ 7 - 10
UAS_MES_JH/FunctionCode/Make/Make_CheckQrcode.cs

@@ -1,10 +1,5 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
 using System.Drawing;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;
@@ -46,26 +41,28 @@ namespace UAS_MES_NEW.Make
                 }
                 if (qrcode.Text == "")
                 {
-                    string qr_code = dh.getFieldDataByCondition("craftmaterial join product on cm_soncode = pr_code", "cm_barcode", "cm_sncode = '"+ input.Text + "' and cm_status =0 and pr_detail like '%二维码%'").ToString();
+                    string qr_code = dh.getFieldDataByCondition("craftmaterial join product on cm_soncode = pr_code", "cm_barcode", "cm_sncode = '" + input.Text + "' and cm_status =0 and pr_detail like '%二维码%'").ToString();
                     if (qr_code == "")
                     {
-                        OperatResult.AppendText(">>SN:"+input.Text+"未找到对应二维码标签\n", Color.Red);
+                        OperatResult.AppendText(">>SN:" + input.Text + "未找到对应二维码标签\n", Color.Red);
                         input.Text = "";
                         return;
                     }
                     qrcode.Text = qr_code;
-                    OperatResult.AppendText(">>获取SN:"+ input.Text + "二维码标签成功,请录入二维码核对\n", Color.Green);
+                    OperatResult.AppendText(">>获取SN:" + input.Text + "二维码标签成功,请录入二维码核对\n", Color.Green);
                     SN.Text = input.Text;
                     input.Text = "";
                 }
-                else {
+                else
+                {
                     if (qrcode.Text != input.Text)
                     {
                         OperatResult.AppendText(">>录入二维码标签:" + input.Text + "与先标签内容不对应,核对失败\n", Color.Red);
                         input.Text = "";
                         return;
                     }
-                    else {
+                    else
+                    {
                         OperatResult.AppendText(">>二维码标签核对成功\n", Color.Green);
                         BaseUtil.CleanControls(this.Controls);
                         OperatResult.AppendText(">>请录入SN\n", Color.Black);

+ 0 - 4
UAS_MES_JH/FunctionCode/Make/Make_CollectBTMAC.cs

@@ -1,10 +1,6 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
 using System.Data;
 using System.Drawing;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;

+ 20 - 24
UAS_MES_JH/FunctionCode/Make/Make_CollectElec.cs

@@ -1,10 +1,6 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
 using System.Data;
 using System.Drawing;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;
@@ -81,7 +77,7 @@ namespace UAS_MES_NEW.Make
                         {
                             sql.Clear();
                             sql.Append("select ms_makecode,ms_prodcode,pr_detail,nvl(pr_electricmax,0)pr_electricmax,nvl(pr_electricmin,0)pr_electricmin,ms_colorcode from makeserial left join product on ");
-                            sql.Append(" ms_prodcode = pr_code where ms_id  = '"+oMsID+"'");
+                            sql.Append(" ms_prodcode = pr_code where ms_id  = '" + oMsID + "'");
                             dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                             BaseUtil.SetFormValue(this.Controls, dt);
                             OperateResult.AppendText(">>请输入COLOR\n", Color.Black);
@@ -104,30 +100,30 @@ namespace UAS_MES_NEW.Make
                     }
                     if (ms_colorcode.Text != "" && ms_colorcode.Text != sncode.Text)
                     {
-                        OperateResult.AppendText(">>COLOR"+ sncode.Text + "与工单设定COLOR"+ms_colorcode.Text+"不一致\n", Color.Red);
+                        OperateResult.AppendText(">>COLOR" + sncode.Text + "与工单设定COLOR" + ms_colorcode.Text + "不一致\n", Color.Red);
                         return;
                     }
                     OperateResult.AppendText("<<" + sncode.Text + "\n", Color.Black);
                     string ErrorMessage = "";
 
-                        if (LogicHandler.SetStepResult(ms_makecode.Text, User.UserSourceCode, sn_code, "COLOR采集", "COLOR采集完成", User.UserCode, out ErrorMessage))
-                        {
-                            //提示正确返回时传递的信息
-                            if (ErrorMessage.Contains("AFTERSUCCESS"))
-                                OperateResult.AppendText(">>" + ErrorMessage + "\n");
-                            dh.BatchInsert("update  makeserial set MS_COLORCODE = :netcode where ms_id = :oMsId", new String[] { "netcode", "oMsId" }, new string[] { sncode.Text }, new string[] { oMsID.ToString() });
-                            OperateResult.AppendText(">>COLOR信息采集完成\n", Color.Green);
-                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "COLOR采集", "采集成功", sn_code, "");                        
-                            isnetcode = false;
-                            sncode.Text = "";
-                            sncode.Focus();
-                        }
-                        else
-                        {
-                            OperateResult.AppendText(">>更新错误" + ErrorMessage + "\n", Color.Red);
-                        }
-                        OperateResult.AppendText(">>请输入SN\n", Color.Black);
-                    
+                    if (LogicHandler.SetStepResult(ms_makecode.Text, User.UserSourceCode, sn_code, "COLOR采集", "COLOR采集完成", User.UserCode, out ErrorMessage))
+                    {
+                        //提示正确返回时传递的信息
+                        if (ErrorMessage.Contains("AFTERSUCCESS"))
+                            OperateResult.AppendText(">>" + ErrorMessage + "\n");
+                        dh.BatchInsert("update  makeserial set MS_COLORCODE = :netcode where ms_id = :oMsId", new String[] { "netcode", "oMsId" }, new string[] { sncode.Text }, new string[] { oMsID.ToString() });
+                        OperateResult.AppendText(">>COLOR信息采集完成\n", Color.Green);
+                        LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "COLOR采集", "采集成功", sn_code, "");
+                        isnetcode = false;
+                        sncode.Text = "";
+                        sncode.Focus();
+                    }
+                    else
+                    {
+                        OperateResult.AppendText(">>更新错误" + ErrorMessage + "\n", Color.Red);
+                    }
+                    OperateResult.AppendText(">>请输入SN\n", Color.Black);
+
                 }
             }
         }

+ 4 - 8
UAS_MES_JH/FunctionCode/Make/Make_CollectLcd.cs

@@ -1,10 +1,6 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
 using System.Data;
 using System.Drawing;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;
@@ -69,18 +65,18 @@ namespace UAS_MES_NEW.Make
                 if (ma_code.Text == "")
                 {
                     OperateResult.AppendText(">>工单号不可为空\n", Color.Red);
-                    return ;
+                    return;
                 }
                 if (!checkBox1.Checked && dh.CheckExist("lcdcheck", "lc_sncode = '" + sncode.Text + "' and lc_status = 0"))
                 {
-                    OperateResult.AppendText(">>SN:"+sncode.Text+"已存在良品检验记录\n", Color.Red,sncode);
+                    OperateResult.AppendText(">>SN:" + sncode.Text + "已存在良品检验记录\n", Color.Red, sncode);
                     return;
                 }
                 String status = radioButton1.Checked ? "0" : "-1";
                 String statuscode = radioButton1.Checked ? "良品" : "不良";
                 dh.ExecuteSql(" insert into lcdcheck(LC_ID,LC_SNCODE,LC_STATUS,LC_INDATE,LC_INMAN,LC_MAKECODE) values" +
-                    " (lcdcheck_seq.nextval,'" + sncode.Text+"','"+ status + "',sysdate,'"+User.UserCode+"','"+ma_code.Text+"') ", "insert");
-                OperateResult.AppendText(">>SN:" + sncode.Text + "全捡采集"+ statuscode + "成功\n", Color.Green, sncode);
+                    " (lcdcheck_seq.nextval,'" + sncode.Text + "','" + status + "',sysdate,'" + User.UserCode + "','" + ma_code.Text + "') ", "insert");
+                OperateResult.AppendText(">>SN:" + sncode.Text + "全捡采集" + statuscode + "成功\n", Color.Green, sncode);
 
 
             }

+ 5 - 8
UAS_MES_JH/FunctionCode/Make/Make_CollectNetCode.cs

@@ -1,10 +1,6 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
 using System.Data;
 using System.Drawing;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;
@@ -130,8 +126,9 @@ namespace UAS_MES_NEW.Make
                             return;
                         }
                     }
-                    else {
-                        OperateResult.AppendText("<<产品" + ma_prodcode.Text + "未维护网标关联信息\n", Color.Red,sncode);
+                    else
+                    {
+                        OperateResult.AppendText("<<产品" + ma_prodcode.Text + "未维护网标关联信息\n", Color.Red, sncode);
                     }
                     #endregion
                     OperateResult.AppendText("<<" + sncode.Text + "\n", Color.Black);
@@ -169,11 +166,11 @@ namespace UAS_MES_NEW.Make
                             string si_id = dh.getFieldDataByCondition("sninfo", "max(si_id) si_id", " si_sn in (select '" + sn_code + "' from dual union select sn from makesnrelation where beforesn = '" + sn_code + "' and sn <> ' '  union select beforesn from makesnrelation where sn = '" + sn_code + "' and beforesn <> ' ') ").ToString();
                             if (si_id != "")
                             {
-                                dh.BatchInsert("update  sninfo set si_netcode = :netcode,si_indate = sysdate where si_id = :osiId", new String[] { "netcode",  "osiId" }, new string[] { sncode.Text },new string[] { si_id });
+                                dh.BatchInsert("update  sninfo set si_netcode = :netcode,si_indate = sysdate where si_id = :osiId", new String[] { "netcode", "osiId" }, new string[] { sncode.Text }, new string[] { si_id });
                             }
                             else
                             {
-                                dh.BatchInsert("insert into sninfo (si_id,si_sn,si_netcode,si_indate) values (SnInfo_seq.nextval,:si_sn,:netcode,sysdate)", new String[] { "si_sn", "netcode"}, new string[] { sn_code }, new string[] { sncode.Text });
+                                dh.BatchInsert("insert into sninfo (si_id,si_sn,si_netcode,si_indate) values (SnInfo_seq.nextval,:si_sn,:netcode,sysdate)", new String[] { "si_sn", "netcode" }, new string[] { sn_code }, new string[] { sncode.Text });
                             }
                             dh.BatchInsert("update  makeserial set ms_netcode = :netcode where ms_id = :oMsId", new String[] { "netcode", "oMsId" }, new string[] { sncode.Text }, new string[] { oMsID.ToString() });
                             OperateResult.AppendText(">>网标采集完成,执行更新\n", Color.Green);

+ 3 - 7
UAS_MES_JH/FunctionCode/Make/Make_CollectSoft.cs

@@ -1,10 +1,6 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
 using System.Data;
 using System.Drawing;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;
@@ -112,7 +108,7 @@ namespace UAS_MES_NEW.Make
 
                     if (ma_softversion.Text != sncode.Text)
                     {
-                        OperateResult.AppendText(">>录入错误,此软件版本:" + sncode.Text + "与工单维护软件版本"+ ma_softversion.Text + "不一致\n", Color.Red, sncode);
+                        OperateResult.AppendText(">>录入错误,此软件版本:" + sncode.Text + "与工单维护软件版本" + ma_softversion.Text + "不一致\n", Color.Red, sncode);
                         OperateResult.AppendText(">>请输入软件版本\n", Color.Black);
                         return;
                     }
@@ -126,7 +122,7 @@ namespace UAS_MES_NEW.Make
                                 OperateResult.AppendText(">>" + ErrorMessage + "\n");
                             dh.BatchInsert("update  makeserial set ms_softversion = :netcode where ms_id = :oMsId", new String[] { "netcode", "oMsId" }, new string[] { sncode.Text }, new string[] { oMsID.ToString() });
                             OperateResult.AppendText(">>软件版本采集完成,执行更新\n", Color.Green);
-                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "软件版本采集"+ sncode.Text, "采集成功", sn_code, "");
+                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "软件版本采集" + sncode.Text, "采集成功", sn_code, "");
                             isnetcode = false;
                             sncode.Text = "";
                             sncode.Focus();
@@ -152,7 +148,7 @@ namespace UAS_MES_NEW.Make
         }
 
 
-       
+
 
         private void deleteButton1_Click(object sender, EventArgs e)
         {

+ 13 - 14
UAS_MES_JH/FunctionCode/Make/Make_ColorBoxLabelPrint.cs

@@ -1,17 +1,16 @@
-using System;
+using LabelManager2;
+using System;
 using System.Data;
+using System.Diagnostics;
 using System.Drawing;
+using System.IO;
 using System.Text;
+using System.Threading;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
-using UAS_MES_NEW.PublicMethod;
 using UAS_MES_NEW.Entity;
-using LabelManager2;
-using System.Threading;
 using UAS_MES_NEW.PublicForm;
-using System.IO;
-using System.Xml;
-using System.Diagnostics;
+using UAS_MES_NEW.PublicMethod;
 
 namespace UAS_MES_NEW.Make
 {
@@ -81,7 +80,7 @@ namespace UAS_MES_NEW.Make
             US_SKU.TableName = "upcsku";
             US_SKU.SelectField = "US_PRODUCTCOLOR  # PRODUCT_COLOR,US_COLORCODE   # 颜色号,US_SKU # SKU,US_UPC # UPC";
             US_SKU.FormName = Name;
-            US_SKU.SetValueField = new string[] { "US_SKU" , "US_PRODUCTCOLOR", "US_COLORCODE" };
+            US_SKU.SetValueField = new string[] { "US_SKU", "US_PRODUCTCOLOR", "US_COLORCODE" };
             US_SKU.Condition = "1=1";
             US_SKU.DbChange += US_SKU_DbChange;
             version = "";
@@ -236,7 +235,7 @@ namespace UAS_MES_NEW.Make
                             //提示用户“<< 序列号:XXXX”
                             OperateResult.AppendText("<<序列号:" + sncode.Text + "\n", Color.Black);
 
-                            DataTable dds = (DataTable)dh.ExecuteSql(" select pr_versioninfo,pr_macinto,pr_btinfo,pr_netinfo,pr_feederspec from product where pr_code = '" + pr_code.Text+"' ", "select");
+                            DataTable dds = (DataTable)dh.ExecuteSql(" select pr_versioninfo,pr_macinto,pr_btinfo,pr_netinfo,pr_feederspec from product where pr_code = '" + pr_code.Text + "' ", "select");
                             verinfo = dds.Rows[0]["pr_versioninfo"].ToString();
                             macinfo = dds.Rows[0]["pr_macinto"].ToString();
                             btinfo = dds.Rows[0]["pr_btinfo"].ToString();
@@ -253,7 +252,7 @@ namespace UAS_MES_NEW.Make
                             {
                                 mac = BaseUtil.GetDataAdb(macinfo);
                                 OperateResult.AppendText("读取MAC:" + mac + "\n");
-                                if (dh.CheckExist("makeserial", " ms_bt||'-'||ms_mac||'-'||ms_net like '%" + mac + "%' and ms_sncode <> '"+ sncode.Text + "' "))
+                                if (dh.CheckExist("makeserial", " ms_bt||'-'||ms_mac||'-'||ms_net like '%" + mac + "%' and ms_sncode <> '" + sncode.Text + "' "))
                                 {
                                     OperateResult.AppendText("<<MAC:" + mac + "在系统有记录,无法采集\n", Color.Red);
                                     return;
@@ -264,7 +263,7 @@ namespace UAS_MES_NEW.Make
                             {
                                 bt = BaseUtil.GetDataAdb(btinfo);
                                 OperateResult.AppendText("读取BT:" + bt + "\n");
-                                if (dh.CheckExist("makeserial", " ms_bt||'-'||ms_mac||'-'||ms_net like '%" + bt + "%' and ms_sncode <> '"+ sncode.Text + "' "))
+                                if (dh.CheckExist("makeserial", " ms_bt||'-'||ms_mac||'-'||ms_net like '%" + bt + "%' and ms_sncode <> '" + sncode.Text + "' "))
                                 {
                                     OperateResult.AppendText("<<BT:" + bt + "在系统有记录,无法采集\n", Color.Red);
                                     return;
@@ -275,7 +274,7 @@ namespace UAS_MES_NEW.Make
                             {
                                 net = BaseUtil.GetDataAdb(netinfo);
                                 OperateResult.AppendText("读取NET:" + net + "\n");
-                                if (dh.CheckExist("makeserial", " ms_bt||'-'||ms_mac||'-'||ms_net like '%" + net + "%' and ms_sncode <> '"+ sncode.Text + "' "))
+                                if (dh.CheckExist("makeserial", " ms_bt||'-'||ms_mac||'-'||ms_net like '%" + net + "%' and ms_sncode <> '" + sncode.Text + "' "))
                                 {
                                     OperateResult.AppendText("<<NET:" + net + "在系统有记录,无法采集\n", Color.Red);
                                     return;
@@ -292,13 +291,13 @@ namespace UAS_MES_NEW.Make
                             }
 
                             string softversion = dh.GetConfig("softversion", "sys").ToString();
-                            if (version.Trim()== sncode.Text)
+                            if (version.Trim() == sncode.Text)
                             {
                                 OperateResult.AppendText("<<序列号:" + sncode.Text + "与对应软件版本" + version + "相同,不允许采集\n", Color.Red);
                                 version = "";
                                 return;
                             }
-                            if (version != ma_softversion.Text && version != ""&& softversion !="0")
+                            if (version != ma_softversion.Text && version != "" && softversion != "0")
                             {
                                 OperateResult.AppendText("<<序列号:" + sncode.Text + "对应软件版本" + version + "与工单维护软件版本" + ma_softversion.Text + "不一致\n", Color.Red);
                                 version = "";

+ 20 - 20
UAS_MES_JH/FunctionCode/Make/Make_ColorBoxLabelPrint2.cs

@@ -1,17 +1,16 @@
-using System;
+using LabelManager2;
+using System;
 using System.Data;
+using System.Diagnostics;
 using System.Drawing;
+using System.IO;
 using System.Text;
+using System.Threading;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
-using UAS_MES_NEW.PublicMethod;
 using UAS_MES_NEW.Entity;
-using LabelManager2;
-using System.Threading;
 using UAS_MES_NEW.PublicForm;
-using System.IO;
-using System.Xml;
-using System.Diagnostics;
+using UAS_MES_NEW.PublicMethod;
 
 namespace UAS_MES_NEW.Make
 {
@@ -30,7 +29,7 @@ namespace UAS_MES_NEW.Make
         //保存TSN编号
         string ms_id = null;
 
-        string version="";
+        string version = "";
         string msmac;
         string fid;
 
@@ -226,7 +225,7 @@ namespace UAS_MES_NEW.Make
                             //提示用户“<< 序列号:XXXX”
                             OperateResult.AppendText("<<序列号:" + sncode.Text + "\n", Color.Black);
                             string softversion = dh.GetConfig("softversion", "sys").ToString();
-                            if (version.Trim()== sncode.Text)
+                            if (version.Trim() == sncode.Text)
                             {
                                 OperateResult.AppendText("<<序列号:" + sncode.Text + "与对应软件版本" + version + "相同,不允许采集\n", Color.Red);
                                 version = "";
@@ -234,7 +233,7 @@ namespace UAS_MES_NEW.Make
                                 msmac = "";
                                 return;
                             }
-                            if (version != ma_softversion.Text && version != ""&& softversion !="0")
+                            if (version != ma_softversion.Text && version != "" && softversion != "0")
                             {
                                 OperateResult.AppendText("<<序列号:" + sncode.Text + "对应软件版本" + version + "与工单维护软件版本" + ma_softversion.Text + "不一致\n", Color.Red);
                                 version = "";
@@ -252,10 +251,11 @@ namespace UAS_MES_NEW.Make
                                 msmac = "";
                                 return;
                             }
-                            else {
+                            else
+                            {
                                 fid = inid;
                             }
-                            
+
 
                             //if (pr_change)
                             //{
@@ -336,10 +336,10 @@ namespace UAS_MES_NEW.Make
                                 {
                                     dh.ExecuteSql("update makeserial set ms_mac = '" + msmac + "' where ms_sncode = '" + sncode.Text + "' and ms_makecode = '" + ma_code.Text + "'", "update");
                                 }
-                                    dh.ExecuteSql("update makeserial set ms_othid1 = '" + fid + "' where ms_sncode = '" + sncode.Text + "' and ms_makecode = '" + ma_code.Text + "'", "update");
+                                dh.ExecuteSql("update makeserial set ms_othid1 = '" + fid + "' where ms_sncode = '" + sncode.Text + "' and ms_makecode = '" + ma_code.Text + "'", "update");
                                 if (PrintLabel.Text.ToUpper().Contains(".BTW"))
                                 {
-                                    if (Print.SinglePrint(Tag.ToString(),  engine , PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text, int.Parse(PrintNum.Text), oMakeCode, pr_code.Text, "彩盒标", "-1", out ErrorMessage))
+                                    if (Print.SinglePrint(Tag.ToString(), engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text, int.Parse(PrintNum.Text), oMakeCode, pr_code.Text, "彩盒标", "-1", out ErrorMessage))
                                     {
                                         //提示用户打印成功
                                         OperateResult.AppendText(">>序列号:" + sncode.Text + "打印结束\n", Color.Green);
@@ -363,9 +363,9 @@ namespace UAS_MES_NEW.Make
                                         OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
                                     }
                                 }
-                              // }
+                                // }
+
 
-     
                                 if (CollectRemark.Checked && Remark.Text != "")
                                 {
                                     LogicHandler.CollectRemarkInf(sncode.Text, "", "", oMakeCode, pr_code.Text, Remark.Text);
@@ -538,16 +538,16 @@ namespace UAS_MES_NEW.Make
             string test_sn = "";
             string imageurl = "";
             string oMSID = "";
-            string oErrMessage = ""; 
+            string oErrMessage = "";
             StreamReader _Sr = new StreamReader(FolderPath.Text + @"\" + e.Name, Encoding.UTF8);
             test_result = _Sr.ReadLine().Trim();
             fid = test_result.Split(';')[1];
             msmac = test_result.Split(';')[2];
             version = test_result.Split(';')[3];
-            OperateResult.AppendText("读取文件" + e.Name + ",软件版本" + version + ",ID"+ fid + ",MAC" + msmac + "\n");
-            _Sr.Close(); 
+            OperateResult.AppendText("读取文件" + e.Name + ",软件版本" + version + ",ID" + fid + ",MAC" + msmac + "\n");
+            _Sr.Close();
             //获取文件名的序列号,如SA123456.xml,如果开头为-表示无条码需要自动获取
-            string sn_code = e.Name.Split('.')[0].Replace("test","");
+            string sn_code = e.Name.Split('.')[0].Replace("test", "");
             sncode.Text = sn_code;
             sn_code_KeyDown(this, new KeyEventArgs(Keys.Enter));
             File.Delete(e.FullPath);

+ 16 - 17
UAS_MES_JH/FunctionCode/Make/Make_ColorBoxLabelPrint3.cs

@@ -1,17 +1,16 @@
-using System;
+using LabelManager2;
+using System;
 using System.Data;
+using System.Diagnostics;
 using System.Drawing;
+using System.IO;
 using System.Text;
+using System.Threading;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
-using UAS_MES_NEW.PublicMethod;
 using UAS_MES_NEW.Entity;
-using LabelManager2;
-using System.Threading;
 using UAS_MES_NEW.PublicForm;
-using System.IO;
-using System.Xml;
-using System.Diagnostics;
+using UAS_MES_NEW.PublicMethod;
 
 namespace UAS_MES_NEW.Make
 {
@@ -30,7 +29,7 @@ namespace UAS_MES_NEW.Make
         //保存TSN编号
         string ms_id = null;
 
-        string version="";
+        string version = "";
         string msmac;
         string bt;
 
@@ -225,7 +224,7 @@ namespace UAS_MES_NEW.Make
                             //提示用户“<< 序列号:XXXX”
                             OperateResult.AppendText("<<序列号:" + sncode.Text + "\n", Color.Black);
                             string softversion = dh.GetConfig("softversion", "sys").ToString();
-                            if (version.Trim()== sncode.Text)
+                            if (version.Trim() == sncode.Text)
                             {
                                 OperateResult.AppendText("<<序列号:" + sncode.Text + "与对应软件版本" + version + "相同,不允许采集\n", Color.Red);
                                 version = "";
@@ -233,7 +232,7 @@ namespace UAS_MES_NEW.Make
                                 msmac = "";
                                 return;
                             }
-                            if (version != ma_softversion.Text && version != ""&& softversion !="0")
+                            if (version != ma_softversion.Text && version != "" && softversion != "0")
                             {
                                 OperateResult.AppendText("<<序列号:" + sncode.Text + "对应软件版本" + version + "与工单维护软件版本" + ma_softversion.Text + "不一致\n", Color.Red);
                                 version = "";
@@ -254,7 +253,7 @@ namespace UAS_MES_NEW.Make
                             //else {
                             //    bt = inid;
                             //}
-                            
+
 
                             //if (pr_change)
                             //{
@@ -365,9 +364,9 @@ namespace UAS_MES_NEW.Make
                                         OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
                                     }
                                 }
-                              // }
+                                // }
+
 
-     
                                 if (CollectRemark.Checked && Remark.Text != "")
                                 {
                                     LogicHandler.CollectRemarkInf(sncode.Text, "", "", oMakeCode, pr_code.Text, Remark.Text);
@@ -540,16 +539,16 @@ namespace UAS_MES_NEW.Make
             string test_sn = "";
             string imageurl = "";
             string oMSID = "";
-            string oErrMessage = ""; 
+            string oErrMessage = "";
             StreamReader _Sr = new StreamReader(FolderPath.Text + @"\" + e.Name, Encoding.UTF8);
             test_result = _Sr.ReadLine().Trim();
             bt = test_result.Split(';')[1];
             msmac = test_result.Split(';')[2];
             version = test_result.Split(';')[3];
-            OperateResult.AppendText("读取文件" + e.Name + ",软件版本" + version + ",BT"+ bt + ",MAC" + msmac + "\n");
-            _Sr.Close(); 
+            OperateResult.AppendText("读取文件" + e.Name + ",软件版本" + version + ",BT" + bt + ",MAC" + msmac + "\n");
+            _Sr.Close();
             //获取文件名的序列号,如SA123456.xml,如果开头为-表示无条码需要自动获取
-            string sn_code = e.Name.Split('.')[0].Replace("test","");
+            string sn_code = e.Name.Split('.')[0].Replace("test", "");
             sncode.Text = sn_code;
             sn_code_KeyDown(this, new KeyEventArgs(Keys.Enter));
             File.Delete(e.FullPath);

+ 5 - 6
UAS_MES_JH/FunctionCode/Make/Make_ColorBoxLoadPrint.cs

@@ -1,15 +1,14 @@
-using System;
+using LabelManager2;
+using System;
+using System.Collections.Generic;
 using System.Data;
 using System.Drawing;
-using System.Text;
+using System.Threading;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
-using UAS_MES_NEW.PublicMethod;
 using UAS_MES_NEW.Entity;
-using LabelManager2;
-using System.Threading;
 using UAS_MES_NEW.PublicForm;
-using System.Collections.Generic;
+using UAS_MES_NEW.PublicMethod;
 
 namespace UAS_MES_NEW.Make
 {

+ 50 - 51
UAS_MES_JH/FunctionCode/Make/Make_ColorBoxWeigh.cs

@@ -1,19 +1,17 @@
-using Microsoft.Win32;
+using LabelManager2;
 using System;
 using System.Data;
+using System.Diagnostics;
+using System.Drawing;
 using System.IO;
 using System.IO.Ports;
-using System.Text;
 using System.Text.RegularExpressions;
 using System.Threading;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;
-using UAS_MES_NEW.PublicMethod;
-using System.Drawing;
-using LabelManager2;
 using UAS_MES_NEW.PublicForm;
-using System.Diagnostics;
+using UAS_MES_NEW.PublicMethod;
 
 namespace UAS_MES_NEW.Make
 {
@@ -84,7 +82,7 @@ namespace UAS_MES_NEW.Make
             ma_code.TableName = "make left join product on ma_prodcode=pr_code";
             ma_code.SelectField = "ma_code # 工单号,pr_code # 产品编号,pr_spec # 产品规格";
             ma_code.FormName = Name;
-            ma_code.SetValueField = new string[] { "ma_code", "pr_code"};
+            ma_code.SetValueField = new string[] { "ma_code", "pr_code" };
             ma_code.Condition = "ma_statuscode='STARTED'";
             ma_code.DbChange += Ma_code_DbChange;
 
@@ -149,48 +147,48 @@ namespace UAS_MES_NEW.Make
             {
                 if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out ErrorMessage))
                 {
-                   string oMakeCode = "";
-                   string oMsID = "";
-                   if (LogicHandler.CheckStepSNAndMacode(ma_code.Text, User.UserSourceCode, sncode.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage))
-                   {
-                      //string nextstepcode = dh.getFieldDataByCondition("makeserial", "ms_nextstepcode", "ms_id='" + oMsID + "'").ToString();
-                      //if (nextstepcode != User.CurrentStepCode)
-                      //{
-                      //    OperateResult.AppendText("<<序列号:" + sncode.Text + "下一工序是" + nextstepcode + ",不是当前岗位的工序\n", Color.Red, sncode);
-                      //    return;
-                      //}
-                    sql.Clear();
-                    sql.Append("select ms_makecode ma_code,ma_qty,ma_salecode,ma_colorcode,pr_colorboxunit,pr_code,ms_sku,pr_colorboxgw,");
-                    sql.Append("pr_colorboxunit,pr_colorboxmaxw,pr_colorboxminw,nvl(PR_CHECKCOLORBOXW,'0') PR_CHECKCOLORBOXW,nvl(pr_sendchecktype,'LineCode')");
-                    sql.Append("pr_sendchecktype from makeserial left join make on ms_makecode=ma_code left join product on ");
-                    sql.Append("ms_prodcode=pr_code where ms_sncode='" + sncode.Text + "' order by ms_id desc");
-                    dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-                    if (dt.Rows.Count > 0)
+                    string oMakeCode = "";
+                    string oMsID = "";
+                    if (LogicHandler.CheckStepSNAndMacode(ma_code.Text, User.UserSourceCode, sncode.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage))
                     {
-                        //重量的临时变量
-                        pr_code.Text = dt.Rows[0]["pr_code"].ToString();
-                        string _weight = dt.Rows[0]["pr_colorboxgw"].ToString();
-                        string _maxweight = dt.Rows[0]["pr_colorboxmaxw"].ToString();
-                        string _minweight = dt.Rows[0]["pr_colorboxminw"].ToString();
-                        string pr_colorunit = dt.Rows[0]["pr_colorboxunit"].ToString();
-                        string ma_salecode_text = dt.Rows[0]["ma_salecode"].ToString();
-                        string PR_CHECKCOLORBOXW = dt.Rows[0]["PR_CHECKCOLORBOXW"].ToString();
-                        //赋值重量单位
-                        Weight = double.Parse(_weight == "" ? "0" : _weight);
-                        MaxWeight = double.Parse(_maxweight == "" ? "0" : _maxweight);
-                        MinWeight = double.Parse(_minweight == "" ? "0" : _minweight);
-                        ms_sku.Text = dt.Rows[0]["ma_salecode"].ToString();
-                        BaseUtil.SetFormValue(this.Controls, dt);
+                        //string nextstepcode = dh.getFieldDataByCondition("makeserial", "ms_nextstepcode", "ms_id='" + oMsID + "'").ToString();
+                        //if (nextstepcode != User.CurrentStepCode)
+                        //{
+                        //    OperateResult.AppendText("<<序列号:" + sncode.Text + "下一工序是" + nextstepcode + ",不是当前岗位的工序\n", Color.Red, sncode);
+                        //    return;
+                        //}
+                        sql.Clear();
+                        sql.Append("select ms_makecode ma_code,ma_qty,ma_salecode,ma_colorcode,pr_colorboxunit,pr_code,ms_sku,pr_colorboxgw,");
+                        sql.Append("pr_colorboxunit,pr_colorboxmaxw,pr_colorboxminw,nvl(PR_CHECKCOLORBOXW,'0') PR_CHECKCOLORBOXW,nvl(pr_sendchecktype,'LineCode')");
+                        sql.Append("pr_sendchecktype from makeserial left join make on ms_makecode=ma_code left join product on ");
+                        sql.Append("ms_prodcode=pr_code where ms_sncode='" + sncode.Text + "' order by ms_id desc");
+                        dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                        if (dt.Rows.Count > 0)
+                        {
+                            //重量的临时变量
+                            pr_code.Text = dt.Rows[0]["pr_code"].ToString();
+                            string _weight = dt.Rows[0]["pr_colorboxgw"].ToString();
+                            string _maxweight = dt.Rows[0]["pr_colorboxmaxw"].ToString();
+                            string _minweight = dt.Rows[0]["pr_colorboxminw"].ToString();
+                            string pr_colorunit = dt.Rows[0]["pr_colorboxunit"].ToString();
+                            string ma_salecode_text = dt.Rows[0]["ma_salecode"].ToString();
+                            string PR_CHECKCOLORBOXW = dt.Rows[0]["PR_CHECKCOLORBOXW"].ToString();
+                            //赋值重量单位
+                            Weight = double.Parse(_weight == "" ? "0" : _weight);
+                            MaxWeight = double.Parse(_maxweight == "" ? "0" : _maxweight);
+                            MinWeight = double.Parse(_minweight == "" ? "0" : _minweight);
+                            ms_sku.Text = dt.Rows[0]["ma_salecode"].ToString();
+                            BaseUtil.SetFormValue(this.Controls, dt);
                             if (ms_sku.Text != US_SKU.Text)
                             {
-                                OperateResult.AppendText(">>成品" + sncode.Text + "SKU为"+ ms_sku.Text + "与界面维护sku"+US_SKU.Text+"不一致\n", Color.Red);
+                                OperateResult.AppendText(">>成品" + sncode.Text + "SKU为" + ms_sku.Text + "与界面维护sku" + US_SKU.Text + "不一致\n", Color.Red);
                                 return;
                             }
-                        if (Weight - MinWeight == MaxWeight - Weight)
-                            pr_colorboxgw.Text = Weight + "±" + (MaxWeight - Weight) + dt.Rows[0]["pr_colorboxunit"].ToString();
-                        else
-                            pr_colorboxgw.Text = MinWeight + "-" + MaxWeight + dt.Rows[0]["pr_colorboxunit"].ToString();
-                    
+                            if (Weight - MinWeight == MaxWeight - Weight)
+                                pr_colorboxgw.Text = Weight + "±" + (MaxWeight - Weight) + dt.Rows[0]["pr_colorboxunit"].ToString();
+                            else
+                                pr_colorboxgw.Text = MinWeight + "-" + MaxWeight + dt.Rows[0]["pr_colorboxunit"].ToString();
+
                             //如果未打开串口设置为0
                             //if (pr_colorboxunit.Text == "kg" && !WeightChange)
                             //{
@@ -254,7 +252,7 @@ namespace UAS_MES_NEW.Make
                         }
                         else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, sncode);
                     }
-                    else OperateResult.AppendText(">>"+ErrorMessage+"\n", Color.Red, sncode);
+                    else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, sncode);
                 }
                 else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, sncode);
             }
@@ -273,7 +271,7 @@ namespace UAS_MES_NEW.Make
                         {
                             try
                             {
-                                weight.Text = re.Match(serialPort1.ReadLine().Trim()).Groups[0].Value.Replace("kg","");
+                                weight.Text = re.Match(serialPort1.ReadLine().Trim()).Groups[0].Value.Replace("kg", "");
                             }
                             catch (Exception)
                             {
@@ -333,7 +331,7 @@ namespace UAS_MES_NEW.Make
                 string oErrorMessage;
                 if (PrintLabel.Text.ToUpper().Contains(".BTW"))
                 {
-                    if (!Print.SinglePrint(Tag.ToString(),engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, sncode.Text, int.Parse(PrintNum.Text), ma_code.Text, pr_code.Text, "彩盒标", "0", out oErrorMessage))
+                    if (!Print.SinglePrint(Tag.ToString(), engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, sncode.Text, int.Parse(PrintNum.Text), ma_code.Text, pr_code.Text, "彩盒标", "0", out oErrorMessage))
                     {
                         OperateResult.AppendText(oErrorMessage + "\n", Color.Red);
                     }
@@ -522,17 +520,18 @@ namespace UAS_MES_NEW.Make
                 return;
             }
             dh.ExecuteSql("update makeserial set ms_sku = '" + US_SKU.Text + "' where ms_sncode = '" + sncode.Text + "'", "update");
-            OperateResult.AppendText(">>成品SN号"+ sncode.Text + "更新SKU"+ US_SKU.Text + "成功\n", Color.Green);
+            OperateResult.AppendText(">>成品SN号" + sncode.Text + "更新SKU" + US_SKU.Text + "成功\n", Color.Green);
         }
 
         private void normalButton2_Click(object sender, EventArgs e)
         {
-            if (pr_code.Text == ""||setmin.Text==""||setmax.Text=="")
+            if (pr_code.Text == "" || setmin.Text == "" || setmax.Text == "")
             {
                 OperateResult.AppendText(">>产品编号与重量范围不可为空,更新失败\n", Color.Red);
                 return;
             }
-            try {
+            try
+            {
                 double minwei;
                 double maxwei;
                 double.TryParse(setmin.Text, out minwei);
@@ -542,7 +541,7 @@ namespace UAS_MES_NEW.Make
                     OperateResult.AppendText(">>最小重量必须小于最大重量\n", Color.Red);
                     return;
                 }
-                dh.UpdateByCondition("product", "pr_colorboxmaxw = '"+setmax.Text+ "' , pr_colorboxminw = '"+setmin.Text+"'", "pr_code = '"+pr_code.Text+"'");
+                dh.UpdateByCondition("product", "pr_colorboxmaxw = '" + setmax.Text + "' , pr_colorboxminw = '" + setmin.Text + "'", "pr_code = '" + pr_code.Text + "'");
                 OperateResult.AppendText(">>重量范围修改完成\n", Color.Green);
             }
             catch (Exception ex)

+ 0 - 4
UAS_MES_JH/FunctionCode/Make/Make_CustomLabelPrint.cs

@@ -1,12 +1,8 @@
 using LabelManager2;
 using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.ComponentModel;
 using System.Data;
 using System.Drawing;
 using System.IO;
-using System.Linq;
 using System.Text;
 using System.Text.RegularExpressions;
 using System.Threading;

+ 0 - 4
UAS_MES_JH/FunctionCode/Make/Make_Decompose.cs

@@ -1,10 +1,6 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
 using System.Data;
 using System.Drawing;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;

+ 2 - 6
UAS_MES_JH/FunctionCode/Make/Make_Decompose_Ex.cs

@@ -1,10 +1,6 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
 using System.Data;
 using System.Drawing;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;
@@ -80,8 +76,8 @@ namespace UAS_MES_NEW.Make
                     dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                     //if (dt.Rows[0]["ms_status"].ToString() == "0" || dt.Rows[0]["ms_status"].ToString() == "3")
                     //{
-                        BaseUtil.SetFormValue(this.Controls, dt);
-                        LoadData(ms_sncode.Text, sender, e);
+                    BaseUtil.SetFormValue(this.Controls, dt);
+                    LoadData(ms_sncode.Text, sender, e);
                     //}
                     //else
                     //{

+ 5 - 8
UAS_MES_JH/FunctionCode/Make/Make_FeedingCollection.cs

@@ -1,14 +1,11 @@
 using System;
+using System.Collections.Generic;
 using System.Data;
-using System.Text;
+using System.Drawing;
 using System.Windows.Forms;
-using UAS_MES_NEW.CustomControl.TextBoxWithIcon;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;
 using UAS_MES_NEW.PublicMethod;
-using System.Drawing;
-using System.Text.RegularExpressions;
-using System.Collections.Generic;
 
 namespace UAS_MES_NEW.Make
 {
@@ -73,7 +70,7 @@ namespace UAS_MES_NEW.Make
             ma_code.SelectField = "ma_code # 工单号,ma_prodcode # 产品编号,ma_qty # 工单数量,ma_craftcode # 途程编号,pr_spec # 产品规格,ma_bomversion # Bom版本,ma_softversion # 软件版本,ma_ecncode # ECN号,ma_colorcode # 颜色号";
             ma_code.FormName = Name;
             ma_code.DBTitle = "工单查询";
-            ma_code.SetValueField = new string[] { "ma_code", "ma_prodcode", "ma_qty", "pr_spec", "ma_craftcode", "ma_bomversion", "ma_softversion", "ma_ecncode","ma_colorcode" };
+            ma_code.SetValueField = new string[] { "ma_code", "ma_prodcode", "ma_qty", "pr_spec", "ma_craftcode", "ma_bomversion", "ma_softversion", "ma_ecncode", "ma_colorcode" };
             ma_code.Condition = "ma_statuscode='STARTED'";
             ma_code.DbChange += Ma_code_DBChange;
             code.Focus();
@@ -403,7 +400,7 @@ namespace UAS_MES_NEW.Make
             else
             {
                 string nextstepcode = dh.getFieldDataByCondition("makeserial left join step on ms_nextstepcode = st_code", "st_name", "ms_sncode = '" + sn_code.Text + "'").ToString();
-                OperateResult.AppendText(">>序列号" + sn_code.Text + "已经上料完成,处于"+ nextstepcode + "工序,请采集其它序列号\n", Color.Red);
+                OperateResult.AppendText(">>序列号" + sn_code.Text + "已经上料完成,处于" + nextstepcode + "工序,请采集其它序列号\n", Color.Red);
                 if (!LogicHandler.SetStepResult(ma_code.Text, User.UserSourceCode, sn_code.Text, "上料采集", "上料成功", User.UserCode, out ErrorMessage))
                     OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
                 else
@@ -423,7 +420,7 @@ namespace UAS_MES_NEW.Make
         {
             CollectDataSonCode.Add(sp_soncode);
             //采集成功提示
-         
+
             CollectData.Add(code.Text.Substring(0, code.Text.Length > 80 ? 80 : code.Text.Length));
             if (!CheckBarcode.ContainsKey(sp_fsoncode))
             {

+ 12 - 13
UAS_MES_JH/FunctionCode/Make/Make_FuselageLabelPrint.cs

@@ -1,17 +1,16 @@
-using System;
+using LabelManager2;
+using System;
 using System.Data;
+using System.Diagnostics;
 using System.Drawing;
+using System.IO;
 using System.Text;
+using System.Threading;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
-using UAS_MES_NEW.PublicMethod;
 using UAS_MES_NEW.Entity;
-using LabelManager2;
-using System.Threading;
 using UAS_MES_NEW.PublicForm;
-using System.IO;
-using System.Xml;
-using System.Diagnostics;
+using UAS_MES_NEW.PublicMethod;
 
 namespace UAS_MES_NEW.Make
 {
@@ -81,7 +80,7 @@ namespace UAS_MES_NEW.Make
             US_SKU.TableName = "upcsku";
             US_SKU.SelectField = "US_PRODUCTCOLOR  # PRODUCT_COLOR,US_COLORCODE   # 颜色号,US_SKU # SKU,US_UPC # UPC";
             US_SKU.FormName = Name;
-            US_SKU.SetValueField = new string[] { "US_SKU" , "US_PRODUCTCOLOR", "US_COLORCODE" };
+            US_SKU.SetValueField = new string[] { "US_SKU", "US_PRODUCTCOLOR", "US_COLORCODE" };
             US_SKU.Condition = "1=1";
             US_SKU.DbChange += US_SKU_DbChange;
             version = "";
@@ -236,7 +235,7 @@ namespace UAS_MES_NEW.Make
                             //提示用户“<< 序列号:XXXX”
                             OperateResult.AppendText("<<序列号:" + sncode.Text + "\n", Color.Black);
 
-                            DataTable dds = (DataTable)dh.ExecuteSql(" select pr_versioninfo,pr_macinto,pr_btinfo,pr_netinfo,pr_feederspec from product where pr_code = '" + pr_code.Text+"' ", "select");
+                            DataTable dds = (DataTable)dh.ExecuteSql(" select pr_versioninfo,pr_macinto,pr_btinfo,pr_netinfo,pr_feederspec from product where pr_code = '" + pr_code.Text + "' ", "select");
                             verinfo = dds.Rows[0]["pr_versioninfo"].ToString();
                             macinfo = dds.Rows[0]["pr_macinto"].ToString();
                             btinfo = dds.Rows[0]["pr_btinfo"].ToString();
@@ -253,7 +252,7 @@ namespace UAS_MES_NEW.Make
                             {
                                 mac = BaseUtil.GetDataAdb(macinfo);
                                 OperateResult.AppendText("读取MAC:" + mac + "\n");
-                                if (dh.CheckExist("makeserial", " ms_bt||'-'||ms_mac||'-'||ms_net like '%" + mac + "%' and ms_sncode <> '"+ sncode.Text + "' "))
+                                if (dh.CheckExist("makeserial", " ms_bt||'-'||ms_mac||'-'||ms_net like '%" + mac + "%' and ms_sncode <> '" + sncode.Text + "' "))
                                 {
                                     OperateResult.AppendText("<<MAC:" + mac + "在系统有记录,无法采集\n", Color.Red);
                                     return;
@@ -264,7 +263,7 @@ namespace UAS_MES_NEW.Make
                             {
                                 bt = BaseUtil.GetDataAdb(btinfo);
                                 OperateResult.AppendText("读取BT:" + bt + "\n");
-                                if (dh.CheckExist("makeserial", " ms_bt||'-'||ms_mac||'-'||ms_net like '%" + bt + "%' and ms_sncode <> '"+ sncode.Text + "' "))
+                                if (dh.CheckExist("makeserial", " ms_bt||'-'||ms_mac||'-'||ms_net like '%" + bt + "%' and ms_sncode <> '" + sncode.Text + "' "))
                                 {
                                     OperateResult.AppendText("<<BT:" + bt + "在系统有记录,无法采集\n", Color.Red);
                                     return;
@@ -292,13 +291,13 @@ namespace UAS_MES_NEW.Make
                             }
 
                             string softversion = dh.GetConfig("softversion", "sys").ToString();
-                            if (version.Trim()== sncode.Text)
+                            if (version.Trim() == sncode.Text)
                             {
                                 OperateResult.AppendText("<<序列号:" + sncode.Text + "与对应软件版本" + version + "相同,不允许采集\n", Color.Red);
                                 version = "";
                                 return;
                             }
-                            if (version != ma_softversion.Text && version != ""&& softversion !="0")
+                            if (version != ma_softversion.Text && version != "" && softversion != "0")
                             {
                                 OperateResult.AppendText("<<序列号:" + sncode.Text + "对应软件版本" + version + "与工单维护软件版本" + ma_softversion.Text + "不一致\n", Color.Red);
                                 version = "";

+ 0 - 3
UAS_MES_JH/FunctionCode/Make/Make_GetReMakeSN.cs

@@ -1,11 +1,8 @@
 using LabelManager2;
 using System;
 using System.Collections.Generic;
-using System.ComponentModel;
 using System.Data;
 using System.Drawing;
-using System.Linq;
-using System.Text;
 using System.Threading;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;

+ 1 - 5
UAS_MES_JH/FunctionCode/Make/Make_ImeiCheck.cs

@@ -1,10 +1,6 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
 using System.Data;
 using System.Drawing;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;
@@ -77,7 +73,7 @@ namespace UAS_MES_NEW.Make
                     OperateResult.AppendText("<<" + sncode.Text + "\n", Color.Black);
                     //查询是否存在该ms_id
                     sql.Clear();
-                    sql.Append("select max(ms_id) ms_id from makeserial where ms_sncode ='"+sncode.Text+"'");
+                    sql.Append("select max(ms_id) ms_id from makeserial where ms_sncode ='" + sncode.Text + "'");
                     dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                     if (dt.Rows.Count == 0 || dt.Rows[0]["ms_id"].ToString() == "")
                     {

+ 19 - 21
UAS_MES_JH/FunctionCode/Make/Make_LabelCheck.cs

@@ -1,10 +1,6 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
 using System.Data;
 using System.Drawing;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;
@@ -72,19 +68,20 @@ namespace UAS_MES_NEW.Make
             //判断是enter事件
             if (e.KeyCode == Keys.Enter)
             {
-                if (sncode.Text == "") {
+                if (sncode.Text == "")
+                {
                     OperateResult.AppendText("<<输入不能为空\n", Color.Red);
                     return;
                 }
                 //输入的是SN
                 if (!isCheckItem)
                 {
-                    OperateResult.AppendText("<<"+sncode.Text+"\n", Color.Black);
+                    OperateResult.AppendText("<<" + sncode.Text + "\n", Color.Black);
                     //查询是否存在该ms_id
                     sql.Clear();
-                    sql.Append("select ms_id,ms_prodcode,ms_makecode,ms_craftcode,ms_beforesn from makeserial where ms_id = (select max(ms_id) from makeserial where ms_sncode ='"+sncode.Text+"' )");
+                    sql.Append("select ms_id,ms_prodcode,ms_makecode,ms_craftcode,ms_beforesn from makeserial where ms_id = (select max(ms_id) from makeserial where ms_sncode ='" + sncode.Text + "' )");
                     dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-                    
+
                     if (dt.Rows.Count == 0 || dt.Rows[0]["ms_id"].ToString() == "")
                     {
                         //SN错误,不存在
@@ -96,14 +93,14 @@ namespace UAS_MES_NEW.Make
                     //存在该SN号,查询相关需要核对的信息
                     sql.Clear();
                     sql.Append("select checkitem,fsoncode,type,detno from (select psr_type checkitem ,'' fsoncode,'MS' type ,");
-                    sql.Append("ROW_NUMBER() OVER (order by psr_detno asc )detno from productsnrelation where psr_prodcode='"+ dt.Rows[0]["ms_prodcode"].ToString() + "' and nvl(psr_iflabelcheck,0)<>0");
+                    sql.Append("ROW_NUMBER() OVER (order by psr_detno asc )detno from productsnrelation where psr_prodcode='" + dt.Rows[0]["ms_prodcode"].ToString() + "' and nvl(psr_iflabelcheck,0)<>0");
                     sql.Append(" UNION ALL select wm_concat(sp_soncode)checkitem,sp_fsoncode fsoncode ,'SP' type,");
                     sql.Append(" ROW_NUMBER()OVER(order by min(sp_detno)asc) detno from make inner join stepbom on sb_bomversion=ma_bomversion and sb_prodcode=ma_prodcode");
-                    sql.Append(" inner join stepproduct on sp_sbid=sb_id where ma_code='"+ dt.Rows[0]["ms_makecode"].ToString() + "' and sb_craftcode='"+ dt.Rows[0]["ms_craftcode"].ToString() + "' and nvl(sp_iflabelcheck,0)<>0");
+                    sql.Append(" inner join stepproduct on sp_sbid=sb_id where ma_code='" + dt.Rows[0]["ms_makecode"].ToString() + "' and sb_craftcode='" + dt.Rows[0]["ms_craftcode"].ToString() + "' and nvl(sp_iflabelcheck,0)<>0");
                     sql.Append(" GROUP BY sp_fsoncode) order by type,detno");
-                    checkItemInfo = (DataTable)dh.ExecuteSql(sql.GetString(),"select");
+                    checkItemInfo = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                     //判断是否无需要核对的项
-                    if (checkItemInfo.Rows.Count==0)
+                    if (checkItemInfo.Rows.Count == 0)
                     {
                         OperateResult.AppendText("<<序列号" + sncode.Text + "没有需要核对的项\n", Color.Red, sncode);
                         OperateResult.AppendText(">>请采集SN\n", Color.Black);
@@ -122,7 +119,7 @@ namespace UAS_MES_NEW.Make
                 {
                     OperateResult.AppendText("<<" + sncode.Text + "\n", Color.Black);
 
-                    if (needCheckedInfo == sncode.Text||((needCheckedInfo == sncode.Text.Replace(":", "").Replace("-", ""))&&(checkItemInfo.Rows[checkIndex]["checkitem"].ToString() == "MAC"|| checkItemInfo.Rows[checkIndex]["checkitem"].ToString() == "BT")))
+                    if (needCheckedInfo == sncode.Text || ((needCheckedInfo == sncode.Text.Replace(":", "").Replace("-", "")) && (checkItemInfo.Rows[checkIndex]["checkitem"].ToString() == "MAC" || checkItemInfo.Rows[checkIndex]["checkitem"].ToString() == "BT")))
                     {
                         checkIndex += 1;//序号+1,进入下一步
                         if (checkIndex == checkItemInfo.Rows.Count)
@@ -190,7 +187,7 @@ namespace UAS_MES_NEW.Make
                     {
                         //信息核对失败
                         //>> 请输入SN
-                        OperateResult.AppendText(">>上料信息或序列号采集信息"+needCheckedInfo+"核对失败,不一致\n", Color.Red, sncode);
+                        OperateResult.AppendText(">>上料信息或序列号采集信息" + needCheckedInfo + "核对失败,不一致\n", Color.Red, sncode);
                         //为采集信息
                         if (checkItemInfo.Rows[checkIndex]["TYPE"].ToString() == "MS")
                         {
@@ -220,7 +217,8 @@ namespace UAS_MES_NEW.Make
             //添加结果的信息进去
             showResult.Items.Add(lvi);
         }
-        private void clear() {
+        private void clear()
+        {
             //清空变量的值
             omakeCode = "";
             oMsid = "";
@@ -234,16 +232,16 @@ namespace UAS_MES_NEW.Make
             if (checkItemInfo.Rows[index]["TYPE"].ToString() == "MS")
             {
                 //从makeserial表中查询对应字段的值
-                needCheckedInfo = dh.getFieldDataByCondition("makeserial","ms_"+ checkItemInfo.Rows[index]["checkitem"].ToString(),"ms_id ='"+ dt.Rows[0]["ms_id"].ToString() + "'").ToString();
-                OperateResult.AppendText("<<序列号" + SN + "对应的"+ checkItemInfo.Rows[index]["checkitem"].ToString() + "为" + needCheckedInfo + "\n", Color.Green);
-                OperateResult.AppendText(">>请采集"+ checkItemInfo.Rows[index]["checkitem"].ToString() + "\n", Color.Black, sncode);
+                needCheckedInfo = dh.getFieldDataByCondition("makeserial", "ms_" + checkItemInfo.Rows[index]["checkitem"].ToString(), "ms_id ='" + dt.Rows[0]["ms_id"].ToString() + "'").ToString();
+                OperateResult.AppendText("<<序列号" + SN + "对应的" + checkItemInfo.Rows[index]["checkitem"].ToString() + "为" + needCheckedInfo + "\n", Color.Green);
+                OperateResult.AppendText(">>请采集" + checkItemInfo.Rows[index]["checkitem"].ToString() + "\n", Color.Black, sncode);
             }
             else//为上料信息
             {
                 //从craftmaterial中查询上料记录
-                needCheckedInfo = dh.getFieldDataByCondition("craftmaterial", "cm_barcode", "cm_makecode='"+ dt.Rows[0]["ms_makecode"].ToString() + "' and cm_sncode in ('"+SN+"'"+(TSN==""?"":(",'"+TSN+"'"))+") and cm_fsoncode='"+checkItemInfo.Rows[index]["fsoncode"].ToString()+"' and cm_status=0").ToString();
-                OperateResult.AppendText("<<序列号" + SN + "上料物料"+ checkItemInfo.Rows[index]["checkitem"].ToString() + "的条码号为" + needCheckedInfo + "\n", Color.Green);
-                OperateResult.AppendText(">>请采集物料"+ checkItemInfo.Rows[index]["checkitem"].ToString() + "条码\n", Color.Black, sncode);
+                needCheckedInfo = dh.getFieldDataByCondition("craftmaterial", "cm_barcode", "cm_makecode='" + dt.Rows[0]["ms_makecode"].ToString() + "' and cm_sncode in ('" + SN + "'" + (TSN == "" ? "" : (",'" + TSN + "'")) + ") and cm_fsoncode='" + checkItemInfo.Rows[index]["fsoncode"].ToString() + "' and cm_status=0").ToString();
+                OperateResult.AppendText("<<序列号" + SN + "上料物料" + checkItemInfo.Rows[index]["checkitem"].ToString() + "的条码号为" + needCheckedInfo + "\n", Color.Green);
+                OperateResult.AppendText(">>请采集物料" + checkItemInfo.Rows[index]["checkitem"].ToString() + "条码\n", Color.Black, sncode);
             }
         }
 

+ 8 - 9
UAS_MES_JH/FunctionCode/Make/Make_LabelPrint.cs

@@ -1,16 +1,15 @@
-using System;
+using LabelManager2;
+using System;
 using System.Data;
 using System.Drawing;
+using System.IO;
 using System.Text;
+using System.Threading;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
-using UAS_MES_NEW.PublicMethod;
 using UAS_MES_NEW.Entity;
-using LabelManager2;
-using System.Threading;
 using UAS_MES_NEW.PublicForm;
-using System.IO;
-using System.Xml;
+using UAS_MES_NEW.PublicMethod;
 
 namespace UAS_MES_NEW.Make
 {
@@ -219,13 +218,13 @@ namespace UAS_MES_NEW.Make
                             //提示用户“<< 序列号:XXXX”
                             OperateResult.AppendText("<<序列号:" + sncode.Text + "\n", Color.Black);
                             string softversion = dh.GetConfig("softversion", "sys").ToString();
-                            if (version.Trim()== sncode.Text)
+                            if (version.Trim() == sncode.Text)
                             {
                                 OperateResult.AppendText("<<序列号:" + sncode.Text + "与对应软件版本" + version + "相同,不允许采集\n", Color.Red);
                                 version = "";
                                 return;
                             }
-                            if (version != ma_softversion.Text && version != ""&& softversion !="0")
+                            if (version != ma_softversion.Text && version != "" && softversion != "0")
                             {
                                 OperateResult.AppendText("<<序列号:" + sncode.Text + "对应软件版本" + version + "与工单维护软件版本" + ma_softversion.Text + "不一致\n", Color.Red);
                                 version = "";
@@ -305,7 +304,7 @@ namespace UAS_MES_NEW.Make
                                     }
                                 }
                                 string skureset = dh.GetConfig("skureset", "sys").ToString();
-                                if (US_SKU.Text != ""&& skureset =="1")
+                                if (US_SKU.Text != "" && skureset == "1")
                                 {
                                     dh.ExecuteSql("update makeserial set ms_sku = '" + US_SKU.Text + "' where ms_sncode = '" + sncode.Text + "' and ms_makecode = '" + ma_code.Text + "'", "update");
                                 }

+ 0 - 4
UAS_MES_JH/FunctionCode/Make/Make_MakeCancelDown.cs

@@ -1,10 +1,6 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
 using System.Data;
 using System.Drawing;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;

+ 1 - 5
UAS_MES_JH/FunctionCode/Make/Make_MakeDown.cs

@@ -1,10 +1,6 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
 using System.Data;
 using System.Drawing;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;
@@ -86,7 +82,7 @@ namespace UAS_MES_NEW.Make
                         string ms_outno = dt.Rows[0]["ms_outno"].ToString();
                         if (ms_downstatus == "0")
                         {
-                            if (ms_outno == ""&& ms_iostatus =="0")
+                            if (ms_outno == "" && ms_iostatus == "0")
                             {
                                 if (ms_outboxcode == null || ms_outboxcode == "")
                                 {

+ 1 - 6
UAS_MES_JH/FunctionCode/Make/Make_NewBadCode.cs

@@ -1,11 +1,6 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
 using System.Data;
-using System.Drawing;
-using System.Linq;
 using System.Runtime.InteropServices;
-using System.Text;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;
@@ -125,7 +120,7 @@ namespace UAS_MES_NEW.Make
                         }
                     }
                     if (!AddToReject)
-                    {                      
+                    {
                         ChoosedRejectList.Items.Add((ListViewItem)WaitRejectList.Items[i].Clone());
                         WaitRejectList.Items[i].Remove();
                         CheckedNum++;

+ 0 - 5
UAS_MES_JH/FunctionCode/Make/Make_NewBadCode_DE.cs

@@ -1,11 +1,6 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
 using System.Data;
-using System.Drawing;
-using System.Linq;
 using System.Runtime.InteropServices;
-using System.Text;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;

+ 0 - 4
UAS_MES_JH/FunctionCode/Make/Make_NewMatainInf.cs

@@ -1,11 +1,7 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
 using System.Data;
 using System.Drawing;
-using System.Linq;
 using System.Runtime.InteropServices;
-using System.Text;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;

+ 0 - 1
UAS_MES_JH/FunctionCode/Make/Make_PositionStock.cs

@@ -2,7 +2,6 @@
 using System.Collections.Generic;
 using System.Data;
 using System.Drawing;
-using System.Text;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;

+ 6 - 9
UAS_MES_JH/FunctionCode/Make/Make_RePrintLabel.cs

@@ -1,12 +1,9 @@
 using LabelManager2;
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
 using System.Data;
 using System.Diagnostics;
 using System.Drawing;
 using System.IO;
-using System.Linq;
 using System.Text;
 using System.Threading;
 using System.Windows.Forms;
@@ -115,7 +112,7 @@ namespace UAS_MES_NEW.Make
         private void radioButton_CheckedChange(object sender, EventArgs e)
         {
             RadioButton btn = sender as RadioButton;
-            if ((btn.Name == "giftBox"|| btn.Name == "flBox") && btn.Checked)
+            if ((btn.Name == "giftBox" || btn.Name == "flBox") && btn.Checked)
             {
                 //如果是切换成彩盒或者机身标提示用户 输入SN
                 OperateResult.AppendText(">>请输入SN\n", Color.Black);
@@ -145,7 +142,7 @@ namespace UAS_MES_NEW.Make
                 }
                 OperateResult.AppendText(">>" + inputText.Text + "\n", Color.Black);
                 //打印类型为彩盒或者机身标
-                if (giftBox.Checked||flBox.Checked)
+                if (giftBox.Checked || flBox.Checked)
                 {
                     //select max(ms_id)ms_id from makeserial where ms_sncode=? 
                     ms_id = dh.getFieldDataByCondition("makeserial", "max(ms_id) ms_id", "ms_sncode='" + inputText.Text + "'").ToString();
@@ -249,7 +246,7 @@ namespace UAS_MES_NEW.Make
                 return;
             }
             //打印类型 彩盒或者标签,再次判断是否已装箱,未转号
-            if (giftBox.Checked||flBox.Checked)
+            if (giftBox.Checked || flBox.Checked)
             {
                 mapB = (DataTable)dh.ExecuteSql("select ms_outboxcode, nvl(ms_downstatus,0) ms_downstatus from makeserial where ms_id='" + ms_id + "' and ms_sncode='" + inputValue.Text + "'", "select");
                 if (mapB.Rows.Count == 0)
@@ -433,7 +430,7 @@ namespace UAS_MES_NEW.Make
 
         private void rePrintCheck_KeyDown(object sender, KeyEventArgs e)
         {
-          
+
         }
         /// <summary>
         /// 清除信息
@@ -476,8 +473,8 @@ namespace UAS_MES_NEW.Make
             string oMSID = "";
             string oErrMessage = "";
             StreamReader _Sr = new StreamReader(FolderPath.Text + @"\" + e.Name, Encoding.UTF8);
-            
-            OperateResult.AppendText("读取文件" + e.Name+"\n");
+
+            OperateResult.AppendText("读取文件" + e.Name + "\n");
             _Sr.Close();
             //获取文件名的序列号,如SA123456.xml,如果开头为-表示无条码需要自动获取
             string sn_code = e.Name.Split('.')[0].Replace("test", "");

+ 0 - 4
UAS_MES_JH/FunctionCode/Make/Make_Repair.cs

@@ -1,12 +1,8 @@
 using System;
-using System.Collections;
 using System.Collections.Generic;
 using System.Data;
 using System.Drawing;
-using System.Text;
 using System.Windows.Forms;
-using UAS_MES_NEW.CustomControl.DataGrid_View;
-using UAS_MES_NEW.CustomControl.TextBoxWithIcon;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;
 using UAS_MES_NEW.PublicMethod;

+ 0 - 3
UAS_MES_JH/FunctionCode/Make/Make_SeqProgramTransform.cs

@@ -1,10 +1,7 @@
 using System;
 using System.Collections;
-using System.Collections.Generic;
-using System.ComponentModel;
 using System.Data;
 using System.Drawing;
-using System.Linq;
 using System.Text;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;

+ 0 - 1
UAS_MES_JH/FunctionCode/Make/Make_SeqTransform.cs

@@ -2,7 +2,6 @@
 using System.Data;
 using System.Drawing;
 using System.Windows.Forms;
-using UAS_MES_NEW.CustomControl.TextBoxWithIcon;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;
 using UAS_MES_NEW.PublicMethod;

+ 1 - 4
UAS_MES_JH/FunctionCode/Make/Make_SmtTestCollection.cs

@@ -1,14 +1,11 @@
 using System;
+using System.Collections.Generic;
 using System.Data;
-using System.Text;
-using System.Threading;
 using System.Drawing;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;
 using UAS_MES_NEW.PublicMethod;
-using System.Collections.Generic;
-using UAS_MES_NEW.CustomControl.PowerControlForm;
 
 namespace UAS_MES_NEW.Make
 {

+ 8 - 13
UAS_MES_JH/FunctionCode/Make/Make_Sndown.cs

@@ -1,10 +1,5 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
 using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
 using System.Threading;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
@@ -35,7 +30,7 @@ namespace UAS_MES_NEW.Make
         {
             asc.controllInitializeSize(this);
             dh = SystemInf.dh;
-          
+
 
             //工单号放大镜配置
             ma_code.TableName = "make left join product on ma_prodcode=pr_code";
@@ -51,8 +46,8 @@ namespace UAS_MES_NEW.Make
             linecode.DataSource = dt;
             linecode.Text = "";
 
-         
-            
+
+
 
         }
 
@@ -63,7 +58,7 @@ namespace UAS_MES_NEW.Make
 
             Dbfind = ma_code.ReturnData;
             BaseUtil.SetFormValue(this.Controls, Dbfind);
-           // Query.PerformClick();
+            // Query.PerformClick();
         }
 
         private void Query_OnlineTraceBack_SizeChanged(object sender, EventArgs e)
@@ -83,7 +78,7 @@ namespace UAS_MES_NEW.Make
                 sql.Append(" order by sp_date asc ");
                 DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 BaseUtil.FillDgvWithDataTable(SnInf, dt);
-              
+
                 checkBox1.Checked = false;
                 Count.Text = "";
             }
@@ -95,7 +90,7 @@ namespace UAS_MES_NEW.Make
             }
 
         }
- 
+
 
 
         private void normalButton1_Click(object sender, EventArgs e)
@@ -142,7 +137,7 @@ namespace UAS_MES_NEW.Make
             {
                 MessageBox.Show(EX.Message);
             }
-          
+
         }
 
         private void Query_OnlineTraceBack_FormClosing(object sender, FormClosingEventArgs e)
@@ -197,7 +192,7 @@ namespace UAS_MES_NEW.Make
 
         private void ma_code_UserControlTextChanged(object sender, EventArgs e)
         {
-            DataTable dt = (DataTable)dh.ExecuteSql(" select mcd_stepcode,mcd_stepname from MAKECRAFTDETAIL where mcd_macode = '" + ma_code.Text+"' order by mcd_detno asc  ", "select");
+            DataTable dt = (DataTable)dh.ExecuteSql(" select mcd_stepcode,mcd_stepname from MAKECRAFTDETAIL where mcd_macode = '" + ma_code.Text + "' order by mcd_detno asc  ", "select");
             ms_stepcode.DisplayMember = "mcd_stepname";
             ms_stepcode.ValueMember = "mcd_stepcode";
             ms_stepcode.DataSource = dt;

+ 7 - 8
UAS_MES_JH/FunctionCode/Make/Make_SpecialCartonPack.cs

@@ -1,18 +1,17 @@
 using LabelManager2;
 using System;
+using System.Collections.Generic;
 using System.Data;
-using System.Text;
+using System.Drawing;
+using System.IO;
+using System.IO.Ports;
+using System.Text.RegularExpressions;
+using System.Threading;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;
-using UAS_MES_NEW.PublicMethod;
-using System.Drawing;
-using System.Threading;
 using UAS_MES_NEW.PublicForm;
-using System.IO.Ports;
-using System.IO;
-using System.Text.RegularExpressions;
-using System.Collections.Generic;
+using UAS_MES_NEW.PublicMethod;
 
 namespace UAS_MES_NEW.Make
 {

+ 0 - 6
UAS_MES_JH/FunctionCode/Make/Make_SplitBoard.cs

@@ -1,10 +1,4 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 
 namespace UAS_MES_NEW.Make

+ 7 - 10
UAS_MES_JH/FunctionCode/Make/Make_TestCollection.cs

@@ -1,16 +1,13 @@
 using System;
+using System.Collections.Generic;
 using System.Data;
-using System.Text;
-using System.Threading;
 using System.Drawing;
+using System.IO;
+using System.Text;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;
 using UAS_MES_NEW.PublicMethod;
-using System.Collections.Generic;
-using UAS_MES_NEW.CustomControl.PowerControlForm;
-using System.Xml;
-using System.IO;
 
 namespace UAS_MES_NEW.Make
 {
@@ -219,7 +216,7 @@ namespace UAS_MES_NEW.Make
                         if (ms_netcode != " " && dh.CheckExist("makeserial", "ms_netcode = '" + ms_netcode + "' and ms_sncode <>'" + ms_sncode.Text + "'"))
                         {
                             string othersn = dh.getFieldDataByCondition("makeserial", "ms_sncode", "ms_netcode = '" + ms_netcode + "' and ms_sncode <>'" + ms_sncode.Text + "'").ToString();
-                            OperateResult.AppendText(">>" + ms_sncode.Text + "对应wifibox:"+ms_netcode+"已被SN:"+othersn+"使用\n", Color.Red, ms_sncode);
+                            OperateResult.AppendText(">>" + ms_sncode.Text + "对应wifibox:" + ms_netcode + "已被SN:" + othersn + "使用\n", Color.Red, ms_sncode);
                             return;
                         }
                         if (sncode != ms_sncode.Text)
@@ -234,7 +231,7 @@ namespace UAS_MES_NEW.Make
                             {
                                 if (stepcode == User.CurrentStepCode && (reworkstatus == "1" || reworkstatus == "2") && ifrepair == "0")
                                 {
-                                    OperateResult.AppendText(">>" + ms_sncode.Text + " 序列号已执行过" + User.CurrentStepCode + "工序,采集结果为良品,待执行工序是:"+ ms_nextstepcode + "\n", Color.Red, ms_sncode);
+                                    OperateResult.AppendText(">>" + ms_sncode.Text + " 序列号已执行过" + User.CurrentStepCode + "工序,采集结果为良品,待执行工序是:" + ms_nextstepcode + "\n", Color.Red, ms_sncode);
                                     return;
                                 }
                             }
@@ -872,7 +869,7 @@ namespace UAS_MES_NEW.Make
         }
 
 
-        
+
 
         private void XmlWatcher_Changed(object sender, FileSystemEventArgs e)
         {
@@ -974,7 +971,7 @@ namespace UAS_MES_NEW.Make
                 OperateResult.AppendText(">>" + sn + "对应wifibox:" + wifibox + "已被SN:" + othersn + "使用\n", Color.Red);
                 return;
             }
-            dh.UpdateByCondition("makeserial","ms_netcode = '"+wifibox+"'","ms_sncode = '"+sn+"'");
+            dh.UpdateByCondition("makeserial", "ms_netcode = '" + wifibox + "'", "ms_sncode = '" + sn + "'");
             OperateResult.AppendText(">>" + sn + "记录wifibox:" + wifibox + "成功\n", Color.Green);
             ms_sncode.Text = sn;
             ms_code_KeyDown(this, new KeyEventArgs(Keys.Enter));

+ 12 - 23
UAS_MES_JH/FunctionCode/Make/Make_TestCollectionColor.cs

@@ -1,26 +1,15 @@
-using System;
+using LabelManager2;
+using System;
+using System.Collections.Generic;
 using System.Data;
-using System.Text;
-using System.Threading;
+using System.Diagnostics;
 using System.Drawing;
+using System.Threading;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;
-using UAS_MES_NEW.PublicMethod;
-using System.Collections.Generic;
-using UAS_MES_NEW.CustomControl.PowerControlForm;
-using System.Xml;
-using System.IO;
-using ExcelHelper;
-using NPOI.SS.UserModel;
-using NPOI.HSSF.UserModel;
-using NPOI.SS.Formula.Eval;
-using NPOI.HSSF.Util;
-using NPOI.SS.Util;
-using LabelManager2;
-using System.Diagnostics;
 using UAS_MES_NEW.PublicForm;
-using System.Security.Cryptography;
+using UAS_MES_NEW.PublicMethod;
 
 namespace UAS_MES_NEW.Make
 {
@@ -102,7 +91,7 @@ namespace UAS_MES_NEW.Make
             US_ID.TableName = "upcsku";
             US_ID.SelectField = "US_ID # ID,US_PRODUCTCOLOR  # PRODUCT_COLOR,US_COLORCODE  # 颜色号,US_SKU # SKU,US_UPC # UPC,US_LOCATION # 出货地";
             US_ID.FormName = Name;
-            US_ID.SetValueField = new string[] { "US_ID","US_SKU", "US_PRODUCTCOLOR", "US_COLORCODE", "US_UPC","US_LOCATION" };
+            US_ID.SetValueField = new string[] { "US_ID", "US_SKU", "US_PRODUCTCOLOR", "US_COLORCODE", "US_UPC", "US_LOCATION" };
             US_ID.Condition = "1=1";
             US_ID.DbChange += US_SKU_DbChange;
 
@@ -156,7 +145,7 @@ namespace UAS_MES_NEW.Make
         }
 
 
-    
+
 
         private void CleanInfo_Click(object sender, EventArgs e)
         {
@@ -208,7 +197,7 @@ namespace UAS_MES_NEW.Make
                         if (ms_netcode != " " && dh.CheckExist("makeserial", "ms_netcode = '" + ms_netcode + "' and ms_sncode <>'" + ms_sncode.Text + "'"))
                         {
                             string othersn = dh.getFieldDataByCondition("makeserial", "ms_sncode", "ms_netcode = '" + ms_netcode + "' and ms_sncode <>'" + ms_sncode.Text + "'").ToString();
-                            OperateResult.AppendText(">>" + ms_sncode.Text + "对应wifibox:"+ms_netcode+"已被SN:"+othersn+"使用\n", Color.Red, ms_sncode);
+                            OperateResult.AppendText(">>" + ms_sncode.Text + "对应wifibox:" + ms_netcode + "已被SN:" + othersn + "使用\n", Color.Red, ms_sncode);
                             return;
                         }
                         if (sncode != ms_sncode.Text)
@@ -276,7 +265,7 @@ namespace UAS_MES_NEW.Make
 
 
 
-    
+
 
 
 
@@ -373,7 +362,7 @@ namespace UAS_MES_NEW.Make
             }
             if (GoodProduct.Checked)
                 ms_code_KeyDown(sender, new KeyEventArgs(Keys.Enter));
-          
+
         }
 
 
@@ -455,7 +444,7 @@ namespace UAS_MES_NEW.Make
 
         private void button1_Click(object sender, EventArgs e)
         {
-           
+
         }
     }
 }

+ 23 - 29
UAS_MES_JH/FunctionCode/Make/Make_TestCollectionlux.cs

@@ -1,22 +1,16 @@
-using System;
+using NPOI.HSSF.UserModel;
+using NPOI.HSSF.Util;
+using NPOI.SS.UserModel;
+using System;
+using System.Collections.Generic;
 using System.Data;
-using System.Text;
-using System.Threading;
 using System.Drawing;
+using System.IO;
+using System.Threading;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;
 using UAS_MES_NEW.PublicMethod;
-using System.Collections.Generic;
-using UAS_MES_NEW.CustomControl.PowerControlForm;
-using System.Xml;
-using System.IO;
-using ExcelHelper;
-using NPOI.SS.UserModel;
-using NPOI.HSSF.UserModel;
-using NPOI.SS.Formula.Eval;
-using NPOI.HSSF.Util;
-using NPOI.SS.Util;
 
 namespace UAS_MES_NEW.Make
 {
@@ -102,7 +96,7 @@ namespace UAS_MES_NEW.Make
         }
 
 
-    
+
 
         private void CleanInfo_Click(object sender, EventArgs e)
         {
@@ -151,7 +145,7 @@ namespace UAS_MES_NEW.Make
                         if (ms_netcode != " " && dh.CheckExist("makeserial", "ms_netcode = '" + ms_netcode + "' and ms_sncode <>'" + ms_sncode.Text + "'"))
                         {
                             string othersn = dh.getFieldDataByCondition("makeserial", "ms_sncode", "ms_netcode = '" + ms_netcode + "' and ms_sncode <>'" + ms_sncode.Text + "'").ToString();
-                            OperateResult.AppendText(">>" + ms_sncode.Text + "对应wifibox:"+ms_netcode+"已被SN:"+othersn+"使用\n", Color.Red, ms_sncode);
+                            OperateResult.AppendText(">>" + ms_sncode.Text + "对应wifibox:" + ms_netcode + "已被SN:" + othersn + "使用\n", Color.Red, ms_sncode);
                             return;
                         }
                         if (sncode != ms_sncode.Text)
@@ -160,7 +154,7 @@ namespace UAS_MES_NEW.Make
                             return;
                         }
                         ifrework = dt.Rows[0]["ms_ifrework"].ToString();
-                        DataTable dtx = (DataTable)dh.ExecuteSql("select nvl(pr_omax,0)pr_omax,nvl(pr_omin,0)pr_omin,nvl(pr_tmax,0)pr_tmax,nvl(pr_tmin,0)pr_tmin from product where pr_code = '"+ma_prodcode.Text+"'", "select");
+                        DataTable dtx = (DataTable)dh.ExecuteSql("select nvl(pr_omax,0)pr_omax,nvl(pr_omin,0)pr_omin,nvl(pr_tmax,0)pr_tmax,nvl(pr_tmin,0)pr_tmin from product where pr_code = '" + ma_prodcode.Text + "'", "select");
                         double pr_omax = double.Parse(dtx.Rows[0]["pr_omax"].ToString());
                         double pr_omin = double.Parse(dtx.Rows[0]["pr_omin"].ToString());
                         double pr_tmax = double.Parse(dtx.Rows[0]["pr_tmax"].ToString());
@@ -178,7 +172,7 @@ namespace UAS_MES_NEW.Make
                         string str = BaseUtil.GetDataAdb("devices").ToUpper().Replace("LIST OF DEVICES ATTACHED", "").Replace("DEVICE", "").Replace("\n", "");
                         if (!str.Contains(ms_sncode.Text))
                         {
-                            OperateResult.AppendText(">>" + ms_sncode.Text + "与获取SN:"+str+"不一致\n", Color.Red, ms_sncode);
+                            OperateResult.AppendText(">>" + ms_sncode.Text + "与获取SN:" + str + "不一致\n", Color.Red, ms_sncode);
                             return;
                         }
                         OperateResult.AppendText(">>核对SN成功,关闭抽屉\n", Color.Black);
@@ -195,14 +189,14 @@ namespace UAS_MES_NEW.Make
                             double nowdata = double.Parse(BaseUtil.GetDataAdb("shell letools getLSensorValue"));
                             if (nowdata >= 5)
                             {
-                                OperateResult.AppendText(">>当前光感"+nowdata+"大于5,重新测试\n", Color.Red, ms_sncode);
+                                OperateResult.AppendText(">>当前光感" + nowdata + "大于5,重新测试\n", Color.Red, ms_sncode);
                                 BaseUtil.GetDatacmd("Open_Drawer");
                                 return;
                             }
                         }
                         catch (Exception ex)
                         {
-                            OperateResult.AppendText(">>"+ex.Message+"\n", Color.Red, ms_sncode);
+                            OperateResult.AppendText(">>" + ex.Message + "\n", Color.Red, ms_sncode);
                             BaseUtil.GetDatacmd("Open_Drawer");
                             return;
                         }
@@ -221,9 +215,9 @@ namespace UAS_MES_NEW.Make
                             BaseUtil.GetDatacmd("Open_Drawer");
                             return;
                         }
-                        OperateResult.AppendText(">>写入关灯光感值"+ avg1 + "\n", Color.Black);
-                        BaseUtil.GetDataAdb("shell letools setLightSensorZero "+avg1);
-                        dh.ExecuteSql("update makeserial set ms_avg1 = '"+avg1+"' where ms_sncode = '"+ms_sncode.Text+"'", "update");
+                        OperateResult.AppendText(">>写入关灯光感值" + avg1 + "\n", Color.Black);
+                        BaseUtil.GetDataAdb("shell letools setLightSensorZero " + avg1);
+                        dh.ExecuteSql("update makeserial set ms_avg1 = '" + avg1 + "' where ms_sncode = '" + ms_sncode.Text + "'", "update");
                         OperateResult.AppendText(">>暂打开200lux光源\n", Color.Black);
                         BaseUtil.GetDatacmd("Open_Light_A");
                         OperateResult.AppendText(">>读取当前光感数值\n", Color.Black);
@@ -270,7 +264,7 @@ namespace UAS_MES_NEW.Make
                             BaseUtil.GetDatacmd("Open_Drawer");
                             return;
                         }
-                        OperateResult.AppendText(">>200lux光感校准值"+ ver1 + "保存\n", Color.Black);
+                        OperateResult.AppendText(">>200lux光感校准值" + ver1 + "保存\n", Color.Black);
                         dh.ExecuteSql("update makeserial set ms_ver1 = '" + ver1 + "' where ms_sncode = '" + ms_sncode.Text + "'", "update");
                         OperateResult.AppendText(">>关闭200lux并打开20lux\n", Color.Black);
                         BaseUtil.GetDatacmd("Close_Light_A");
@@ -288,8 +282,8 @@ namespace UAS_MES_NEW.Make
                         OperateResult.AppendText(">>读取WIFI MAC和BT MAC\n", Color.Black);
                         string mac = BaseUtil.GetDataAdb("shell ft.sh getmac wifi");
                         string bt = BaseUtil.GetDataAdb("shell ft.sh getmac bt");
-                        OperateResult.AppendText(">>保存WIFI:"+mac+",BT:"+bt+"\n", Color.Black);
-                        dh.ExecuteSql("update makeserial set ms_mac = '" + mac + "',ms_bt = '"+bt+"' where ms_sncode = '" + ms_sncode.Text + "'", "update");
+                        OperateResult.AppendText(">>保存WIFI:" + mac + ",BT:" + bt + "\n", Color.Black);
+                        dh.ExecuteSql("update makeserial set ms_mac = '" + mac + "',ms_bt = '" + bt + "' where ms_sncode = '" + ms_sncode.Text + "'", "update");
                         OperateResult.AppendText(">>测试完成打开抽屉\n", Color.Black);
                         BaseUtil.GetDatacmd("Open_Drawer");
                         int index = LabelDataGridView.Rows.Add();
@@ -454,7 +448,7 @@ namespace UAS_MES_NEW.Make
 
 
 
-    
+
 
 
 
@@ -552,7 +546,7 @@ namespace UAS_MES_NEW.Make
             }
             if (GoodProduct.Checked)
                 ms_code_KeyDown(sender, new KeyEventArgs(Keys.Enter));
-          
+
         }
 
 
@@ -680,7 +674,7 @@ namespace UAS_MES_NEW.Make
 
         private void ma_prodcode_TextChanged(object sender, EventArgs e)
         {
-       
+
         }
 
 
@@ -706,7 +700,7 @@ namespace UAS_MES_NEW.Make
 
         private void button1_Click(object sender, EventArgs e)
         {
-           
+
         }
     }
 }

+ 17 - 28
UAS_MES_JH/FunctionCode/Make/Make_TestCollectionqrcode2.cs

@@ -1,26 +1,15 @@
-using System;
+using LabelManager2;
+using System;
+using System.Collections.Generic;
 using System.Data;
-using System.Text;
-using System.Threading;
+using System.Diagnostics;
 using System.Drawing;
+using System.Threading;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;
-using UAS_MES_NEW.PublicMethod;
-using System.Collections.Generic;
-using UAS_MES_NEW.CustomControl.PowerControlForm;
-using System.Xml;
-using System.IO;
-using ExcelHelper;
-using NPOI.SS.UserModel;
-using NPOI.HSSF.UserModel;
-using NPOI.SS.Formula.Eval;
-using NPOI.HSSF.Util;
-using NPOI.SS.Util;
-using LabelManager2;
-using System.Diagnostics;
 using UAS_MES_NEW.PublicForm;
-using System.Security.Cryptography;
+using UAS_MES_NEW.PublicMethod;
 
 namespace UAS_MES_NEW.Make
 {
@@ -156,7 +145,7 @@ namespace UAS_MES_NEW.Make
         }
 
 
-    
+
 
         private void CleanInfo_Click(object sender, EventArgs e)
         {
@@ -165,7 +154,7 @@ namespace UAS_MES_NEW.Make
 
         private void ms_code_KeyDown(object sender, KeyEventArgs e)
         {
-       
+
             if (e.KeyCode == Keys.Enter)
             {
                 string softversion = "";
@@ -186,7 +175,7 @@ namespace UAS_MES_NEW.Make
                     {
                         if (message.Length != 8)
                         {
-                            OperateResult.AppendText(">>需要采集相框ID,采集二维码解析出"+ message.Length + "个数据,不符合要求\n", Color.Red, ms_sncode);
+                            OperateResult.AppendText(">>需要采集相框ID,采集二维码解析出" + message.Length + "个数据,不符合要求\n", Color.Red, ms_sncode);
                             return;
                         }
 
@@ -298,7 +287,7 @@ namespace UAS_MES_NEW.Make
                         }
                         ifrework = dt.Rows[0]["ms_ifrework"].ToString();
                         //string softversioncheck = dh.GetConfig("softversion", "sys").ToString();
-                        if (softversion != ma_softversion.Text )
+                        if (softversion != ma_softversion.Text)
                         {
                             OperateResult.AppendText("<<序列号:" + ms_sncode.Text + "对应软件版本:" + softversion + "与工单维护软件版本:" + ma_softversion.Text + "不一致\n", Color.Red);
                             return;
@@ -348,10 +337,10 @@ namespace UAS_MES_NEW.Make
                             OperateResult.AppendText("<<序列号:" + ms_sncode.Text + " 相框ID信息异常\n", Color.Red);
                             return;
                         }
-                        listmac = dh.getFieldDataByCondition("makesnlist", "msl_mac", "msl_sncode ='" + ms_sncode.Text + "' and msl_makecode = '"+ma_code.Text+"'").ToString();
+                        listmac = dh.getFieldDataByCondition("makesnlist", "msl_mac", "msl_sncode ='" + ms_sncode.Text + "' and msl_makecode = '" + ma_code.Text + "'").ToString();
                         if (listmac != "" && listmac != mac.ToUpper())
                         {
-                            OperateResult.AppendText("<<序列号:" + ms_sncode.Text + " 导入WIFI为:"+listmac+",与二维码mac:"+mac+"不一致\n", Color.Red);
+                            OperateResult.AppendText("<<序列号:" + ms_sncode.Text + " 导入WIFI为:" + listmac + ",与二维码mac:" + mac + "不一致\n", Color.Red);
                             return;
                         }
 
@@ -365,7 +354,7 @@ namespace UAS_MES_NEW.Make
 
 
                         dh.ExecuteSql("update makeserial set MS_SOFTVERSION = '" + softversion + "',ms_othid1 = '" + othid + "'," +
-                            "ms_mac = '" + mac + "',ms_bt = '" + bt + "',ms_appver = '"+appver+"' where ms_sncode = '" + ms_sncode.Text + "' and ms_makecode = '" + ma_code.Text + "'", "update");
+                            "ms_mac = '" + mac + "',ms_bt = '" + bt + "',ms_appver = '" + appver + "' where ms_sncode = '" + ms_sncode.Text + "' and ms_makecode = '" + ma_code.Text + "'", "update");
 
                         //if (US_SKU.Text != "")
                         //{
@@ -409,7 +398,7 @@ namespace UAS_MES_NEW.Make
                             }
                         }
 
-                   
+
 
 
                         SetCollectResult();
@@ -424,7 +413,7 @@ namespace UAS_MES_NEW.Make
 
 
 
-    
+
 
 
 
@@ -521,7 +510,7 @@ namespace UAS_MES_NEW.Make
             }
             if (GoodProduct.Checked)
                 ms_code_KeyDown(sender, new KeyEventArgs(Keys.Enter));
-          
+
         }
 
 
@@ -603,7 +592,7 @@ namespace UAS_MES_NEW.Make
 
         private void button1_Click(object sender, EventArgs e)
         {
-           
+
         }
     }
 }

+ 9 - 12
UAS_MES_JH/FunctionCode/Make/Make_UpdateCollectCode.cs

@@ -1,10 +1,7 @@
 using System;
-using System.Collections;
 using System.Collections.Generic;
-using System.ComponentModel;
 using System.Data;
 using System.Drawing;
-using System.Linq;
 using System.Text;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
@@ -82,7 +79,7 @@ namespace UAS_MES_NEW.Make
                 if (step == 0)
                 {
                     //避免第一步出错的时候添加不需要的数据
-                    if (list.Count!=0)
+                    if (list.Count != 0)
                     {
                         list.Clear();
                     }
@@ -182,7 +179,7 @@ namespace UAS_MES_NEW.Make
                                 sb.Append("ms_" + ((CheckBox)list[step - 1]).Text.Split('/')[0] + " = '" + inputValue.Text.Replace(":", "").Replace("-", "") + "',");
                                 toSi.Append("si_" + ((CheckBox)list[step - 1]).Text.Split('/')[0] + " = '" + inputValue.Text.Replace(":", "").Replace("-", "") + "',");
                                 insertSninfoFields.Append("si_" + ((CheckBox)list[step - 1]).Text.Split('/')[0] + ",");
-                                insertSninfoValues.Append("'"+inputValue.Text.Replace(":", "").Replace("-", "") + "',");
+                                insertSninfoValues.Append("'" + inputValue.Text.Replace(":", "").Replace("-", "") + "',");
                                 oldData.Append("ms_" + ((CheckBox)list[step - 1]).Text.Split('/')[0] + ":" + dt.Rows[0]["ms_" + ((CheckBox)list[step - 1]).Text.Split('/')[0]].ToString() + ",");
                                 newData.Append("ms_" + ((CheckBox)list[step - 1]).Text.Split('/')[0] + ":" + inputValue.Text.Replace(":", "").Replace("-", "") + ",");
                             }
@@ -197,7 +194,7 @@ namespace UAS_MES_NEW.Make
                                 return;
                             }
                             //验证长度前缀通过,验证数据库
-                            if (dh.CheckExist("makeserial", "ms_status in (0,1,2,3) and  ms_" + (((CheckBox)list[step - 1]).Text == "网标" ? "NETCODE" : ((CheckBox)list[step - 1]).Text) + " ='" + inputValue.Text + "' and ms_id <>'"+ms_id+"'"))
+                            if (dh.CheckExist("makeserial", "ms_status in (0,1,2,3) and  ms_" + (((CheckBox)list[step - 1]).Text == "网标" ? "NETCODE" : ((CheckBox)list[step - 1]).Text) + " ='" + inputValue.Text + "' and ms_id <>'" + ms_id + "'"))
                             {
                                 OperateResult.AppendText("<<" + ((CheckBox)list[step - 1]).Text + ":" + inputValue.Text + "错误,已被使用\n", Color.Red, inputValue);
                                 return;
@@ -206,7 +203,7 @@ namespace UAS_MES_NEW.Make
                             sb.Append("ms_" + (((CheckBox)list[step - 1]).Text == "网标" ? "NETCODE" : ((CheckBox)list[step - 1]).Text) + " = '" + inputValue.Text + "',");
                             toSi.Append("si_" + (((CheckBox)list[step - 1]).Text == "网标" ? "NETCODE" : ((CheckBox)list[step - 1]).Text) + " = '" + inputValue.Text + "',");
                             insertSninfoFields.Append("si_" + (((CheckBox)list[step - 1]).Text == "网标" ? "NETCODE" : ((CheckBox)list[step - 1]).Text) + ",");
-                            insertSninfoValues.Append("'"+inputValue.Text+"',");
+                            insertSninfoValues.Append("'" + inputValue.Text + "',");
                             oldData.Append("ms_" + (((CheckBox)list[step - 1]).Text == "网标" ? "NETCODE" : ((CheckBox)list[step - 1]).Text) + ":" + dt.Rows[0]["ms_" + (((CheckBox)list[step - 1]).Text == "网标" ? "NETCODE" : ((CheckBox)list[step - 1]).Text)].ToString() + ",");
                             newData.Append("ms_" + (((CheckBox)list[step - 1]).Text == "网标" ? "NETCODE" : ((CheckBox)list[step - 1]).Text) + ":" + inputValue.Text + ",");
                             break;
@@ -225,7 +222,7 @@ namespace UAS_MES_NEW.Make
                         //更新sninfo表
                         insert2Sninfo(sncode);
                         //记录日志
-                        LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, dt.Rows[0]["ms_makecode"].ToString(), User.UserLineCode, User.UserSourceCode, "更新烧录","原:"+oldData.ToString()+",新:" + newData.ToString(), sncode, "");
+                        LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, dt.Rows[0]["ms_makecode"].ToString(), User.UserLineCode, User.UserSourceCode, "更新烧录", "原:" + oldData.ToString() + ",新:" + newData.ToString(), sncode, "");
                         step = 0;
                         //清除规则
                         BaseUtil.CleanDataTableData(info);
@@ -302,15 +299,15 @@ namespace UAS_MES_NEW.Make
         private void insert2Sninfo(string sn)
         {
             //查询是否有记录
-            string siid = dh.getFieldDataByCondition("sninfo", "max(si_id) si_id", "si_sn='"+sn+"'").ToString();
+            string siid = dh.getFieldDataByCondition("sninfo", "max(si_id) si_id", "si_sn='" + sn + "'").ToString();
             //是否为空
             if (siid == "")
             {
                 //插入新的数据
                 sql.Clear();
-                sql.Append("insert into sninfo(si_id,si_sn,"+ insertSninfoFields.ToString().Substring(0, insertSninfoFields.ToString().Length - 1) + ") values ");
-                sql.Append("(sninfo_seq.nextval,'"+sn+"',"+ insertSninfoValues.ToString().Substring(0, insertSninfoValues.ToString().Length - 1) + ")");
-                dh.ExecuteSql(sql.GetString(),"insert");
+                sql.Append("insert into sninfo(si_id,si_sn," + insertSninfoFields.ToString().Substring(0, insertSninfoFields.ToString().Length - 1) + ") values ");
+                sql.Append("(sninfo_seq.nextval,'" + sn + "'," + insertSninfoValues.ToString().Substring(0, insertSninfoValues.ToString().Length - 1) + ")");
+                dh.ExecuteSql(sql.GetString(), "insert");
             }
             else
             {

+ 3 - 5
UAS_MES_JH/FunctionCode/OQC/OQC_BatchResultJudge.cs

@@ -1,12 +1,10 @@
 using System;
 using System.Data;
-using System.Windows.Forms;
 using System.Drawing;
-using UAS_MES_NEW.PublicMethod;
+using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
-using System.Text;
 using UAS_MES_NEW.Entity;
-using System.Collections.Generic;
+using UAS_MES_NEW.PublicMethod;
 
 namespace UAS_MES_NEW.OQC
 {
@@ -128,7 +126,7 @@ namespace UAS_MES_NEW.OQC
                 {
                     if (LogicHandler.OQCBatchJudge(ob_checkno.Text, User.UserSourceCode, "OK", "", User.UserCode, Remark.Text, out ReworkCode, out ErrorMessage))
                     {
-                        LogicHandler.DoCommandLog(Tag.ToString(),User.UserCode,"",User.UserLineCode,User.UserSourceCode,"通过批", "抽检批: "+ ob_checkno.Text+"通过","",ob_checkno.Text);
+                        LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, "", User.UserLineCode, User.UserSourceCode, "通过批", "抽检批: " + ob_checkno.Text + "通过", "", ob_checkno.Text);
                         OperateResult.AppendText(">>通过批成功\n", Color.Green);
                         GetBatch.PerformClick();
                     }

+ 0 - 3
UAS_MES_JH/FunctionCode/OQC/OQC_CheckNoSplit.cs

@@ -1,10 +1,7 @@
 using System;
 using System.Collections.Generic;
-using System.ComponentModel;
 using System.Data;
 using System.Drawing;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;

+ 0 - 2
UAS_MES_JH/FunctionCode/OQC/OQC_Inspection.cs

@@ -1,10 +1,8 @@
 using System;
 using System.Collections.Generic;
 using System.Data;
-using System.Text;
 using System.Drawing;
 using System.Windows.Forms;
-using UAS_MES_NEW.CustomControl.DataGrid_View;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;
 using UAS_MES_NEW.PublicMethod;

+ 0 - 1
UAS_MES_JH/FunctionCode/OQC/OQC_PlanMaintain.cs

@@ -2,7 +2,6 @@
 using System.Collections.Generic;
 using System.Data;
 using System.Drawing;
-using System.Text;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;

+ 1 - 3
UAS_MES_JH/FunctionCode/OQC/OQC_SamplingDataCollection.cs

@@ -2,9 +2,7 @@
 using System.Collections.Generic;
 using System.Data;
 using System.Drawing;
-using System.Text;
 using System.Windows.Forms;
-using UAS_MES_NEW.CustomControl.DataGrid_View;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;
 using UAS_MES_NEW.PublicMethod;
@@ -308,7 +306,7 @@ namespace UAS_MES_NEW.OQC
                             sql.Clear();
                             sql.Append("insert into makebad(mb_id,mb_makecode,mb_mscode,mb_sncode,mb_inman,mb_indate,mb_stepcode");
                             sql.Append(",mb_sourcecode,mb_badcode,mb_bgcode,mb_badtable,mb_soncode,mb_badname,mb_status,mb_bgname)");
-                            sql.Append("select makebad_seq.nextval,ma_code,ms_code,ms_sncode,'" + User.UserCode + "',sysdate,'" + User.CurrentStepCode + "','"+User.UserSourceCode+"',:bc_code,:bg_code,'',");
+                            sql.Append("select makebad_seq.nextval,ma_code,ms_code,ms_sncode,'" + User.UserCode + "',sysdate,'" + User.CurrentStepCode + "','" + User.UserSourceCode + "',:bc_code,:bg_code,'',");
                             sql.Append("sp_soncode,:bc_name,'0',:bg_name from make left join makeSerial on ms_makecode=ma_code left join stepProduct on ");
                             sql.Append("sp_mothercode=ma_prodcode and sp_stepcode=ms_nextstepcode where ms_sncode='" + sncode.Text + "' and ms_makecode='" + ob_makecode.Text + "'");
                             dh.BatchInsert(sql.GetString(), new string[] { "bc_code", "bg_code", "bc_name", "bg_name" }, bc_code.ToArray(), bg_code.ToArray(), bc_name.ToArray(), bg_name.ToArray());

+ 0 - 5
UAS_MES_JH/FunctionCode/Packing/Packing_BigBoxWeight.cs

@@ -1,14 +1,9 @@
 using LabelManager2;
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
 using System.Data;
 using System.Drawing;
 using System.IO;
 using System.IO.Ports;
-using System.Linq;
-using System.Text;
-using System.Text.RegularExpressions;
 using System.Threading;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;

+ 0 - 2
UAS_MES_JH/FunctionCode/Packing/Packing_CartonBoxSNWeigh.cs

@@ -1,11 +1,9 @@
 using LabelManager2;
-using Microsoft.Win32;
 using System;
 using System.Data;
 using System.Drawing;
 using System.IO;
 using System.IO.Ports;
-using System.Text;
 using System.Text.RegularExpressions;
 using System.Threading;
 using System.Windows.Forms;

+ 0 - 2
UAS_MES_JH/FunctionCode/Packing/Packing_CartonBoxWeigh.cs

@@ -1,11 +1,9 @@
 using LabelManager2;
-using Microsoft.Win32;
 using System;
 using System.Data;
 using System.Drawing;
 using System.IO;
 using System.IO.Ports;
-using System.Text;
 using System.Text.RegularExpressions;
 using System.Threading;
 using System.Windows.Forms;

Some files were not shown because too many files changed in this diff