public bool DelWmsInventory(string Id) { using (IWmsInventoryBLL WmsInventoryBLL = BLLContainer.Resolve <IWmsInventoryBLL>()) { try { WmsInventory item = WmsInventoryBLL.GetFirstOrDefault(Id); return(WmsInventoryBLL.Delete(item)); } catch { return(false); } } }
public bool DelWmsInventorys(string[] Ids) { using (IWmsInventoryBLL WmsInventoryBLL = BLLContainer.Resolve <IWmsInventoryBLL>()) { try { List <WmsInventory> entitys = new List <WmsInventory>(); foreach (string id in Ids) { WmsInventory item = WmsInventoryBLL.GetFirstOrDefault(id); entitys.Add(item); } return(WmsInventoryBLL.Delete(entitys)); } catch { return(false); } } }