private void button1_Click(object sender, EventArgs e) { UserAuthenticate.LoginWebService a = new UserAuthenticate.LoginWebService(); string type = a.loginService(txtUsername.Text.ToString(), txtPassword.Text.ToString()); if (type == null) { MessageBox.Show("Username or Password is incorrect, enter again.", "Login Error"); } else { type = type.ToLower(); if (type == "student") { user = txtUsername.Text; Student_View_Information svi = new Student_View_Information(this); svi.Show(); this.Hide(); } else if (type == "teacher") { user = txtUsername.Text; Teachers t = new Teachers(this); t.Show(); this.Hide(); } else if (type == "admin") { user = txtUsername.Text; Admin ad = new Admin(this); ad.Show(); this.Hide(); } } }
private void button2_Click(object sender, EventArgs e) { if (flag == 1) { a.Show(); this.Close(); } else if (flag == 2) { t.Show(); this.Close(); } else if (flag == 3) { svi.Show(); this.Close(); } }
private void btnBack_Click(object sender, EventArgs e) { svi.Show(); this.Close(); }