public SysMenuPurview GetSysMenuPurviewById(string Id) { using (ISysMenuPurviewBLL SysMenuPurviewBLL = BLLContainer.Resolve <ISysMenuPurviewBLL>()) { SysMenuPurview model = SysMenuPurviewBLL.GetFirstOrDefault(Id); return(model); } }
public int GetSysMenuPurviewCount(string sWhere) { Expression <Func <SysMenuPurview, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <SysMenuPurview>(sWhere); using (ISysMenuPurviewBLL SysMenuPurviewBLL = BLLContainer.Resolve <ISysMenuPurviewBLL>()) { return(SysMenuPurviewBLL.GetCount(whereLamda)); } }
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); } }
public bool AddSysMenuPurview(SysMenuPurview mSysMenuPurview) { if (mSysMenuPurview == null) { return(false); } using (ISysMenuPurviewBLL SysMenuPurviewBLL = BLLContainer.Resolve <ISysMenuPurviewBLL>()) { return(SysMenuPurviewBLL.Add(mSysMenuPurview)); } }
public bool DelSysMenuPurview(string Id) { using (ISysMenuPurviewBLL SysMenuPurviewBLL = BLLContainer.Resolve <ISysMenuPurviewBLL>()) { try { SysMenuPurview item = SysMenuPurviewBLL.GetFirstOrDefault(Id); return(SysMenuPurviewBLL.Delete(item)); } catch { return(false); } } }
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); } } }
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); } }