using SqlSugar; using System; using System.Collections.Generic; using System.Data; using System.Linq; namespace IStation.DAL { /// /// 泵站 /// public partial class Station : CorpTraceDAL_Sorter_UseStatus_TagName_TerminalId { /// /// /// public override ConnectionConfig ConnectionConfig { get { return ConfigHelper.DefaultConnectionConfig; } } /// /// 更新类型 /// public bool UpdateType(long CorpID, long ID, string Type,long UpdateUserID,DateTime UpdateTime) { using (SqlSugarClient db = new SqlSugarClient(ConnectionConfig)) { return db.Updateable() .SetColumns(x => x.Type == Type) .SetColumns(x => x.UpdateUserID == UpdateUserID) .SetColumns(x => x.UpdateTime == UpdateTime) .Where(x => x.CorpID == CorpID && x.ID == ID) .ExecuteCommand() > 0; } } /// /// 更新 MonitorStatus /// public bool UpdateMonitorStatus(long CorpID, long ID, int MonitorStatus, long UpdateUserID, DateTime UpdateTime) { using (SqlSugarClient db = new SqlSugarClient(ConnectionConfig)) { return db.Updateable() .SetColumns(x => x.MonitorStatus == MonitorStatus) .SetColumns(x => x.UpdateUserID == UpdateUserID) .SetColumns(x => x.UpdateTime == UpdateTime) .Where(x => x.CorpID == CorpID && x.ID == ID) .ExecuteCommand() > 0; } } } }