Example #1
0
 public SysPurview GetSysPurviewById(string Id)
 {
     using (ISysPurviewBLL SysPurviewBLL = BLLContainer.Resolve <ISysPurviewBLL>())
     {
         SysPurview model = SysPurviewBLL.GetFirstOrDefault(Id);
         return(model);
     }
 }
Example #2
0
        public int GetSysPurviewCount(string sWhere)
        {
            Expression <Func <SysPurview, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <SysPurview>(sWhere);

            using (ISysPurviewBLL SysPurviewBLL = BLLContainer.Resolve <ISysPurviewBLL>())
            {
                return(SysPurviewBLL.GetCount(whereLamda));
            }
        }
Example #3
0
        public List <SysPurview> GetSysPurviews([FromBody] string sWhere)
        {
            Expression <Func <SysPurview, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <SysPurview>(sWhere);

            using (ISysPurviewBLL SysPurviewBLL = BLLContainer.Resolve <ISysPurviewBLL>())
            {
                List <SysPurview> models = SysPurviewBLL.GetModels(whereLamda);
                return(models);
            }
        }
Example #4
0
 public bool AddSysPurview(SysPurview mSysPurview)
 {
     if (mSysPurview == null)
     {
         return(false);
     }
     using (ISysPurviewBLL SysPurviewBLL = BLLContainer.Resolve <ISysPurviewBLL>())
     {
         return(SysPurviewBLL.Add(mSysPurview));
     }
 }
Example #5
0
 public bool DelSysPurview(string Id)
 {
     using (ISysPurviewBLL SysPurviewBLL = BLLContainer.Resolve <ISysPurviewBLL>())
     {
         try
         {
             SysPurview item = SysPurviewBLL.GetFirstOrDefault(Id);
             return(SysPurviewBLL.Delete(item));
         }
         catch { return(false); }
     }
 }
Example #6
0
 public bool DelSysPurviews(string[] Ids)
 {
     using (ISysPurviewBLL SysPurviewBLL = BLLContainer.Resolve <ISysPurviewBLL>())
     {
         try
         {
             List <SysPurview> entitys = new List <SysPurview>();
             foreach (string id in Ids)
             {
                 SysPurview item = SysPurviewBLL.GetFirstOrDefault(id);
                 entitys.Add(item);
             }
             return(SysPurviewBLL.Delete(entitys));
         }
         catch { return(false); }
     }
 }
Example #7
0
        public List <SysPurview> GetSysPurviewByPage(int pageSize, int pageIndex, bool isAsc, string orderField, string sWhere)
        {
            string orderStr = "";

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

            using (ISysPurviewBLL SysPurviewBLL = BLLContainer.Resolve <ISysPurviewBLL>())
            {
                List <SysPurview> models = SysPurviewBLL.GetModelsByPage(pageSize, pageIndex, isAsc, orderStr, whereLamda);
                return(models);
            }
        }