public SysPurview GetSysPurviewById(string Id) { using (ISysPurviewBLL SysPurviewBLL = BLLContainer.Resolve <ISysPurviewBLL>()) { SysPurview model = SysPurviewBLL.GetFirstOrDefault(Id); return(model); } }
public int GetSysPurviewCount(string sWhere) { Expression <Func <SysPurview, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <SysPurview>(sWhere); using (ISysPurviewBLL SysPurviewBLL = BLLContainer.Resolve <ISysPurviewBLL>()) { return(SysPurviewBLL.GetCount(whereLamda)); } }
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); } }
public bool AddSysPurview(SysPurview mSysPurview) { if (mSysPurview == null) { return(false); } using (ISysPurviewBLL SysPurviewBLL = BLLContainer.Resolve <ISysPurviewBLL>()) { return(SysPurviewBLL.Add(mSysPurview)); } }
public bool DelSysPurview(string Id) { using (ISysPurviewBLL SysPurviewBLL = BLLContainer.Resolve <ISysPurviewBLL>()) { try { SysPurview item = SysPurviewBLL.GetFirstOrDefault(Id); return(SysPurviewBLL.Delete(item)); } catch { return(false); } } }
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); } } }
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); } }