Beispiel #1
0
        public LogIn()
        {
            DBSelect dBSelect = new DBSelect();

            dBSelect.SelectCategoryWithProducts();
            InitializeComponent();
        }
Beispiel #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));
        }
Beispiel #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));
        }
Beispiel #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());
        }
Beispiel #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());
        }
Beispiel #6
0
        public static Subscription SelectSubcription(int ID)
        {
            DBSelect dBSelect = new DBSelect();

            return(dBSelect.SelectSubscription(ID));
        }
Beispiel #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));
        }
Beispiel #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));
        }
Beispiel #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());
        }
Beispiel #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));
        }
Beispiel #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());
        }
Beispiel #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());
        }
Beispiel #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));
        }
Beispiel #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());
        }
Beispiel #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());
        }
Beispiel #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());
        }
Beispiel #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());
        }
Beispiel #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());
        }