public RsRoutingHead GetRsRoutingHeadById(string Id) { using (IRsRoutingHeadBLL RsRoutingHeadBLL = BLLContainer.Resolve <IRsRoutingHeadBLL>()) { RsRoutingHead model = RsRoutingHeadBLL.GetFirstOrDefault(Id); return(model); } }
public int GetRsRoutingHeadCount(string sWhere) { Expression <Func <RsRoutingHead, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <RsRoutingHead>(sWhere); using (IRsRoutingHeadBLL RsRoutingHeadBLL = BLLContainer.Resolve <IRsRoutingHeadBLL>()) { return(RsRoutingHeadBLL.GetCount(whereLamda)); } }
public List <RsRoutingHead> GetRsRoutingHeads([FromBody] string sWhere) { Expression <Func <RsRoutingHead, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <RsRoutingHead>(sWhere); using (IRsRoutingHeadBLL RsRoutingHeadBLL = BLLContainer.Resolve <IRsRoutingHeadBLL>()) { List <RsRoutingHead> models = RsRoutingHeadBLL.GetModels(whereLamda); return(models); } }
public bool AddRsRoutingHead(RsRoutingHead mRsRoutingHead) { if (mRsRoutingHead == null) { return(false); } using (IRsRoutingHeadBLL RsRoutingHeadBLL = BLLContainer.Resolve <IRsRoutingHeadBLL>()) { return(RsRoutingHeadBLL.Add(mRsRoutingHead)); } }
public bool DelRsRoutingHead(string Id) { using (IRsRoutingHeadBLL RsRoutingHeadBLL = BLLContainer.Resolve <IRsRoutingHeadBLL>()) { try { RsRoutingHead item = RsRoutingHeadBLL.GetFirstOrDefault(Id); return(RsRoutingHeadBLL.Delete(item)); } catch { return(false); } } }
public bool DelRsRoutingHeads(string[] Ids) { using (IRsRoutingHeadBLL RsRoutingHeadBLL = BLLContainer.Resolve <IRsRoutingHeadBLL>()) { try { List <RsRoutingHead> entitys = new List <RsRoutingHead>(); foreach (string id in Ids) { RsRoutingHead item = RsRoutingHeadBLL.GetFirstOrDefault(id); entitys.Add(item); } return(RsRoutingHeadBLL.Delete(entitys)); } catch { return(false); } } }
public List <RsRoutingHead> GetRsRoutingHeadByPage(int pageSize, int pageIndex, bool isAsc, string orderField, string sWhere) { string orderStr = ""; if (string.IsNullOrEmpty(orderField)) { orderStr = "CREATION_DATE"; } else { orderStr = orderField; } Expression <Func <RsRoutingHead, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <RsRoutingHead>(sWhere); using (IRsRoutingHeadBLL RsRoutingHeadBLL = BLLContainer.Resolve <IRsRoutingHeadBLL>()) { List <RsRoutingHead> models = RsRoutingHeadBLL.GetModelsByPage(pageSize, pageIndex, isAsc, orderStr, whereLamda); return(models); } }