|
@@ -1,11 +1,13 @@
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Data;
|
|
|
+using System.Drawing;
|
|
|
using System.Text;
|
|
|
using System.Windows;
|
|
|
using System.Windows.Forms;
|
|
|
using UAS_MES_NEW.DataOperate;
|
|
|
using UAS_MES_NEW.Entity;
|
|
|
+using UAS_MES_NEW.PublicForm;
|
|
|
|
|
|
namespace UAS_MES_NEW.PublicMethod
|
|
|
{
|
|
@@ -178,9 +180,16 @@ namespace UAS_MES_NEW.PublicMethod
|
|
|
oMsID = param[5];
|
|
|
oErrorMessage = param[6];
|
|
|
if (oErrorMessage == "" || oErrorMessage == null || oErrorMessage == "null")
|
|
|
+ {
|
|
|
return true;
|
|
|
+ }
|
|
|
else
|
|
|
+ {
|
|
|
+ SetCheck set = new SetCheck("NG", Color.Red);
|
|
|
+ BaseUtil.SetFormCenter(set);
|
|
|
+ set.ShowDialog();
|
|
|
return false;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
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)
|
|
|
{
|
|
|
- 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)
|
|
@@ -776,7 +798,7 @@ namespace UAS_MES_NEW.PublicMethod
|
|
|
string ifng = dh.getFieldDataByCondition("oqcbatchdetail", "obd_ifng", "obd_sncode='" + iSnCode + "'").ToString();
|
|
|
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("delete from oqcbatchdetail where obd_sncode='" + iSnCode + "'", "delete");
|