diff --git a/ConvertMoels/RowToIndexConverter.cs b/ConvertMoels/RowToIndexConverter.cs
new file mode 100644
index 0000000..4522d8f
--- /dev/null
+++ b/ConvertMoels/RowToIndexConverter.cs
@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Controls;
+using System.Windows.Data;
+
+namespace DyeingComputer.ConvertMoels
+{
+ ///
+ /// 序号转换器
+ /// 获取DataGrid的行号 , 转换为对应的序号
+ ///
+ internal class RowToIndexConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ {
+ DataGridRow row = value as DataGridRow;
+ if (row != null)
+ return row.GetIndex() + 1;
+ else
+ return -1;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/DyeingComputer.csproj b/DyeingComputer.csproj
index c5ea206..40233cc 100644
--- a/DyeingComputer.csproj
+++ b/DyeingComputer.csproj
@@ -64,6 +64,7 @@
+
True
diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs
index f342bc2..61b9b94 100644
--- a/Properties/Resources.Designer.cs
+++ b/Properties/Resources.Designer.cs
@@ -213,6 +213,15 @@ namespace DyeingComputer.Properties {
}
}
+ ///
+ /// 查找类似 Insert 的本地化字符串。
+ ///
+ public static string Insert {
+ get {
+ return ResourceManager.GetString("Insert", resourceCulture);
+ }
+ }
+
///
/// 查找类似 LineUp 的本地化字符串。
///
@@ -303,6 +312,15 @@ namespace DyeingComputer.Properties {
}
}
+ ///
+ /// 查找类似 Recover 的本地化字符串。
+ ///
+ public static string Recover {
+ get {
+ return ResourceManager.GetString("Recover", resourceCulture);
+ }
+ }
+
///
/// 查找类似 Redye 的本地化字符串。
///
@@ -330,6 +348,15 @@ namespace DyeingComputer.Properties {
}
}
+ ///
+ /// 查找类似 Save 的本地化字符串。
+ ///
+ public static string Save {
+ get {
+ return ResourceManager.GetString("Save", resourceCulture);
+ }
+ }
+
///
/// 查找类似 StartTime 的本地化字符串。
///
diff --git a/Properties/Resources.en-US.resx b/Properties/Resources.en-US.resx
index 7dcd64f..5534ca0 100644
--- a/Properties/Resources.en-US.resx
+++ b/Properties/Resources.en-US.resx
@@ -237,4 +237,13 @@
Code
+
+ Recover
+
+
+ Insert
+
+
+ Save
+
\ No newline at end of file
diff --git a/Properties/Resources.resx b/Properties/Resources.resx
index 323762b..dd45444 100644
--- a/Properties/Resources.resx
+++ b/Properties/Resources.resx
@@ -237,4 +237,13 @@
ID
+
+ Insert
+
+
+ Recover
+
+
+ Save
+
\ No newline at end of file
diff --git a/Properties/Resources.zh-CN.resx b/Properties/Resources.zh-CN.resx
index 0b483ca..de6bd3a 100644
--- a/Properties/Resources.zh-CN.resx
+++ b/Properties/Resources.zh-CN.resx
@@ -237,4 +237,13 @@
代码
+
+ 恢复
+
+
+ 插入
+
+
+ 保存
+
\ No newline at end of file
diff --git a/Properties/Resources.zh-TW.resx b/Properties/Resources.zh-TW.resx
index a386d1a..e4ef165 100644
--- a/Properties/Resources.zh-TW.resx
+++ b/Properties/Resources.zh-TW.resx
@@ -237,4 +237,13 @@
代碼
+
+ 恢復
+
+
+ 插入
+
+
+ 儲存
+
\ No newline at end of file
diff --git a/View/ProgramgroupView.xaml b/View/ProgramgroupView.xaml
index daaa384..002349d 100644
--- a/View/ProgramgroupView.xaml
+++ b/View/ProgramgroupView.xaml
@@ -50,8 +50,6 @@
-
-
diff --git a/View/ProgramgroupView.xaml.cs b/View/ProgramgroupView.xaml.cs
index 14cf731..26be57b 100644
--- a/View/ProgramgroupView.xaml.cs
+++ b/View/ProgramgroupView.xaml.cs
@@ -59,7 +59,6 @@ namespace DyeingComputer.View
if (Programgroup_ID == null) return;
container.Content = new ProgramstepsView();
-
}
private void ProgramgroupView_new_Click(object sender, RoutedEventArgs e)//新建按钮
@@ -167,8 +166,9 @@ namespace DyeingComputer.View
Programgroup_ID = null;
}
- string Programgroup_Numder = null;
- string Programgroup_ID = null;
+ public static string Programgroup_Numder { get; set; }
+ public static string Programgroup_ID { get; set; }
+
private void Grid_SelectionChanged(object sender, SelectionChangedEventArgs e)//表格选择事件
{
int rownum = Grid.SelectedIndex;//获取鼠标选中行并定义变量
diff --git a/View/ProgramstepsView .xaml b/View/ProgramstepsView .xaml
index ca7613a..af70d1d 100644
--- a/View/ProgramstepsView .xaml
+++ b/View/ProgramstepsView .xaml
@@ -5,16 +5,21 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:DyeingComputer.View"
xmlns:lang="clr-namespace:DyeingComputer.Properties"
+ xmlns:ConvertMoels="clr-namespace:DyeingComputer.ConvertMoels"
mc:Ignorable="d"
d:DesignHeight="630" d:DesignWidth="1280" HorizontalAlignment="Left">
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/View/ProgramstepsView .xaml.cs b/View/ProgramstepsView .xaml.cs
index 7d4c1f9..732a291 100644
--- a/View/ProgramstepsView .xaml.cs
+++ b/View/ProgramstepsView .xaml.cs
@@ -30,6 +30,11 @@ namespace DyeingComputer.View
public ProgramstepsView()
{
InitializeComponent();
+
+ ProgramID = ProgramgroupView.Programgroup_ID;
+ ProgramNAME = ProgramgroupView.Programgroup_Numder;
+ this.p_title.Text = ProgramNAME;
+
Programgroup_sql();
}
@@ -37,16 +42,19 @@ namespace DyeingComputer.View
private readonly string DBAddress = Environment.CurrentDirectory + "\\DataBase\\800COMPUTER.db"; //数据库路径
DataSet sql; //内存数据缓存
+ string ProgramID;
+ string ProgramNAME;
+
public void Programgroup_sql()
{
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
SQLiteHelpers.Open(); //打开数据库
- string sql_script = "select * from ProgramName order by ProgramID desc";
+ string sql_script = "select * from ProgramSteps where ProgramID='"+ ProgramID + "' order by Step desc";
if (sql != null) sql.Clear(); //清空缓存
sql = SQLiteHelpers.ExecuteDataSet(sql_script, null); //读取计划表写入缓存
- // if (sql != null) Grid.ItemsSource = sql.Tables[0].DefaultView; //转换显示计划表
+ if (sql != null) Grid.ItemsSource = sql.Tables[0].DefaultView; //转换显示计划表
SQLiteHelpers.Close(); //关闭连接
@@ -54,16 +62,37 @@ namespace DyeingComputer.View
//System.GC.Collect();
}
- string Programgroup_Numder = null;
- string Programgroup_ID = null;
+ string Numder = null;
+ string ID = null;
private void Grid_SelectionChanged(object sender, SelectionChangedEventArgs e)//表格选择事件
{
int rownum = Grid.SelectedIndex;//获取鼠标选中行并定义变量
if (rownum != -1)//判断鼠标定位是否有效
{
- Programgroup_ID = (Grid.Columns[0].GetCellContent(Grid.Items[rownum]) as TextBlock).Text;//定位第0列,
- Programgroup_Numder = (Grid.Columns[1].GetCellContent(Grid.Items[rownum]) as TextBlock).Text;//定位第1列,
+ ID = (Grid.Columns[0].GetCellContent(Grid.Items[rownum]) as TextBlock).Text;//定位第0列,
+ Numder = (Grid.Columns[1].GetCellContent(Grid.Items[rownum]) as TextBlock).Text;//定位第1列,
}
}
+
+ private void ProgramgroupView_edit_Click(object sender, RoutedEventArgs e)//
+ {
+
+ }
+ private void ProgramgroupView_Recover_Click(object sender, RoutedEventArgs e)//
+ {
+
+ }
+ private void ProgramgroupView_del_Click(object sender, RoutedEventArgs e)//
+ {
+
+ }
+ private void ProgramgroupView_Insert_Click(object sender, RoutedEventArgs e)//
+ {
+
+ }
+ private void ProgramgroupView_Save_Click(object sender, RoutedEventArgs e)//
+ {
+
+ }
}
}
diff --git a/View/WorkOrderView.xaml b/View/WorkOrderView.xaml
index 9754429..7011ddb 100644
--- a/View/WorkOrderView.xaml
+++ b/View/WorkOrderView.xaml
@@ -62,7 +62,6 @@
-