Exemple #1
0
 public RsEquipMaster GetRsEquipMasterById(string Id)
 {
     using (IRsEquipMasterBLL RsEquipMasterBLL = BLLContainer.Resolve <IRsEquipMasterBLL>())
     {
         RsEquipMaster model = RsEquipMasterBLL.GetFirstOrDefault(Id);
         return(model);
     }
 }
Exemple #2
0
        public int GetRsEquipMasterCount(string sWhere)
        {
            Expression <Func <RsEquipMaster, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <RsEquipMaster>(sWhere);

            using (IRsEquipMasterBLL RsEquipMasterBLL = BLLContainer.Resolve <IRsEquipMasterBLL>())
            {
                return(RsEquipMasterBLL.GetCount(whereLamda));
            }
        }
Exemple #3
0
        public List <RsEquipMaster> GetRsEquipMasters([FromBody] string sWhere)
        {
            Expression <Func <RsEquipMaster, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <RsEquipMaster>(sWhere);

            using (IRsEquipMasterBLL RsEquipMasterBLL = BLLContainer.Resolve <IRsEquipMasterBLL>())
            {
                List <RsEquipMaster> models = RsEquipMasterBLL.GetModels(whereLamda);
                return(models);
            }
        }
Exemple #4
0
 public bool AddRsEquipMaster(RsEquipMaster mRsEquipMaster)
 {
     if (mRsEquipMaster == null)
     {
         return(false);
     }
     using (IRsEquipMasterBLL RsEquipMasterBLL = BLLContainer.Resolve <IRsEquipMasterBLL>())
     {
         return(RsEquipMasterBLL.Add(mRsEquipMaster));
     }
 }
Exemple #5
0
 public bool DelRsEquipMaster(string Id)
 {
     using (IRsEquipMasterBLL RsEquipMasterBLL = BLLContainer.Resolve <IRsEquipMasterBLL>())
     {
         try
         {
             RsEquipMaster item = RsEquipMasterBLL.GetFirstOrDefault(Id);
             return(RsEquipMasterBLL.Delete(item));
         }
         catch { return(false); }
     }
 }
Exemple #6
0
 public bool DelRsEquipMasters(string[] Ids)
 {
     using (IRsEquipMasterBLL RsEquipMasterBLL = BLLContainer.Resolve <IRsEquipMasterBLL>())
     {
         try
         {
             List <RsEquipMaster> entitys = new List <RsEquipMaster>();
             foreach (string id in Ids)
             {
                 RsEquipMaster item = RsEquipMasterBLL.GetFirstOrDefault(id);
                 entitys.Add(item);
             }
             return(RsEquipMasterBLL.Delete(entitys));
         }
         catch { return(false); }
     }
 }
Exemple #7
0
        public List <RsEquipMaster> GetRsEquipMasterByPage(int pageSize, int pageIndex, bool isAsc, string orderField, string sWhere)
        {
            string orderStr = "";

            if (string.IsNullOrEmpty(orderField))
            {
                orderStr = "CREATION_DATE";
            }
            else
            {
                orderStr = orderField;
            }
            Expression <Func <RsEquipMaster, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <RsEquipMaster>(sWhere);

            using (IRsEquipMasterBLL RsEquipMasterBLL = BLLContainer.Resolve <IRsEquipMasterBLL>())
            {
                List <RsEquipMaster> models = RsEquipMasterBLL.GetModelsByPage(pageSize, pageIndex, isAsc, orderStr, whereLamda);
                return(models);
            }
        }