|
@@ -90,12 +90,12 @@ namespace UAS_MES_NEW.Special
|
|
|
{
|
|
{
|
|
|
if (e.KeyCode == Keys.Enter)
|
|
if (e.KeyCode == Keys.Enter)
|
|
|
{
|
|
{
|
|
|
- DataTable dt = (DataTable)dh.ExecuteSql("select ms_sncode,ms_firstsn,ms_makecode,ms_id,ms_craftcode,ms_prodcode,ms_nextstepcode,ms_checkno from makeserial where ms_sncode='" + SN.Text + "' order by ms_id desc", "select");
|
|
|
|
|
|
|
+ DataTable dt = (DataTable)dh.ExecuteSql("select ms_sncode,ms_paststep,ms_firstsn,ms_makecode,ms_id,ms_craftcode,ms_prodcode,ms_nextstepcode,ms_checkno from makeserial where ms_sncode='" + SN.Text + "' order by ms_id desc", "select");
|
|
|
|
|
|
|
|
if (dt.Rows.Count == 0) { OperateResult.AppendText(">>" + SN.Text + "不存在\n", System.Drawing.Color.Red, SN); return; }
|
|
if (dt.Rows.Count == 0) { OperateResult.AppendText(">>" + SN.Text + "不存在\n", System.Drawing.Color.Red, SN); return; }
|
|
|
|
|
|
|
|
ms_id = dt.Rows[0]["ms_id"].ToString();
|
|
ms_id = dt.Rows[0]["ms_id"].ToString();
|
|
|
- string ms_checkno = dt.Rows[0]["ms_checkno"].ToString();
|
|
|
|
|
|
|
+ string ms_paststep = dt.Rows[0]["ms_paststep"].ToString();
|
|
|
string ms_nextstepcode = dt.Rows[0]["ms_nextstepcode"].ToString();
|
|
string ms_nextstepcode = dt.Rows[0]["ms_nextstepcode"].ToString();
|
|
|
string ms_makecode = dt.Rows[0]["ms_makecode"].ToString();
|
|
string ms_makecode = dt.Rows[0]["ms_makecode"].ToString();
|
|
|
string ms_firstsn = dt.Rows[0]["ms_firstsn"].ToString();
|
|
string ms_firstsn = dt.Rows[0]["ms_firstsn"].ToString();
|
|
@@ -104,7 +104,7 @@ namespace UAS_MES_NEW.Special
|
|
|
string ms_craftcode = dt.Rows[0]["ms_craftcode"].ToString();
|
|
string ms_craftcode = dt.Rows[0]["ms_craftcode"].ToString();
|
|
|
|
|
|
|
|
cr_code.Text = dt.Rows[0]["ms_craftcode"].ToString();
|
|
cr_code.Text = dt.Rows[0]["ms_craftcode"].ToString();
|
|
|
- //cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode + "' order by cd_stepno";
|
|
|
|
|
|
|
+ cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode + "' and instr('" + ms_paststep + "',cd_stepcode)>0 order by cd_stepno";
|
|
|
|
|
|
|
|
dt = (DataTable)dh.ExecuteSql("select cd_detno-1 cd_detno from craft left join craftdetail on cr_id=cd_crid where cr_prodcode='" + ms_prodcode + "' and cr_code='" + ms_craftcode + "' and cd_stepcode='" + ms_nextstepcode + "'", "select");
|
|
dt = (DataTable)dh.ExecuteSql("select cd_detno-1 cd_detno from craft left join craftdetail on cr_id=cd_crid where cr_prodcode='" + ms_prodcode + "' and cr_code='" + ms_craftcode + "' and cd_stepcode='" + ms_nextstepcode + "'", "select");
|
|
|
if (dt.Rows.Count == 0)
|
|
if (dt.Rows.Count == 0)
|