Exemple #1
0
        private List<Journey> _journeyLog;  // stores the bus stops hopped on from and hopped off to and the corresponding bus name taken (past)

        /****************************************************************************************************/
        // CONSTRUCTOR
        /****************************************************************************************************/
        public User(string name, string mobileNum, float account, string creditCardNum, PAYMENT_MODE paymentMode1, PAYMENT_MODE paymentMode2, string password)
        {
            _name = name;
            _mobileNum = mobileNum;
            _account = account;
            _creditCardNum = creditCardNum;
            _paymentMode1 = paymentMode1;
            _paymentMode2 = paymentMode2;
            _ticketExpiry = 0;
            _journeyPlan = new Journey(null, null, null, -1, -1);
            _userStatus = USER_STATUS.inactive;
            _location = null;
            _password = password;

            _smsLog = new List<string>();
            _journeyLog = new List<Journey>();
        }
Exemple #2
0
 // creates a user object and adds it to the database
 public void CreateUser(string name, string mobileNum, float account, string creditCardNum, PAYMENT_MODE paymentMode1, PAYMENT_MODE paymentMode2, string password)
 {
     User newUser = new User(name, mobileNum, account, creditCardNum, paymentMode1, paymentMode2, password);
     _userList.Add(newUser);
 }
Exemple #3
0
 // updates the secondary mode of payment
 public void UpdatePaymentMode2(PAYMENT_MODE paymentMode)
 {
     _paymentMode2 = paymentMode;
 }
Exemple #4
0
 // update new 2nd payment method for user
 public void UpdateUserSecondPaymentMethod(string mobilenumber, PAYMENT_MODE paymentmethod)
 {
     _userList.FindUserWithMobileNumber(mobilenumber).UpdatePaymentMode1(paymentmethod);
 }