public PercentToCompound InsertPercentToCompound(PercentToCompound percentToCompound) { Dictionary <string, object> parameters = new Dictionary <string, object>(); parameters.Add("@Percents_id", percentToCompound.PercentId); parameters.Add("@Compound_id", percentToCompound.CompoundId); PercentToCompound result = GetPercentToCompoundById(InsertElement(parameters, _insertPercentToCompoundQuery)); return(result); }
private PercentToCompound GetPercentToCompoundFromObjectArray(object[] array) { PercentToCompound result = new PercentToCompound(); if (array != null) { result.Id = (int)array[0]; result.PercentId = (int)array[1]; result.CompoundId = (int)array[2]; return(result); } return(null); }
public PercentToCompound GetPercentToCompoundById(int id) { PercentToCompound result = new PercentToCompound(); object[] values = GetElementById(id, _getPercentToCompoundByIdQuery); if (values != null) { result.Id = (int)values[0]; result.PercentId = (int)values[1]; result.CompoundId = (int)values[2]; return(result); } return(null); }
public BusinessMatrix() { this._matrix = new Matrix(); this._percentage = new Percentage(); this._percentToCompound = new PercentToCompound(); }