Ejemplo n.º 1
0
        private void cmdSRegister_Click(object sender, EventArgs e)
        {
            MyServer.Service1 Server = new MyServer.Service1();

            if (txtSName.Text == "" || txtSpassword.Text == "")
            {
                MessageBox.Show("Invalid Register Attempt");
            }
            else
            {
                Server.AddStudent(txtSName.Text, txtSage.Text, comboBoxSSecretQs.Text, txtSSecretAnswer.Text, txtSNo.Text, txtSpassword.Text, txtSCPassword.Text);
                MessageBox.Show("You have been registered");
            }
        }
Ejemplo n.º 2
0
        private void cmdTRegister_Click(object sender, EventArgs e)
        {
            if (txtTName.Text == "" || txtTpassword.Text == "")
            {
                MessageBox.Show("Invalid Register Attempt");
            }
            else
            {
                MyServer.Service1 Server = new MyServer.Service1();

                if (txtTName.Text == "" || txtTpassword.Text == "")
                {
                    MessageBox.Show("Invalid Register Attempt");
                }
                else
                {
                    Server.AddTeacher(txtTName.Text, txtTage.Text, comboBoxSecretQs.Text, txtSecretAnswer.Text, txtTNo.Text, txtTpassword.Text, txtTCPassword.Text, txtTSubject.Text, comboBoxTLevel.Text, txtTiming.Text, txtTCity.Text, txtRange.Text);
                    MessageBox.Show("You have been registered");
                }
            }
        }