Exemplo n.º 1
0
 public SysMenuPurview GetSysMenuPurviewById(string Id)
 {
     using (ISysMenuPurviewBLL SysMenuPurviewBLL = BLLContainer.Resolve <ISysMenuPurviewBLL>())
     {
         SysMenuPurview model = SysMenuPurviewBLL.GetFirstOrDefault(Id);
         return(model);
     }
 }
Exemplo n.º 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));
            }
        }
Exemplo n.º 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);
            }
        }
Exemplo n.º 4
0
 public bool AddSysMenuPurview(SysMenuPurview mSysMenuPurview)
 {
     if (mSysMenuPurview == null)
     {
         return(false);
     }
     using (ISysMenuPurviewBLL SysMenuPurviewBLL = BLLContainer.Resolve <ISysMenuPurviewBLL>())
     {
         return(SysMenuPurviewBLL.Add(mSysMenuPurview));
     }
 }
Exemplo n.º 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); }
     }
 }
Exemplo n.º 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); }
     }
 }
Exemplo n.º 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);
            }
        }