/// <summary> /// 根据关键字段的值获取记录 /// </summary> /// <param name="Id">关键字段的值</param> /// <returns>符合查询条件的记录</returns> public QmsCheckParam GetQmsCheckParamById(string Id) { using (IQmsCheckParamBLL QmsCheckParamBLL = BLLContainer.Resolve <IQmsCheckParamBLL>()) { QmsCheckParam model = QmsCheckParamBLL.GetFirstOrDefault(Id); return(model); } }
/// <summary> /// 按照关键字段删除 /// </summary> /// <param name="Id">关键字段</param> /// <returns>是否成功</returns> public bool DelQmsCheckParam(string Id) { using (IQmsCheckParamBLL QmsCheckParamBLL = BLLContainer.Resolve <IQmsCheckParamBLL>()) { try { QmsCheckParam item = QmsCheckParamBLL.GetFirstOrDefault(Id); return(QmsCheckParamBLL.Delete(item)); } catch { return(false); } } }
/// <summary> /// 按照关键字段删除 /// </summary> /// <param name="Ids">关键字段数组</param> /// <returns>是否成功</returns> public bool DelQmsCheckParams(string[] Ids) { using (IQmsCheckParamBLL QmsCheckParamBLL = BLLContainer.Resolve <IQmsCheckParamBLL>()) { try { List <QmsCheckParam> entitys = new List <QmsCheckParam>(); foreach (string id in Ids) { QmsCheckParam item = QmsCheckParamBLL.GetFirstOrDefault(id); entitys.Add(item); } return(QmsCheckParamBLL.Delete(entitys)); } catch { return(false); } } }