public RmRepairRecord GetRmRepairRecordById(string Id) { using (IRmRepairRecordBLL RmRepairRecordBLL = BLLContainer.Resolve <IRmRepairRecordBLL>()) { RmRepairRecord model = RmRepairRecordBLL.GetFirstOrDefault(Id); return(model); } }
public bool DelRmRepairRecord(string Id) { using (IRmRepairRecordBLL RmRepairRecordBLL = BLLContainer.Resolve <IRmRepairRecordBLL>()) { try { RmRepairRecord item = RmRepairRecordBLL.GetFirstOrDefault(Id); return(RmRepairRecordBLL.Delete(item)); } catch { return(false); } } }
public bool DelRmRepairRecords(string[] Ids) { using (IRmRepairRecordBLL RmRepairRecordBLL = BLLContainer.Resolve <IRmRepairRecordBLL>()) { try { List <RmRepairRecord> entitys = new List <RmRepairRecord>(); foreach (string id in Ids) { RmRepairRecord item = RmRepairRecordBLL.GetFirstOrDefault(id); entitys.Add(item); } return(RmRepairRecordBLL.Delete(entitys)); } catch { return(false); } } }