Beispiel #1
0
        private void cmdRegistration_Click(object sender, EventArgs e)
        {
            Server.Service1 server = new Server.Service1();
            bool            isvalid;
            bool            isvalidPassed;

            server.isvalid(txtUsername.Text, txtPassword.Text, comboBox1.Text, out isvalid, out isvalidPassed);
            if (isvalid)
            {
                MessageBox.Show(" valid");

                Addnum add = new Addnum();
                this.Hide();
                add.Show();

                if (comboBox1.Text == "user")
                {
                    Search search = new Search();
                    this.Hide();
                    search.Show();
                    MessageBox.Show("valid");
                }
            }
            else
            {
                MessageBox.Show("invalid user!");
            }
        }
Beispiel #2
0
        private void cmdLogin_Click(object sender, EventArgs e)
        {
            Server.Service1 server        = new Server.Service1();
            Boolean         isvalid       = false;
            Boolean         isvalidpassed = false;

            server.isvalid(txtUserName.Text, txtPassword.Text, out isvalid, out isvalidpassed);



            if (!isvalid)
            {
                AdminHome l = AdminHome.getInstance();
                l.Show();
                this.Hide();
                MessageBox.Show("valid");
            }
            else
            {
                MessageBox.Show("invalid");
            }
        }