private void homeToolStripMenuItem_Click(object sender, EventArgs e) { Form_Login login = new Form_Login(); login.Show(); this.Hide(); }
private void toolStripMenuItem2_Click(object sender, EventArgs e) { Form_Login logout = new Form_Login(); this.Hide(); logout.Show(); }
private void pbSingup_Click(object sender, EventArgs e) { if (txtuname_s.Text == "" || txtpass_s.Text == "" || txtfname_s.Text == "" || txtlname_s.Text == "" || cmb_s.SelectedItem == null || txttelno_s.Text == "" || txtemail_s.Text == "" || txtnic_s.Text == "") { MessageBox.Show("please fill all the fields", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { try { db.addUser(txtuname_s.Text, txtpass_s.Text, txtfname_s.Text, txtlname_s.Text, cmb_s.SelectedItem.ToString(), txttelno_s.Text, txtemail_s.Text, txtnic_s.Text); MessageBox.Show("user has been added!", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); cleartxt(); Form_Login login = new Form_Login(); this.Hide(); login.Show(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } }