private void btnSignOut_Click(object sender, EventArgs e) { this.Dispose(); Login_Form login = new Login_Form(); login.Show(); }
private void button1_Click(object sender, EventArgs e) { if (txtCode.Text != code) { MessageBox.Show("Invalid Verification Code"); txtCode.Text = ""; this.Dispose(); Login_Form login = new Login_Form(); login.Show(); } else { MessageBox.Show("Account has been verified"); BookStoreDBEntities ent = new BookStoreDBEntities(); var query = (from c in ent.Customers where c.Email.Equals(txtEmail.Text) select c ).First(); query.Status = "Verified"; ent.SaveChanges(); this.Dispose(); Login_Form login = new Login_Form(); login.Show(); } }