예제 #1
0
 public DAMachineRealTimeInfo GetDAMachineRealTimeInfoById(string Id)
 {
     using (IDAMachineRealTimeInfoBLL DAMachineRealTimeInfoBLL = BLLContainer.Resolve <IDAMachineRealTimeInfoBLL>())
     {
         DAMachineRealTimeInfo model = DAMachineRealTimeInfoBLL.GetFirstOrDefault(Id);
         return(model);
     }
 }
예제 #2
0
        public int GetDAMachineRealTimeInfoCount(string sWhere)
        {
            Expression <Func <DAMachineRealTimeInfo, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <DAMachineRealTimeInfo>(sWhere);

            using (IDAMachineRealTimeInfoBLL DAMachineRealTimeInfoBLL = BLLContainer.Resolve <IDAMachineRealTimeInfoBLL>())
            {
                return(DAMachineRealTimeInfoBLL.GetCount(whereLamda));
            }
        }
예제 #3
0
        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);
            }
        }
예제 #4
0
 public bool AddDAMachineRealTimeInfo(DAMachineRealTimeInfo mDAMachineRealTimeInfo)
 {
     if (mDAMachineRealTimeInfo == null)
     {
         return(false);
     }
     using (IDAMachineRealTimeInfoBLL DAMachineRealTimeInfoBLL = BLLContainer.Resolve <IDAMachineRealTimeInfoBLL>())
     {
         return(DAMachineRealTimeInfoBLL.Add(mDAMachineRealTimeInfo));
     }
 }
예제 #5
0
 public bool DelDAMachineRealTimeInfo(string Id)
 {
     using (IDAMachineRealTimeInfoBLL DAMachineRealTimeInfoBLL = BLLContainer.Resolve <IDAMachineRealTimeInfoBLL>())
     {
         try
         {
             DAMachineRealTimeInfo item = DAMachineRealTimeInfoBLL.GetFirstOrDefault(Id);
             return(DAMachineRealTimeInfoBLL.Delete(item));
         }
         catch { return(false); }
     }
 }
예제 #6
0
 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); }
     }
 }
예제 #7
0
        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);
            }
        }