|
@ -179,23 +179,14 @@ namespace DyeingComputer.UserClass |
|
|
{ |
|
|
{ |
|
|
DataTable WorkOrder_dat; |
|
|
DataTable WorkOrder_dat; |
|
|
WorkOrder_dat = SerializeConvert.JsonDeserializeFromString<DataTable>(SYSDAT); |
|
|
WorkOrder_dat = SerializeConvert.JsonDeserializeFromString<DataTable>(SYSDAT); |
|
|
bool dat_w = SQLDATA.WorkOderStep(WorkOrder_dat); |
|
|
MainWindow.SQLiteHelpers.InsertData("WorkorderSet", |
|
|
if (!dat_w) |
|
|
MainWindow.SQLiteHelpers.DataTableToDictionary(WorkOrder_dat));//行插入
|
|
|
{ |
|
|
MainWindowViewModel.TX++; |
|
|
client.SendAsync("SC911" + "[" + MainWindowViewModel.S01 + "]" + |
|
|
|
|
|
WorkOrder_dat.Select().First().Field<object>("WorkOrder")); |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
client.SendAsync("SC811" + "[" + MainWindowViewModel.S01 + "]" + |
|
|
|
|
|
WorkOrder_dat.Select().First().Field<object>("WorkOrder")); |
|
|
|
|
|
MainWindowViewModel.TX++; |
|
|
|
|
|
} |
|
|
|
|
|
APILog.DBlog(client.IP, SYSKEY, SYSAPI, SYSDAT);//记录指令
|
|
|
APILog.DBlog(client.IP, SYSKEY, SYSAPI, SYSDAT);//记录指令
|
|
|
} |
|
|
} |
|
|
catch (Exception ex) |
|
|
catch (Exception ex) |
|
|
{ |
|
|
{ |
|
|
client.SendAsync("SC991" + "[" + MainWindowViewModel.S01 + "]" + ex); |
|
|
client.SendAsync("SC992" + "[" + MainWindowViewModel.S01 + "]" + ex); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
else { client.SendAsync("SC999"); } |
|
|
else { client.SendAsync("SC999"); } |
|
@ -223,7 +214,7 @@ namespace DyeingComputer.UserClass |
|
|
|
|
|
|
|
|
APILog.DBlog(client.IP, SYSKEY, SYSAPI, SYSDAT);//记录指令
|
|
|
APILog.DBlog(client.IP, SYSKEY, SYSAPI, SYSDAT);//记录指令
|
|
|
} |
|
|
} |
|
|
catch (Exception ex) { client.SendAsync("SC991" + "[" + MainWindowViewModel.S01 + "]" + ex); } |
|
|
catch (Exception ex) { client.SendAsync("SC993" + "[" + MainWindowViewModel.S01 + "]" + ex); } |
|
|
} |
|
|
} |
|
|
else { client.SendAsync("SC999"); } |
|
|
else { client.SendAsync("SC999"); } |
|
|
}//写入领料单
|
|
|
}//写入领料单
|
|
|