diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs
index 9e968ce..bfb0fdd 100644
--- a/Properties/Resources.Designer.cs
+++ b/Properties/Resources.Designer.cs
@@ -645,6 +645,15 @@ namespace DyeingComputer.Properties {
}
}
+ ///
+ /// 查找类似 Inspect 的本地化字符串。
+ ///
+ public static string Inspect {
+ get {
+ return ResourceManager.GetString("Inspect", resourceCulture);
+ }
+ }
+
///
/// 查找类似 Invalid features 的本地化字符串。
///
diff --git a/Properties/Resources.en-US.resx b/Properties/Resources.en-US.resx
index cea0a39..f3b5348 100644
--- a/Properties/Resources.en-US.resx
+++ b/Properties/Resources.en-US.resx
@@ -588,4 +588,7 @@
Subroutine
+
+ Waiting For Check
+
\ No newline at end of file
diff --git a/Properties/Resources.resx b/Properties/Resources.resx
index 7496fb7..f446f5a 100644
--- a/Properties/Resources.resx
+++ b/Properties/Resources.resx
@@ -588,4 +588,7 @@
Subroutine
+
+ Inspect
+
\ No newline at end of file
diff --git a/Properties/Resources.zh-CN.resx b/Properties/Resources.zh-CN.resx
index 9716b3f..67163f1 100644
--- a/Properties/Resources.zh-CN.resx
+++ b/Properties/Resources.zh-CN.resx
@@ -286,10 +286,10 @@
加注
- 呼叫输送
+ 呼叫輸送
- 呼叫准备
+ 等待輸送
呼叫操作员
@@ -588,4 +588,7 @@
副功能
+
+ 等待检查
+
\ No newline at end of file
diff --git a/Properties/Resources.zh-TW.resx b/Properties/Resources.zh-TW.resx
index e3096d9..363ab41 100644
--- a/Properties/Resources.zh-TW.resx
+++ b/Properties/Resources.zh-TW.resx
@@ -289,7 +289,7 @@
呼叫輸送
- 呼叫準備
+ 等待輸送
呼叫操作員
@@ -588,4 +588,7 @@
副功能
+
+ 等待檢查
+
\ No newline at end of file
diff --git a/UserClass/SQLDATA.cs b/UserClass/SQLDATA.cs
index 6dba347..e9dc214 100644
--- a/UserClass/SQLDATA.cs
+++ b/UserClass/SQLDATA.cs
@@ -16,6 +16,7 @@ namespace DyeingComputer.UserClass
{
private static SQLiteHelper SQLiteHelpers = null; //定义数据库
private readonly static string DBAddress = Environment.CurrentDirectory + "\\DataBase\\800COMPUTER.db"; //数据库路径
+
//WorkOrder表检查写入
public static bool WorkOrder(string WorkOrder, string ProgramName, string StartTime, string EndTime, string Time, string Remark,string lock_,string state,string ProgramID, string color,string dyelot)
{
@@ -113,16 +114,39 @@ namespace DyeingComputer.UserClass
public static bool Dyelot(DataTable Dyelot_)//领料单
{
- SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
- SQLiteHelpers.Open(); //打开数据库
- DataTable data_t = Dyelot_.Clone();
- int a = Dyelot_.Rows.Count;
- if (a < 1)
+ DataTable DyelotTable = new DataTable();
+ DyelotTable.Columns.Add("WorkOrder", Type.GetType("System.String"));
+ DyelotTable.Columns.Add("Dyelot", Type.GetType("System.String"));
+ DyelotTable.Columns.Add("Redye", Type.GetType("System.Int"));
+ DyelotTable.Columns.Add("Step", Type.GetType("System.Int"));
+ DyelotTable.Columns.Add("Tank", Type.GetType("System.Int"));
+ DyelotTable.Columns.Add("State", Type.GetType("System.Int"));
+ DyelotTable.Columns.Add("Machine", Type.GetType("System.String"));
+ DyelotTable.Columns.Add("ProductCode", Type.GetType("System.String"));
+ DyelotTable.Columns.Add("ProductName", Type.GetType("System.String"));
+ DyelotTable.Columns.Add("ProductType", Type.GetType("System.Int"));
+ DyelotTable.Columns.Add("Grams", Type.GetType("System.Double"));
+ DyelotTable.Columns.Add("Amount", Type.GetType("System.Double"));
+ string[] columnsToCopy = { "WorkOrder", "Dyelot", "Redye", "Step", "Tank", "State", "Machine",
+ "ProductCode", "ProductName", "ProductType", "Grams", "Amount"};
+ foreach (DataRow sourceRow in Dyelot_.Rows)
{
- SQLiteHelpers.Close();
- return false;
+ DataRow newRow = DyelotTable.NewRow();
+ foreach (string colName in columnsToCopy)
+ {
+ if (Dyelot_.Columns.Contains(colName))
+ {
+ newRow[colName] = sourceRow[colName];
+ }
+ }
+ DyelotTable.Rows.Add(newRow);
}
- string Dyelot = Dyelot_.Rows[0][0].ToString();
+ DataTable data_t = DyelotTable.Clone();
+ int a = DyelotTable.Rows.Count;
+ if (a < 1) return false;
+ string Dyelot = DyelotTable.Rows[0][0].ToString();
+ SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
+ SQLiteHelpers.Open(); //打开数据库
object n = SQLiteHelpers.ExecuteScalar("select * from Dyelot where Dyelot = " + Dyelot, null);
if (n != null)//如id存在着返回错误状态
{
@@ -133,7 +157,7 @@ namespace DyeingComputer.UserClass
{
data_t.Clear();//清空
DataRow dr = data_t.NewRow();
- dr.ItemArray = Dyelot_.Rows[i].ItemArray;
+ dr.ItemArray = DyelotTable.Rows[i].ItemArray;
data_t.Rows.InsertAt(dr, 0);
SQLiteHelpers.InsertData("Dyelot", SQLiteHelpers.DataTableToDictionary(data_t));//行插入
}
diff --git a/View/TechnologicalProcessView.xaml b/View/TechnologicalProcessView.xaml
index 238c2a8..43c0a8e 100644
--- a/View/TechnologicalProcessView.xaml
+++ b/View/TechnologicalProcessView.xaml
@@ -195,8 +195,8 @@
-
-
+
+