Example #1
0
        /// <summary>
        /// Creates a new instance of the Sac_LogType class and populates it with data from the specified SqlDataReader.
        /// </summary>
        protected virtual Sac_LogType MakeSac_LogType(SqlDataReader dataReader)
        {
            Sac_LogType sac_LogType = new Sac_LogType();

            sac_LogType.LogTypeID   = SqlClientUtility.GetInt32(dataReader, "LogTypeID", 0);
            sac_LogType.Description = SqlClientUtility.GetString(dataReader, "Description", String.Empty);

            return(sac_LogType);
        }
Example #2
0
        /// <summary>
        /// Updates a record in the Sac_LogType table.
        /// </summary>
        public virtual void Update(Sac_LogType sac_LogType)
        {
            ValidationUtility.ValidateArgument("sac_LogType", sac_LogType);

            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@LogTypeID", sac_LogType.LogTypeID),
                new SqlParameter("@Description", sac_LogType.Description)
            };

            SqlClientUtility.ExecuteNonQuery(connectionStringName, CommandType.StoredProcedure, "Sac_LogType_Update", parameters);
        }
Example #3
0
        /// <summary>
        /// Selects all records from the Sac_LogType table.
        /// </summary>
        public virtual List <Sac_LogType> SelectAll()
        {
            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(connectionStringName, CommandType.StoredProcedure, "Sac_LogType_SelectAll"))
            {
                List <Sac_LogType> sac_LogTypeList = new List <Sac_LogType>();
                while (dataReader.Read())
                {
                    Sac_LogType sac_LogType = MakeSac_LogType(dataReader);
                    sac_LogTypeList.Add(sac_LogType);
                }

                return(sac_LogTypeList);
            }
        }