public WmsAllocationInfo GetWmsAllocationInfoById(string Id) { using (IWmsAllocationInfoBLL WmsAllocationInfoBLL = BLLContainer.Resolve <IWmsAllocationInfoBLL>()) { WmsAllocationInfo model = WmsAllocationInfoBLL.GetFirstOrDefault(Id); return(model); } }
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); } } }