コード例 #1
0
        private void homeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form_Login login = new Form_Login();

            login.Show();
            this.Hide();
        }
コード例 #2
0
        private void toolStripMenuItem2_Click(object sender, EventArgs e)
        {
            Form_Login logout = new Form_Login();

            this.Hide();
            logout.Show();
        }
コード例 #3
0
 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);
         }
     }
 }