public DAMachineRealTimeInfo GetDAMachineRealTimeInfoById(string Id) { using (IDAMachineRealTimeInfoBLL DAMachineRealTimeInfoBLL = BLLContainer.Resolve <IDAMachineRealTimeInfoBLL>()) { DAMachineRealTimeInfo model = DAMachineRealTimeInfoBLL.GetFirstOrDefault(Id); return(model); } }
public int GetDAMachineRealTimeInfoCount(string sWhere) { Expression <Func <DAMachineRealTimeInfo, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <DAMachineRealTimeInfo>(sWhere); using (IDAMachineRealTimeInfoBLL DAMachineRealTimeInfoBLL = BLLContainer.Resolve <IDAMachineRealTimeInfoBLL>()) { return(DAMachineRealTimeInfoBLL.GetCount(whereLamda)); } }
public List <DAMachineRealTimeInfo> GetDAMachineRealTimeInfos([FromBody] string sWhere) { Expression <Func <DAMachineRealTimeInfo, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <DAMachineRealTimeInfo>(sWhere); using (IDAMachineRealTimeInfoBLL DAMachineRealTimeInfoBLL = BLLContainer.Resolve <IDAMachineRealTimeInfoBLL>()) { List <DAMachineRealTimeInfo> models = DAMachineRealTimeInfoBLL.GetModels(whereLamda); return(models); } }
public bool AddDAMachineRealTimeInfo(DAMachineRealTimeInfo mDAMachineRealTimeInfo) { if (mDAMachineRealTimeInfo == null) { return(false); } using (IDAMachineRealTimeInfoBLL DAMachineRealTimeInfoBLL = BLLContainer.Resolve <IDAMachineRealTimeInfoBLL>()) { return(DAMachineRealTimeInfoBLL.Add(mDAMachineRealTimeInfo)); } }
public bool DelDAMachineRealTimeInfo(string Id) { using (IDAMachineRealTimeInfoBLL DAMachineRealTimeInfoBLL = BLLContainer.Resolve <IDAMachineRealTimeInfoBLL>()) { try { DAMachineRealTimeInfo item = DAMachineRealTimeInfoBLL.GetFirstOrDefault(Id); return(DAMachineRealTimeInfoBLL.Delete(item)); } catch { return(false); } } }
public bool DelDAMachineRealTimeInfos(string[] Ids) { using (IDAMachineRealTimeInfoBLL DAMachineRealTimeInfoBLL = BLLContainer.Resolve <IDAMachineRealTimeInfoBLL>()) { try { List <DAMachineRealTimeInfo> entitys = new List <DAMachineRealTimeInfo>(); foreach (string id in Ids) { DAMachineRealTimeInfo item = DAMachineRealTimeInfoBLL.GetFirstOrDefault(id); entitys.Add(item); } return(DAMachineRealTimeInfoBLL.Delete(entitys)); } catch { return(false); } } }
public List <DAMachineRealTimeInfo> GetDAMachineRealTimeInfoByPage(int pageSize, int pageIndex, bool isAsc, string orderField, string sWhere) { string orderStr = ""; if (string.IsNullOrEmpty(orderField)) { orderStr = "CREATION_DATE"; } else { orderStr = orderField; } Expression <Func <DAMachineRealTimeInfo, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <DAMachineRealTimeInfo>(sWhere); using (IDAMachineRealTimeInfoBLL DAMachineRealTimeInfoBLL = BLLContainer.Resolve <IDAMachineRealTimeInfoBLL>()) { List <DAMachineRealTimeInfo> models = DAMachineRealTimeInfoBLL.GetModelsByPage(pageSize, pageIndex, isAsc, orderStr, whereLamda); return(models); } }