/// <summary> /// 创建一个最大允许误差信息 /// </summary> /// <param name="validationErrors">返回的错误信息</param> /// <param name="db">数据库上下文</param> /// <param name="entity">一个最大允许误差信息</param> /// <returns></returns> public bool Create(ref ValidationErrors validationErrors, ALLOWABLE_ERROR entity) { try { repository.Create(entity); return(true); } catch (Exception ex) { validationErrors.Add(ex.Message); ExceptionsHander.WriteExceptions(ex); } return(false); }
/// <summary> /// 最大允许误差信息 /// </summary> /// <param name="validationErrors">返回的错误信息</param> /// <param name="entity">最大允许误差信息 </param> /// <returns></returns> public bool EditField(ref ValidationErrors validationErrors, ALLOWABLE_ERROR entity) { try { repository.EditField(db, entity); repository.Save(db); return(true); } catch (Exception ex) { validationErrors.Add(ex.Message); ExceptionsHander.WriteExceptions(ex); } return(false); }
/// <summary> /// 根据ID获取数据模型 /// </summary> /// <param name="id">编号</param> /// <returns></returns> public ALLOWABLE_ERROR Get(string id) { ALLOWABLE_ERROR item = m_BLL.GetById(id); return(item); }