public WmsAllocationInfo GetWmsAllocationInfoById(string Id) { using (IWmsAllocationInfoBLL WmsAllocationInfoBLL = BLLContainer.Resolve <IWmsAllocationInfoBLL>()) { WmsAllocationInfo model = WmsAllocationInfoBLL.GetFirstOrDefault(Id); return(model); } }
public int GetWmsAllocationInfoCount(string sWhere) { Expression <Func <WmsAllocationInfo, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <WmsAllocationInfo>(sWhere); using (IWmsAllocationInfoBLL WmsAllocationInfoBLL = BLLContainer.Resolve <IWmsAllocationInfoBLL>()) { return(WmsAllocationInfoBLL.GetCount(whereLamda)); } }
public List <WmsAllocationInfo> GetWmsAllocationInfos([FromBody] string sWhere) { Expression <Func <WmsAllocationInfo, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <WmsAllocationInfo>(sWhere); using (IWmsAllocationInfoBLL WmsAllocationInfoBLL = BLLContainer.Resolve <IWmsAllocationInfoBLL>()) { List <WmsAllocationInfo> models = WmsAllocationInfoBLL.GetModels(whereLamda); return(models); } }
public bool AddWmsAllocationInfo(WmsAllocationInfo mWmsAllocationInfo) { if (mWmsAllocationInfo == null) { return(false); } using (IWmsAllocationInfoBLL WmsAllocationInfoBLL = BLLContainer.Resolve <IWmsAllocationInfoBLL>()) { return(WmsAllocationInfoBLL.Add(mWmsAllocationInfo)); } }
public bool DelWmsAllocationInfo(string Id) { using (IWmsAllocationInfoBLL WmsAllocationInfoBLL = BLLContainer.Resolve <IWmsAllocationInfoBLL>()) { try { WmsAllocationInfo item = WmsAllocationInfoBLL.GetFirstOrDefault(Id); return(WmsAllocationInfoBLL.Delete(item)); } catch { return(false); } } }
public bool DelWmsAllocationInfos(string[] Ids) { using (IWmsAllocationInfoBLL WmsAllocationInfoBLL = BLLContainer.Resolve <IWmsAllocationInfoBLL>()) { try { List <WmsAllocationInfo> entitys = new List <WmsAllocationInfo>(); foreach (string id in Ids) { WmsAllocationInfo item = WmsAllocationInfoBLL.GetFirstOrDefault(id); entitys.Add(item); } return(WmsAllocationInfoBLL.Delete(entitys)); } catch { return(false); } } }
public List <WmsAllocationInfo> GetWmsAllocationInfoByPage(int pageSize, int pageIndex, bool isAsc, string orderField, string sWhere) { string orderStr = ""; if (string.IsNullOrEmpty(orderField)) { orderStr = "CREATION_DATE"; } else { orderStr = orderField; } Expression <Func <WmsAllocationInfo, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <WmsAllocationInfo>(sWhere); using (IWmsAllocationInfoBLL WmsAllocationInfoBLL = BLLContainer.Resolve <IWmsAllocationInfoBLL>()) { List <WmsAllocationInfo> models = WmsAllocationInfoBLL.GetModelsByPage(pageSize, pageIndex, isAsc, orderStr, whereLamda); return(models); } }