示例#1
0
        /// <summary>
        /// Creates a new instance of the Vir_StagingMethod class and populates it with data from the specified SqlDataReader.
        /// </summary>
        protected virtual Vir_StagingMethod MakeVir_StagingMethod(SqlDataReader dataReader)
        {
            Vir_StagingMethod vir_StagingMethod = new Vir_StagingMethod();

            vir_StagingMethod.StagingMethodID   = SqlClientUtility.GetInt32(dataReader, "StagingMethodID", 0);
            vir_StagingMethod.StagingMethodName = SqlClientUtility.GetString(dataReader, "StagingMethodName", String.Empty);

            return(vir_StagingMethod);
        }
示例#2
0
        /// <summary>
        /// Saves a record to the Vir_StagingMethod table.
        /// </summary>
        public virtual void Insert(Vir_StagingMethod vir_StagingMethod)
        {
            ValidationUtility.ValidateArgument("vir_StagingMethod", vir_StagingMethod);

            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@StagingMethodName", vir_StagingMethod.StagingMethodName)
            };

            vir_StagingMethod.StagingMethodID = (int)SqlClientUtility.ExecuteScalar(connectionStringName, CommandType.StoredProcedure, "Vir_StagingMethod_Insert", parameters);
        }
示例#3
0
        /// <summary>
        /// Updates a record in the Vir_StagingMethod table.
        /// </summary>
        public virtual void Update(Vir_StagingMethod vir_StagingMethod)
        {
            ValidationUtility.ValidateArgument("vir_StagingMethod", vir_StagingMethod);

            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@StagingMethodID", vir_StagingMethod.StagingMethodID),
                new SqlParameter("@StagingMethodName", vir_StagingMethod.StagingMethodName)
            };

            SqlClientUtility.ExecuteNonQuery(connectionStringName, CommandType.StoredProcedure, "Vir_StagingMethod_Update", parameters);
        }
示例#4
0
        /// <summary>
        /// Selects all records from the Vir_StagingMethod table.
        /// </summary>
        public virtual List <Vir_StagingMethod> SelectAll()
        {
            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(connectionStringName, CommandType.StoredProcedure, "Vir_StagingMethod_SelectAll"))
            {
                List <Vir_StagingMethod> vir_StagingMethodList = new List <Vir_StagingMethod>();
                while (dataReader.Read())
                {
                    Vir_StagingMethod vir_StagingMethod = MakeVir_StagingMethod(dataReader);
                    vir_StagingMethodList.Add(vir_StagingMethod);
                }

                return(vir_StagingMethodList);
            }
        }