Beispiel #1
0
 public RsMaintainStandards GetRsMaintainStandardsById(string Id)
 {
     using (IRsMaintainStandardsBLL RsMaintainStandardsBLL = BLLContainer.Resolve <IRsMaintainStandardsBLL>())
     {
         RsMaintainStandards model = RsMaintainStandardsBLL.GetFirstOrDefault(Id);
         return(model);
     }
 }
Beispiel #2
0
        public int GetRsMaintainStandardsCount(string sWhere)
        {
            Expression <Func <RsMaintainStandards, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <RsMaintainStandards>(sWhere);

            using (IRsMaintainStandardsBLL RsMaintainStandardsBLL = BLLContainer.Resolve <IRsMaintainStandardsBLL>())
            {
                return(RsMaintainStandardsBLL.GetCount(whereLamda));
            }
        }
Beispiel #3
0
        public List <RsMaintainStandards> GetRsMaintainStandardss([FromBody] string sWhere)
        {
            Expression <Func <RsMaintainStandards, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <RsMaintainStandards>(sWhere);

            using (IRsMaintainStandardsBLL RsMaintainStandardsBLL = BLLContainer.Resolve <IRsMaintainStandardsBLL>())
            {
                List <RsMaintainStandards> models = RsMaintainStandardsBLL.GetModels(whereLamda);
                return(models);
            }
        }
Beispiel #4
0
 public bool AddRsMaintainStandards(RsMaintainStandards mRsMaintainStandards)
 {
     if (mRsMaintainStandards == null)
     {
         return(false);
     }
     using (IRsMaintainStandardsBLL RsMaintainStandardsBLL = BLLContainer.Resolve <IRsMaintainStandardsBLL>())
     {
         return(RsMaintainStandardsBLL.Add(mRsMaintainStandards));
     }
 }
Beispiel #5
0
 public bool DelRsMaintainStandards(string Id)
 {
     using (IRsMaintainStandardsBLL RsMaintainStandardsBLL = BLLContainer.Resolve <IRsMaintainStandardsBLL>())
     {
         try
         {
             RsMaintainStandards item = RsMaintainStandardsBLL.GetFirstOrDefault(Id);
             return(RsMaintainStandardsBLL.Delete(item));
         }
         catch { return(false); }
     }
 }
Beispiel #6
0
 public bool DelRsMaintainStandardss(string[] Ids)
 {
     using (IRsMaintainStandardsBLL RsMaintainStandardsBLL = BLLContainer.Resolve <IRsMaintainStandardsBLL>())
     {
         try
         {
             List <RsMaintainStandards> entitys = new List <RsMaintainStandards>();
             foreach (string id in Ids)
             {
                 RsMaintainStandards item = RsMaintainStandardsBLL.GetFirstOrDefault(id);
                 entitys.Add(item);
             }
             return(RsMaintainStandardsBLL.Delete(entitys));
         }
         catch { return(false); }
     }
 }
Beispiel #7
0
        public List <RsMaintainStandards> GetRsMaintainStandardsByPage(int pageSize, int pageIndex, bool isAsc, string orderField, string sWhere)
        {
            string orderStr = "";

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

            using (IRsMaintainStandardsBLL RsMaintainStandardsBLL = BLLContainer.Resolve <IRsMaintainStandardsBLL>())
            {
                List <RsMaintainStandards> models = RsMaintainStandardsBLL.GetModelsByPage(pageSize, pageIndex, isAsc, orderStr, whereLamda);
                return(models);
            }
        }