添加图片资源,修改插入逻辑错误,修改主功能循环跳转逻辑错误

This commit is contained in:
sc committed 2025-08-08 16:49:32 +08:00
commit ad765afbbd
35 files changed
+81 -66

No files matched your search

+5 -5
View File
@@ -81,19 +81,19 @@ namespace DyeingComputer.UserClass
SQLiteHelpers.Open(); //打开数据库
int r = 0;
string sql_script = "select * from WorkorderSteps where ProgramID = '" + workName + "'";
if (TechnologicalProcessView.sql != null) TechnologicalProcessView.sql.Clear(); //清空缓存
TechnologicalProcessView.sql = SQLiteHelpers.ExecuteDataSet(sql_script, null); //读取表写入缓存
// if (TechnologicalProcessView.sql != null) TechnologicalProcessView.sql.Clear(); //清空缓存
MainWindowViewModel.dt_TP = SQLiteHelpers.ExecuteDataSet(sql_script, null).Tables[0]; //读取表写入缓存
MainWindowViewModel.ProgramName = SQLiteHelpers.ExecuteScalar("select ProgramName from Workorder where ProgramID = '" + workName + "'", null).ToString();
SQLiteHelpers.Delete("RUN", null, null); //删除run信息
DataTable data_t = new DataTable();
data_t = TechnologicalProcessView.sql.Tables[0].Clone();
data_t = MainWindowViewModel.dt_TP.Clone();
data_t.Columns.Add("DYELOT", typeof(string)); //添加列
int a = TechnologicalProcessView.sql.Tables[0].Rows.Count;
int a = MainWindowViewModel.dt_TP.Rows.Count;
for (int i = 0; i < a; i++)
{
data_t.Clear();//清空
DataRow dt = TechnologicalProcessView.sql.Tables[0].Rows[i];//行转
DataRow dt = MainWindowViewModel.dt_TP.Rows[i];//行转
DataRow dr = data_t.NewRow();
dr.ItemArray = dt.ItemArray;
dr.BeginEdit(); //添加订单号