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