|
|
@@ -54,7 +54,7 @@ namespace UAS_MES.Make
|
|
|
li_code.FormName = Name;
|
|
|
li_code.SetValueField = new string[] { "li_code", "li_name" };
|
|
|
li_code.DbChange += Li_code_DbChange;
|
|
|
- ma_code.Focus();
|
|
|
+ ma_code.Controls["TextBox"].Focus();
|
|
|
}
|
|
|
|
|
|
private void Li_code_DbChange(object sender, EventArgs e)
|
|
|
@@ -169,7 +169,7 @@ namespace UAS_MES.Make
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
string status = dt.Rows[0]["ST_USESTATUS"].ToString();
|
|
|
- if (status == "在仓")
|
|
|
+ if (status == "在仓" || status == "借出")
|
|
|
{
|
|
|
MessageBox.Show("当前钢网" + SU_DEVCODE.Text + "未在线,无需归还");
|
|
|
return;
|
|
|
@@ -191,7 +191,7 @@ namespace UAS_MES.Make
|
|
|
if (int.Parse(st_combinenumber.Text) >= 0)
|
|
|
{
|
|
|
sql.Clear();
|
|
|
- sql.Append("update StencilUse set SU_BACKDATE=sysdate,su_returnman='"+dt.Rows[0]["em_name"].ToString() +"',su_returnmancode='" + em_code1.Text + "',");
|
|
|
+ sql.Append("update StencilUse set SU_BACKDATE=sysdate,su_returnman='" + dt.Rows[0]["em_name"].ToString() + "',su_returnmancode='" + em_code1.Text + "',");
|
|
|
sql.Append("SU_THISUSETIMES='" + (st_combinenumber.Text == "" ? "0" : st_combinenumber.Text) + "',SU_STATUS='借出',su_usecount=" + (St_USECOUNT == "" ? "0" : St_USECOUNT) + "+" + st_combinenumber.Text);
|
|
|
sql.Append(",SU_RETURNIFCLEAN='" + (SU_RETURNIFCLEAN.Checked ? "-1" : "0") + "' where su_id=(select max(su_id) from stenciluse where su_stcode='" + SU_DEVCODE1.Text + "' and su_status='在线')");
|
|
|
dh.ExecuteSql(sql.ToString(), "update");
|
|
|
@@ -291,7 +291,7 @@ namespace UAS_MES.Make
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- st_combinenumber.Text = (int.Parse(ma_qty.Text) / int.Parse(dt.Rows[0][0].ToString())).ToString();
|
|
|
+ st_combinenumber.Text = (Math.Ceiling(decimal.Parse(ma_qty.Text) / decimal.Parse(dt.Rows[0][0].ToString()))).ToString();
|
|
|
}
|
|
|
catch (Exception)
|
|
|
{
|