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