/// <summary> /// 按照关键字段删除 /// </summary> /// <param name="Id">关键字段</param> /// <returns>是否成功</returns> public bool DelMesJobOrder(string Id) { using (IMesJobOrderBLL MesJobOrderBLL = BLLContainer.Resolve <IMesJobOrderBLL>()) { try { MesJobOrder item = MesJobOrderBLL.GetFirstOrDefault(Id); return(MesJobOrderBLL.Delete(item)); } catch { return(false); } } }
/// <summary> /// 按照关键字段删除 /// </summary> /// <param name="Ids">关键字段数组</param> /// <returns>是否成功</returns> public bool DelMesJobOrders(string[] Ids) { using (IMesJobOrderBLL MesJobOrderBLL = BLLContainer.Resolve <IMesJobOrderBLL>()) { try { List <MesJobOrder> entitys = new List <MesJobOrder>(); foreach (string id in Ids) { MesJobOrder item = MesJobOrderBLL.GetFirstOrDefault(id); entitys.Add(item); } return(MesJobOrderBLL.Delete(entitys)); } catch { return(false); } } }