|
|
@@ -102,6 +102,19 @@ namespace UAS_MES.Make
|
|
|
OperateResult.AppendText(">>网标号不能为空\n", Color.Red);
|
|
|
return;
|
|
|
}
|
|
|
+ sql.Clear();
|
|
|
+ sql.Append("select psr_prefix,psr_length from productsnrelation where psr_prodcode = '" + ma_prodcode.Text + "' and psr_type = 'NETCODE'");
|
|
|
+ dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
|
|
|
+ if (dt.Rows.Count > 0) {
|
|
|
+ int psr_length = int.Parse(dt.Rows[0][1].ToString());
|
|
|
+ string psr_prefix = dt.Rows[0][0].ToString();
|
|
|
+ if (sncode.Text.Length != psr_length || sncode.Text.Substring(0,psr_prefix.Length).ToString() != psr_prefix) {
|
|
|
+ sncode.Text = "";
|
|
|
+ sncode.Focus();
|
|
|
+ OperateResult.AppendText("<<所输入网标不符合定义要求\n", Color.Red);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
OperateResult.AppendText("<<" + sncode.Text + "\n", Color.Green);
|
|
|
string ErrorMessage = "";
|
|
|
string result = "";
|