Merge branch 'master' of http://www.scserverddns.top:13000/sc/formula_manage
This commit is contained in:
commit
1d6e6816f3
2 files changed
+21
-8
No files matched your search
+19
-7
@@ -486,6 +486,10 @@ namespace formula_manage
|
||||
{
|
||||
if (e.Key == Key.Enter)
|
||||
{
|
||||
System.Windows.Controls.ComboBox curComboBox = sender as System.Windows.Controls.ComboBox;
|
||||
string a = curComboBox.Text;
|
||||
if (a == "") return;
|
||||
|
||||
PressKey.PressKeys(Keys.Right, false);
|
||||
PressKey.PressKeys(Keys.Right, true);
|
||||
// PressKey.PressKeys(Keys.Up, false);
|
||||
@@ -505,18 +509,20 @@ namespace formula_manage
|
||||
private void CP_CONC_KeyUp(object sender, System.Windows.Input.KeyEventArgs e)//目标饱和度输入事件
|
||||
{
|
||||
double ang;
|
||||
double conc;
|
||||
double conc=0;
|
||||
|
||||
System.Windows.Controls.TextBox curTextBox = sender as System.Windows.Controls.TextBox;
|
||||
|
||||
if (!double.TryParse(curTextBox.Text, out ang) && curTextBox.Text != "")
|
||||
if (e.Key == Key.Enter)
|
||||
{
|
||||
if (!double.TryParse(curTextBox.Text, out ang))
|
||||
{
|
||||
System.Windows.MessageBox.Show("错误,重新输入");
|
||||
curTextBox.Text = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
conc = double.Parse(curTextBox.Text); //转换后判断数值输入是否异常
|
||||
if (curTextBox.Text != "") conc = double.Parse(curTextBox.Text); //转换后判断数值输入是否异常
|
||||
if (conc > 100)
|
||||
{
|
||||
System.Windows.MessageBox.Show("比例错误");
|
||||
@@ -524,8 +530,6 @@ namespace formula_manage
|
||||
return;
|
||||
}
|
||||
|
||||
if (e.Key == Key.Enter)
|
||||
{
|
||||
PressKey.PressKeys(Keys.Left, false);
|
||||
PressKey.PressKeys(Keys.Left, true);
|
||||
PressKey.PressKeys(Keys.Tab, false);
|
||||
@@ -535,20 +539,28 @@ namespace formula_manage
|
||||
row = RRODUCTdataTable.NewRow();
|
||||
ID_N++;
|
||||
row["ID"] = ID_N;
|
||||
row["STEP"] = "1";
|
||||
row["UNIT"] = "g";
|
||||
// row["STEP"] = Procedures_P.Text;
|
||||
RRODUCTdataTable.Rows.Add(row);
|
||||
}
|
||||
|
||||
DataGridHelper.SetRealTimeCommit(Grid_RRODUCT, true); //实时更新datagrid
|
||||
}
|
||||
}
|
||||
} //目标饱和度输入事件
|
||||
|
||||
private void CP_PRODUCT_CODE_LostFocus(object sender, RoutedEventArgs e)
|
||||
{
|
||||
System.Windows.Controls.ComboBox curComboBox = sender as System.Windows.Controls.ComboBox;
|
||||
string a = curComboBox.Text;
|
||||
MainWindowViewModel.STUFFdatatemp.Select("ProductCode ='"+ a +"'");
|
||||
|
||||
DataTable data = null;
|
||||
if (a != "")
|
||||
{
|
||||
data = MainWindowViewModel.STUFFdatatemp.Select("ProductCode ='" + a + "'").CopyToDataTable();
|
||||
//Grid_RRODUCT.ItemsSource = data.Columns.//Add("ProductName").ToString();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -95,7 +95,6 @@ namespace formula_manage.ViewModel
|
||||
Dissolve_data.Fill(DissolvedataTable); //Dissolve_data查询结果存入缓存
|
||||
|
||||
conn_SC.Close(); //关闭连接
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
@@ -113,6 +112,8 @@ namespace formula_manage.ViewModel
|
||||
mac_Machine = ToObservableCollection<Machine>(MACHINEdataTable);
|
||||
flow_Workflow = ToObservableCollection<Workflow>(DissolvedataTable);
|
||||
|
||||
STUFFdatatemp = STUFFdataTable;
|
||||
|
||||
}
|
||||
|
||||
public ObservableCollection<Product> stuff_Product { get; set; } //stuff_Product动态表实力化
|
||||
|
||||
Reference in new issue
Block a user