コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
 public BusinessMatrix()
 {
     this._matrix            = new Matrix();
     this._percentage        = new Percentage();
     this._percentToCompound = new PercentToCompound();
 }