原料代码输入判定
This commit is contained in:
commit
be7cfcdcaf
1 file changed
+9
-2
+9
-2
@@ -653,7 +653,7 @@ namespace formula_manage
|
||||
if (grid_row == -1) grid_row = 0;
|
||||
|
||||
Code_ = curComboBox.Text.TrimEnd();
|
||||
if (Code_ == "")
|
||||
if ((Code_ == "") && (grid_row != 0))
|
||||
{
|
||||
if (Procedures_N.Text == Procedures_P.Text)
|
||||
{
|
||||
@@ -671,7 +671,6 @@ namespace formula_manage
|
||||
PressKey.PressKeys(Keys.Tab, false);
|
||||
PressKey.PressKeys(Keys.Tab, true);
|
||||
return;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -764,6 +763,14 @@ namespace formula_manage
|
||||
|
||||
System.Windows.Controls.TextBox curTextBox = sender as System.Windows.Controls.TextBox;
|
||||
int grid_row = Grid_RRODUCT.SelectedIndex; //获取当前行
|
||||
int ID_ = grid_row + 1;
|
||||
|
||||
DataRow[] c = RRODUCTdataTable.Select("PRODUCT_CODE is null and ID = '" + ID_ + "'");//查询判断原料代码是否重复
|
||||
if (c.Any())
|
||||
{
|
||||
System.Windows.MessageBox.Show("先选择原料");
|
||||
return;
|
||||
}
|
||||
|
||||
if (e.Key == Key.Enter)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user