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