Beispiel #1
0
        private void btnMain_Click(object sender, EventArgs e)
        {
            frmParentMain temp = new frmParentMain();

            temp.Show();
            this.Close();
        }
Beispiel #2
0
        private void btLogin_Click(object sender, EventArgs e)
        {
            bool isValid  = false;
            bool isValidS = false;

            server.Service1 ser = new server.Service1();
            if (txtCnic.Text == "" || txtPassword.Text == "")
            {
                MessageBox.Show("Incorrect username or password!");
            }
            else
            {
                ser.sValidParent(txtCnic.Text, txtPassword.Text, out isValid, out isValidS);
                if (!isValid)
                {
                    MessageBox.Show("Incorrect username or password!");
                }
                else
                {
                    frmParentMain temp = new frmParentMain();
                    temp.Show();
                    this.Close();
                }
            }
        }