private void cmdLogin_Click(object sender, EventArgs e) { localhost.Service1 myserver = new localhost.Service1(); bool login; bool loginpassed; //bool loginp; //bool loginppassed; myserver.logina(txtCNIC.Text, txtPassword.Text, out login, out loginpassed); if (login) { { MessageBox.Show("valid user"); } } else { myserver.loginp(txtCNIC.Text, txtPassword.Text, out login, out loginpassed); if (login) { MessageBox.Show("valid user"); } else { MessageBox.Show("invalid user"); } } }
private void linklblLogin_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { localhost.Service1 myserver = new localhost.Service1(); bool login; bool loginpassed; myserver.logina(txtCNIC.Text, txtConfirmPassword.Text, out login, out loginpassed); if (login) { Login l = new Login(); this.Hide(); l.Show(); } myserver.loginp(txtCNIC.Text, txtConfirmPassword.Text, out login, out loginpassed); if (login) { Login l = new Login(); this.Hide(); l.Show(); } else { LoginD k = new LoginD(); this.Hide(); k.Show(); } }
private void linklblDoctorinfo_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { localhost.Service1 myserver = new localhost.Service1(); bool login; bool loginpassed; myserver.logina(txtCNIC.Text, txtPassword.Text, out login, out loginpassed); if (login) { Doctor_Info DoctorInfo = new Doctor_Info(); this.Hide(); DoctorInfo.Show(); } }