public void AddDebitCards(int card_number)
        {
            user_debit_cards udc = new user_debit_cards();

            udc.card_number = card_number;
            db.user_debit_cards.Add(udc);
            db.SaveChanges();
        }
Beispiel #2
0
        public void AddEstablishment(string est_name, string phone_number, string adress, string website)
        {
            establishment est = new establishment();

            est.est_name     = est_name;
            est.adress       = adress;
            est.website      = website;
            est.phone_number = phone_number;
            db.establishment.Add(est);
            db.SaveChanges();
        }
        public void AddPayment(string establishment_name, int customer_number, float user_balance, float payment_amount)
        {
            payments pay = new payments();

            pay.establishment_name = establishment_name;
            pay.customer_number    = customer_number;
            pay.user_balance       = user_balance;
            pay.payment_amount     = payment_amount;
            db.payments.Add(pay);
            db.SaveChanges();
        }
Beispiel #4
0
        public void UserRegister(string first_name, string last_name, string email, string password, int admin, string phone_number)
        {
            MyPayEntities db = new MyPayEntities();

            users user = new users();

            try
            {
                user.first_name   = first_name;
                user.last_name    = last_name;
                user.email        = email;
                user.password     = password;
                user.phone_number = phone_number;
                user.admin        = 1;
                db.users.Add(user);
                db.SaveChanges();
            }
            catch (Exception e)
            {
                throw e;
            }
        }