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

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

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