示例#1
0
        private void cmdRegister_Click(object sender, EventArgs e)
        {
            localhost.Service1 myserver = new localhost.Service1();
            //bool register;
            //bool registerpassed;
            if (radioButtonAdmin.Checked == true)
            {
                //MessageBox.Show("u r registered");
                //myserver.registera(txtName.Text , txtCNIC.Text , txtPassword.Text);
                myserver.registera(txtName.Text, txtCNIC.Text, txtPassword.Text);
                MessageBox.Show("u r registered");
            }

            else if (radioButtonPatient.Checked == true)
            {
                // MessageBox.Show("u r registered");
                myserver.registerp(txtName.Text, txtCNIC.Text, txtPassword.Text);
                SetValueForText1 = txtName.Text;
                SetValueForText2 = txtCNIC.Text;

                MessageBox.Show("u r registered");
            }

            else if (radioButtonDoctor.Checked == true)
            {
                //MessageBox.Show("u r registered");
                myserver.registerd(txtName.Text, txtCNIC.Text, txtPassword.Text, txtHospitalName.Text);

                MessageBox.Show("u r registered");
            }
            else
            {
                MessageBox.Show("choose atleast 1 option");
            }
        }