/// <summary>
        /// Selects all records from the role_permissions table.
        /// </summary>
        public CHRTList<RolepermissionsInfo> SelectAll()
        {
            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(connectionStringName, CommandType.StoredProcedure, "role_permissions_SelectAll"))
            {
                CHRTList<RolepermissionsInfo> rolepermissionsInfoList = new CHRTList<RolepermissionsInfo>();
                while (dataReader.Read())
                {
                    RolepermissionsInfo rolepermissionsInfo = MakeRolepermissionsInfo(dataReader);
                    rolepermissionsInfoList.Add(rolepermissionsInfo);
                }

                return rolepermissionsInfoList;
            }
        }
        /// <summary>
        /// Selects all records from the role_permissions table by a foreign key.
        /// </summary>
        public virtual CHRTList<RolepermissionsInfo> SelectAllByRoleid(int roleid)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@roleid", roleid)
            };

            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(connectionStringName, CommandType.StoredProcedure, "role_permissions_SelectAllByRoleid", parameters))
            {
                CHRTList<RolepermissionsInfo> rolepermissionsInfoList = new CHRTList<RolepermissionsInfo>();
                while (dataReader.Read())
                {
                    RolepermissionsInfo rolepermissionsInfo = MakeRolepermissionsInfo(dataReader);
                    rolepermissionsInfoList.Add(rolepermissionsInfo);
                }

                return rolepermissionsInfoList;
            }
        }
        /// <summary>
        /// Selects all records from the ticket_type table.
        /// </summary>
        public CHRTList<TickettypeInfo> SelectAll()
        {
            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(connectionStringName, CommandType.StoredProcedure, "ticket_type_SelectAll"))
            {
                CHRTList<TickettypeInfo> tickettypeInfoList = new CHRTList<TickettypeInfo>();
                while (dataReader.Read())
                {
                    TickettypeInfo tickettypeInfo = MakeTickettypeInfo(dataReader);
                    tickettypeInfoList.Add(tickettypeInfo);
                }

                return tickettypeInfoList;
            }
        }
        /// <summary>
        /// Selects all records from the transaction table by a foreign key.
        /// </summary>
        public virtual CHRTList<TransactionInfo> SelectAllByUserid(int userid)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@userid", userid)
            };

            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(connectionStringName, CommandType.StoredProcedure, "transaction_SelectAllByUserid", parameters))
            {
                CHRTList<TransactionInfo> transactionInfoList = new CHRTList<TransactionInfo>();
                while (dataReader.Read())
                {
                    TransactionInfo transactionInfo = MakeTransactionInfo(dataReader);
                    transactionInfoList.Add(transactionInfo);
                }

                return transactionInfoList;
            }
        }
        /// <summary>
        /// Selects all records from the car_groups table.
        /// </summary>
        public CHRTList<CargroupsInfo> SelectAll()
        {
            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(connectionStringName, CommandType.StoredProcedure, "car_groups_SelectAll"))
            {
                CHRTList<CargroupsInfo> cargroupsInfoList = new CHRTList<CargroupsInfo>();
                while (dataReader.Read())
                {
                    CargroupsInfo cargroupsInfo = MakeCargroupsInfo(dataReader);
                    cargroupsInfoList.Add(cargroupsInfo);
                }

                return cargroupsInfoList;
            }
        }
        /// <summary>
        /// Selects all records from the station table.
        /// </summary>
        public CHRTList<StationInfo> SelectAll()
        {
            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(connectionStringName, CommandType.StoredProcedure, "station_SelectAll"))
            {
                CHRTList<StationInfo> stationInfoList = new CHRTList<StationInfo>();
                while (dataReader.Read())
                {
                    StationInfo stationInfo = MakeStationInfo(dataReader);
                    stationInfoList.Add(stationInfo);
                }

                return stationInfoList;
            }
        }
Beispiel #7
0
        /// <summary>
        /// Selects all records from the users table.
        /// </summary>
        public CHRTList<UsersInfo> SelectAll()
        {
            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(connectionStringName, CommandType.StoredProcedure, "users_SelectAll"))
            {
                CHRTList<UsersInfo> usersInfoList = new CHRTList<UsersInfo>();
                while (dataReader.Read())
                {
                    UsersInfo usersInfo = MakeUsersInfo(dataReader);
                    usersInfoList.Add(usersInfo);
                }

                return usersInfoList;
            }
        }
        /// <summary>
        /// Selects all records from the ticket_registration table by a foreign key.
        /// </summary>
        public virtual CHRTList<TicketregistrationInfo> SelectAllByTicket_type(int ticket_type)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@ticket_type", ticket_type)
            };

            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(connectionStringName, CommandType.StoredProcedure, "ticket_registration_SelectAllByTicket_type", parameters))
            {
                CHRTList<TicketregistrationInfo> ticketregistrationInfoList = new CHRTList<TicketregistrationInfo>();
                while (dataReader.Read())
                {
                    TicketregistrationInfo ticketregistrationInfo = MakeTicketregistrationInfo(dataReader);
                    ticketregistrationInfoList.Add(ticketregistrationInfo);
                }

                return ticketregistrationInfoList;
            }
        }
Beispiel #9
0
        /// <summary>
        /// Selects all records from the car table by a foreign key.
        /// </summary>
        public virtual CHRTList<CarInfo> SelectAllByCar_type(int car_type)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@car_type", car_type)
            };

            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(connectionStringName, CommandType.StoredProcedure, "car_SelectAllByCar_type", parameters))
            {
                CHRTList<CarInfo> carInfoList = new CHRTList<CarInfo>();
                while (dataReader.Read())
                {
                    CarInfo carInfo = MakeCarInfo(dataReader);
                    carInfoList.Add(carInfo);
                }

                return carInfoList;
            }
        }
Beispiel #10
0
        /// <summary>
        /// Selects all records from the fare table by a foreign key.
        /// </summary>
        public virtual CHRTList<FareInfo> SelectAllByCar_group(int car_group)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@car_group", car_group)
            };

            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(connectionStringName, CommandType.StoredProcedure, "fare_SelectAllByCar_group", parameters))
            {
                CHRTList<FareInfo> fareInfoList = new CHRTList<FareInfo>();
                while (dataReader.Read())
                {
                    FareInfo fareInfo = MakeFareInfo(dataReader);
                    fareInfoList.Add(fareInfo);
                }

                return fareInfoList;
            }
        }
Beispiel #11
0
        /// <summary>
        /// Selects all records from the fare table.
        /// </summary>
        public CHRTList<FareInfo> SelectAll()
        {
            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(connectionStringName, CommandType.StoredProcedure, "fare_SelectAll"))
            {
                CHRTList<FareInfo> fareInfoList = new CHRTList<FareInfo>();
                while (dataReader.Read())
                {
                    FareInfo fareInfo = MakeFareInfo(dataReader);
                    fareInfoList.Add(fareInfo);
                }

                return fareInfoList;
            }
        }