/// <summary> /// Modify only the specified properties of the MaterialParameterValue /// specified by: /// </summary> /// <param name="id">PK</param> /// <param name="propValues">Properties to change</param> public virtual void Modify(Int32 id, params KeyValuePair <string, object>[] propValues) { try { Trace.WriteInformation("({0}, {1})", Trace.GetMethodName(), CLASSNAME, id, string.Join(",", propValues)); DataAccess.MaterialParameterValues materialParameterValues = new DataAccess.MaterialParameterValues(); materialParameterValues.Modify( id, propValues); return; } catch (Exception ex) { Trace.WriteError("({0})", Trace.GetMethodName(), CLASSNAME, ex, id); throw; } }
/// <summary> /// Modify the given MaterialParameterValue in the database /// </summary> public virtual void Modify(Model.MaterialParameterValue modifiedMaterialParameterValue) { try { Trace.WriteInformation("({0})", Trace.GetMethodName(), CLASSNAME, modifiedMaterialParameterValue); //Begin Checks CheckConstraints(modifiedMaterialParameterValue); if (!Exists(modifiedMaterialParameterValue)) { throw new BusinessException(string.Format("There is no MaterialParameterValue with this id. ({0})", modifiedMaterialParameterValue)); } DataAccess.MaterialParameterValues materialParameterValues = new DataAccess.MaterialParameterValues(); materialParameterValues.Modify(modifiedMaterialParameterValue); } catch (Exception ex) { Trace.WriteError("({0})", Trace.GetMethodName(), CLASSNAME, ex, modifiedMaterialParameterValue); throw; } }