diff --git a/CleanMachine.BLL/CM/LastPattleNumBLL.cs b/CleanMachine.BLL/CM/LastPattleNumBLL.cs
index ef12270..65b487f 100644
--- a/CleanMachine.BLL/CM/LastPattleNumBLL.cs
+++ b/CleanMachine.BLL/CM/LastPattleNumBLL.cs
@@ -78,28 +78,7 @@ namespace CleanMachine.BLL.CM
}
#endregion
-
- ///
- /// 删除一个数据
- ///
- public bool Delete(string Key)
- {
- return new LastPattleNumDAL().Delete(Key);
- }
- ///
- /// 获取一个对象
- ///
- public CleanMachine.Model.CM.LastPattleNum GetModel(string Key)
- {
- return new LastPattleNumDAL().GetModel(Key);
- }
- ///
- /// 存在
- ///
- public bool Exists(string Key)
- {
- return new LastPattleNumDAL().Exists(Key);
- }
+
///
diff --git a/CleanMachine.DAL/CM/LastPattleNumDAL.cs b/CleanMachine.DAL/CM/LastPattleNumDAL.cs
index 02aa146..f8a2217 100644
--- a/CleanMachine.DAL/CM/LastPattleNumDAL.cs
+++ b/CleanMachine.DAL/CM/LastPattleNumDAL.cs
@@ -101,31 +101,7 @@ namespace CleanMachine.DAL.CM
-
- ///
- /// 删除一个数据
- ///
- public bool Delete(string Key)
- {
- return this.Delete("Key=@Key ", new { Key }) ;
- }
- ///
- /// 获取一个对象
- ///
- public CleanMachine.Model.CM.LastPattleNum GetModel(string Key)
- {
- return this.GetList("Key=@Key", new { Key }).QueryFirstOrDefault();
- }
-
-
- ///
- /// 存在
- ///
- public bool Exists(string Key)
- {
- string strSql = @"SELECT count(1) from CM_LastPattleNum WHERE Key=@Key ";
- return LeadDbHelperSQLite.ExecuteScalar(strSql, new { Key }) > 0;
- }
+
///
/// 查询数据
diff --git a/CleanMachine.DAL/SYS/UserDAL.cs b/CleanMachine.DAL/SYS/UserDAL.cs
index dfef936..2e43afd 100644
--- a/CleanMachine.DAL/SYS/UserDAL.cs
+++ b/CleanMachine.DAL/SYS/UserDAL.cs
@@ -114,7 +114,7 @@ namespace CleanMachine.DAL.SYS
///
public CleanMachine.Model.SYS.User GetModel(string UserCode)
{
- return this.GetList("USER_CODE=@UserCode", new { UserCode }).QueryFirstOrDefault();
+ return this.GetList("USER_CODE=@UserCode", new { UserCode }).FirstOrDefault();
}
diff --git a/CleanMachineHMI/Form2.cs b/CleanMachineHMI/Form2.cs
index 4823159..dc47c8d 100644
--- a/CleanMachineHMI/Form2.cs
+++ b/CleanMachineHMI/Form2.cs
@@ -1,4 +1,5 @@
using CleanMachine.Model;
+using CleanMachine.Model.CM;
using Krypton.Navigator;
using Krypton.Toolkit;
using System;
diff --git a/CleanMachineHMI/FrmUserControl/frmIOMonitor.cs b/CleanMachineHMI/FrmUserControl/frmIOMonitor.cs
index 736063d..ad6989d 100644
--- a/CleanMachineHMI/FrmUserControl/frmIOMonitor.cs
+++ b/CleanMachineHMI/FrmUserControl/frmIOMonitor.cs
@@ -12,6 +12,8 @@ using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using CleanMachine.Model;
+using CleanMachine.Model.BAS;
+
namespace CleanMachineHMI.FrmUserControl
{
[FormType(EnumFormType.IoMonitor)]
diff --git a/CleanMachineHMI/FrmUserControl/frmPlcAlarmLog.cs b/CleanMachineHMI/FrmUserControl/frmPlcAlarmLog.cs
index 8eef08a..ae153c3 100644
--- a/CleanMachineHMI/FrmUserControl/frmPlcAlarmLog.cs
+++ b/CleanMachineHMI/FrmUserControl/frmPlcAlarmLog.cs
@@ -1,4 +1,5 @@
using CleanMachine.Model;
+using CleanMachine.Model.CM;
using CleanMachineHMI.Domain.Enums;
using CleanMachineHMI.Utils;
using Krypton.Toolkit;
diff --git a/CleanMachineHMI/FrmUserControl/frmPlcItemConfig.cs b/CleanMachineHMI/FrmUserControl/frmPlcItemConfig.cs
index 185c07c..f41af41 100644
--- a/CleanMachineHMI/FrmUserControl/frmPlcItemConfig.cs
+++ b/CleanMachineHMI/FrmUserControl/frmPlcItemConfig.cs
@@ -13,6 +13,8 @@ using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using CleanMachine.Model;
+using CleanMachine.Model.BAS;
+
namespace CleanMachineHMI.FrmUserControl
{
[FormType(EnumFormType.PlcItemConfig)]
diff --git a/CleanMachineHMI/Utils/GlobalHelper.cs b/CleanMachineHMI/Utils/GlobalHelper.cs
index 90e497f..9b3c8cf 100644
--- a/CleanMachineHMI/Utils/GlobalHelper.cs
+++ b/CleanMachineHMI/Utils/GlobalHelper.cs
@@ -1,4 +1,6 @@
using CleanMachine.Model;
+using CleanMachine.Model.BAS;
+using CleanMachine.Model.CM;
using CleanMachineHMI.Domain.Enums;
using CleanMachineHMI.Domain.Models.ViewModels;
using CleanMachineHMI.forms;
diff --git a/CleanMachineHMI/Utils/KeyboardAutoPopUp.cs b/CleanMachineHMI/Utils/KeyboardAutoPopUp.cs
index adb5647..d8c0bcf 100644
--- a/CleanMachineHMI/Utils/KeyboardAutoPopUp.cs
+++ b/CleanMachineHMI/Utils/KeyboardAutoPopUp.cs
@@ -24,13 +24,13 @@ namespace CleanMachineHMI
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
private static extern int RegisterWindowMessage(string lpString);
- private static bool hasKeyboard=false;
+ private static bool hasKeyboard = false;
private static readonly string USB = "USB";
- static KeyboardAutoPopUp()
+ static KeyboardAutoPopUp()
{
- // hasKeyboard = GetKeyboardPresent();
+ hasKeyboard = GetKeyboardPresent();
@@ -65,7 +65,7 @@ namespace CleanMachineHMI
if (hasKeyboard) return 0;
try
{
-
+
dynamic file = "C:\\Program Files\\Common Files\\microsoft shared\\ink\\TabTip.exe";
if (!System.IO.File.Exists(file))
return -1;
diff --git a/CleanMachineHMI/Utils/PlcOperationHelper.cs b/CleanMachineHMI/Utils/PlcOperationHelper.cs
index 82d4b35..a956c90 100644
--- a/CleanMachineHMI/Utils/PlcOperationHelper.cs
+++ b/CleanMachineHMI/Utils/PlcOperationHelper.cs
@@ -2,7 +2,7 @@
#if DEBUG
-//#define USE_LOCAL_TCP_DEBUG
+#define USE_LOCAL_TCP_DEBUG
#endif
//启用心跳检查
@@ -10,6 +10,8 @@
#define UseHeartbeat
#endif
using CleanMachine.Model;
+using CleanMachine.Model.BAS;
+using CleanMachine.Model.CM;
using LeadDataBaseUtility;
using NModbus;
diff --git a/CleanMachineHMI/frmIOMonitor_Old.cs b/CleanMachineHMI/frmIOMonitor_Old.cs
index 14244dd..e1f84fc 100644
--- a/CleanMachineHMI/frmIOMonitor_Old.cs
+++ b/CleanMachineHMI/frmIOMonitor_Old.cs
@@ -16,6 +16,8 @@ using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using CleanMachine.Model;
+using CleanMachine.Model.BAS;
+
namespace CleanMachineHMI
{
//[FormType(EnumFormType.IoMonitor)]
diff --git a/CleanMachineHMI/frmIoMonitorNew.cs b/CleanMachineHMI/frmIoMonitorNew.cs
index 1d5e009..fc8f02a 100644
--- a/CleanMachineHMI/frmIoMonitorNew.cs
+++ b/CleanMachineHMI/frmIoMonitorNew.cs
@@ -10,6 +10,8 @@ using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using CleanMachine.Model;
+using CleanMachine.Model.BAS;
+
namespace CleanMachineHMI
{
public partial class frmIoMonitorNew : KryptonForm
diff --git a/CleanMachineHMI/frmLogin.cs b/CleanMachineHMI/frmLogin.cs
index 9f41044..f4fd811 100644
--- a/CleanMachineHMI/frmLogin.cs
+++ b/CleanMachineHMI/frmLogin.cs
@@ -51,7 +51,7 @@ namespace CleanMachineHMI
return;
}
- // var sql = $@"SELECT A.USER_ID,A.USER_CODE,A.USER_NAME,A.SCHEDULE_CODE,A.USED_FLAG,A.DEL_FLAG,A.PASSWORD,B.ROLE_ID,B.ROLE_GRADE FROM SYS_USER A LEFT JOIN SYS_ROLE B ON A.ROLE_ID = B.ROLE_ID WHERE A.USER_CODE= '{txtAccount.Text}'";
+ var sql = $@"SELECT A.USER_ID,A.USER_CODE,A.USER_NAME,A.SCHEDULE_CODE,A.USED_FLAG,A.DEL_FLAG,A.PASSWORD,B.ROLE_ID,B.ROLE_GRADE FROM SYS_USER A LEFT JOIN SYS_ROLE B ON A.ROLE_ID = B.ROLE_ID WHERE A.USER_CODE= '{txtAccount.Text}'";
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
if (dt.Rows.Count > 0)
diff --git a/CleanMachineHMI/frmMainNew.cs b/CleanMachineHMI/frmMainNew.cs
index b008fc3..d4a32a1 100644
--- a/CleanMachineHMI/frmMainNew.cs
+++ b/CleanMachineHMI/frmMainNew.cs
@@ -1,4 +1,6 @@
using CleanMachine.Model;
+using CleanMachine.Model.BAS;
+using CleanMachine.Model.CM;
using CleanMachineHMI.Domain.Enums;
using CleanMachineHMI.frmChild;
using CleanMachineHMI.FrmUserControl;
@@ -374,7 +376,7 @@ namespace CleanMachineHMI
PlcItem md = PlcItemMdList.Find(x => x.PlcItemCode == item["PLC_ITEM_CODE"].ToString());
if (md != null)
{
- md.PlcItemId = item["PLC_ITEM_ID"].ToString();
+ md.PlcItemId = int.Parse( 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());
@@ -388,7 +390,7 @@ namespace CleanMachineHMI
{
PlcItemMdList.Add(new PlcItem
{
- PlcItemId = item["PLC_ITEM_ID"].ToString(),
+ PlcItemId = int.Parse( 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()),
@@ -405,7 +407,7 @@ namespace CleanMachineHMI
PlcItemMdList = new List();
PlcItemMdList.Add(new PlcItem
{
- PlcItemId = item["PLC_ITEM_ID"].ToString(),
+ PlcItemId = int.Parse( 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()),