|
@@ -191,7 +191,7 @@ namespace UAS_PLCDataReader
|
|
|
ButtonDeleteCommandSet.Grid = GridPollingSetting;
|
|
ButtonDeleteCommandSet.Grid = GridPollingSetting;
|
|
|
|
|
|
|
|
//指令设置界面
|
|
//指令设置界面
|
|
|
- GridCommandSetting.GetDataSQL = "select 0 CHECKEDCOLUMN,dc_id,dc_code,dc_name,dc_type,case when dc_type='INQTY' then '投入' when dc_type='NGQTY' then '不良' when dc_type='OUTQTY' then '产出' when dc_type='TEMPERATURE' then '温度' when dc_type='PARAM1' then '参数1' when dc_type='PARAM2' then '参数2' when dc_type='PARAM3' then '参数3' when dc_type='PARAM4' then '参数4' when dc_type='PARAM5' then '参数5' when dc_type='PARAM6' then '参数6' when dc_type='PARAM7' then '参数7' when dc_type='PARAM8' then '参数8' when dc_type='PARAM9' then '参数9' when dc_type='PARAM10' then '参数10' when dc_type='PARAM3' then '参数3' end dc_typename,dc_value,dc_dataindex,dc_sendcoding,dc_receivecoding,db_name,dc_man,dc_date from devicecommand left join devicebrand on db_code=dc_debrand ".ToUpper();
|
|
|
|
|
|
|
+ GridCommandSetting.GetDataSQL = "select 0 CHECKEDCOLUMN,dc_id,dc_code,dc_ifng,dc_name,dc_type,case when dc_type='INQTY' then '投入' when dc_type='NGQTY' then '不良' when dc_type='OUTQTY' then '产出' when dc_type='TEMPERATURE' then '温度' when dc_type='PARAM1' then '参数1' when dc_type='PARAM2' then '参数2' when dc_type='PARAM3' then '参数3' when dc_type='PARAM4' then '参数4' when dc_type='PARAM5' then '参数5' when dc_type='PARAM6' then '参数6' when dc_type='PARAM7' then '参数7' when dc_type='PARAM8' then '参数8' when dc_type='PARAM9' then '参数9' when dc_type='PARAM10' then '参数10' when dc_type='PARAM3' then '参数3' end dc_typename,dc_value,dc_dataindex,dc_sendcoding,dc_receivecoding,db_name,dc_man,dc_date from devicecommand left join devicebrand on db_code=dc_debrand ".ToUpper();
|
|
|
GridCommandSetting.TableName = "devicecommand";
|
|
GridCommandSetting.TableName = "devicecommand";
|
|
|
GridCommandSetting.ID = "dc_id";
|
|
GridCommandSetting.ID = "dc_id";
|
|
|
GridCommandSetting.InsertSQL = "insert into devicecommand(dc_id,dc_code,dc_name,dc_value,dc_debrand,dc_sendcoding,dc_receivecoding,dc_man,dc_date,dc_dataindex,dc_type) values(devicecommand_seq.nextval,:dc_code,:dc_name,:dc_value,'" + BaseUtil.GetComboxEditValue(Brand) + "',:dc_sendcoding,:dc_receivecoding,'" + User.UserName + "',sysdate,:dc_dataindex,:dc_type)";
|
|
GridCommandSetting.InsertSQL = "insert into devicecommand(dc_id,dc_code,dc_name,dc_value,dc_debrand,dc_sendcoding,dc_receivecoding,dc_man,dc_date,dc_dataindex,dc_type) values(devicecommand_seq.nextval,:dc_code,:dc_name,:dc_value,'" + BaseUtil.GetComboxEditValue(Brand) + "',:dc_sendcoding,:dc_receivecoding,'" + User.UserName + "',sysdate,:dc_dataindex,:dc_type)";
|
|
@@ -410,7 +410,7 @@ namespace UAS_PLCDataReader
|
|
|
/// <param name="e"></param>
|
|
/// <param name="e"></param>
|
|
|
private void ButtonSaveCommand_Click(object sender, EventArgs e)
|
|
private void ButtonSaveCommand_Click(object sender, EventArgs e)
|
|
|
{
|
|
{
|
|
|
- GridCommandSetting.InsertSQL = "insert into devicecommand(dc_id,dc_code,dc_name,dc_value,dc_debrand,dc_sendcoding,dc_receivecoding,dc_man,dc_date,dc_dataindex,dc_type) values(devicecommand_seq.nextval,:dc_code,:dc_name,:dc_value,'" + BaseUtil.GetComboxEditValue(Brand) + "',:dc_sendcoding,:dc_receivecoding,'" + User.UserName + "',sysdate,:dc_dataindex,:dc_type)";
|
|
|
|
|
|
|
+ GridCommandSetting.InsertSQL = "insert into devicecommand(dc_id,dc_code,dc_name,dc_value,dc_debrand,dc_sendcoding,dc_receivecoding,dc_man,dc_date,dc_dataindex,dc_type,dc_ifng) values(devicecommand_seq.nextval,:dc_code,:dc_name,:dc_value,'" + BaseUtil.GetComboxEditValue(Brand) + "',:dc_sendcoding,:dc_receivecoding,'" + User.UserName + "',sysdate,:dc_dataindex,:dc_type,:dc_ifng)";
|
|
|
ButtonSaveCommand.DoSaveAfterHandler(true);
|
|
ButtonSaveCommand.DoSaveAfterHandler(true);
|
|
|
sql.Clear();
|
|
sql.Clear();
|
|
|
sql.Append("update devicecommand set dc_man='" + User.UserName + "',dc_date=sysdate where dc_id=:dc_id");
|
|
sql.Append("update devicecommand set dc_man='" + User.UserName + "',dc_date=sysdate where dc_id=:dc_id");
|
|
@@ -430,7 +430,6 @@ namespace UAS_PLCDataReader
|
|
|
{
|
|
{
|
|
|
if (PageCommandSet.PageVisible)
|
|
if (PageCommandSet.PageVisible)
|
|
|
{
|
|
{
|
|
|
-
|
|
|
|
|
DataTable dt = (DataTable)SystemInf.dh.ExecuteSql("select * from devicebrand", "select");
|
|
DataTable dt = (DataTable)SystemInf.dh.ExecuteSql("select * from devicebrand", "select");
|
|
|
BaseUtil.FillComBoxEditWidthDataTable(Brand, "db_name", "db_code", dt);
|
|
BaseUtil.FillComBoxEditWidthDataTable(Brand, "db_name", "db_code", dt);
|
|
|
GridCommandSetting.Condition = " where dc_debrand='" + BaseUtil.GetComboxEditValue(Brand) + "' order by dc_code,dc_dataindex";
|
|
GridCommandSetting.Condition = " where dc_debrand='" + BaseUtil.GetComboxEditValue(Brand) + "' order by dc_code,dc_dataindex";
|