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);
         }
     }
 }
        }//Done 2 bracket

        private void button7_Click(object sender, EventArgs e)
        {
            this.Hide();
            doctorFunctions df = new doctorFunctions(this.Doc_username);

            df.ShowDialog();
            this.Close();
        }
        //back
        private void button3_Click(object sender, EventArgs e)
        {
            this.Hide();
            doctorFunctions functions = new doctorFunctions(this.username);

            functions.ShowDialog();
            this.Close();
        }
示例#4
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();
     }
 }