Exemplo n.º 1
0
        /// <summary>
        /// Creates a new account based on the CreatorX class.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnAccCreate_Click(object sender, EventArgs e)
        {
            CreatorX newAccount = new CreatorX();

            newAccount.setFirstName = txtFirstName.Text;
            newAccount.setLastName  = txtLastName.Text;
            newAccount.setAge       = Convert.ToInt32(txtAge.Text);
            showID.Text             = newAccount.getID.ToString();
            newDataBase.AddToDataBase(newAccount, newAccount.getID);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Adds the account and account ID to a list of ID's and accounts
 /// </summary>
 /// <param name="newAcc"></param>
 /// <param name="accID"></param>
 public void AddToDataBase(CreatorX newAcc, int accID)
 {
     Accounts.Add(newAcc);
     accountID.Add(accID);
 }