|
|
@@ -1632,10 +1632,12 @@ namespace UAS_LabelMachine
|
|
|
private void CustomerLabel_Click(object sender, EventArgs e)
|
|
|
{
|
|
|
sql.Clear();
|
|
|
- sql.Append("update prodiobarcode set pib_custbarcode=('SL'||pib_custbarcode),");
|
|
|
- sql.Append("pib_custoutboxcode=('SC'||pib_custoutboxcode) where pib_inoutno='" + pi_inoutno.Text + "'");
|
|
|
+ sql.Append("update prodiobarcode set pib_custbarcode=case when instr(pib_custbarcode,'SL')=0 ");
|
|
|
+ sql.Append("then ('SL'||pib_custbarcode)else pib_custbarcode end, pib_custoutboxcode=case when instr");
|
|
|
+ sql.Append("(pib_custoutboxcode,'SC')=0 then ('SC'||pib_custoutboxcode)else pib_custoutboxcode end where pib_inoutno='" + pi_inoutno.Text + "'");
|
|
|
dh.ExecuteSql(sql.ToString(), "select");
|
|
|
LoadGridData(sender, e);
|
|
|
+ CustomerLabel.Enabled = false;
|
|
|
}
|
|
|
}
|
|
|
}
|