|
|
@@ -64,6 +64,12 @@ namespace UAS_MES_NEW.Make
|
|
|
//Confirm.PerformClick();
|
|
|
}
|
|
|
|
|
|
+ private void toolingVal_Leave(object sender, EventArgs e)
|
|
|
+ {
|
|
|
+ KeyPressEventArgs newEvent = new KeyPressEventArgs((char)Keys.Enter);
|
|
|
+ toolingVal_KeyPress(toolingVal, newEvent);
|
|
|
+ }
|
|
|
+
|
|
|
private void toolingVal_KeyPress(object sender, KeyPressEventArgs e)
|
|
|
{
|
|
|
if (e.KeyChar != (char)Keys.Enter) return;
|
|
|
@@ -219,7 +225,7 @@ namespace UAS_MES_NEW.Make
|
|
|
{
|
|
|
//ShowMsg(MsgBox, 2, "Warning,钢网:" + toolingVal.Text + "使用次数接近上限");
|
|
|
DialogResult result = MessageBox.Show(this.ParentForm, $"Warning,{typeVal.Text}:{toolingVal.Text}使用次数接近上限,已使用{useCount},距离上限还有{(maxCount - useCount)}次", "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
|
|
|
- if (result == DialogResult.No) return;
|
|
|
+ if (result == DialogResult.No || result == DialogResult.Cancel) return;
|
|
|
}
|
|
|
|
|
|
dt = (DataTable)dh.ExecuteSql($"select ma_prodcode from make where ma_code='{ma_code.Text}'", "select");
|
|
|
@@ -282,7 +288,9 @@ namespace UAS_MES_NEW.Make
|
|
|
ShowMsg(MsgBox, 1, $"OK,{typeVal.Text}编号:{toolingVal.Text},已领用成功");
|
|
|
|
|
|
CleanDetail("Receive");
|
|
|
- toolingVal_KeyPress(null, null);
|
|
|
+
|
|
|
+ KeyPressEventArgs newEvent = new KeyPressEventArgs((char)Keys.Enter);
|
|
|
+ toolingVal_KeyPress(toolingVal, newEvent);
|
|
|
}
|
|
|
|
|
|
private void CleanDetail(string type)
|
|
|
@@ -386,12 +394,15 @@ namespace UAS_MES_NEW.Make
|
|
|
ShowMsg(MsgBox, 1, $"OK,{typeVal.Text}编号:{toolingVal.Text},已归还成功");
|
|
|
|
|
|
CleanDetail("Receive");
|
|
|
- toolingVal_KeyPress(null, null);
|
|
|
+
|
|
|
+ KeyPressEventArgs newEvent = new KeyPressEventArgs((char)Keys.Enter);
|
|
|
+ toolingVal_KeyPress(toolingVal, newEvent);
|
|
|
}
|
|
|
|
|
|
private void Scrap_Click(object sender, EventArgs e)
|
|
|
{
|
|
|
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
}
|