|
|
|
@ -1,4 +1,5 @@ |
|
|
|
using System; |
|
|
|
using GalaSoft.MvvmLight; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Linq; |
|
|
|
using System.Text; |
|
|
|
@ -16,6 +17,7 @@ using System.Windows.Forms; |
|
|
|
using System.Drawing; |
|
|
|
using System.Text.RegularExpressions; |
|
|
|
using Models; |
|
|
|
using Audit.ViewModel; |
|
|
|
|
|
|
|
namespace Audit.View |
|
|
|
{ |
|
|
|
@ -44,7 +46,6 @@ namespace Audit.View |
|
|
|
} |
|
|
|
|
|
|
|
private Product product = new Product(); |
|
|
|
|
|
|
|
private void Button_Preservation(object sender, RoutedEventArgs e)//保存按钮事件
|
|
|
|
{ |
|
|
|
int int_stuff_ProductType = 0; |
|
|
|
@ -72,16 +73,16 @@ namespace Audit.View |
|
|
|
product.GRAVITY = Double.Parse(this.stuff_GRAVITY.Text);//写入原料比重
|
|
|
|
product.Concentration = Double.Parse(this.stuff_Concentration.Text);//写入原料浓度
|
|
|
|
product.ProductType = int_stuff_ProductType;//写入原料类型
|
|
|
|
var count = new ProductProvider().Insert(product);//实例化并添加数据库信息。
|
|
|
|
if (count == 0)//判断执行是否成功
|
|
|
|
{ |
|
|
|
var count = new ProductProvider().Insert(product);//实例化并添加数据库信息。
|
|
|
|
if (count == 0)//判断执行是否成功
|
|
|
|
{ |
|
|
|
System.Windows.MessageBox.Show("ERR.C0110-1:添加失败"); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
System.Windows.MessageBox.Show("添加完成"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
System.Windows.MessageBox.Show("添加完成"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private void Button_Delete(object sender, RoutedEventArgs e) |
|
|
|
@ -130,6 +131,7 @@ namespace Audit.View |
|
|
|
///存储色彩变量
|
|
|
|
/// </summary>
|
|
|
|
public static int ColorCode_SQL; |
|
|
|
|
|
|
|
private void Stuff_Color_MouseDoubleClick(object sender, MouseButtonEventArgs e)//色彩框双击事件
|
|
|
|
{ |
|
|
|
|
|
|
|
|