This commit is contained in:
sc committed 2022-03-06 13:11:10 +08:00
commit 4ae6df4e79
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -24,8 +24,8 @@ namespace Models
if (t == null) return 0; if (t == null) return 0;
if (String.IsNullOrEmpty(t.ProductCode)) return 0; if (String.IsNullOrEmpty(t.ProductCode)) return 0;
db.Product.Add(t); db.Product.Add(t);
int count = db.SaveChanges(); int counti = db.SaveChanges();
return count; return counti;
} }
public List<Product> Select() public List<Product> Select()
+1 -1
View File
@@ -48,7 +48,7 @@ namespace Audit.View
private void Button_Preservation(object sender, RoutedEventArgs e)//保存按钮事件 private void Button_Preservation(object sender, RoutedEventArgs e)//保存按钮事件
{ {
int int_stuff_ProductType = 0; int int_stuff_ProductType = 0;
if (this.stuff_ProductType.Text == "染料") int_stuff_ProductType = 0; if (this.stuff_ProductType.Text == "染料") int_stuff_ProductType = 0;//原料类型0。染料,1助剂,2粉体
if (this.stuff_ProductType.Text == "助剂") int_stuff_ProductType = 1; if (this.stuff_ProductType.Text == "助剂") int_stuff_ProductType = 1;
if (this.stuff_ProductType.Text == "粉体助剂") int_stuff_ProductType = 2; if (this.stuff_ProductType.Text == "粉体助剂") int_stuff_ProductType = 2;
if (string.IsNullOrEmpty(this.stuff_ProductCode.Text)) System.Windows.MessageBox.Show("ERR.C0101:无效的原料信息");//检查原料代码 if (string.IsNullOrEmpty(this.stuff_ProductCode.Text)) System.Windows.MessageBox.Show("ERR.C0101:无效的原料信息");//检查原料代码