private void user_delete_button_Click(object sender, EventArgs e) { if (MessageBox.Show("Do You Want to Delete Your Account?", "Delete Account", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { user_dao.delete(login_user[1]); sess_dao.clear(); this.ParentForm.Hide(); Registraion registraion = new Registraion(); registraion.Show(); } }
private void Main_FormClosed(object sender, FormClosedEventArgs e) { Session s = sess_dao.getSession("login"); if (s.save_login_status.Equals(0)) { sess_dao.clear(); } }