忱 沈 4 years ago
parent
commit
4ae6df4e79
  1. 4
      Models/ProductProvider.cs
  2. 2
      View/StuffView.xaml.cs

4
Models/ProductProvider.cs

@ -24,8 +24,8 @@ namespace Models
if (t == null) return 0;
if (String.IsNullOrEmpty(t.ProductCode)) return 0;
db.Product.Add(t);
int count = db.SaveChanges();
return count;
int counti = db.SaveChanges();
return counti;
}
public List<Product> Select()

2
View/StuffView.xaml.cs

@ -48,7 +48,7 @@ namespace Audit.View
private void Button_Preservation(object sender, RoutedEventArgs e)//保存按钮事件
{
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 = 2;
if (string.IsNullOrEmpty(this.stuff_ProductCode.Text)) System.Windows.MessageBox.Show("ERR.C0101:无效的原料信息");//检查原料代码

Loading…
Cancel
Save