Exemplo n.º 1
0
        /// <summary>
        ///     Add parameters into a SqlDataAccessParameter object and add that to the list.  Size and Precision are assigned a 0
        ///     value.
        /// </summary>
        /// <param name="name">Gets added to Name property</param>
        /// <param name="dbType">Gets added to DataType property</param>
        /// <param name="oValue">Gets added to Value property</param>
        public void Add(string name, SqlDbType dbType, object oValue)
        {
            SqlDataAccessParameter dto = new SqlDataAccessParameter();

            dto.Name        = name;
            dto.DataType    = dbType;
            dto.Size        = 0;
            dto.Precision   = 0;
            dto.ObjectValue = oValue;

            Add(dto);
        }
Exemplo n.º 2
0
        /// <summary>
        ///     Add parameters into a SqlDataAccessParameter object and add that to the list.  Precision is assigned a 0 value.
        /// </summary>
        /// <param name="name">Gets added to Name property</param>
        /// <param name="dbType">Gets added to DataType property</param>
        /// <param name="size">Gets added to Size property</param>
        /// <param name="value">Gets added to Value property</param>
        public void Add(string name, SqlDbType dbType, int size, string value)
        {
            SqlDataAccessParameter dto = new SqlDataAccessParameter();

            dto.Name      = name;
            dto.DataType  = dbType;
            dto.Size      = size;
            dto.Precision = 0;
            dto.Value     = value;

            Add(dto);
        }
Exemplo n.º 3
0
 /// <summary>
 ///     Gets data from stored procedure with one parameter
 /// </summary>
 /// <param name="parameter">Single parameter to send to database</param>
 /// <param name="procedureName">Stored procedure to call</param>
 /// <returns>DtoDataSet filled with data from database</returns>
 public DtoDataSet GetData(SqlDataAccessParameter parameter, string procedureName)
 {
     return(GetData(new[] { parameter }, procedureName));
 }
Exemplo n.º 4
0
 /// <summary>
 ///     Adds SqlDataAccessParameter to SqlDataAccessParameter List
 /// </summary>
 /// <param name="dtoParam">SqlDataAccessParameter to add</param>
 public void Add(SqlDataAccessParameter dtoParam)
 {
     _ColParameters.Add(dtoParam);
 }