private void button1_Click(object sender, EventArgs e) { this.Close(); Administration m = new Administration(); m.Show(); }
private void button1_Click_1(object sender, EventArgs e) { try { MatchUsername(); MatchPassword(); if (t1 && t2) { switch (Category.Text) { case "Admin": this.Hide(); Main m = new Main(); m.Show(); break; case "Administration": this.Hide(); GetAttandance(); administrator = new Administration(); administrator.GetIdLebel.Text = GetId; administrator.getLoginTimeLebel.Text = timeLabel.Text + AmPm.Text; administrator.Show(); break; case "Doctor": getID(); GetAttandance(); doctor = new DoctorForm(ID); this.Hide(); doctor.Show(); break; default: MessageBox.Show("Select User Category first."); break; } } else { MessageBox.Show("Incorrect Username or Password \n or you are not registerd."); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void button4_Click(object sender, EventArgs e) { switch (User) { case "Admin": this.Close(); Main m = new Main(); m.Show(); break; case "Administration": this.Close(); Administration a = new Administration(); a.Show(); break; } }
private void button4_Click_1(object sender, EventArgs e) { if (Home != "") { switch (Home) { case "Admin": this.Close(); Main m = new Main(); Home = ""; m.Show(); break; case "Administration": this.Close(); Administration am = new Administration(); Home = ""; am.Show(); break; } } }