Exemplo n.º 1
0
 private void comboBox1_SelectedValueChanged(object sender, EventArgs e)
 {
     if (cmbRole.Text == "Employee")
     {
         Hide();
         frmPatientComplaint objfrmPatientComplaint = new frmPatientComplaint();
         objfrmPatientComplaint.Closed += (s, args) => this.Close();
         objfrmPatientComplaint.ShowDialog();
     }
     //else if (comboBox1.Text == "Doctor" || comboBox1.Text == "Nurse")
     //{
     //    textUsername.Enabled = true;
     //    textPassword.Enabled = true;
     //    btnLogin.Enabled = true;
     //    SetPlaceholder(textUsername, "Username");
     //    SetPlaceholder(textPassword, "Password");
     //}
     else if (cmbRole.Text == "")
     {
         textUsername.Enabled = false;
         textPassword.Enabled = false;
         btnLogin.Enabled     = false;
         SetPlaceholder(textUsername, "");
         SetPlaceholder(textPassword, "");
     }
     else
     {
         textUsername.Enabled = true;
         textPassword.Enabled = true;
         btnLogin.Enabled     = true;
         SetPlaceholder(textUsername, "Username");
         SetPlaceholder(textPassword, "Password");
     }
     textUsername.Focus();
 }
Exemplo n.º 2
0
        private void btnEmployee_Click(object sender, EventArgs e)
        {
            //this.Hide();
            //this.Close();

            //frmPatientComplaint objfrmPatientComplaint = new frmPatientComplaint();
            //objfrmPatientComplaint.ShowDialog();

            this.Hide();
            frmPatientComplaint objfrmPatientComplaint = new frmPatientComplaint();

            objfrmPatientComplaint.Closed += (s, args) => this.Close();
            objfrmPatientComplaint.ShowDialog();
        }