예제 #1
0
        /// <summary>
        /// Добавление параметра
        /// </summary>
        /// <param name="name">Имя параметра</param>
        /// <param name="type">Тип параметра</param>
        /// <param name="value">Значение параметра</param>
        /// <returns></returns>
        public UniParameter Add(string name, UniDbType type, ParameterDirection direction, string sourceColumn)
        {
            UniParameter v = new UniParameter(name, type, null)
            {
                Direction = direction, SourceColumn = sourceColumn
            };

            Add(v);
            return(v);
        }
예제 #2
0
        public override int Add(object value)
        {
            UniParameter v = (UniParameter)value;

            if (v.UniDbType == UniDbType.RefCursor)
            {
                v.Direction = System.Data.ParameterDirection.Output;
            }
            list_params.Add(v);
            return(m_parameters.Add(v.InternalParameter));
        }
예제 #3
0
 protected override void SetParameter(string parameterName, DbParameter value)
 {
     for (int i = 0; i < m_parameters.Count; ++i)
     {
         if (m_parameters[i].ParameterName == parameterName)
         {
             m_parameters[i] = value;
             list_params[i]  = new UniParameter(value);
             break;
         }
     }
 }
예제 #4
0
 protected override void SetParameter(int index, DbParameter value)
 {
     list_params[index]  = new UniParameter(value);
     m_parameters[index] = value;
 }