Esempio n. 1
0
        public LogIn()
        {
            DBSelect dBSelect = new DBSelect();

            dBSelect.SelectCategoryWithProducts();
            InitializeComponent();
        }
Esempio n. 2
0
        //Made by Mikkel E.R. Glerup
        /// <summary>
        /// Returns a list of subscriptions which cotains a category
        /// </summary>
        /// <param name="ID"></param>
        /// <returns></returns>
        public static List <Categories> SelectSubscriptionwithCategory(int ID)
        {
            DBSelect dBSelect = new DBSelect();

            return(dBSelect.SelectSubscriptionwithCategory(ID));
        }
Esempio n. 3
0
        // Made by Helena Brunsgaard Madsen
        /// <summary>
        /// return a Deals with the given ID
        /// </summary>
        /// <param name="ID"></param>
        /// <returns></returns>
        public static Deals SelectDeal(int ID)
        {
            DBSelect dBSelect = new DBSelect();

            return(dBSelect.SelectDeal(ID));
        }
Esempio n. 4
0
        // Made by Helena Brunsgaard Madsen
        /// <summary>
        /// Creates a list of all deals in the database
        /// </summary>
        /// <returns></returns>
        public static List <Deals> SelectAllDeals()
        {
            DBSelect dBSelect = new DBSelect();

            return(dBSelect.SelectAllDeals());
        }
Esempio n. 5
0
        //Mikkel E.R. Glerup
        /// <summary>
        /// Creates a list of subscriptions which are inactive
        /// </summary>
        /// <returns></returns>
        public static List <Subscription> SelectInactiveSubscriptions()
        {
            DBSelect dBSelect = new DBSelect();

            return(dBSelect.SelectInactiveSubscriptions());
        }
Esempio n. 6
0
        public static Subscription SelectSubcription(int ID)
        {
            DBSelect dBSelect = new DBSelect();

            return(dBSelect.SelectSubscription(ID));
        }
Esempio n. 7
0
        // Made by Helena Brunsgaard Madsen
        /// <summary>
        /// Creates an object based of the given ID
        /// </summary>
        /// <param name="ID"></param>
        /// <returns></returns>
        public static Product SelectProduct(int?ID)
        {
            DBSelect dBSelect = new DBSelect();

            return(dBSelect.SelectProduct(ID));
        }
Esempio n. 8
0
        //Made by Mikkel E.R. Glerup
        /// <summary>
        /// Selects a user with the given ID from the database
        /// </summary>
        /// <param name="ID"></param>
        /// <returns></returns>
        public static User SelectUser(int ID)
        {
            DBSelect dBSelect = new DBSelect();

            return(dBSelect.SelectUser(ID));
        }
Esempio n. 9
0
        //Made by Mikkel E.R. Glerup
        /// <summary>
        /// Creates a list of categories with the amount of products contained
        /// </summary>
        /// <returns></returns>
        public static List <Categories> SelectCategoriesAndProducts()
        {
            DBSelect dBSelect = new DBSelect();

            return(dBSelect.SelectCategoryWithProducts());
        }
Esempio n. 10
0
        // Made by Helena Brunsgaard Madsen
        /// <summary>
        /// Creates a category with the ID specified
        /// </summary>
        /// <param name="ID"></param>
        /// <returns></returns>
        public static Categories SelectCategory(int?ID)
        {
            DBSelect dBSelect = new DBSelect();

            return(dBSelect.SelectCategory(ID));
        }
Esempio n. 11
0
        //Made by Mikkel E.R. Glerup
        /// <summary>
        /// Checks username and password with the data in the database
        /// </summary>
        /// <returns></returns>
        public static bool UserLogin()
        {
            DBSelect dBSelect = new DBSelect();

            return(dBSelect.GetUserIdByUsernameAndPassword());
        }
Esempio n. 12
0
        // Made by Helena Brunsgaard Madsen
        /// <summary>
        /// Creates a list of all categories in the database
        /// </summary>
        /// <returns></returns>
        public static List <Categories> SelectAllCategories()
        {
            DBSelect dBSelect = new DBSelect();

            return(dBSelect.SelectAllCategories());
        }
Esempio n. 13
0
        // Made by Helena Brunsgaard Madsen
        /// <summary>
        /// Returns a Customer with the ID specified
        /// </summary>
        /// <param name="ID"></param>
        /// <returns></returns>
        public static Customer SelectCustomer(int ID)
        {
            DBSelect dBSelect = new DBSelect();

            return(dBSelect.SelectCustomer(ID));
        }
Esempio n. 14
0
        // Made by Mikkel E.R. Glerup
        /// <summary>
        /// Creates a list with all customers that has a deal
        /// </summary>
        /// <returns></returns>
        public static List <StatDeals> SelectCustomersWithDeals()
        {
            DBSelect dBSelect = new DBSelect();

            return(dBSelect.SelectCustomersWithDeals());
        }
Esempio n. 15
0
        // Made by Helena Brunsgaard Madsen
        /// <summary>
        /// Creates a list of all customers in the database
        /// </summary>
        /// <returns></returns>
        public static List <Customer> SelectAllCustomers()
        {
            DBSelect dBSelect = new DBSelect();

            return(dBSelect.SelectAllCustomers());
        }
Esempio n. 16
0
        //Made by Mikkel E.R. Glerup
        /// <summary>
        /// Returns a list of DealTypes with the amount of times used
        /// </summary>
        /// <returns></returns>
        public static List <StatDeals> SelectDealTypes()
        {
            DBSelect dBSelect = new DBSelect();

            return(dBSelect.SelectDealTypes());
        }
Esempio n. 17
0
        // Made by Helena Brunsgaard Madsen
        /// <summary>
        /// Creates a list of all products in the database
        /// </summary>
        /// <returns></returns>
        public static List <Product> SelectAllProducts()
        {
            DBSelect dBSelect = new DBSelect();

            return(dBSelect.SelectAllProducts());
        }
Esempio n. 18
0
        // Made by Mikkel E.R. Glerup
        /// <summary>
        /// Creates a list of all users in the database
        /// </summary>
        /// <returns></returns>
        public static List <User> SelectAllUsers()
        {
            DBSelect dBSelect = new DBSelect();

            return(dBSelect.SelectAllUsers());
        }