|
|
@@ -26,7 +26,6 @@ namespace UAS_MES_NEW.Special
|
|
|
private void Special_BoxSplit_Load(object sender, EventArgs e)
|
|
|
{
|
|
|
dh = SystemInf.dh;
|
|
|
-
|
|
|
}
|
|
|
|
|
|
string ms_id = "";
|
|
|
@@ -64,14 +63,16 @@ namespace UAS_MES_NEW.Special
|
|
|
{
|
|
|
if (e.KeyCode == Keys.Enter)
|
|
|
{
|
|
|
- DataTable dt = (DataTable)dh.ExecuteSql("select nvl(ms_isactive,0)ms_isactive,ms_id,ms_paststep,ms_craftcode,ms_prodcode,ms_checkno from makeserial where ms_sncode='" + SN.Text + "' order by ms_id desc", "select");
|
|
|
+ DataTable dt = (DataTable)dh.ExecuteSql("select nvl(ms_isactive,0)ms_isactive,ms_status,ms_id,ms_paststep,ms_craftcode,ms_prodcode,ms_checkno from makeserial where ms_sncode='" + SN.Text + "' order by ms_id desc", "select");
|
|
|
ms_id = "";
|
|
|
if (dt.Rows.Count == 0) { OperateResult.AppendText(">>" + SN.Text + "不存在\n", System.Drawing.Color.Red, SN); return; }
|
|
|
|
|
|
ms_id = dt.Rows[0]["ms_id"].ToString();
|
|
|
string ms_isactive = dt.Rows[0]["ms_isactive"].ToString();
|
|
|
+ string ms_status = dt.Rows[0]["ms_status"].ToString();
|
|
|
|
|
|
if (ms_isactive == "-1") { OperateResult.AppendText(">>" + SN.Text + "已激活\n", System.Drawing.Color.Red, SN); return; }
|
|
|
+ if (ms_status == "3") { OperateResult.AppendText(">>" + SN.Text + "处于待维修状态,不允许激活\n", System.Drawing.Color.Red, SN); return; }
|
|
|
}
|
|
|
}
|
|
|
}
|