Explorar o código

添加新查询界面

callm %!s(int64=5) %!d(string=hai) anos
pai
achega
d35b4cbd2e

+ 24 - 2
UAS_MES_ODLF/PublicMethod/LogicHandler.cs

@@ -1,11 +1,13 @@
 using System;
 using System;
 using System.Collections.Generic;
 using System.Collections.Generic;
 using System.Data;
 using System.Data;
+using System.Drawing;
 using System.Text;
 using System.Text;
 using System.Windows;
 using System.Windows;
 using System.Windows.Forms;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;
 using UAS_MES_NEW.Entity;
+using UAS_MES_NEW.PublicForm;
 
 
 namespace UAS_MES_NEW.PublicMethod
 namespace UAS_MES_NEW.PublicMethod
 {
 {
@@ -178,9 +180,16 @@ namespace UAS_MES_NEW.PublicMethod
             oMsID = param[5];
             oMsID = param[5];
             oErrorMessage = param[6];
             oErrorMessage = param[6];
             if (oErrorMessage == "" || oErrorMessage == null || oErrorMessage == "null")
             if (oErrorMessage == "" || oErrorMessage == null || oErrorMessage == "null")
+            {
                 return true;
                 return true;
+            }
             else
             else
+            {
+                SetCheck set = new SetCheck("NG", Color.Red);
+                BaseUtil.SetFormCenter(set);
+                set.ShowDialog();
                 return false;
                 return false;
+            }
         }
         }
 
 
         public static void DoCommandLog(string iCaller, string iUserCode, string iMakeCode, string iLineCode, string iSourceCode, string iOperate, string iResult, string iSncode, string iCheckno)
         public static void DoCommandLog(string iCaller, string iUserCode, string iMakeCode, string iLineCode, string iSourceCode, string iOperate, string iResult, string iSncode, string iCheckno)
@@ -691,7 +700,20 @@ namespace UAS_MES_NEW.PublicMethod
 
 
         public static bool SetStepResult(string iMakeCode, string iSourceCode, string iSN, string iMPKind, string iResult, string iUserCode, out string oErrorMessage)
         public static bool SetStepResult(string iMakeCode, string iSourceCode, string iSN, string iMPKind, string iResult, string iUserCode, out string oErrorMessage)
         {
         {
-            return CS_SetResult(iMakeCode, iSourceCode, iSN, iUserCode, iResult, out oErrorMessage);
+            bool result = CS_SetResult(iMakeCode, iSourceCode, iSN, iUserCode, iResult, out oErrorMessage);
+            if (result)
+            {
+                SetCheck set = new SetCheck("OK", Color.Green);
+                BaseUtil.SetFormCenter(set);
+                set.ShowDialog();
+            }
+            else
+            {
+                SetCheck set = new SetCheck("NG", Color.Red);
+                BaseUtil.SetFormCenter(set);
+                set.ShowDialog();
+            }
+            return result;
         }
         }
 
 
         public static bool CS_SetResult(string iMakeCode, string iSourceCode, string iSN, string iUserCode, string iResult, out string oErrorMessage)
         public static bool CS_SetResult(string iMakeCode, string iSourceCode, string iSN, string iUserCode, string iResult, out string oErrorMessage)
@@ -776,7 +798,7 @@ namespace UAS_MES_NEW.PublicMethod
                 string ifng = dh.getFieldDataByCondition("oqcbatchdetail", "obd_ifng", "obd_sncode='" + iSnCode + "'").ToString();
                 string ifng = dh.getFieldDataByCondition("oqcbatchdetail", "obd_ifng", "obd_sncode='" + iSnCode + "'").ToString();
                 if (ifng == "-1")
                 if (ifng == "-1")
                 {
                 {
-                    dh.ExecuteSql("delete OQCITEMSAMPLES where ois_sncode = '" + iSnCode + "'","select");
+                    dh.ExecuteSql("delete OQCITEMSAMPLES where ois_sncode = '" + iSnCode + "'", "select");
                     dh.ExecuteSql("update oqcbatch set ob_nowcheckqty=ob_nowcheckqty-1,ob_ngqty =  ob_ngqty -1 where ob_checkno='" + checkno + "'", "update");
                     dh.ExecuteSql("update oqcbatch set ob_nowcheckqty=ob_nowcheckqty-1,ob_ngqty =  ob_ngqty -1 where ob_checkno='" + checkno + "'", "update");
                 }
                 }
                 dh.ExecuteSql("delete from oqcbatchdetail where obd_sncode='" + iSnCode + "'", "delete");
                 dh.ExecuteSql("delete from oqcbatchdetail where obd_sncode='" + iSnCode + "'", "delete");

+ 9 - 0
UAS_MES_ODLF/UAS_MES_ODLF.csproj

@@ -856,6 +856,12 @@
     <Compile Include="FunctionCode\Query\Query_DateRate.Designer.cs">
     <Compile Include="FunctionCode\Query\Query_DateRate.Designer.cs">
       <DependentUpon>Query_DateRate.cs</DependentUpon>
       <DependentUpon>Query_DateRate.cs</DependentUpon>
     </Compile>
     </Compile>
+    <Compile Include="FunctionCode\Query\Query_SN.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Query\Query_SN.Designer.cs">
+      <DependentUpon>Query_SN.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Query\Query_SpecialReport.cs">
     <Compile Include="FunctionCode\Query\Query_SpecialReport.cs">
       <SubType>Form</SubType>
       <SubType>Form</SubType>
     </Compile>
     </Compile>
@@ -1408,6 +1414,9 @@
     <EmbeddedResource Include="FunctionCode\Query\Query_DateRate.resx">
     <EmbeddedResource Include="FunctionCode\Query\Query_DateRate.resx">
       <DependentUpon>Query_DateRate.cs</DependentUpon>
       <DependentUpon>Query_DateRate.cs</DependentUpon>
     </EmbeddedResource>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Query\Query_SN.resx">
+      <DependentUpon>Query_SN.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Query\Query_SpecialReport.resx">
     <EmbeddedResource Include="FunctionCode\Query\Query_SpecialReport.resx">
       <DependentUpon>Query_SpecialReport.cs</DependentUpon>
       <DependentUpon>Query_SpecialReport.cs</DependentUpon>
     </EmbeddedResource>
     </EmbeddedResource>