Beispiel #1
0
 public SysMenuPurview GetSysMenuPurviewById(string Id)
 {
     using (ISysMenuPurviewBLL SysMenuPurviewBLL = BLLContainer.Resolve <ISysMenuPurviewBLL>())
     {
         SysMenuPurview model = SysMenuPurviewBLL.GetFirstOrDefault(Id);
         return(model);
     }
 }
Beispiel #2
0
        public int GetSysMenuPurviewCount(string sWhere)
        {
            Expression <Func <SysMenuPurview, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <SysMenuPurview>(sWhere);

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

            using (ISysMenuPurviewBLL SysMenuPurviewBLL = BLLContainer.Resolve <ISysMenuPurviewBLL>())
            {
                List <SysMenuPurview> models = SysMenuPurviewBLL.GetModels(whereLamda);
                return(models);
            }
        }
Beispiel #4
0
 public bool AddSysMenuPurview(SysMenuPurview mSysMenuPurview)
 {
     if (mSysMenuPurview == null)
     {
         return(false);
     }
     using (ISysMenuPurviewBLL SysMenuPurviewBLL = BLLContainer.Resolve <ISysMenuPurviewBLL>())
     {
         return(SysMenuPurviewBLL.Add(mSysMenuPurview));
     }
 }
Beispiel #5
0
 public bool DelSysMenuPurview(string Id)
 {
     using (ISysMenuPurviewBLL SysMenuPurviewBLL = BLLContainer.Resolve <ISysMenuPurviewBLL>())
     {
         try
         {
             SysMenuPurview item = SysMenuPurviewBLL.GetFirstOrDefault(Id);
             return(SysMenuPurviewBLL.Delete(item));
         }
         catch { return(false); }
     }
 }
Beispiel #6
0
 public bool DelSysMenuPurviews(string[] Ids)
 {
     using (ISysMenuPurviewBLL SysMenuPurviewBLL = BLLContainer.Resolve <ISysMenuPurviewBLL>())
     {
         try
         {
             List <SysMenuPurview> entitys = new List <SysMenuPurview>();
             foreach (string id in Ids)
             {
                 SysMenuPurview item = SysMenuPurviewBLL.GetFirstOrDefault(id);
                 entitys.Add(item);
             }
             return(SysMenuPurviewBLL.Delete(entitys));
         }
         catch { return(false); }
     }
 }
Beispiel #7
0
        public List <SysMenuPurview> GetSysMenuPurviewByPage(int pageSize, int pageIndex, bool isAsc, string orderField, string sWhere)
        {
            string orderStr = "";

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

            using (ISysMenuPurviewBLL SysMenuPurviewBLL = BLLContainer.Resolve <ISysMenuPurviewBLL>())
            {
                List <SysMenuPurview> models = SysMenuPurviewBLL.GetModelsByPage(pageSize, pageIndex, isAsc, orderStr, whereLamda);
                return(models);
            }
        }