diff --git a/View/HistoryRecordsView.xaml b/View/HistoryRecordsView.xaml
index 787b3e1..dc439dc 100644
--- a/View/HistoryRecordsView.xaml
+++ b/View/HistoryRecordsView.xaml
@@ -10,55 +10,53 @@
d:DataContext="{d:DesignInstance Type=viewmodel:HistoryRecordsViewModel}"
d:DesignHeight="630" d:DesignWidth="1280">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/View/ParameterSetView.xaml b/View/ParameterSetView.xaml
index c8f7a15..55b08f2 100644
--- a/View/ParameterSetView.xaml
+++ b/View/ParameterSetView.xaml
@@ -9,49 +9,48 @@
mc:Ignorable="d" Loaded="UserControl_Loaded"
d:DesignHeight="630" d:DesignWidth="1280">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/View/ProgramgroupView.xaml b/View/ProgramgroupView.xaml
index d5b0554..d333cf8 100644
--- a/View/ProgramgroupView.xaml
+++ b/View/ProgramgroupView.xaml
@@ -15,52 +15,50 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/View/ProgramstepsView .xaml b/View/ProgramstepsView .xaml
index 9d817b9..ef941cf 100644
--- a/View/ProgramstepsView .xaml
+++ b/View/ProgramstepsView .xaml
@@ -21,115 +21,113 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/View/SysSetView.xaml b/View/SysSetView.xaml
index 10f9489..9829e92 100644
--- a/View/SysSetView.xaml
+++ b/View/SysSetView.xaml
@@ -8,49 +8,47 @@
mc:Ignorable="d" Loaded="UserControl_Loaded"
d:DesignHeight="630" d:DesignWidth="1280">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/View/TechnologicalProcessView.xaml b/View/TechnologicalProcessView.xaml
index fbe0930..035445c 100644
--- a/View/TechnologicalProcessView.xaml
+++ b/View/TechnologicalProcessView.xaml
@@ -112,21 +112,21 @@
-
+
-
+
-
+
diff --git a/View/WorkOrderView.xaml.cs b/View/WorkOrderView.xaml.cs
index 91df483..e1a8c4c 100644
--- a/View/WorkOrderView.xaml.cs
+++ b/View/WorkOrderView.xaml.cs
@@ -132,7 +132,7 @@ namespace DyeingComputer.View
viewProgram.AddressUpdated += new ViewProgram.AddressUpdateHandler(Address_ButtonClicked);
viewProgram.ShowDialog();
}
- private void Address_ButtonClicked(object sender, AddressUpdateEventArgs e)//编辑返回结果
+ private void Address_ButtonClicked(object sender, AddressUpdateEventArgs e)//新建返回结果
{
SQL_UPDATE = false;
@@ -157,7 +157,29 @@ namespace DyeingComputer.View
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
SQLiteHelpers.Open(); //打开数据库
+ /*插入表头信息*/
SQLiteHelpers.InsertData("WorkOrder", WorkOrder_new);//
+ /*获取转并插入步骤信息*/
+ DataTable step_dat = SQLiteHelpers.ExecuteDataSet(
+ "select * from ProgramSteps where ProgramID='" + Process_id + "'", null).Tables[0]; //读取表写入缓存
+ DataTable _t = step_dat.Clone();
+ _t.Columns.Add("WorkOrder", System.Type.GetType("System.String"));
+ _t.Columns.Add("DYELOT", System.Type.GetType("System.String"));
+ int a = step_dat.Rows.Count;
+ for (int i = 0; i < a; i++)
+ {
+ _t.Clear();//清空
+ DataRow dt = step_dat.Rows[i];//行转
+ DataRow dr = _t.NewRow();
+ dr.ItemArray = dt.ItemArray;
+ dr.BeginEdit(); //添加订单号
+ dr["WorkOrder"] = WorkOrder_Numder;
+ dr["DYELOT"] = WorkOrder_Numder;
+ dr.EndEdit();
+ _t.Rows.InsertAt(dr, 0); //行转换
+
+ SQLiteHelpers.InsertData("WorkorderSteps", SQLiteHelpers.DataTableToDictionary(_t));//行插入
+ }
SQLiteHelpers.Close();
}
private void WorkOrderView_del_Click(object sender, RoutedEventArgs e)//删除按钮
@@ -234,7 +256,9 @@ namespace DyeingComputer.View
dataGrid.Columns.Add(new DataGridTextColumn() { Header = Properties.Resources.Step, Width = 60, Binding = new Binding("Step") });
dataGrid.Columns.Add(new DataGridTextColumn() { Header = Properties.Resources.Directives, Width = 300, Binding = new Binding("StepName") });
dataGrid.Columns.Add(new DataGridTextColumn() { Header = Properties.Resources.ParameterSet, Width = 500, Binding = new Binding("ParameterName") });
- dataGrid.Columns.Add(new DataGridTextColumn() { Header = Properties.Resources.Remark, Width = Picture.ActualWidth - 885, Binding = new Binding("Remark") });
+ dataGrid.Columns.Add(new DataGridTextColumn() { Header = Properties.Resources.Subroutine +1, Width = 300, Binding = new Binding("StepName_S1") });
+ dataGrid.Columns.Add(new DataGridTextColumn() { Header = Properties.Resources.Subroutine +2, Width = 300, Binding = new Binding("StepName_S2") });
+ dataGrid.Columns.Add(new DataGridTextColumn() { Header = Properties.Resources.Subroutine +3, Width = 300, Binding = new Binding("StepName_S3") });
dataGrid.AutoGenerateColumns = false;
dataGrid.CanUserReorderColumns = false;
dataGrid.CanUserSortColumns = false;