修改结构

This commit is contained in:
gongxh
2021-12-31 19:53:53 +08:00
parent 31fe9e834a
commit 7321539b72
41 changed files with 1828 additions and 211 deletions

View File

@@ -11,7 +11,7 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using CleanMachine.Model;
namespace CleanMachineHMI.FrmUserControl
{
//[FormType(EnumFormType.IoMonitor)]
@@ -33,7 +33,7 @@ namespace CleanMachineHMI.FrmUserControl
}
private void Show_X_Y_Status(object sender, EventArgs e)
{
BasPlcItemMd item = sender as BasPlcItemMd;
PlcItem item = sender as PlcItem;
Invoke(new Action(() =>
{
if (item.PlcItemDataType == 2)
@@ -82,8 +82,8 @@ namespace CleanMachineHMI.FrmUserControl
{
if (GlobalHelper.PlcItemMd_X_List != null && GlobalHelper.PlcItemMd_X_List.Count > 0)
{
List<BasPlcItemMd> tempLst = GlobalHelper.PlcItemMd_X_List.OrderBy(x => Convert.ToInt32(x.PlcItemPriAddress)).ToList();
foreach (BasPlcItemMd item in tempLst)
List<PlcItem> tempLst = GlobalHelper.PlcItemMd_X_List.OrderBy(x => Convert.ToInt32(x.PlcItemPriAddress)).ToList();
foreach (PlcItem item in tempLst)
{
Invoke(new Action(() =>
{
@@ -99,8 +99,8 @@ namespace CleanMachineHMI.FrmUserControl
if (GlobalHelper.PlcItemMd_Y_List != null && GlobalHelper.PlcItemMd_Y_List.Count > 0)
{
List<BasPlcItemMd> tempLst = GlobalHelper.PlcItemMd_Y_List.OrderBy(x => Convert.ToInt32(x.PlcItemPriAddress)).ToList();
foreach (BasPlcItemMd item in tempLst)
List<PlcItem> tempLst = GlobalHelper.PlcItemMd_Y_List.OrderBy(x => Convert.ToInt32(x.PlcItemPriAddress)).ToList();
foreach (PlcItem item in tempLst)
{
Invoke(new Action(() =>
{

View File

@@ -145,12 +145,12 @@ namespace CleanMachineHMI.FrmUserControl
string contaminationDtlName = item["CONTAMINATION_DTL_NAME"] == null ? "" : item["CONTAMINATION_DTL_NAME"].ToString();
basCleanTypeMsgList.Add(new BasCleanTypeMsg
{
CLEAN_MODE_CODE = cleanTypeCode,
CLEAN_MODE_NAME = cleanTypeName,
CONTAMINATION_TYPE_CODE = contaminationTypeCode,
CONTAMINATION_TYPE_NAME = contaminationTypeName,
CONTAMINATION_DTL_CODE = contaminationDtlCode,
CONTAMINATION_DTL_NAME = contaminationDtlName,
CleanModeCode = cleanTypeCode,
CleanModeName = cleanTypeName,
ContaminationTypeCode = contaminationTypeCode,
ContaminationTypeName = contaminationTypeName,
ContaminationDtlCode = contaminationDtlCode,
ContaminationDtlName = contaminationDtlName,
});
}
}
@@ -333,13 +333,13 @@ namespace CleanMachineHMI.FrmUserControl
//清空当前内存污染计数
foreach (BasCleanTypeMsg item in basCleanTypeMsgList)
{
if (string.IsNullOrEmpty(item.CONTAMINATION_DTL_CODE))
if (string.IsNullOrEmpty(item.ContaminationDtlCode))
{//常规清洗 清零(其他污染)
Invoke(new Action(() =>
{
if (this.Controls.Find("knud_" + item.CLEAN_MODE_CODE, true).Length > 0)
if (this.Controls.Find("knud_" + item.CleanModeCode, true).Length > 0)
{
KryptonNumericUpDown knudmd = this.Controls.Find("knud_" + item.CLEAN_MODE_CODE, true)[0] as KryptonNumericUpDown;
KryptonNumericUpDown knudmd = this.Controls.Find("knud_" + item.CleanModeCode, true)[0] as KryptonNumericUpDown;
knudmd.Value = 0;
}
}));
@@ -348,9 +348,9 @@ namespace CleanMachineHMI.FrmUserControl
{//特殊清洗 清零
Invoke(new Action(() =>
{
if (this.Controls.Find("knud_" + item.CONTAMINATION_DTL_CODE, true).Length > 0)
if (this.Controls.Find("knud_" + item.ContaminationDtlCode, true).Length > 0)
{
KryptonNumericUpDown knudmd = this.Controls.Find("knud_" + item.CONTAMINATION_DTL_CODE, true)[0] as KryptonNumericUpDown;
KryptonNumericUpDown knudmd = this.Controls.Find("knud_" + item.ContaminationDtlCode, true)[0] as KryptonNumericUpDown;
knudmd.Value = 0;
}
}));
@@ -631,13 +631,13 @@ namespace CleanMachineHMI.FrmUserControl
//清空当前内存污染计数
foreach (BasCleanTypeMsg item in basCleanTypeMsgList)
{
if (string.IsNullOrEmpty(item.CONTAMINATION_DTL_CODE))
if (string.IsNullOrEmpty(item.ContaminationDtlCode))
{//常规清洗 清零(其他污染)
Invoke(new Action(() =>
{
if (this.Controls.Find("knud_" + item.CLEAN_MODE_CODE, true).Length > 0)
if (this.Controls.Find("knud_" + item.CleanModeCode, true).Length > 0)
{
KryptonNumericUpDown knudmd = this.Controls.Find("knud_" + item.CLEAN_MODE_CODE, true)[0] as KryptonNumericUpDown;
KryptonNumericUpDown knudmd = this.Controls.Find("knud_" + item.CleanModeCode, true)[0] as KryptonNumericUpDown;
knudmd.Value = 0;
}
}));
@@ -646,9 +646,9 @@ namespace CleanMachineHMI.FrmUserControl
{//特殊清洗 清零
Invoke(new Action(() =>
{
if (this.Controls.Find("knud_" + item.CONTAMINATION_DTL_CODE, true).Length > 0)
if (this.Controls.Find("knud_" + item.ContaminationDtlCode, true).Length > 0)
{
KryptonNumericUpDown knudmd = this.Controls.Find("knud_" + item.CONTAMINATION_DTL_CODE, true)[0] as KryptonNumericUpDown;
KryptonNumericUpDown knudmd = this.Controls.Find("knud_" + item.ContaminationDtlCode, true)[0] as KryptonNumericUpDown;
knudmd.Value = 0;
}
}));
@@ -758,13 +758,13 @@ namespace CleanMachineHMI.FrmUserControl
//清空当前内存污染计数
foreach (BasCleanTypeMsg item in basCleanTypeMsgList)
{
if (string.IsNullOrEmpty(item.CONTAMINATION_DTL_CODE))
if (string.IsNullOrEmpty(item.ContaminationDtlCode))
{//常规清洗 清零(其他污染)
Invoke(new Action(() =>
{
if (this.Controls.Find("knud_" + item.CLEAN_MODE_CODE, true).Length > 0)
if (this.Controls.Find("knud_" + item.CleanModeCode, true).Length > 0)
{
KryptonNumericUpDown knudmd = this.Controls.Find("knud_" + item.CLEAN_MODE_CODE, true)[0] as KryptonNumericUpDown;
KryptonNumericUpDown knudmd = this.Controls.Find("knud_" + item.CleanModeCode, true)[0] as KryptonNumericUpDown;
knudmd.Value = 0;
}
}));
@@ -773,9 +773,9 @@ namespace CleanMachineHMI.FrmUserControl
{//特殊清洗 清零
Invoke(new Action(() =>
{
if (this.Controls.Find("knud_" + item.CONTAMINATION_DTL_CODE, true).Length > 0)
if (this.Controls.Find("knud_" + item.ContaminationDtlCode, true).Length > 0)
{
KryptonNumericUpDown knudmd = this.Controls.Find("knud_" + item.CONTAMINATION_DTL_CODE, true)[0] as KryptonNumericUpDown;
KryptonNumericUpDown knudmd = this.Controls.Find("knud_" + item.ContaminationDtlCode, true)[0] as KryptonNumericUpDown;
knudmd.Value = 0;
}
}));
@@ -856,9 +856,9 @@ namespace CleanMachineHMI.FrmUserControl
'{ktb_IR.Text.Trim()}',
'{((ListItem)kcmb_SheetType.SelectedItem).Value}',
(datetime('now','localtime')),
'{item.CLEAN_MODE_CODE}',
'{item.CONTAMINATION_TYPE_CODE}',
'{item.CONTAMINATION_DTL_CODE}',
'{item.CleanModeCode}',
'{item.ContaminationTypeCode}',
'{item.ContaminationDtlCode}',
0,
'{GlobalHelper.UserInfo.UserId}',
datetime('now', 'localtime'),
@@ -901,13 +901,13 @@ namespace CleanMachineHMI.FrmUserControl
//清空当前内存污染计数
foreach (BasCleanTypeMsg item in basCleanTypeMsgList)
{
if (string.IsNullOrEmpty(item.CONTAMINATION_DTL_CODE))
if (string.IsNullOrEmpty(item.ContaminationDtlCode))
{//常规清洗 清零(其他污染)
Invoke(new Action(() =>
{
if (this.Controls.Find("knud_" + item.CLEAN_MODE_CODE, true).Length > 0)
if (this.Controls.Find("knud_" + item.CleanModeCode, true).Length > 0)
{
KryptonNumericUpDown knudmd = this.Controls.Find("knud_" + item.CLEAN_MODE_CODE, true)[0] as KryptonNumericUpDown;
KryptonNumericUpDown knudmd = this.Controls.Find("knud_" + item.CleanModeCode, true)[0] as KryptonNumericUpDown;
knudmd.Value = 0;
}
}));
@@ -916,9 +916,9 @@ namespace CleanMachineHMI.FrmUserControl
{//特殊清洗 清零
Invoke(new Action(() =>
{
if (this.Controls.Find("knud_" + item.CONTAMINATION_DTL_CODE, true).Length > 0)
if (this.Controls.Find("knud_" + item.ContaminationDtlCode, true).Length > 0)
{
KryptonNumericUpDown knudmd = this.Controls.Find("knud_" + item.CONTAMINATION_DTL_CODE, true)[0] as KryptonNumericUpDown;
KryptonNumericUpDown knudmd = this.Controls.Find("knud_" + item.ContaminationDtlCode, true)[0] as KryptonNumericUpDown;
knudmd.Value = 0;
}
}));
@@ -1819,9 +1819,9 @@ namespace CleanMachineHMI.FrmUserControl
'{ktb_IR.Text.Trim()}',
'{((ListItem)kcmb_SheetType.SelectedItem).Value}',
(datetime('now','localtime')),
'{item.CLEAN_MODE_CODE}',
'{item.CONTAMINATION_TYPE_CODE}',
'{item.CONTAMINATION_DTL_CODE}',
'{item.CleanModeCode}',
'{item.ContaminationTypeCode}',
'{item.ContaminationDtlCode}',
0,
'{GlobalHelper.UserInfo.UserId}',
datetime('now', 'localtime'),
@@ -1879,7 +1879,7 @@ namespace CleanMachineHMI.FrmUserControl
}
KryptonButton kbtnMd = sender as KryptonButton;
BasCleanTypeMsg md = basCleanTypeMsgList.Find(x => x.CONTAMINATION_DTL_CODE == kbtnMd.Name.Replace("kbtn_", ""));
BasCleanTypeMsg md = basCleanTypeMsgList.Find(x => x.ContaminationDtlCode == kbtnMd.Name.Replace("kbtn_", ""));
if (ktb_SaveIR.Enabled)
{
//KryptonMessageBox.Show("未录入板材信息和IR收货编号信息,不能进行计数处理!");
@@ -1893,13 +1893,13 @@ namespace CleanMachineHMI.FrmUserControl
if (row > 0)
{
knudmd.Value = currentIndex + 1;
LogHelper.WriteLog($"用户:【{GlobalHelper.UserInfo.UserName}】,托盘号:【{ktb_CurrPalletCode.Text.Trim()}】,IR:【{ktb_IR.Text.Trim()}】,板材信息:【{kcmb_SheetType.Text}】。清洗类型:【{md.CLEAN_MODE_CODE}】污染类型:【{md.CONTAMINATION_TYPE_CODE}】污染明细:【{md.CONTAMINATION_TYPE_NAME}的明细+1计数成功。旧数据:【{currentIndex}】,新数据:【{currentIndex + 1}】!", LogTypeEum.Run);
LogHelper.WriteLog($"用户:【{GlobalHelper.UserInfo.UserName}】,托盘号:【{ktb_CurrPalletCode.Text.Trim()}】,IR:【{ktb_IR.Text.Trim()}】,板材信息:【{kcmb_SheetType.Text}】。清洗类型:【{md.CleanModeCode}】污染类型:【{md.ContaminationTypeCode}】污染明细:【{md.ContaminationTypeName}的明细+1计数成功。旧数据:【{currentIndex}】,新数据:【{currentIndex + 1}】!", LogTypeEum.Run);
}
else
{
LogHelper.WriteLog($"用户:【{GlobalHelper.UserInfo.UserName}】,托盘号:【{ktb_CurrPalletCode.Text.Trim()}】,IR:【{ktb_IR.Text.Trim()}】,板材信息:【{kcmb_SheetType.Text}】。清洗类型:【{md.CLEAN_MODE_CODE}】污染类型:【{md.CONTAMINATION_TYPE_CODE}】污染明细:【{md.CONTAMINATION_TYPE_NAME}的明细计数+1功能,数据更新到数据库发生异常。", LogTypeEum.Err);
LogHelper.WriteLog($"用户:【{GlobalHelper.UserInfo.UserName}】,托盘号:【{ktb_CurrPalletCode.Text.Trim()}】,IR:【{ktb_IR.Text.Trim()}】,板材信息:【{kcmb_SheetType.Text}】。清洗类型:【{md.CleanModeCode}】污染类型:【{md.ContaminationTypeCode}】污染明细:【{md.ContaminationTypeName}的明细计数+1功能,数据更新到数据库发生异常。", LogTypeEum.Err);
//KryptonMessageBox.Show($"清洗类型:【{md.CLEAN_MODE_CODE}】污染类型:【{md.CONTAMINATION_TYPE_CODE}】污染明细:【{md.CONTAMINATION_TYPE_NAME}】的计数+1功能,数据更新到数据库发生异常。");
KryptonMessageBox.Show($"Clean type: [{md.CLEAN_MODE_CODE}] pollution types: {md.CONTAMINATION_TYPE_CODE} [pollution] detail: [{md.CONTAMINATION_TYPE_NAME}] count + 1 function, abnormity data updates to the database.");
KryptonMessageBox.Show($"Clean type: [{md.CleanModeCode}] pollution types: {md.ContaminationTypeCode} [pollution] detail: [{md.ContaminationTypeName}] count + 1 function, abnormity data updates to the database.");
}
kryptonGroupBox1.Focus();
}
@@ -1974,13 +1974,13 @@ namespace CleanMachineHMI.FrmUserControl
//清空当前内存污染计数
foreach (BasCleanTypeMsg item in basCleanTypeMsgList)
{
if (string.IsNullOrEmpty(item.CONTAMINATION_DTL_CODE))
if (string.IsNullOrEmpty(item.ContaminationDtlCode))
{//常规清洗 清零(其他污染)
Invoke(new Action(() =>
{
if (this.Controls.Find("knud_" + item.CLEAN_MODE_CODE, true).Length > 0)
if (this.Controls.Find("knud_" + item.CleanModeCode, true).Length > 0)
{
KryptonNumericUpDown knudmd = this.Controls.Find("knud_" + item.CLEAN_MODE_CODE, true)[0] as KryptonNumericUpDown;
KryptonNumericUpDown knudmd = this.Controls.Find("knud_" + item.CleanModeCode, true)[0] as KryptonNumericUpDown;
knudmd.Value = 0;
}
}));
@@ -1989,9 +1989,9 @@ namespace CleanMachineHMI.FrmUserControl
{//特殊清洗 清零
Invoke(new Action(() =>
{
if (this.Controls.Find("knud_" + item.CONTAMINATION_DTL_CODE, true).Length > 0)
if (this.Controls.Find("knud_" + item.ContaminationDtlCode, true).Length > 0)
{
KryptonNumericUpDown knudmd = this.Controls.Find("knud_" + item.CONTAMINATION_DTL_CODE, true)[0] as KryptonNumericUpDown;
KryptonNumericUpDown knudmd = this.Controls.Find("knud_" + item.ContaminationDtlCode, true)[0] as KryptonNumericUpDown;
knudmd.Value = 0;
}
}));
@@ -3019,7 +3019,7 @@ namespace CleanMachineHMI.FrmUserControl
return;
}
KryptonButton kbtnMd = sender as KryptonButton;
BasCleanTypeMsg md = basCleanTypeMsgList.Find(x => x.CONTAMINATION_DTL_CODE == kbtnMd.Name.Replace("kbtn_", "").Replace("_1", ""));
BasCleanTypeMsg md = basCleanTypeMsgList.Find(x => x.ContaminationDtlCode == kbtnMd.Name.Replace("kbtn_", "").Replace("_1", ""));
if (ktb_SaveIR.Enabled)
{
KryptonMessageBox.Show("The plate information and IR receiving number information are not entered, so the counting process cannot be carried out!");
@@ -3038,12 +3038,12 @@ namespace CleanMachineHMI.FrmUserControl
if (row > 0)
{
knudmd.Value = currentIndex - 1;
LogHelper.WriteLog($"用户:【{GlobalHelper.UserInfo.UserName}】,托盘号:【{ktb_CurrPalletCode.Text.Trim()}】,IR:【{ktb_IR.Text.Trim()}】,板材信息:【{kcmb_SheetType.Text}】。清洗类型:【{md.CLEAN_MODE_CODE}】污染类型:【{md.CONTAMINATION_TYPE_CODE}】污染明细:【{md.CONTAMINATION_TYPE_NAME}的明细 -1 计数成功。旧数据:【{currentIndex}】,新数据:【{currentIndex - 1}】!", LogTypeEum.Run);
LogHelper.WriteLog($"用户:【{GlobalHelper.UserInfo.UserName}】,托盘号:【{ktb_CurrPalletCode.Text.Trim()}】,IR:【{ktb_IR.Text.Trim()}】,板材信息:【{kcmb_SheetType.Text}】。清洗类型:【{md.CleanModeCode}】污染类型:【{md.ContaminationTypeCode}】污染明细:【{md.ContaminationTypeName}的明细 -1 计数成功。旧数据:【{currentIndex}】,新数据:【{currentIndex - 1}】!", LogTypeEum.Run);
}
else
{
LogHelper.WriteLog($"用户:【{GlobalHelper.UserInfo.UserName}】,托盘号:【{ktb_CurrPalletCode.Text.Trim()}】,IR:【{ktb_IR.Text.Trim()}】,板材信息:【{kcmb_SheetType.Text}】。清洗类型:【{md.CLEAN_MODE_CODE}】污染类型:【{md.CONTAMINATION_TYPE_CODE}】污染明细:【{md.CONTAMINATION_TYPE_NAME}的明细计数 -1 功能,数据更新到数据库发生异常。", LogTypeEum.Err);
KryptonMessageBox.Show($"Clean type: [{md.CLEAN_MODE_CODE}] pollution types: {md.CONTAMINATION_TYPE_CODE} [pollution] detail: [{md.CONTAMINATION_TYPE_NAME}] count - 1 function, abnormity data updates to the database.");
LogHelper.WriteLog($"用户:【{GlobalHelper.UserInfo.UserName}】,托盘号:【{ktb_CurrPalletCode.Text.Trim()}】,IR:【{ktb_IR.Text.Trim()}】,板材信息:【{kcmb_SheetType.Text}】。清洗类型:【{md.CleanModeCode}】污染类型:【{md.ContaminationTypeCode}】污染明细:【{md.ContaminationTypeName}的明细计数 -1 功能,数据更新到数据库发生异常。", LogTypeEum.Err);
KryptonMessageBox.Show($"Clean type: [{md.CleanModeCode}] pollution types: {md.ContaminationTypeCode} [pollution] detail: [{md.ContaminationTypeName}] count - 1 function, abnormity data updates to the database.");
}
kryptonGroupBox1.Focus();
}
@@ -3202,13 +3202,13 @@ namespace CleanMachineHMI.FrmUserControl
//清空当前内存污染计数
foreach (BasCleanTypeMsg item in basCleanTypeMsgList)
{
if (string.IsNullOrEmpty(item.CONTAMINATION_DTL_CODE))
if (string.IsNullOrEmpty(item.ContaminationDtlCode))
{//常规清洗 清零(其他污染)
Invoke(new Action(() =>
{
if (this.Controls.Find("knud_" + item.CLEAN_MODE_CODE, true).Length > 0)
if (this.Controls.Find("knud_" + item.CleanModeCode, true).Length > 0)
{
KryptonNumericUpDown knudmd = this.Controls.Find("knud_" + item.CLEAN_MODE_CODE, true)[0] as KryptonNumericUpDown;
KryptonNumericUpDown knudmd = this.Controls.Find("knud_" + item.CleanModeCode, true)[0] as KryptonNumericUpDown;
knudmd.Value = 0;
}
}));
@@ -3217,9 +3217,9 @@ namespace CleanMachineHMI.FrmUserControl
{//特殊清洗 清零
Invoke(new Action(() =>
{
if (this.Controls.Find("knud_" + item.CONTAMINATION_DTL_CODE, true).Length > 0)
if (this.Controls.Find("knud_" + item.ContaminationDtlCode, true).Length > 0)
{
KryptonNumericUpDown knudmd = this.Controls.Find("knud_" + item.CONTAMINATION_DTL_CODE, true)[0] as KryptonNumericUpDown;
KryptonNumericUpDown knudmd = this.Controls.Find("knud_" + item.ContaminationDtlCode, true)[0] as KryptonNumericUpDown;
knudmd.Value = 0;
}
}));
@@ -3332,13 +3332,13 @@ namespace CleanMachineHMI.FrmUserControl
//清空当前内存污染计数
foreach (BasCleanTypeMsg item in basCleanTypeMsgList)
{
if (string.IsNullOrEmpty(item.CONTAMINATION_DTL_CODE))
if (string.IsNullOrEmpty(item.ContaminationDtlCode))
{//常规清洗 清零(其他污染)
Invoke(new Action(() =>
{
if (this.Controls.Find("knud_" + item.CLEAN_MODE_CODE, true).Length > 0)
if (this.Controls.Find("knud_" + item.CleanModeCode, true).Length > 0)
{
KryptonNumericUpDown knudmd = this.Controls.Find("knud_" + item.CLEAN_MODE_CODE, true)[0] as KryptonNumericUpDown;
KryptonNumericUpDown knudmd = this.Controls.Find("knud_" + item.CleanModeCode, true)[0] as KryptonNumericUpDown;
knudmd.Value = 0;
}
}));
@@ -3347,9 +3347,9 @@ namespace CleanMachineHMI.FrmUserControl
{//特殊清洗 清零
Invoke(new Action(() =>
{
if (this.Controls.Find("knud_" + item.CONTAMINATION_DTL_CODE, true).Length > 0)
if (this.Controls.Find("knud_" + item.ContaminationDtlCode, true).Length > 0)
{
KryptonNumericUpDown knudmd = this.Controls.Find("knud_" + item.CONTAMINATION_DTL_CODE, true)[0] as KryptonNumericUpDown;
KryptonNumericUpDown knudmd = this.Controls.Find("knud_" + item.ContaminationDtlCode, true)[0] as KryptonNumericUpDown;
knudmd.Value = 0;
}
}));

View File

@@ -1,4 +1,5 @@
using CleanMachineHMI.Domain.Enums;
using CleanMachine.Model;
using CleanMachineHMI.Domain.Enums;
using CleanMachineHMI.Utils;
using Krypton.Toolkit;
using LeadDataBaseUtility;
@@ -101,7 +102,7 @@ namespace CleanMachineHMI.FrmUserControl
}
private void RefreshPlcData(bool isContainHisData)
{
List<CM_WarningLogMd> tmpWarningLogList = new List<CM_WarningLogMd>();
List<WarningLog> tmpWarningLogList = new List<WarningLog>();
tmpWarningLogList.AddRange(GlobalHelper.CmWarningLogMd_List);
if (isContainHisData)
{
@@ -109,7 +110,7 @@ namespace CleanMachineHMI.FrmUserControl
DataTable dtHis = LeadDbHelperSQLite.Query(sql).Tables[0];
foreach (DataRow item in dtHis.Rows)
{
tmpWarningLogList.Add(new CM_WarningLogMd
tmpWarningLogList.Add(new WarningLog
{
WarningCode = item["WARNING_CODE"].ToString(),
WarningName = item["WARNING_NAME"].ToString(),
@@ -117,7 +118,7 @@ namespace CleanMachineHMI.FrmUserControl
WarningMessage = item["WARNING_MESSAGE"].ToString(),
WarningTime = Convert.ToDateTime(item["WARNING_TIME"]),
PlcItemCode = item["PLC_ITEM_CODE"].ToString(),
WarningStatus = Convert.ToInt32(item["WARING_STATUS"]),
WaringStatus = Convert.ToInt32(item["WARING_STATUS"]),
WarningHandleResult = Convert.ToInt32(item["WARNING_HANDLE_RESULT"]),
WarningHandleTime = Convert.ToDateTime(item["WARNING_HANDLE_TIME"]),
CreateBy = Convert.ToInt32(item["CREATE_BY"]),
@@ -136,7 +137,7 @@ namespace CleanMachineHMI.FrmUserControl
{
if (kcmb_plcAlarmStatus.SelectedIndex != 0)
{
tmpWarningLogList = tmpWarningLogList.FindAll(x => x.WarningStatus == (kcmb_plcAlarmStatus.SelectedIndex - 1));
tmpWarningLogList = tmpWarningLogList.FindAll(x => x.WaringStatus == (kcmb_plcAlarmStatus.SelectedIndex - 1));
}
if (tmpWarningLogList == null && tmpWarningLogList.Count > 0)
{
@@ -170,7 +171,7 @@ namespace CleanMachineHMI.FrmUserControl
dt.Columns.Add(dc8);
dt.Columns.Add(dc9);
int index = 1;
foreach (CM_WarningLogMd item in tmpWarningLogList)
foreach (WarningLog item in tmpWarningLogList)
{
DataRow dr = dt.NewRow();
dr["序号"] = index;
@@ -178,7 +179,7 @@ namespace CleanMachineHMI.FrmUserControl
dr["报警条码"] = item.WarningCode;
dr["报警内容"] = item.WarningName;
dr["报警时间"] = item.WarningTime;
if (item.WarningStatus == 0)
if (item.WaringStatus == 0)
{
//dr["报警状态"] = "正在报警";
dr["报警状态"] = "Occurrent Alarm";

View File

@@ -12,7 +12,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using CleanMachine.Model;
namespace CleanMachineHMI.FrmUserControl
{
[FormType(EnumFormType.PlcItemConfig)]
@@ -146,7 +146,7 @@ namespace CleanMachineHMI.FrmUserControl
//DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
#endregion
List<BasPlcItemMd> tmpMdList;
List<PlcItem> tmpMdList;
if (!string.IsNullOrEmpty(ktb_plcMsg.Text.Trim()))
{
tmpMdList = GlobalHelper.PlcItemMdList.FindAll(x => x.PlcItemCode.Contains(ktb_plcMsg.Text.Trim()) || x.PlcItemName.Contains(ktb_plcMsg.Text.Trim()));
@@ -205,7 +205,7 @@ namespace CleanMachineHMI.FrmUserControl
dt.Columns.Add(dc5);
dt.Columns.Add(dc6);
dt.Columns.Add(dc7);
foreach (BasPlcItemMd item in tmpMdList)
foreach (PlcItem item in tmpMdList)
{
DataRow dr = dt.NewRow();
dr["序号"] = item.PlcItemId;