/// <summary> /// Modify only the specified properties of the MaterialParameter /// 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.MaterialParameters materialParameters = new DataAccess.MaterialParameters(); materialParameters.Modify( id, propValues); return; } catch (Exception ex) { Trace.WriteError("({0})", Trace.GetMethodName(), CLASSNAME, ex, id); throw; } }
/// <summary> /// Modify the given MaterialParameter in the database /// </summary> public virtual void Modify(Model.MaterialParameter modifiedMaterialParameter) { try { Trace.WriteInformation("({0})", Trace.GetMethodName(), CLASSNAME, modifiedMaterialParameter); //Begin Checks CheckConstraints(modifiedMaterialParameter); if (!Exists(modifiedMaterialParameter)) { throw new BusinessException(string.Format("There is no MaterialParameter with this id. ({0})", modifiedMaterialParameter)); } DataAccess.MaterialParameters materialParameters = new DataAccess.MaterialParameters(); materialParameters.Modify(modifiedMaterialParameter); } catch (Exception ex) { Trace.WriteError("({0})", Trace.GetMethodName(), CLASSNAME, ex, modifiedMaterialParameter); throw; } }