예제 #1
0
 void checkCredentials(string username, string password)
 {
     if (txtusername.Text == "hk")      //username == txtusername.Text)
     {
         if (txtpassword.Text == "123") //password == txtpassword.Text)
         {
             if (First_Page.opt1 == 1)
             {
                 this.Hide();
                 patientFunctions pf = new patientFunctions(username, true);
                 pf.ShowDialog();
                 this.Close();
             }
             else
             {
                 this.Hide();
                 doctorFunctions df = new doctorFunctions(username, true);
                 df.ShowDialog();
                 this.Close();
             }
         }
         else
         {
             MessageBox.Show("LOGIN FAILED!! Enter Password Again", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
 }
예제 #2
0
        //Back button
        private void button2_Click(object sender, EventArgs e)
        {
            this.Hide();
            patientFunctions pf = new patientFunctions(this.username);

            pf.ShowDialog();
            this.Close();
        }
예제 #3
0
 //Back button
 private void button1_Click(object sender, EventArgs e)
 {
     if (First_Page.opt1 == 0)
     {
         this.Hide();
         doctorFunctions df = new doctorFunctions(this.username);
         df.ShowDialog();
         this.Close();
     }
     if (First_Page.opt1 == 1)
     {
         this.Hide();
         patientFunctions pf = new patientFunctions(this.username);
         pf.ShowDialog();
         this.Close();
     }
 }
예제 #4
0
        //Exit
        private void button10_Click(object sender, EventArgs e)
        {
            if (First_Page.opt1 == 0)
            {
                this.Hide();
                viewInfo view = new viewInfo(this.username);
                view.ShowDialog();
                this.Close();
            }

            if (First_Page.opt1 == 1)
            {
                this.Hide();
                patientFunctions pf = new patientFunctions(this.username);
                pf.ShowDialog();
                this.Close();
            }
        }