Esempio n. 1
0
        /// <summary>
        /// Creates a new instance of the Sol_BinCount class and populates it with data from the specified SqlDataReader.
        /// </summary>
        protected virtual Sol_BinCount MakeSol_BinCount(SqlDataReader dataReader)
        {
            Sol_BinCount sol_BinCount = new Sol_BinCount();

            sol_BinCount.ClientID         = SqlClientUtility.GetString(dataReader, "ClientID", String.Empty);
            sol_BinCount.CategoryButtonID = SqlClientUtility.GetInt32(dataReader, "CategoryButtonID", 0);
            sol_BinCount.CurrentCount     = SqlClientUtility.GetInt32(dataReader, "CurrentCount", 0);

            return(sol_BinCount);
        }
Esempio n. 2
0
        /// <summary>
        /// Updates a record in the Sol_BinCount table.
        /// </summary>
        public virtual void Update(Sol_BinCount sol_BinCount)
        {
            ValidationUtility.ValidateArgument("sol_BinCount", sol_BinCount);

            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@ClientID", sol_BinCount.ClientID),
                new SqlParameter("@CategoryButtonID", sol_BinCount.CategoryButtonID),
                new SqlParameter("@CurrentCount", sol_BinCount.CurrentCount)
            };

            SqlClientUtility.ExecuteNonQuery(connectionStringName, CommandType.StoredProcedure, "Sol_BinCount_Update", parameters);
        }
Esempio n. 3
0
        /// <summary>
        /// Selects all records from the Sol_BinCount table.
        /// </summary>
        public virtual List <Sol_BinCount> SelectAll()
        {
            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(connectionStringName, CommandType.StoredProcedure, "Sol_BinCount_SelectAll"))
            {
                List <Sol_BinCount> sol_BinCountList = new List <Sol_BinCount>();
                while (dataReader.Read())
                {
                    Sol_BinCount sol_BinCount = MakeSol_BinCount(dataReader);
                    sol_BinCountList.Add(sol_BinCount);
                }

                return(sol_BinCountList);
            }
        }
Esempio n. 4
0
        /// <summary>
        /// Selects all records from the Sol_BinCount table by a foreign key.
        /// </summary>
        public virtual List <Sol_BinCount> _SelectAllByCategoryButtonID(int categoryButtonID)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@CategoryButtonID", categoryButtonID)
            };

            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(connectionStringName, CommandType.StoredProcedure, "Sol_BinCount_SelectAllByCategoryButtonID", parameters))
            {
                List <Sol_BinCount> sol_BinCountList = new List <Sol_BinCount>();
                while (dataReader.Read())
                {
                    Sol_BinCount sol_BinCount = MakeSol_BinCount(dataReader);
                    sol_BinCountList.Add(sol_BinCount);
                }

                return(sol_BinCountList);
            }
        }