private void cmdLogin_Click(object sender, EventArgs e) { localhost.Service1 myserver = new localhost.Service1(); bool login; bool loginpassed; myserver.logind(txtName.Text, txtCNIC.Text, txtPassword.Text, txtHospitalName.Text, out login, out loginpassed); if (login) { MessageBox.Show("valid user"); } else { MessageBox.Show("invalid user"); } }