diff --git a/CleanMachine.Model/BaseModel.cs b/CleanMachine.Model/BaseModel.cs
new file mode 100644
index 0000000..655ac8f
--- /dev/null
+++ b/CleanMachine.Model/BaseModel.cs
@@ -0,0 +1,129 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CleanMachine.Model
+{
+ public class BaseModel
+ {
+ private int usedFlag;
+ private int delFlag;
+ private int createBy;
+ private DateTime createTime;
+ private int updateBy;
+ private DateTime updateTime;
+ private int dataVersion;
+ private string remarks1;
+ private string remarks2;
+ private string remarks3;
+ private string remarks4;
+ private string remarks5;
+ ///
+ ///
+ ///
+ public int UsedFlag
+ {
+ get { return this.usedFlag; }
+ set { this.usedFlag = value; }
+ }
+
+ ///
+ ///
+ ///
+ public int DelFlag
+ {
+ get { return this.delFlag; }
+ set { this.delFlag = value; }
+ }
+
+ ///
+ ///
+ ///
+ public int CreateBy
+ {
+ get { return this.createBy; }
+ set { this.createBy = value; }
+ }
+
+ ///
+ ///
+ ///
+ public DateTime CreateTime
+ {
+ get { return this.createTime; }
+ set { this.createTime = value; }
+ }
+
+ ///
+ ///
+ ///
+ public int UpdateBy
+ {
+ get { return this.updateBy; }
+ set { this.updateBy = value; }
+ }
+
+ ///
+ ///
+ ///
+ public DateTime UpdateTime
+ {
+ get { return this.updateTime; }
+ set { this.updateTime = value; }
+ }
+
+ ///
+ ///
+ ///
+ public int DataVersion
+ {
+ get { return this.dataVersion; }
+ set { this.dataVersion = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string Remarks1
+ {
+ get { return this.remarks1; }
+ set { this.remarks1 = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string Remarks2
+ {
+ get { return this.remarks2; }
+ set { this.remarks2 = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string Remarks3
+ {
+ get { return this.remarks3; }
+ set { this.remarks3 = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string Remarks4
+ {
+ get { return this.remarks4; }
+ set { this.remarks4 = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string Remarks5
+ {
+ get { return this.remarks5; }
+ set { this.remarks5 = value; }
+ }
+ }
+}
diff --git a/CleanMachine.Model/CleanMachine.Model.csproj b/CleanMachine.Model/CleanMachine.Model.csproj
new file mode 100644
index 0000000..50e8b66
--- /dev/null
+++ b/CleanMachine.Model/CleanMachine.Model.csproj
@@ -0,0 +1,7 @@
+
+
+
+ net45
+
+
+
diff --git a/CleanMachine.Model/CleanMode.cs b/CleanMachine.Model/CleanMode.cs
new file mode 100644
index 0000000..5204911
--- /dev/null
+++ b/CleanMachine.Model/CleanMode.cs
@@ -0,0 +1,48 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CleanMachine.Model
+{
+ ///
+ ///
+ ///
+ public class CleanMode: BaseModel
+ {
+
+ private string cleanModeId;
+ private string cleanModeCode;
+ private string cleanModeName;
+
+
+ ///
+ ///
+ ///
+ public string CleanModeId
+ {
+ get { return this.cleanModeId; }
+ set { this.cleanModeId = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string CleanModeCode
+ {
+ get { return this.cleanModeCode; }
+ set { this.cleanModeCode = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string CleanModeName
+ {
+ get { return this.cleanModeName; }
+ set { this.cleanModeName = value; }
+ }
+
+
+
+ }
+}
diff --git a/CleanMachine.Model/ContaminationDtl.cs b/CleanMachine.Model/ContaminationDtl.cs
new file mode 100644
index 0000000..53dd1ae
--- /dev/null
+++ b/CleanMachine.Model/ContaminationDtl.cs
@@ -0,0 +1,57 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CleanMachine.Model
+{
+ ///
+ ///
+ ///
+ public class ContaminationDtl: BaseModel
+ {
+
+ private string contaminationDtlId;
+ private string contaminationTypeCode;
+ private string contaminationDtlCode;
+ private string contaminationDtlName;
+
+
+ ///
+ ///
+ ///
+ public string ContaminationDtlId
+ {
+ get { return this.contaminationDtlId; }
+ set { this.contaminationDtlId = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string ContaminationTypeCode
+ {
+ get { return this.contaminationTypeCode; }
+ set { this.contaminationTypeCode = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string ContaminationDtlCode
+ {
+ get { return this.contaminationDtlCode; }
+ set { this.contaminationDtlCode = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string ContaminationDtlName
+ {
+ get { return this.contaminationDtlName; }
+ set { this.contaminationDtlName = value; }
+ }
+
+
+ }
+}
diff --git a/CleanMachine.Model/ContaminationType.cs b/CleanMachine.Model/ContaminationType.cs
new file mode 100644
index 0000000..7533691
--- /dev/null
+++ b/CleanMachine.Model/ContaminationType.cs
@@ -0,0 +1,58 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CleanMachine.Model
+{
+ ///
+ ///
+ ///
+ public class ContaminationType:BaseModel
+ {
+
+ private string contaminationTypeId;
+ private string contaminationTypeCode;
+ private string contaminationTypeName;
+ private string cleanModeCode;
+
+
+ ///
+ ///
+ ///
+ public string ContaminationTypeId
+ {
+ get { return this.contaminationTypeId; }
+ set { this.contaminationTypeId = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string ContaminationTypeCode
+ {
+ get { return this.contaminationTypeCode; }
+ set { this.contaminationTypeCode = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string ContaminationTypeName
+ {
+ get { return this.contaminationTypeName; }
+ set { this.contaminationTypeName = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string CleanModeCode
+ {
+ get { return this.cleanModeCode; }
+ set { this.cleanModeCode = value; }
+ }
+
+
+
+ }
+}
diff --git a/CleanMachine.Model/Language.cs b/CleanMachine.Model/Language.cs
new file mode 100644
index 0000000..93e5249
--- /dev/null
+++ b/CleanMachine.Model/Language.cs
@@ -0,0 +1,48 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CleanMachine.Model
+{
+ ///
+ ///
+ ///
+ public class Language:BaseModel
+ {
+
+ private string languageId;
+ private string languageCode;
+ private string languageName;
+
+
+ ///
+ ///
+ ///
+ public string LanguageId
+ {
+ get { return this.languageId; }
+ set { this.languageId = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string LanguageCode
+ {
+ get { return this.languageCode; }
+ set { this.languageCode = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string LanguageName
+ {
+ get { return this.languageName; }
+ set { this.languageName = value; }
+ }
+
+
+
+ }
+}
diff --git a/CleanMachine.Model/LanguageControl.cs b/CleanMachine.Model/LanguageControl.cs
new file mode 100644
index 0000000..43a087e
--- /dev/null
+++ b/CleanMachine.Model/LanguageControl.cs
@@ -0,0 +1,77 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CleanMachine.Model
+{
+ ///
+ ///
+ ///
+ public class LanguageControl : BaseModel
+ {
+
+ private string languageControlId;
+ private string languageCode;
+ private string formCode;
+ private string controlCode;
+ private string controlName;
+ private string controlType;
+
+ ///
+ ///
+ ///
+ public string LanguageControlId
+ {
+ get { return this.languageControlId; }
+ set { this.languageControlId = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string LanguageCode
+ {
+ get { return this.languageCode; }
+ set { this.languageCode = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string FormCode
+ {
+ get { return this.formCode; }
+ set { this.formCode = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string ControlCode
+ {
+ get { return this.controlCode; }
+ set { this.controlCode = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string ControlName
+ {
+ get { return this.controlName; }
+ set { this.controlName = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string ControlType
+ {
+ get { return this.controlType; }
+ set { this.controlType = value; }
+ }
+
+
+
+ }
+}
diff --git a/CleanMachine.Model/LastPattleNum.cs b/CleanMachine.Model/LastPattleNum.cs
new file mode 100644
index 0000000..28ba8df
--- /dev/null
+++ b/CleanMachine.Model/LastPattleNum.cs
@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CleanMachine.Model
+{
+ ///
+ ///
+ ///
+ public class LastPattleNum:BaseModel
+ {
+
+ private string key;
+ private string value;
+
+ ///
+ ///
+ ///
+ public string Key
+ {
+ get { return this.key; }
+ set { this.key = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string Value
+ {
+ get { return this.value; }
+ set { this.value = value; }
+ }
+
+ }
+}
diff --git a/CleanMachine.Model/Log.cs b/CleanMachine.Model/Log.cs
new file mode 100644
index 0000000..425aa28
--- /dev/null
+++ b/CleanMachine.Model/Log.cs
@@ -0,0 +1,67 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CleanMachine.Model
+{
+ ///
+ ///
+ ///
+ public class Log : BaseModel
+ {
+
+ private string sysLogId;
+ private int userId;
+ private string operateStatus;
+ private string resultStatus;
+ private string message;
+
+ ///
+ ///
+ ///
+ public string SysLogId
+ {
+ get { return this.sysLogId; }
+ set { this.sysLogId = value; }
+ }
+
+ ///
+ ///
+ ///
+ public int UserId
+ {
+ get { return this.userId; }
+ set { this.userId = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string OperateStatus
+ {
+ get { return this.operateStatus; }
+ set { this.operateStatus = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string ResultStatus
+ {
+ get { return this.resultStatus; }
+ set { this.resultStatus = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string Message
+ {
+ get { return this.message; }
+ set { this.message = value; }
+ }
+
+
+
+ }
+}
diff --git a/CleanMachine.Model/Menu.cs b/CleanMachine.Model/Menu.cs
new file mode 100644
index 0000000..e111941
--- /dev/null
+++ b/CleanMachine.Model/Menu.cs
@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CleanMachine.Model
+{
+ ///
+ ///
+ ///
+ public class Menu : BaseModel
+ {
+
+ private string menuId;
+ private string menuCode;
+ private string menuName;
+ private string menuUrl;
+ private int menuPid;
+ private int menuOrder;
+ private int usedFlag;
+
+
+ }
+}
diff --git a/CleanMachine.Model/Parameter.cs b/CleanMachine.Model/Parameter.cs
new file mode 100644
index 0000000..7f46f66
--- /dev/null
+++ b/CleanMachine.Model/Parameter.cs
@@ -0,0 +1,79 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CleanMachine.Model
+{
+ ///
+ ///
+ ///
+ public class Parameter : BaseModel
+ {
+
+ private string parameterId;
+ private string parameterCode;
+ private string parameterName;
+ private string parameterValue;
+ private string parameterType;
+ private int usedFlag;
+ private int delFlag;
+ private int createBy;
+ private DateTime createTime;
+ private int updateBy;
+ private DateTime updateTime;
+ private int dataVersion;
+ private string remarks1;
+ private string remarks2;
+ private string remarks3;
+ private string remarks4;
+ private string remarks5;
+
+ ///
+ ///
+ ///
+ public string ParameterId
+ {
+ get { return this.parameterId; }
+ set { this.parameterId = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string ParameterCode
+ {
+ get { return this.parameterCode; }
+ set { this.parameterCode = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string ParameterName
+ {
+ get { return this.parameterName; }
+ set { this.parameterName = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string ParameterValue
+ {
+ get { return this.parameterValue; }
+ set { this.parameterValue = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string ParameterType
+ {
+ get { return this.parameterType; }
+ set { this.parameterType = value; }
+ }
+
+
+
+ }
+}
diff --git a/CleanMachine.Model/PlcItem.cs b/CleanMachine.Model/PlcItem.cs
new file mode 100644
index 0000000..6263b6e
--- /dev/null
+++ b/CleanMachine.Model/PlcItem.cs
@@ -0,0 +1,117 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CleanMachine.Model
+{
+ ///
+ ///
+ ///
+ public class PlcItem : BaseModel
+ {
+
+ private string plcItemId;
+ private string plcItemCode;
+ private string plcItemName;
+ private int plcItemType;
+ private int plcItemDataType;
+ private int plcItemDataLength;
+ private string plcItemPriAddress;
+ private string plcItemModbusAddress;
+ private string plcItemDeviationAddress;
+ private string plcItemValue;
+
+
+ ///
+ ///
+ ///
+ public string PlcItemId
+ {
+ get { return this.plcItemId; }
+ set { this.plcItemId = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string PlcItemCode
+ {
+ get { return this.plcItemCode; }
+ set { this.plcItemCode = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string PlcItemName
+ {
+ get { return this.plcItemName; }
+ set { this.plcItemName = value; }
+ }
+
+ ///
+ ///
+ ///
+ public int PlcItemType
+ {
+ get { return this.plcItemType; }
+ set { this.plcItemType = value; }
+ }
+
+ ///
+ ///
+ ///
+ public int PlcItemDataType
+ {
+ get { return this.plcItemDataType; }
+ set { this.plcItemDataType = value; }
+ }
+
+ ///
+ ///
+ ///
+ public int PlcItemDataLength
+ {
+ get { return this.plcItemDataLength; }
+ set { this.plcItemDataLength = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string PlcItemPriAddress
+ {
+ get { return this.plcItemPriAddress; }
+ set { this.plcItemPriAddress = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string PlcItemModbusAddress
+ {
+ get { return this.plcItemModbusAddress; }
+ set { this.plcItemModbusAddress = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string PlcItemDeviationAddress
+ {
+ get { return this.plcItemDeviationAddress; }
+ set { this.plcItemDeviationAddress = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string PlcItemValue
+ {
+ get { return this.plcItemValue; }
+ set { this.plcItemValue = value; }
+ }
+
+
+ }
+}
diff --git a/CleanMachine.Model/Role.cs b/CleanMachine.Model/Role.cs
new file mode 100644
index 0000000..86ed3d6
--- /dev/null
+++ b/CleanMachine.Model/Role.cs
@@ -0,0 +1,57 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CleanMachine.Model
+{
+ ///
+ ///
+ ///
+ public class Role : BaseModel
+ {
+
+ private string roleId;
+ private string roleCode;
+ private string roleName;
+ private int roleGrade;
+
+ ///
+ ///
+ ///
+ public string RoleId
+ {
+ get { return this.roleId; }
+ set { this.roleId = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string RoleCode
+ {
+ get { return this.roleCode; }
+ set { this.roleCode = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string RoleName
+ {
+ get { return this.roleName; }
+ set { this.roleName = value; }
+ }
+
+ ///
+ ///
+ ///
+ public int RoleGrade
+ {
+ get { return this.roleGrade; }
+ set { this.roleGrade = value; }
+ }
+
+
+
+ }
+}
diff --git a/CleanMachine.Model/RoleMenuPermission.cs b/CleanMachine.Model/RoleMenuPermission.cs
new file mode 100644
index 0000000..c79b8a1
--- /dev/null
+++ b/CleanMachine.Model/RoleMenuPermission.cs
@@ -0,0 +1,47 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CleanMachine.Model
+{
+ ///
+ ///
+ ///
+ public class RoleMenuPermission : BaseModel
+ {
+
+ private string roleMenuPermissionId;
+ private string roleId;
+ private string menuId;
+
+ ///
+ ///
+ ///
+ public string RoleMenuPermissionId
+ {
+ get { return this.roleMenuPermissionId; }
+ set { this.roleMenuPermissionId = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string RoleId
+ {
+ get { return this.roleId; }
+ set { this.roleId = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string MenuId
+ {
+ get { return this.menuId; }
+ set { this.menuId = value; }
+ }
+
+
+
+ }
+}
diff --git a/CleanMachine.Model/ScheduleDtl.cs b/CleanMachine.Model/ScheduleDtl.cs
new file mode 100644
index 0000000..59e19ba
--- /dev/null
+++ b/CleanMachine.Model/ScheduleDtl.cs
@@ -0,0 +1,66 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CleanMachine.Model
+{
+ ///
+ ///
+ ///
+ public class ScheduleDtl : BaseModel
+ {
+
+ private string scheduleDtlId;
+ private string scheduleCode;
+ private string scheduleName;
+ private string beginTime;
+ private string endTime;
+
+ ///
+ ///
+ ///
+ public string ScheduleDtlId
+ {
+ get { return this.scheduleDtlId; }
+ set { this.scheduleDtlId = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string ScheduleCode
+ {
+ get { return this.scheduleCode; }
+ set { this.scheduleCode = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string ScheduleName
+ {
+ get { return this.scheduleName; }
+ set { this.scheduleName = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string BeginTime
+ {
+ get { return this.beginTime; }
+ set { this.beginTime = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string EndTime
+ {
+ get { return this.endTime; }
+ set { this.endTime = value; }
+ }
+
+
+ }
+}
diff --git a/CleanMachine.Model/SheetType.cs b/CleanMachine.Model/SheetType.cs
new file mode 100644
index 0000000..1c0311a
--- /dev/null
+++ b/CleanMachine.Model/SheetType.cs
@@ -0,0 +1,48 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CleanMachine.Model
+{
+ ///
+ ///
+ ///
+ public class SheetType : BaseModel
+ {
+
+ private string sheetTypeId;
+ private string sheetTypeCode;
+ private string sheetTypeName;
+
+
+ ///
+ ///
+ ///
+ public string SheetTypeId
+ {
+ get { return this.sheetTypeId; }
+ set { this.sheetTypeId = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string SheetTypeCode
+ {
+ get { return this.sheetTypeCode; }
+ set { this.sheetTypeCode = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string SheetTypeName
+ {
+ get { return this.sheetTypeName; }
+ set { this.sheetTypeName = value; }
+ }
+
+
+
+ }
+}
diff --git a/CleanMachine.Model/User.cs b/CleanMachine.Model/User.cs
new file mode 100644
index 0000000..b995502
--- /dev/null
+++ b/CleanMachine.Model/User.cs
@@ -0,0 +1,88 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CleanMachine.Model
+{
+ ///
+ ///
+ ///
+ public class User : BaseModel
+ {
+
+ private string userId;
+ private string userCode;
+ private string userName;
+ private string password;
+ private int gender;
+ private string roleId;
+ private string scheduleCode;
+
+
+ ///
+ ///
+ ///
+ public string UserId
+ {
+ get { return this.userId; }
+ set { this.userId = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string UserCode
+ {
+ get { return this.userCode; }
+ set { this.userCode = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string UserName
+ {
+ get { return this.userName; }
+ set { this.userName = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string Password
+ {
+ get { return this.password; }
+ set { this.password = value; }
+ }
+
+ ///
+ ///
+ ///
+ public int Gender
+ {
+ get { return this.gender; }
+ set { this.gender = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string RoleId
+ {
+ get { return this.roleId; }
+ set { this.roleId = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string ScheduleCode
+ {
+ get { return this.scheduleCode; }
+ set { this.scheduleCode = value; }
+ }
+
+
+
+ }
+}
diff --git a/CleanMachine.Model/Warning.cs b/CleanMachine.Model/Warning.cs
new file mode 100644
index 0000000..5ba0965
--- /dev/null
+++ b/CleanMachine.Model/Warning.cs
@@ -0,0 +1,78 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CleanMachine.Model
+{
+ ///
+ ///
+ ///
+ public class Warning : BaseModel
+ {
+
+ private string warningId;
+ private string warningCode;
+ private string warningName;
+ private string plcItemCode;
+ private string warningType;
+ private string warningMessage;
+
+
+ ///
+ ///
+ ///
+ public string WarningId
+ {
+ get { return this.warningId; }
+ set { this.warningId = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string WarningCode
+ {
+ get { return this.warningCode; }
+ set { this.warningCode = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string WarningName
+ {
+ get { return this.warningName; }
+ set { this.warningName = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string PlcItemCode
+ {
+ get { return this.plcItemCode; }
+ set { this.plcItemCode = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string WarningType
+ {
+ get { return this.warningType; }
+ set { this.warningType = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string WarningMessage
+ {
+ get { return this.warningMessage; }
+ set { this.warningMessage = value; }
+ }
+
+
+
+ }
+}
diff --git a/CleanMachine.Model/WarningLog.cs b/CleanMachine.Model/WarningLog.cs
new file mode 100644
index 0000000..9a42d9a
--- /dev/null
+++ b/CleanMachine.Model/WarningLog.cs
@@ -0,0 +1,118 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CleanMachine.Model
+{
+ ///
+ ///
+ ///
+ public class WarningLog : BaseModel
+ {
+
+ private string warningLogId;
+ private string warningCode;
+ private string warningName;
+ private string warningType;
+ private string warningMessage;
+ private DateTime warningTime;
+ private string plcItemCode;
+ private int waringStatus;
+ private int warningHandleResult;
+ private DateTime warningHandleTime;
+
+
+ ///
+ ///
+ ///
+ public string WarningLogId
+ {
+ get { return this.warningLogId; }
+ set { this.warningLogId = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string WarningCode
+ {
+ get { return this.warningCode; }
+ set { this.warningCode = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string WarningName
+ {
+ get { return this.warningName; }
+ set { this.warningName = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string WarningType
+ {
+ get { return this.warningType; }
+ set { this.warningType = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string WarningMessage
+ {
+ get { return this.warningMessage; }
+ set { this.warningMessage = value; }
+ }
+
+ ///
+ ///
+ ///
+ public DateTime WarningTime
+ {
+ get { return this.warningTime; }
+ set { this.warningTime = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string PlcItemCode
+ {
+ get { return this.plcItemCode; }
+ set { this.plcItemCode = value; }
+ }
+
+ ///
+ ///
+ ///
+ public int WaringStatus
+ {
+ get { return this.waringStatus; }
+ set { this.waringStatus = value; }
+ }
+
+ ///
+ ///
+ ///
+ public int WarningHandleResult
+ {
+ get { return this.warningHandleResult; }
+ set { this.warningHandleResult = value; }
+ }
+
+ ///
+ ///
+ ///
+ public DateTime WarningHandleTime
+ {
+ get { return this.warningHandleTime; }
+ set { this.warningHandleTime = value; }
+ }
+
+
+
+ }
+}
diff --git a/CleanMachine.Model/WorkingPallet.cs b/CleanMachine.Model/WorkingPallet.cs
new file mode 100644
index 0000000..9a2e059
--- /dev/null
+++ b/CleanMachine.Model/WorkingPallet.cs
@@ -0,0 +1,58 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CleanMachine.Model
+{
+ ///
+ ///
+ ///
+ public class WorkingPallet : BaseModel
+ {
+
+ private string workingPalletId;
+ private string workingPalletCode;
+ private string workingPalletDesc;
+ private string workingStatus;
+
+
+ ///
+ ///
+ ///
+ public string WorkingPalletId
+ {
+ get { return this.workingPalletId; }
+ set { this.workingPalletId = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string WorkingPalletCode
+ {
+ get { return this.workingPalletCode; }
+ set { this.workingPalletCode = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string WorkingPalletDesc
+ {
+ get { return this.workingPalletDesc; }
+ set { this.workingPalletDesc = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string WorkingStatus
+ {
+ get { return this.workingStatus; }
+ set { this.workingStatus = value; }
+ }
+
+
+
+ }
+}
diff --git a/CleanMachine.Model/WorkingPalletDtl.cs b/CleanMachine.Model/WorkingPalletDtl.cs
new file mode 100644
index 0000000..a6ccc50
--- /dev/null
+++ b/CleanMachine.Model/WorkingPalletDtl.cs
@@ -0,0 +1,138 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CleanMachine.Model
+{
+ ///
+ ///
+ ///
+ public class WorkingPalletDtl : BaseModel
+ {
+
+ private string workingPalletDtlId;
+ private string workingPalletCode;
+ private string irCode;
+ private string sheetTypeCode;
+ private DateTime inputTime;
+ private string cleanModeCode;
+ private string contaminationTypeCode;
+ private string contaminationDtlCode;
+ private int currentNumber;
+ private int operateUserId;
+ private DateTime operateUserTime;
+ private int workingDtlStatus;
+
+
+ ///
+ ///
+ ///
+ public string WorkingPalletDtlId
+ {
+ get { return this.workingPalletDtlId; }
+ set { this.workingPalletDtlId = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string WorkingPalletCode
+ {
+ get { return this.workingPalletCode; }
+ set { this.workingPalletCode = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string IrCode
+ {
+ get { return this.irCode; }
+ set { this.irCode = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string SheetTypeCode
+ {
+ get { return this.sheetTypeCode; }
+ set { this.sheetTypeCode = value; }
+ }
+
+ ///
+ ///
+ ///
+ public DateTime InputTime
+ {
+ get { return this.inputTime; }
+ set { this.inputTime = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string CleanModeCode
+ {
+ get { return this.cleanModeCode; }
+ set { this.cleanModeCode = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string ContaminationTypeCode
+ {
+ get { return this.contaminationTypeCode; }
+ set { this.contaminationTypeCode = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string ContaminationDtlCode
+ {
+ get { return this.contaminationDtlCode; }
+ set { this.contaminationDtlCode = value; }
+ }
+
+ ///
+ ///
+ ///
+ public int CurrentNumber
+ {
+ get { return this.currentNumber; }
+ set { this.currentNumber = value; }
+ }
+
+ ///
+ ///
+ ///
+ public int OperateUserId
+ {
+ get { return this.operateUserId; }
+ set { this.operateUserId = value; }
+ }
+
+ ///
+ ///
+ ///
+ public DateTime OperateUserTime
+ {
+ get { return this.operateUserTime; }
+ set { this.operateUserTime = value; }
+ }
+
+ ///
+ ///
+ ///
+ public int WorkingDtlStatus
+ {
+ get { return this.workingDtlStatus; }
+ set { this.workingDtlStatus = value; }
+ }
+
+
+
+ }
+}
diff --git a/CleanMachine.Model/ZbkWorkingPallet.cs b/CleanMachine.Model/ZbkWorkingPallet.cs
new file mode 100644
index 0000000..ebf948e
--- /dev/null
+++ b/CleanMachine.Model/ZbkWorkingPallet.cs
@@ -0,0 +1,57 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CleanMachine.Model
+{
+ ///
+ ///
+ ///
+ public class ZbkWorkingPallet:BaseModel
+ {
+
+ private string workingPalletId;
+ private string workingPalletCode;
+ private string workingPalletDesc;
+ private int workingStatus;
+
+
+ ///
+ ///
+ ///
+ public string WorkingPalletId
+ {
+ get { return this.workingPalletId; }
+ set { this.workingPalletId = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string WorkingPalletCode
+ {
+ get { return this.workingPalletCode; }
+ set { this.workingPalletCode = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string WorkingPalletDesc
+ {
+ get { return this.workingPalletDesc; }
+ set { this.workingPalletDesc = value; }
+ }
+
+ ///
+ ///
+ ///
+ public int WorkingStatus
+ {
+ get { return this.workingStatus; }
+ set { this.workingStatus = value; }
+ }
+
+
+ }
+}
diff --git a/CleanMachine.Model/ZbkWorkingPalletDtl.cs b/CleanMachine.Model/ZbkWorkingPalletDtl.cs
new file mode 100644
index 0000000..098d140
--- /dev/null
+++ b/CleanMachine.Model/ZbkWorkingPalletDtl.cs
@@ -0,0 +1,137 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CleanMachine.Model
+{
+ ///
+ ///
+ ///
+ public class ZbkWorkingPalletDtl : BaseModel
+ {
+
+ private string workingPalletDtlId;
+ private string workingPalletCode;
+ private string irCode;
+ private string sheetTypeCode;
+ private DateTime inputTime;
+ private string cleanModeCode;
+ private string contaminationTypeCode;
+ private string contaminationDtlCode;
+ private int currentNumber;
+ private int operateUserId;
+ private DateTime operateUserTime;
+ private int workingDtlStatus;
+
+
+ ///
+ ///
+ ///
+ public string WorkingPalletDtlId
+ {
+ get { return this.workingPalletDtlId; }
+ set { this.workingPalletDtlId = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string WorkingPalletCode
+ {
+ get { return this.workingPalletCode; }
+ set { this.workingPalletCode = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string IrCode
+ {
+ get { return this.irCode; }
+ set { this.irCode = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string SheetTypeCode
+ {
+ get { return this.sheetTypeCode; }
+ set { this.sheetTypeCode = value; }
+ }
+
+ ///
+ ///
+ ///
+ public DateTime InputTime
+ {
+ get { return this.inputTime; }
+ set { this.inputTime = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string CleanModeCode
+ {
+ get { return this.cleanModeCode; }
+ set { this.cleanModeCode = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string ContaminationTypeCode
+ {
+ get { return this.contaminationTypeCode; }
+ set { this.contaminationTypeCode = value; }
+ }
+
+ ///
+ ///
+ ///
+ public string ContaminationDtlCode
+ {
+ get { return this.contaminationDtlCode; }
+ set { this.contaminationDtlCode = value; }
+ }
+
+ ///
+ ///
+ ///
+ public int CurrentNumber
+ {
+ get { return this.currentNumber; }
+ set { this.currentNumber = value; }
+ }
+
+ ///
+ ///
+ ///
+ public int OperateUserId
+ {
+ get { return this.operateUserId; }
+ set { this.operateUserId = value; }
+ }
+
+ ///
+ ///
+ ///
+ public DateTime OperateUserTime
+ {
+ get { return this.operateUserTime; }
+ set { this.operateUserTime = value; }
+ }
+
+ ///
+ ///
+ ///
+ public int WorkingDtlStatus
+ {
+ get { return this.workingDtlStatus; }
+ set { this.workingDtlStatus = value; }
+ }
+
+
+ }
+}
diff --git a/CleanMachineHMI.sln b/CleanMachineHMI.sln
index 8ebb487..76349ba 100644
--- a/CleanMachineHMI.sln
+++ b/CleanMachineHMI.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.30330.147
+# Visual Studio Version 17
+VisualStudioVersion = 17.0.32014.148
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CleanMachineHMI", "CleanMachineHMI\CleanMachineHMI.csproj", "{9CF77369-B471-4476-9F42-779945113EA5}"
EndProject
@@ -15,6 +15,8 @@ Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "CleanMachineSoftware_Setup"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CleanMachine.Control", "CleanMachine.Control\CleanMachine.Control.csproj", "{6891D010-F826-49C9-A087-2717A264BC16}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CleanMachine.Model", "CleanMachine.Model\CleanMachine.Model.csproj", "{BC0DA19C-0C89-4D3D-9DEE-1673D465A688}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -91,6 +93,18 @@ Global
{6891D010-F826-49C9-A087-2717A264BC16}.Release|x64.Build.0 = Release|Any CPU
{6891D010-F826-49C9-A087-2717A264BC16}.Release|x86.ActiveCfg = Release|Any CPU
{6891D010-F826-49C9-A087-2717A264BC16}.Release|x86.Build.0 = Release|Any CPU
+ {BC0DA19C-0C89-4D3D-9DEE-1673D465A688}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BC0DA19C-0C89-4D3D-9DEE-1673D465A688}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BC0DA19C-0C89-4D3D-9DEE-1673D465A688}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {BC0DA19C-0C89-4D3D-9DEE-1673D465A688}.Debug|x64.Build.0 = Debug|Any CPU
+ {BC0DA19C-0C89-4D3D-9DEE-1673D465A688}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {BC0DA19C-0C89-4D3D-9DEE-1673D465A688}.Debug|x86.Build.0 = Debug|Any CPU
+ {BC0DA19C-0C89-4D3D-9DEE-1673D465A688}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BC0DA19C-0C89-4D3D-9DEE-1673D465A688}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BC0DA19C-0C89-4D3D-9DEE-1673D465A688}.Release|x64.ActiveCfg = Release|Any CPU
+ {BC0DA19C-0C89-4D3D-9DEE-1673D465A688}.Release|x64.Build.0 = Release|Any CPU
+ {BC0DA19C-0C89-4D3D-9DEE-1673D465A688}.Release|x86.ActiveCfg = Release|Any CPU
+ {BC0DA19C-0C89-4D3D-9DEE-1673D465A688}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/CleanMachineHMI/CleanMachineHMI.csproj b/CleanMachineHMI/CleanMachineHMI.csproj
index 04d1d75..0984738 100644
--- a/CleanMachineHMI/CleanMachineHMI.csproj
+++ b/CleanMachineHMI/CleanMachineHMI.csproj
@@ -260,7 +260,6 @@
-
Form
@@ -609,6 +608,10 @@
{6891d010-f826-49c9-a087-2717a264bc16}
CleanMachine.Control
+
+ {bc0da19c-0c89-4d3d-9dee-1673d465a688}
+ CleanMachine.Model
+
{f7af907b-5ddc-469f-956c-08c5fd110448}
CleanMachineHMI.Domain
diff --git a/CleanMachineHMI/Form2.cs b/CleanMachineHMI/Form2.cs
index 1115eaf..4823159 100644
--- a/CleanMachineHMI/Form2.cs
+++ b/CleanMachineHMI/Form2.cs
@@ -1,4 +1,5 @@
-using Krypton.Navigator;
+using CleanMachine.Model;
+using Krypton.Navigator;
using Krypton.Toolkit;
using System;
using System.Collections.Generic;
@@ -23,7 +24,7 @@ namespace CleanMachineHMI
{
kryptonNavigator1.Pages.Clear();
AddFrmPage(null, null);
- GlobalHelper.CmWarningLogMd_List_1 = new List();
+ GlobalHelper.CmWarningLogMd_List_1 = new List();
}
private void kryptonButton8_BackColorChanged(object sender, EventArgs e)
@@ -85,14 +86,14 @@ namespace CleanMachineHMI
private void kryptonButton9_Click(object sender, EventArgs e)
{
- GlobalHelper.CmWarningLogMd_List_1.Add(new CM_WarningLogMd {
+ GlobalHelper.CmWarningLogMd_List_1.Add(new WarningLog {
WarningCode = "TestAlarm001",
WarningName = "TestAlarm001",
WarningType = "TestAlarm001",
WarningMessage = "TestAlarm001",
WarningTime = DateTime.Now,
PlcItemCode = "TestAlarm001",
- WarningStatus = 0,
+ WaringStatus = 0,
WarningHandleResult = 0,
CreateBy = 1,
CreateTime = DateTime.Now,
@@ -104,10 +105,10 @@ namespace CleanMachineHMI
private void kryptonButton10_Click(object sender, EventArgs e)
{
- CM_WarningLogMd tmpWarn = GlobalHelper.CmWarningLogMd_List_1.Find(x => x.WarningStatus == 0);
+ WarningLog tmpWarn = GlobalHelper.CmWarningLogMd_List_1.Find(x => x.WaringStatus == 0);
if (tmpWarn != null)
{
- tmpWarn.WarningStatus = 1;
+ tmpWarn.WaringStatus = 1;
}
}
private void timer1_Tick(object sender, EventArgs e)
diff --git a/CleanMachineHMI/FrmUserControl/frmIOMonitor.cs b/CleanMachineHMI/FrmUserControl/frmIOMonitor.cs
index 9d413fa..c29ba08 100644
--- a/CleanMachineHMI/FrmUserControl/frmIOMonitor.cs
+++ b/CleanMachineHMI/FrmUserControl/frmIOMonitor.cs
@@ -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 tempLst = GlobalHelper.PlcItemMd_X_List.OrderBy(x => Convert.ToInt32(x.PlcItemPriAddress)).ToList();
- foreach (BasPlcItemMd item in tempLst)
+ List 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 tempLst = GlobalHelper.PlcItemMd_Y_List.OrderBy(x => Convert.ToInt32(x.PlcItemPriAddress)).ToList();
- foreach (BasPlcItemMd item in tempLst)
+ List tempLst = GlobalHelper.PlcItemMd_Y_List.OrderBy(x => Convert.ToInt32(x.PlcItemPriAddress)).ToList();
+ foreach (PlcItem item in tempLst)
{
Invoke(new Action(() =>
{
diff --git a/CleanMachineHMI/FrmUserControl/frmMainDetail.cs b/CleanMachineHMI/FrmUserControl/frmMainDetail.cs
index ede832a..38a9b98 100644
--- a/CleanMachineHMI/FrmUserControl/frmMainDetail.cs
+++ b/CleanMachineHMI/FrmUserControl/frmMainDetail.cs
@@ -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;
}
}));
diff --git a/CleanMachineHMI/FrmUserControl/frmPlcAlarmLog.cs b/CleanMachineHMI/FrmUserControl/frmPlcAlarmLog.cs
index 4ea4458..29eceb6 100644
--- a/CleanMachineHMI/FrmUserControl/frmPlcAlarmLog.cs
+++ b/CleanMachineHMI/FrmUserControl/frmPlcAlarmLog.cs
@@ -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 tmpWarningLogList = new List();
+ List tmpWarningLogList = new List();
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";
diff --git a/CleanMachineHMI/FrmUserControl/frmPlcItemConfig.cs b/CleanMachineHMI/FrmUserControl/frmPlcItemConfig.cs
index e394d76..db189aa 100644
--- a/CleanMachineHMI/FrmUserControl/frmPlcItemConfig.cs
+++ b/CleanMachineHMI/FrmUserControl/frmPlcItemConfig.cs
@@ -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 tmpMdList;
+ List 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;
diff --git a/CleanMachineHMI/Model/BasCleanTypeMsg.cs b/CleanMachineHMI/Model/BasCleanTypeMsg.cs
index 305a107..9897057 100644
--- a/CleanMachineHMI/Model/BasCleanTypeMsg.cs
+++ b/CleanMachineHMI/Model/BasCleanTypeMsg.cs
@@ -8,11 +8,11 @@ namespace CleanMachineHMI
{
public class BasCleanTypeMsg
{
- public string CLEAN_MODE_CODE { get; set; }
- public string CLEAN_MODE_NAME { get; set; }
- public string CONTAMINATION_TYPE_CODE { get; set; }
- public string CONTAMINATION_TYPE_NAME { get; set; }
- public string CONTAMINATION_DTL_CODE { get; set; }
- public string CONTAMINATION_DTL_NAME { get; set; }
+ public string CleanModeCode { get; set; }
+ public string CleanModeName { get; set; }
+ public string ContaminationTypeCode { get; set; }
+ public string ContaminationTypeName { get; set; }
+ public string ContaminationDtlCode { get; set; }
+ public string ContaminationDtlName { get; set; }
}
}
diff --git a/CleanMachineHMI/Model/BasPlcItemMd.cs b/CleanMachineHMI/Model/BasPlcItemMd.cs
index 7bbc792..4788000 100644
--- a/CleanMachineHMI/Model/BasPlcItemMd.cs
+++ b/CleanMachineHMI/Model/BasPlcItemMd.cs
@@ -6,17 +6,5 @@ using System.Threading.Tasks;
namespace CleanMachineHMI
{
- public class BasPlcItemMd
- {
- public int PlcItemId { get; set; }
- public string PlcItemCode { get; set; }
- public string PlcItemName { get; set; }
- public int PlcItemType { get; set; }
- public int PlcItemDataType { get; set; }
- public string PlcItemPriAddress { get; set; }
- public string PlcItemModbusAddress { get; set; }
- public string PlcItemDeviationAddress { get; set; }
- public string PlcItemValue { get; set; }
- public int PlcItemDataLen { get; set; }
- }
+
}
diff --git a/CleanMachineHMI/Model/CM_WarningLogMd.cs b/CleanMachineHMI/Model/CM_WarningLogMd.cs
deleted file mode 100644
index 8fb1d27..0000000
--- a/CleanMachineHMI/Model/CM_WarningLogMd.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace CleanMachineHMI
-{
- public class CM_WarningLogMd
- {
- public string WarningCode { get; set; }
- public string WarningName { get; set; }
- public string WarningType { get; set; }
- public string WarningMessage { get; set; }
- public DateTime WarningTime { get; set; }
- public string PlcItemCode { get; set; }
- public int WarningStatus { get; set; }
- public int WarningHandleResult { get; set; }
- public DateTime WarningHandleTime { get; set; }
-
- public int CreateBy { get; set; }
- public DateTime CreateTime { get; set; }
-
- public int UpdateBy { get; set; }
- public DateTime UpdateTime { get; set; }
-
- public int DataVersion { get; set; }
- }
-}
diff --git a/CleanMachineHMI/Utils/GlobalHelper.cs b/CleanMachineHMI/Utils/GlobalHelper.cs
index 66f4fc2..b26984c 100644
--- a/CleanMachineHMI/Utils/GlobalHelper.cs
+++ b/CleanMachineHMI/Utils/GlobalHelper.cs
@@ -1,4 +1,5 @@
-using CleanMachineHMI.Domain.Enums;
+using CleanMachine.Model;
+using CleanMachineHMI.Domain.Enums;
using CleanMachineHMI.Domain.Models.ViewModels;
using CleanMachineHMI.forms;
using CleanMachineHMI.frmChild;
@@ -62,21 +63,21 @@ namespace CleanMachineHMI
///
///
///
- public static List PlcItemMdList { get; set; }
- public static List PlcItemMd_D_List { get; set; }
+ public static List PlcItemMdList { get; set; }
+ public static List PlcItemMd_D_List { get; set; }
- public static List PlcItemMd_M_List { get; set; }
+ public static List PlcItemMd_M_List { get; set; }
- public static List PlcItemMd_X_List { get; set; }
+ public static List PlcItemMd_X_List { get; set; }
- public static List PlcItemMd_Y_List { get; set; }
+ public static List PlcItemMd_Y_List { get; set; }
public static List BasWarningMd_List { get; set; }
- public static List CmWarningLogMd_List { get; set; }
-
- public static List CmWarningLogMd_List_1 { get; set; }
+ public static List CmWarningLogMd_List { get; set; }
+ public static List CmWarningLogMd_List_1 { get; set; }
+
///
/// 参数列表
///
diff --git a/CleanMachineHMI/Utils/PlcOperationHelper.cs b/CleanMachineHMI/Utils/PlcOperationHelper.cs
index e2565d8..bfa8866 100644
--- a/CleanMachineHMI/Utils/PlcOperationHelper.cs
+++ b/CleanMachineHMI/Utils/PlcOperationHelper.cs
@@ -1,5 +1,6 @@
#define USE_LOCAL_TCP_DEBUG //使用本地调式
+using CleanMachine.Model;
using LeadDataBaseUtility;
using Modbus.Device;
using NX_LogUtility;
@@ -134,7 +135,7 @@ namespace CleanMachineHMI
{
if (GlobalHelper.PlcItemMd_M_List != null && GlobalHelper.PlcItemMd_M_List.Count > 0)
{
- foreach (BasPlcItemMd item in GlobalHelper.PlcItemMd_M_List)
+ foreach (PlcItem item in GlobalHelper.PlcItemMd_M_List)
{
if (Convert.ToInt32(item.PlcItemPriAddress) >= 200)
{
@@ -177,7 +178,7 @@ namespace CleanMachineHMI
{
if (GlobalHelper.PlcItemMd_D_List != null && GlobalHelper.PlcItemMd_D_List.Count > 0)
{
- foreach (BasPlcItemMd item in GlobalHelper.PlcItemMd_D_List)
+ foreach (PlcItem item in GlobalHelper.PlcItemMd_D_List)
{
if (!string.IsNullOrEmpty(item.PlcItemDeviationAddress))
{
@@ -191,7 +192,7 @@ namespace CleanMachineHMI
}
else
{
- if (item.PlcItemDataLen == 2)
+ if (item.PlcItemDataLength == 2)
{
ushort[] tmp_1 = new ushort[] { readBytArr_D[plcItemDeviationAddress], readBytArr_D[plcItemDeviationAddress + 1] };
@@ -249,7 +250,7 @@ namespace CleanMachineHMI
Bas_WarningMd tmpMd = GlobalHelper.BasWarningMd_List.Find(x => x.PlcItemCode == $"{priStr + (index + i)}" && x.WarningCode == $"{priWarnCode + j}" && x.WarningType == "1");
if (tmpMd != null)
{
- CM_WarningLogMd warnLogTmp = GlobalHelper.CmWarningLogMd_List.Find(y => y.WarningStatus == 0 && y.WarningHandleResult == 0 && y.WarningCode == tmpMd.WarningCode && y.PlcItemCode == tmpMd.PlcItemCode);
+ WarningLog warnLogTmp = GlobalHelper.CmWarningLogMd_List.Find(y => y.WaringStatus == 0 && y.WarningHandleResult == 0 && y.WarningCode == tmpMd.WarningCode && y.PlcItemCode == tmpMd.PlcItemCode);
if (warnLogTmp != null)
{//找到报警项,并增加版本
warnLogTmp.UpdateTime = DateTime.Now;
@@ -257,7 +258,7 @@ namespace CleanMachineHMI
}
else
{//新报警增加记录
- GlobalHelper.CmWarningLogMd_List.Add(new CM_WarningLogMd
+ GlobalHelper.CmWarningLogMd_List.Add(new WarningLog
{
WarningCode = tmpMd.WarningCode,
WarningName = tmpMd.WarningName,
@@ -265,7 +266,7 @@ namespace CleanMachineHMI
WarningMessage = tmpMd.WarningMessage,
WarningTime = DateTime.Now,
PlcItemCode = tmpMd.PlcItemCode,
- WarningStatus = 0,
+ WaringStatus = 0,
WarningHandleResult = 0,
CreateBy = 1,
CreateTime = DateTime.Now,
@@ -329,12 +330,12 @@ namespace CleanMachineHMI
Bas_WarningMd tmpMd = GlobalHelper.BasWarningMd_List.Find(x => x.PlcItemCode == $"{priStr + (index + i)}" && x.WarningCode == $"{priWarnCode + j}" && x.WarningType == "1");
if (tmpMd != null)
{//之前有报警,则结束当前报警项
- CM_WarningLogMd warnLogTmp = GlobalHelper.CmWarningLogMd_List.Find(y => y.WarningStatus == 0 && y.WarningHandleResult == 0 && y.WarningCode == tmpMd.WarningCode && y.PlcItemCode == tmpMd.PlcItemCode);
+ WarningLog warnLogTmp = GlobalHelper.CmWarningLogMd_List.Find(y => y.WaringStatus == 0 && y.WarningHandleResult == 0 && y.WarningCode == tmpMd.WarningCode && y.PlcItemCode == tmpMd.PlcItemCode);
if (warnLogTmp != null)
{
warnLogTmp.UpdateTime = DateTime.Now;
warnLogTmp.DataVersion += 1;
- warnLogTmp.WarningStatus = 1;
+ warnLogTmp.WaringStatus = 1;
warnLogTmp.WarningHandleResult = 1;
warnLogTmp.WarningHandleTime = DateTime.Now;
}
@@ -388,12 +389,12 @@ namespace CleanMachineHMI
{//D13~D19报警
if (tmpReadAlarmBytArr_D[i] == 0)
{
- CM_WarningLogMd warnLogTmp = GlobalHelper.CmWarningLogMd_List.Find(y => y.WarningStatus == 0 && y.WarningHandleResult == 0 && y.PlcItemCode == $"{priStr + (index + i)}");
+ WarningLog warnLogTmp = GlobalHelper.CmWarningLogMd_List.Find(y => y.WaringStatus == 0 && y.WarningHandleResult == 0 && y.PlcItemCode == $"{priStr + (index + i)}");
if (warnLogTmp != null)
{
warnLogTmp.UpdateTime = DateTime.Now;
warnLogTmp.DataVersion += 1;
- warnLogTmp.WarningStatus = 1;
+ warnLogTmp.WaringStatus = 1;
warnLogTmp.WarningHandleResult = 1;
warnLogTmp.WarningHandleTime = DateTime.Now;
}
@@ -420,7 +421,7 @@ namespace CleanMachineHMI
Bas_WarningMd tmpMd = GlobalHelper.BasWarningMd_List.Find(x => string.IsNullOrEmpty(x.PlcItemCode) && x.WarningCode == tmpReadAlarmBytArr_D[i].ToString() && x.WarningType == "2");
if (tmpMd != null)
{
- CM_WarningLogMd warnLogTmp = GlobalHelper.CmWarningLogMd_List.Find(y => y.WarningStatus == 0 && y.WarningHandleResult == 0 && y.WarningCode == tmpMd.WarningCode && y.PlcItemCode == $"{priStr + (index + i)}");
+ WarningLog warnLogTmp = GlobalHelper.CmWarningLogMd_List.Find(y => y.WaringStatus == 0 && y.WarningHandleResult == 0 && y.WarningCode == tmpMd.WarningCode && y.PlcItemCode == $"{priStr + (index + i)}");
if (warnLogTmp != null)
{
warnLogTmp.UpdateTime = DateTime.Now;
@@ -428,7 +429,7 @@ namespace CleanMachineHMI
}
else
{
- GlobalHelper.CmWarningLogMd_List.Add(new CM_WarningLogMd
+ GlobalHelper.CmWarningLogMd_List.Add(new WarningLog
{
WarningCode = tmpMd.WarningCode,
WarningName = tmpMd.WarningName,
@@ -436,7 +437,7 @@ namespace CleanMachineHMI
WarningMessage = tmpMd.WarningMessage,
WarningTime = DateTime.Now,
PlcItemCode = $"{priStr + (index + i)}",
- WarningStatus = 0,
+ WaringStatus = 0,
WarningHandleResult = 0,
CreateBy = 1,
CreateTime = DateTime.Now,
@@ -502,10 +503,10 @@ namespace CleanMachineHMI
}
}
- List tmpLst = GlobalHelper.CmWarningLogMd_List.FindAll(x => x.WarningHandleResult == 1 && x.WarningStatus == 1);
+ List tmpLst = GlobalHelper.CmWarningLogMd_List.FindAll(x => x.WarningHandleResult == 1 && x.WaringStatus == 1);
if (tmpLst.Count >= 10)
{
- foreach (CM_WarningLogMd item in tmpLst)
+ foreach (WarningLog item in tmpLst)
{
string sql1 = $@"
INSERT INTO CM_WARNING_LOG (
@@ -531,7 +532,7 @@ namespace CleanMachineHMI
'{item.WarningMessage}',
'{item.WarningTime.ToString("yyyy-MM-dd HH:mm:ss")}',
'{item.PlcItemCode}',
- '{item.WarningStatus}',
+ '{item.WaringStatus}',
'{item.WarningHandleResult}',
'{item.WarningHandleTime.ToString("yyyy-MM-dd HH:mm:ss")}',
'{item.CreateBy}',
@@ -543,10 +544,10 @@ namespace CleanMachineHMI
";
LeadDbHelperSQLite.ExecuteSql(sql1);
}
- GlobalHelper.CmWarningLogMd_List.RemoveAll(x => x.WarningHandleResult == 1 && x.WarningStatus == 1);
+ GlobalHelper.CmWarningLogMd_List.RemoveAll(x => x.WarningHandleResult == 1 && x.WaringStatus == 1);
}
- if (GlobalHelper.CmWarningLogMd_List.FindAll(x => x.WarningHandleResult == 0 && x.WarningStatus == 0).Count > 0)
+ if (GlobalHelper.CmWarningLogMd_List.FindAll(x => x.WarningHandleResult == 0 && x.WaringStatus == 0).Count > 0)
{
//frmMainNew.Show_ptb_Alarm(true);
GlobalHelper.ShowMainFrmAlarmMsg(true, EventArgs.Empty);
@@ -573,7 +574,7 @@ namespace CleanMachineHMI
{
if (GlobalHelper.PlcItemMd_X_List != null && GlobalHelper.PlcItemMd_X_List.Count > 0)
{
- foreach (BasPlcItemMd item in GlobalHelper.PlcItemMd_X_List)
+ foreach (PlcItem item in GlobalHelper.PlcItemMd_X_List)
{
if (!string.IsNullOrEmpty(item.PlcItemDeviationAddress))
{
@@ -608,7 +609,7 @@ namespace CleanMachineHMI
{
if (GlobalHelper.PlcItemMd_Y_List != null && GlobalHelper.PlcItemMd_Y_List.Count > 0)
{
- foreach (BasPlcItemMd item in GlobalHelper.PlcItemMd_Y_List)
+ foreach (PlcItem item in GlobalHelper.PlcItemMd_Y_List)
{
if (!string.IsNullOrEmpty(item.PlcItemDeviationAddress))
{
@@ -641,7 +642,7 @@ namespace CleanMachineHMI
switch (itemType)
{
case PlcItemTypeDesc.M:
- BasPlcItemMd item_M = GlobalHelper.PlcItemMd_M_List.Find(x => x.PlcItemCode == plcItemCode);
+ PlcItem item_M = GlobalHelper.PlcItemMd_M_List.Find(x => x.PlcItemCode == plcItemCode);
if (item_M == null)
{
return null;
@@ -656,7 +657,7 @@ namespace CleanMachineHMI
}
break;
case PlcItemTypeDesc.D:
- BasPlcItemMd item_D = GlobalHelper.PlcItemMd_D_List.Find(x => x.PlcItemCode == plcItemCode);
+ PlcItem item_D = GlobalHelper.PlcItemMd_D_List.Find(x => x.PlcItemCode == plcItemCode);
if (item_D == null)
{
return null;
@@ -671,7 +672,7 @@ namespace CleanMachineHMI
}
break;
case PlcItemTypeDesc.X:
- BasPlcItemMd item_X = GlobalHelper.PlcItemMd_X_List.Find(x => x.PlcItemCode == plcItemCode);
+ PlcItem item_X = GlobalHelper.PlcItemMd_X_List.Find(x => x.PlcItemCode == plcItemCode);
if (item_X == null)
{
return null;
@@ -686,7 +687,7 @@ namespace CleanMachineHMI
}
break;
case PlcItemTypeDesc.Y:
- BasPlcItemMd item_Y = GlobalHelper.PlcItemMd_Y_List.Find(x => x.PlcItemCode == plcItemCode);
+ PlcItem item_Y = GlobalHelper.PlcItemMd_Y_List.Find(x => x.PlcItemCode == plcItemCode);
if (item_Y == null)
{
return null;
@@ -721,7 +722,7 @@ namespace CleanMachineHMI
switch (itemType)
{
case PlcItemTypeDesc.M:
- BasPlcItemMd item_M = GlobalHelper.PlcItemMd_M_List.Find(x => x.PlcItemCode == plcItemCode);
+ PlcItem item_M = GlobalHelper.PlcItemMd_M_List.Find(x => x.PlcItemCode == plcItemCode);
if (item_M == null)
{
return false;
@@ -729,7 +730,7 @@ namespace CleanMachineHMI
master.WriteSingleCoil(slaveAddress, Convert.ToUInt16(item_M.PlcItemModbusAddress), bool.Parse(writeValue));
return true;
case PlcItemTypeDesc.Y:
- BasPlcItemMd item_Y = GlobalHelper.PlcItemMd_Y_List.Find(x => x.PlcItemCode == plcItemCode);
+ PlcItem item_Y = GlobalHelper.PlcItemMd_Y_List.Find(x => x.PlcItemCode == plcItemCode);
if (item_Y == null)
{
return false;
@@ -737,7 +738,7 @@ namespace CleanMachineHMI
master.WriteSingleCoil(slaveAddress, Convert.ToUInt16(item_Y.PlcItemModbusAddress), bool.Parse(writeValue));
return true;
case PlcItemTypeDesc.D:
- BasPlcItemMd item_D = GlobalHelper.PlcItemMd_D_List.Find(x => x.PlcItemCode == plcItemCode);
+ PlcItem item_D = GlobalHelper.PlcItemMd_D_List.Find(x => x.PlcItemCode == plcItemCode);
if (item_D == null)
{
return false;
diff --git a/CleanMachineHMI/frmChild/frmAddContaminationDtl.cs b/CleanMachineHMI/frmChild/frmAddContaminationDtl.cs
index 924459c..e3bdb02 100644
--- a/CleanMachineHMI/frmChild/frmAddContaminationDtl.cs
+++ b/CleanMachineHMI/frmChild/frmAddContaminationDtl.cs
@@ -49,6 +49,7 @@ namespace CleanMachineHMI.frmChild
this.SetFormControlText(GlobalHelper.LanguageCode);
string sql = $@"select CONTAMINATION_TYPE_CODE,CONTAMINATION_TYPE_NAME from BAS_CONTAMINATION_TYPE where DEL_FLAG=0";
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
+ cmbContaminationType.DisplayMember = "Text";
if (dt != null && dt.Rows.Count > 0)
{
cmbContaminationType.Items.Add(new ListItem
diff --git a/CleanMachineHMI/frmChild/frmAddContaminationType.cs b/CleanMachineHMI/frmChild/frmAddContaminationType.cs
index c7ed5f9..723fc8f 100644
--- a/CleanMachineHMI/frmChild/frmAddContaminationType.cs
+++ b/CleanMachineHMI/frmChild/frmAddContaminationType.cs
@@ -49,6 +49,7 @@ namespace CleanMachineHMI.frmChild
this.SetFormControlText(GlobalHelper.LanguageCode);
string sql = $@"select CLEAN_MODE_CODE,CLEAN_MODE_NAME from BAS_CLEAN_MODE where DEL_FLAG=0";
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
+ cmbCleanMode.DisplayMember = "Text";
if (dt != null && dt.Rows.Count > 0)
{
cmbCleanMode.Items.Add(new ListItem
diff --git a/CleanMachineHMI/frmChild/frmAddUser.cs b/CleanMachineHMI/frmChild/frmAddUser.cs
index 6458cd7..b627dda 100644
--- a/CleanMachineHMI/frmChild/frmAddUser.cs
+++ b/CleanMachineHMI/frmChild/frmAddUser.cs
@@ -63,6 +63,8 @@ namespace CleanMachineHMI.frmChild
}
string sql = $"SELECT ROLE_ID,ROLE_CODE,ROLE_NAME FROM SYS_ROLE ";
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
+ kcmb_Role.DisplayMember = "Text";
+ kcmb_Role.DisplayMember = "Text";
if (dt != null && dt.Rows.Count > 0)
{
kcmb_Role.Items.Clear();
diff --git a/CleanMachineHMI/frmIOMonitor_Old.cs b/CleanMachineHMI/frmIOMonitor_Old.cs
index 709488f..d30b7a2 100644
--- a/CleanMachineHMI/frmIOMonitor_Old.cs
+++ b/CleanMachineHMI/frmIOMonitor_Old.cs
@@ -15,7 +15,7 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
-
+using CleanMachine.Model;
namespace CleanMachineHMI
{
[FormType(EnumFormType.IoMonitor)]
@@ -39,7 +39,7 @@ namespace CleanMachineHMI
public class BtnPlcItemMonitor
{
public CircleButton ctn { get; set; }
- public BasPlcItemMd plcItemMd { get; set; }
+ public PlcItem plcItemMd { get; set; }
}
private void frmIOMonitor_Load(object sender, EventArgs e)
{
@@ -151,7 +151,7 @@ namespace CleanMachineHMI
if (GlobalHelper.PlcItemMd_X_List != null && GlobalHelper.PlcItemMd_X_List.Count > 0)
{
//List tempLst = AppConfig.PlcItemMd_X_List.FindAll(x => x.PlcItemName != "备用").OrderBy(x => Convert.ToInt32(x.PlcItemPriAddress)).ToList();
- List tempLst = GlobalHelper.PlcItemMd_X_List.OrderBy(x => Convert.ToInt32(x.PlcItemPriAddress)).ToList();
+ List tempLst = GlobalHelper.PlcItemMd_X_List.OrderBy(x => Convert.ToInt32(x.PlcItemPriAddress)).ToList();
int dataSum = tempLst.Count;
int rowNum;
if (dataSum % 2 == 0)
@@ -188,7 +188,7 @@ namespace CleanMachineHMI
colSecondLocX = wdNum + tmpSpace + 1;
int rowSpace = 7;
- foreach (BasPlcItemMd item in tempLst)
+ foreach (PlcItem item in tempLst)
{
if (tmpNum <= rowNum)
@@ -273,7 +273,7 @@ namespace CleanMachineHMI
if (GlobalHelper.PlcItemMd_Y_List != null && GlobalHelper.PlcItemMd_Y_List.Count > 0)
{
//List tempLst = AppConfig.PlcItemMd_Y_List.FindAll(x => x.PlcItemName != "备用").OrderBy(x => Convert.ToInt32(x.PlcItemPriAddress)).ToList();
- List tempLst = GlobalHelper.PlcItemMd_Y_List.OrderBy(x => Convert.ToInt32(x.PlcItemPriAddress)).ToList();
+ List tempLst = GlobalHelper.PlcItemMd_Y_List.OrderBy(x => Convert.ToInt32(x.PlcItemPriAddress)).ToList();
int dataSum = tempLst.Count;
//int dataSum = AppConfig.PlcItemMd_Y_List.Count;
int rowNum;
@@ -313,7 +313,7 @@ namespace CleanMachineHMI
colSecondLocX = wdNum + tmpSpace + 1;
int rowSpace = 7;
- foreach (BasPlcItemMd item in tempLst)
+ foreach (PlcItem item in tempLst)
{
if (tmpNum <= rowNum)
diff --git a/CleanMachineHMI/frmIoMonitorNew.cs b/CleanMachineHMI/frmIoMonitorNew.cs
index 61b485a..8236072 100644
--- a/CleanMachineHMI/frmIoMonitorNew.cs
+++ b/CleanMachineHMI/frmIoMonitorNew.cs
@@ -9,7 +9,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
-
+using CleanMachine.Model;
namespace CleanMachineHMI
{
public partial class frmIoMonitorNew : KryptonForm
@@ -67,7 +67,7 @@ namespace CleanMachineHMI
{
lock (lockObj)
{
- BasPlcItemMd item = sender as BasPlcItemMd;
+ PlcItem item = sender as PlcItem;
Invoke(new Action(() =>
{
if (item.PlcItemDataType == 2)
@@ -117,7 +117,7 @@ namespace CleanMachineHMI
{
lock (lockObj)
{
- BasPlcItemMd item = sender as BasPlcItemMd;
+ PlcItem item = sender as PlcItem;
Invoke(new Action(() =>
{
if (item.PlcItemDataType == 2)
@@ -170,8 +170,8 @@ namespace CleanMachineHMI
{
if (GlobalHelper.PlcItemMd_X_List != null && GlobalHelper.PlcItemMd_X_List.Count > 0)
{
- List tempLst = GlobalHelper.PlcItemMd_X_List.OrderBy(x => Convert.ToInt32(x.PlcItemPriAddress)).ToList();
- foreach (BasPlcItemMd item in tempLst)
+ List tempLst = GlobalHelper.PlcItemMd_X_List.OrderBy(x => Convert.ToInt32(x.PlcItemPriAddress)).ToList();
+ foreach (PlcItem item in tempLst)
{
Invoke(new Action(() =>
{
@@ -187,8 +187,8 @@ namespace CleanMachineHMI
if (GlobalHelper.PlcItemMd_Y_List != null && GlobalHelper.PlcItemMd_Y_List.Count > 0)
{
- List tempLst = GlobalHelper.PlcItemMd_Y_List.OrderBy(x => Convert.ToInt32(x.PlcItemPriAddress)).ToList();
- foreach (BasPlcItemMd item in tempLst)
+ List tempLst = GlobalHelper.PlcItemMd_Y_List.OrderBy(x => Convert.ToInt32(x.PlcItemPriAddress)).ToList();
+ foreach (PlcItem item in tempLst)
{
Invoke(new Action(() =>
{
@@ -222,7 +222,7 @@ namespace CleanMachineHMI
string plcItemNameAddress = pic.Name.Replace("picb_", "");
if (plcItemNameAddress.StartsWith("M"))
{
- BasPlcItemMd tmpPlc = GlobalHelper.PlcItemMd_M_List.First(x => x.PlcItemPriAddress == plcItemNameAddress.Replace("M", ""));
+ PlcItem tmpPlc = GlobalHelper.PlcItemMd_M_List.First(x => x.PlcItemPriAddress == plcItemNameAddress.Replace("M", ""));
if (tmpPlc != null)
{
ttp.SetToolTip(pic, tmpPlc.PlcItemName);
@@ -230,7 +230,7 @@ namespace CleanMachineHMI
}
else
{
- BasPlcItemMd tmpPlc = GlobalHelper.PlcItemMd_X_List.First(x => x.PlcItemPriAddress == Convert.ToInt32(plcItemNameAddress.Replace("X", ""), 10).ToString());
+ PlcItem tmpPlc = GlobalHelper.PlcItemMd_X_List.First(x => x.PlcItemPriAddress == Convert.ToInt32(plcItemNameAddress.Replace("X", ""), 10).ToString());
if (tmpPlc != null)
{
ttp.SetToolTip(pic, tmpPlc.PlcItemName);
diff --git a/CleanMachineHMI/frmMainNew.cs b/CleanMachineHMI/frmMainNew.cs
index 58fb61f..9b59c8d 100644
--- a/CleanMachineHMI/frmMainNew.cs
+++ b/CleanMachineHMI/frmMainNew.cs
@@ -1,4 +1,5 @@
-using CleanMachineHMI.Domain.Enums;
+using CleanMachine.Model;
+using CleanMachineHMI.Domain.Enums;
using CleanMachineHMI.frmChild;
using CleanMachineHMI.FrmUserControl;
using CleanMachineHMI.Utils;
@@ -147,19 +148,14 @@ namespace CleanMachineHMI
this.SetFormControlText(GlobalHelper.LanguageCode);
SwitchFrmMenu = new dlgSwitchFrmMenu(AddFrmMenuPage);
bool isInitStatus = PlcOperationHelper.Instance.PlcInit();
- string sql1 = $@"
- SELECT
- *
- FROM
- BAS_PLC_ITEM
- ";
+ string sql1 = $@" SELECT * FROM BAS_PLC_ITEM ";
DataTable dt1 = LeadDbHelperSQLite.Query(sql1).Tables[0];
if (dt1 != null && dt1.Rows.Count > 0)
{
- GlobalHelper.PlcItemMd_M_List = new List();
- GlobalHelper.PlcItemMd_D_List = new List();
- GlobalHelper.PlcItemMd_X_List = new List();
- GlobalHelper.PlcItemMd_Y_List = new List();
+ GlobalHelper.PlcItemMd_M_List = new List();
+ GlobalHelper.PlcItemMd_D_List = new List();
+ GlobalHelper.PlcItemMd_X_List = new List();
+ GlobalHelper.PlcItemMd_Y_List = new List();
foreach (DataRow item in dt1.Rows)
{
@@ -180,7 +176,7 @@ namespace CleanMachineHMI
SetPlcItem(GlobalHelper.PlcItemMd_Y_List, item);
}
}
- GlobalHelper.PlcItemMdList = new List();
+ GlobalHelper.PlcItemMdList = new List();
GlobalHelper.PlcItemMdList.AddRange(GlobalHelper.PlcItemMd_M_List);
GlobalHelper.PlcItemMdList.AddRange(GlobalHelper.PlcItemMd_D_List);
GlobalHelper.PlcItemMdList.AddRange(GlobalHelper.PlcItemMd_X_List);
@@ -267,7 +263,7 @@ namespace CleanMachineHMI
private void ShowWarningMsg()
{
- BasPlcItemMd item = GlobalHelper.PlcItemMd_D_List.FirstOrDefault(x => x.PlcItemCode == "AlarmPopUpMsg");
+ PlcItem item = GlobalHelper.PlcItemMd_D_List.FirstOrDefault(x => x.PlcItemCode == "AlarmPopUpMsg");
char[] tmpCharArr = Convert.ToString(Convert.ToInt32(item.PlcItemValue), 2).PadLeft(16, '0').Reverse().ToArray();
if (tmpCharArr.Contains('1'))
{
@@ -329,7 +325,7 @@ namespace CleanMachineHMI
if (dt != null && dt.Rows.Count > 0)
{
GlobalHelper.BasWarningMd_List = new List();
- GlobalHelper.CmWarningLogMd_List = new List();
+ GlobalHelper.CmWarningLogMd_List = new List();
foreach (DataRow item in dt.Rows)
{
GlobalHelper.BasWarningMd_List.Add(new Bas_WarningMd
@@ -348,7 +344,7 @@ namespace CleanMachineHMI
{
foreach (DataRow item in dt1.Rows)
{
- GlobalHelper.CmWarningLogMd_List.Add(new CM_WarningLogMd
+ GlobalHelper.CmWarningLogMd_List.Add(new WarningLog
{
WarningCode = item["WARNING_CODE"].ToString(),
WarningName = item["WARNING_NAME"].ToString(),
@@ -356,7 +352,7 @@ namespace CleanMachineHMI
WarningMessage = item["WARNING_MESSAGE"].ToString(),
WarningTime = Convert.ToDateTime(item["WARNING_TIME"]),
PlcItemCode = item["PLC_ITEM_CODE"].ToString(),
- WarningStatus = 0,
+ WaringStatus = 0,
WarningHandleResult = 0,
CreateBy = Convert.ToInt32(item["CREATE_BY"]),
CreateTime = Convert.ToDateTime(item["CREATE_TIME"]),
@@ -369,14 +365,14 @@ namespace CleanMachineHMI
LeadDbHelperSQLite.ExecuteSql(sql2);
}
}
- private void SetPlcItem(List PlcItemMdList, DataRow item)
+ private void SetPlcItem(List PlcItemMdList, DataRow item)
{
if (PlcItemMdList != null)
{
- BasPlcItemMd md = PlcItemMdList.Find(x => x.PlcItemCode == item["PLC_ITEM_CODE"].ToString());
+ PlcItem md = PlcItemMdList.Find(x => x.PlcItemCode == item["PLC_ITEM_CODE"].ToString());
if (md != null)
{
- md.PlcItemId = Convert.ToInt32(item["PLC_ITEM_ID"].ToString());
+ md.PlcItemId =item["PLC_ITEM_ID"].ToString();
md.PlcItemCode = item["PLC_ITEM_CODE"].ToString();
md.PlcItemName = item["PLC_ITEM_NAME"].ToString();
md.PlcItemType = Convert.ToInt32(item["PLC_ITEM_TYPE"].ToString());
@@ -384,13 +380,13 @@ namespace CleanMachineHMI
md.PlcItemPriAddress = item["PLC_ITEM_PRI_ADDRESS"].ToString();
md.PlcItemModbusAddress = item["PLC_ITEM_MODBUS_ADDRESS"].ToString();
md.PlcItemDeviationAddress = item["PLC_ITEM_DEVIATION_ADDRESS"] == null ? "" : item["PLC_ITEM_DEVIATION_ADDRESS"].ToString();
- md.PlcItemDataLen = Convert.ToInt32(item["PLC_ITEM_DATA_LENGTH"]);
+ md.PlcItemDataLength = Convert.ToInt32(item["PLC_ITEM_DATA_LENGTH"]);
}
else
{
- PlcItemMdList.Add(new BasPlcItemMd
+ PlcItemMdList.Add(new PlcItem
{
- PlcItemId = Convert.ToInt32(item["PLC_ITEM_ID"].ToString()),
+ PlcItemId = item["PLC_ITEM_ID"].ToString(),
PlcItemCode = item["PLC_ITEM_CODE"].ToString(),
PlcItemName = item["PLC_ITEM_NAME"].ToString(),
PlcItemType = Convert.ToInt32(item["PLC_ITEM_TYPE"].ToString()),
@@ -398,16 +394,16 @@ namespace CleanMachineHMI
PlcItemPriAddress = item["PLC_ITEM_PRI_ADDRESS"].ToString(),
PlcItemModbusAddress = item["PLC_ITEM_MODBUS_ADDRESS"].ToString(),
PlcItemDeviationAddress = item["PLC_ITEM_DEVIATION_ADDRESS"] == null ? "" : item["PLC_ITEM_DEVIATION_ADDRESS"].ToString(),
- PlcItemDataLen = Convert.ToInt32(item["PLC_ITEM_DATA_LENGTH"]),
+ PlcItemDataLength = Convert.ToInt32(item["PLC_ITEM_DATA_LENGTH"]),
});
}
}
else
{
- PlcItemMdList = new List();
- PlcItemMdList.Add(new BasPlcItemMd
+ PlcItemMdList = new List();
+ PlcItemMdList.Add(new PlcItem
{
- PlcItemId = Convert.ToInt32(item["PLC_ITEM_ID"].ToString()),
+ PlcItemId = item["PLC_ITEM_ID"].ToString(),
PlcItemCode = item["PLC_ITEM_CODE"].ToString(),
PlcItemName = item["PLC_ITEM_NAME"].ToString(),
PlcItemType = Convert.ToInt32(item["PLC_ITEM_TYPE"].ToString()),
@@ -415,7 +411,7 @@ namespace CleanMachineHMI
PlcItemPriAddress = item["PLC_ITEM_PRI_ADDRESS"].ToString(),
PlcItemModbusAddress = item["PLC_ITEM_MODBUS_ADDRESS"].ToString(),
PlcItemDeviationAddress = item["PLC_ITEM_DEVIATION_ADDRESS"] == null ? "" : item["PLC_ITEM_DEVIATION_ADDRESS"].ToString(),
- PlcItemDataLen = Convert.ToInt32(item["PLC_ITEM_DATA_LENGTH"]),
+ PlcItemDataLength = Convert.ToInt32(item["PLC_ITEM_DATA_LENGTH"]),
});
}
}
@@ -623,7 +619,7 @@ namespace CleanMachineHMI
}
}
-
+
}
@@ -692,9 +688,9 @@ namespace CleanMachineHMI
GlobalHelper.eventAlarmLock = true;
if (GlobalHelper.CmWarningLogMd_List.Count > 0)
{
- foreach (CM_WarningLogMd item in GlobalHelper.CmWarningLogMd_List)
+ foreach (WarningLog item in GlobalHelper.CmWarningLogMd_List)
{
- if (item.WarningStatus == 0 && item.WarningHandleResult == 0)
+ if (item.WaringStatus == 0 && item.WarningHandleResult == 0)
{
string sql1 = $@"
INSERT INTO CM_WARNING_LOG (
@@ -719,7 +715,7 @@ namespace CleanMachineHMI
'{item.WarningMessage}',
'{item.WarningTime.ToString("yyyy-MM-dd HH:mm:ss")}',
'{item.PlcItemCode}',
- '{item.WarningStatus}',
+ '{item.WaringStatus}',
'{item.WarningHandleResult}',
'{item.CreateBy}',
'{item.CreateTime.ToString("yyyy-MM-dd HH:mm:ss")}',
@@ -756,7 +752,7 @@ namespace CleanMachineHMI
'{item.WarningMessage}',
'{item.WarningTime.ToString("yyyy-MM-dd HH:mm:ss")}',
'{item.PlcItemCode}',
- '{item.WarningStatus}',
+ '{item.WaringStatus}',
'{item.WarningHandleResult}',
'{item.WarningHandleTime.ToString("yyyy-MM-dd HH:mm:ss")}',
'{item.CreateBy}',