工单接收功能添加
This commit is contained in:
commit
c0219e6c2c
3 files changed
+13
-9
No files matched your search
@@ -118,12 +118,14 @@ namespace DyeingComputer.UserClass
|
|||||||
WorkOrder_dat.GetValue("ProgramID").ToString(),
|
WorkOrder_dat.GetValue("ProgramID").ToString(),
|
||||||
WorkOrder_dat.GetValue("color").ToString(),
|
WorkOrder_dat.GetValue("color").ToString(),
|
||||||
WorkOrder_dat.GetValue("Dyelot").ToString());
|
WorkOrder_dat.GetValue("Dyelot").ToString());
|
||||||
if (!dat_w) { client.SendAsync("SC910"); }
|
if (!dat_w) { client.SendAsync("SC910" + "[" + MainWindowViewModel.S01 + "]" +
|
||||||
else { client.SendAsync("SC810" + SYSKEY + SYSDAT); MainWindowViewModel.TX++; }
|
WorkOrder_dat.GetValue("WorkOrder").ToString()); }
|
||||||
|
else { client.SendAsync("SC810" + "[" + MainWindowViewModel.S01 + "]" +
|
||||||
|
WorkOrder_dat.GetValue("WorkOrder").ToString()); MainWindowViewModel.TX++; }
|
||||||
}
|
}
|
||||||
catch(Exception ex)
|
catch(Exception ex)
|
||||||
{
|
{
|
||||||
client.SendAsync("SC990"+ex);
|
client.SendAsync("SC990" + "[" + MainWindowViewModel.S01 + "]" + ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { client.SendAsync("SC999"); }
|
else { client.SendAsync("SC999"); }
|
||||||
@@ -137,12 +139,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);
|
bool dat_w = SQLDATA.WorkOderStep(WorkOrder_dat);
|
||||||
if (!dat_w) { client.SendAsync("SC911"); }
|
if (!dat_w) { client.SendAsync("SC911" + "[" + MainWindowViewModel.S01 + "]" +
|
||||||
else { client.SendAsync("SC811" + SYSKEY + SYSDAT); MainWindowViewModel.TX++; }
|
WorkOrder_dat.Select().First().Field<object>("WorkOrder")); }
|
||||||
|
else { client.SendAsync("SC811" + "[" + MainWindowViewModel.S01 + "]" +
|
||||||
|
WorkOrder_dat.Select().First().Field<object>("WorkOrder")); MainWindowViewModel.TX++; }
|
||||||
}
|
}
|
||||||
catch
|
catch(Exception ex)
|
||||||
{
|
{
|
||||||
client.SendAsync("SC991");
|
client.SendAsync("SC991" + "[" + MainWindowViewModel.S01 + "]" + ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { client.SendAsync("SC999"); }
|
else { client.SendAsync("SC999"); }
|
||||||
|
|||||||
@@ -69,7 +69,7 @@
|
|||||||
</DataGridTextColumn.ElementStyle>
|
</DataGridTextColumn.ElementStyle>
|
||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn Header="{x:Static lang:Resources.ProcessName}" Width="300" Binding="{Binding ProgramName}" IsReadOnly="True"/>
|
<DataGridTextColumn Header="{x:Static lang:Resources.ProcessName}" Width="300" Binding="{Binding ProgramName}" IsReadOnly="True"/>
|
||||||
<DataGridTextColumn Header="ProcessID" Binding="{Binding ProcessID}" Width="0" MinWidth="0" MaxWidth="0"/>
|
<DataGridTextColumn Header="ProcessID" Binding="{Binding ProgramID}" Width="0" MinWidth="0" MaxWidth="0"/>
|
||||||
<DataGridTextColumn Header="lock" Binding="{Binding lock}" Width="0" MinWidth="0" MaxWidth="0"/>
|
<DataGridTextColumn Header="lock" Binding="{Binding lock}" Width="0" MinWidth="0" MaxWidth="0"/>
|
||||||
<DataGridTextColumn Header="{x:Static lang:Resources.State}" Width="120" IsReadOnly="True">
|
<DataGridTextColumn Header="{x:Static lang:Resources.State}" Width="120" IsReadOnly="True">
|
||||||
<DataGridTextColumn.ElementStyle>
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ namespace DyeingComputer.View
|
|||||||
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
|
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
|
||||||
SQLiteHelpers.Open(); //打开数据库
|
SQLiteHelpers.Open(); //打开数据库
|
||||||
|
|
||||||
string sql_script = "select * from WorkOrder where StartTime > '" + DateTime.Now.ToString("yyyy/MM/dd") + "'";
|
string sql_script = "select * from WorkOrder where StartTime > '" + DateTime.Now.ToString("yyyy/M/d HH:mm:ss") + "'";
|
||||||
|
|
||||||
if (sql != null) sql.Clear(); //清空缓存
|
if (sql != null) sql.Clear(); //清空缓存
|
||||||
sql = SQLiteHelpers.ExecuteDataSet(sql_script, null); //读取计划表写入缓存
|
sql = SQLiteHelpers.ExecuteDataSet(sql_script, null); //读取计划表写入缓存
|
||||||
|
|||||||
Reference in new issue
Block a user