|
|
@@ -1293,7 +1293,7 @@ namespace UAS_MES_NEW.PublicMethod
|
|
|
if (iIfRepeat != "-1")
|
|
|
{
|
|
|
//判定条码是否已经上料了
|
|
|
- dt = (DataTable)dh.ExecuteSql("select cm_barcode from craftmaterial where cm_barcode='" + iSN + "' and cm_status=0", "select");
|
|
|
+ dt = (DataTable)dh.ExecuteSql("select cm_barcode from craftmaterial where cm_barcode=:sn and cm_status=0", "select", iSN);
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
ErrMessage = "条码" + iSN + "已经上料";
|
|
|
@@ -1302,14 +1302,14 @@ namespace UAS_MES_NEW.PublicMethod
|
|
|
}
|
|
|
if (iEdiStatus == "-1")
|
|
|
{
|
|
|
- dt = (DataTable)dh.ExecuteSql("select cm_barcode from craftmaterial where cm_barcode='" + iSN + "' and cm_sncode='" + iMsSncode + "' and cm_status=-1", "select");
|
|
|
+ dt = (DataTable)dh.ExecuteSql("select cm_barcode from craftmaterial where cm_barcode=:sn and cm_sncode='" + iMsSncode + "' and cm_status=-1", "select", iSN);
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
ErrMessage = "条码" + iSN + "之前未上料,不允许绑定";
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
- dt = (DataTable)dh.ExecuteSql("select bar_prodcode,bar_code from barcode where bar_code='" + iSN + "'", "select");
|
|
|
+ dt = (DataTable)dh.ExecuteSql("select bar_prodcode,bar_code from barcode where bar_code=:sn", "select", iSN);
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
string bar_prodcode = dt.Rows[0]["bar_prodcode"].ToString();
|