This commit is contained in:
sc committed 2024-12-02 23:29:02 +08:00
commit 2794a1e9ed
2 files changed
+136 -16

No files matched your search

+14 -7
View File
@@ -46,8 +46,8 @@ namespace DyeingComputer.View
public static object workName;
public static string Program_Name;
private SQLiteHelper SQLiteHelpers = null; //定义数据库
private readonly string DBAddress = Environment.CurrentDirectory + "\\DataBase\\800COMPUTER.db"; //数据库路径
public static SQLiteHelper SQLiteHelpers = null; //定义数据库
public static readonly string DBAddress = Environment.CurrentDirectory + "\\DataBase\\800COMPUTER.db"; //数据库路径
public static DataSet sql; //内存数据缓存
private void TechnologicalProcess_Import()
@@ -145,8 +145,8 @@ namespace DyeingComputer.View
}
private void Address_ButtonClicked(object sender, AddressUpdateEventArgs e)//编辑返回结果
{
int n = StrToInt.To16Convert10(ID);
int n = Convert.ToInt16(ID);
ID=null;
DataRow dr = sql.Tables[0].Rows[n - 1];
dr.BeginEdit();
dr["StepID"] = e.StepID;
@@ -223,16 +223,23 @@ namespace DyeingComputer.View
SQLiteHelpers.Close();
if (ID != null) { d = StrToInt.To16Convert10(ID); } else { return; }
if (ID != null) { d = Convert.ToInt16(ID); } else { return; }
DataRow dr = sql.Tables[0].NewRow();//添加表数据
dr["ProgramID"] = ProgramID;
dr["Program"] = ProgramNAME;
sql.Tables[0].Rows.InsertAt(dr, d - 1);
ID = null;
// ID = null;
Dat();
Grid.ItemsSource = sql.Tables[0].DefaultView; //转换显示计划表
if (string.IsNullOrEmpty(Numder)) { Numder = null; P1 = "0"; P2 = "0"; P3 = "0"; P4 = "0"; P5 = "0"; }
if (ID == null) ID = sql.Tables[0].Rows.Count.ToString();
ViewStep viewstop = new ViewStep(null, "0", "0", "0", "0", "0");
viewstop.data = ID;
viewstop.AddressUpdated += new ViewStep.AddressUpdateHandler(Address_ButtonClicked);
viewstop.ShowDialog();
//Grid.ItemsSource = sql.Tables[0].DefaultView; //转换显示计划表
}
string Numder = null;