Merge branch 'master' of http://www.scserverddns.top:13000/sc/DyeingComputer
This commit is contained in:
commit
86c16ed3e9
1 file changed
+18
-2
@@ -204,8 +204,8 @@ namespace DyeingComputer.UserClass
|
||||
DataRow dr = TechnologicalProcessView.sql.Tables[0].NewRow();//添加表数据
|
||||
dr["ProgramID"] = ProgramID;
|
||||
dr["Program"] = ProgramNAME;
|
||||
|
||||
TechnologicalProcessView.sql.Tables[0].Rows.InsertAt(dr, d - 1);
|
||||
|
||||
int a = TechnologicalProcessView.sql.Tables[0].Rows.Count;
|
||||
for (int i = 0; i < a; i++)
|
||||
{
|
||||
@@ -298,10 +298,26 @@ namespace DyeingComputer.UserClass
|
||||
}
|
||||
|
||||
TechnologicalProcessView.SQLiteHelpers.Close(); //关闭连接
|
||||
}
|
||||
}//编辑
|
||||
else if (dat_821.GetValue("INSTRUCTION").ToString() == "DELETE")
|
||||
{
|
||||
int d = Convert.ToInt16(dat_821.GetValue("ID"));
|
||||
|
||||
int a = TechnologicalProcessView.sql.Tables[0].Rows.Count;
|
||||
if (a != d)//如果删除不是最后一行执行
|
||||
{
|
||||
TechnologicalProcessView.sql.Tables[0].Rows.RemoveAt(d - 1);
|
||||
|
||||
for (int i = 0; i < a; i++)
|
||||
{
|
||||
DataRow drt = TechnologicalProcessView.sql.Tables[0].Rows[i];
|
||||
drt.BeginEdit();
|
||||
drt["Step"] = i + 1;
|
||||
drt.EndEdit();
|
||||
}
|
||||
var _TechnologicalProcessView = Application.Current.Windows.Cast<UserControl>().FirstOrDefault(window => window is TechnologicalProcessView) as TechnologicalProcessView;//跨页面
|
||||
_TechnologicalProcessView.Grid.ItemsSource = TechnologicalProcessView.sql.Tables[0].DefaultView; //转换显示计划表
|
||||
}
|
||||
}
|
||||
client.SendAsync("SC821" + SYSKEY + SYSDAT);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user