示例#1
0
        private void cmdLogin_Click(object sender, EventArgs e)
        {
            localhost.Service1 myserver = new localhost.Service1();
            bool login;
            bool loginpassed;

            //bool loginp;
            //bool loginppassed;
            myserver.logina(txtCNIC.Text, txtPassword.Text, out login, out loginpassed);
            if (login)
            {
                {
                    MessageBox.Show("valid user");
                }
            }
            else
            {
                myserver.loginp(txtCNIC.Text, txtPassword.Text, out login, out loginpassed);
                if (login)
                {
                    MessageBox.Show("valid user");
                }
                else
                {
                    MessageBox.Show("invalid user");
                }
            }
        }
示例#2
0
        private void linklblLogin_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            localhost.Service1 myserver = new localhost.Service1();
            bool login;
            bool loginpassed;

            myserver.logina(txtCNIC.Text, txtConfirmPassword.Text, out login, out loginpassed);
            if (login)
            {
                Login l = new Login();
                this.Hide();
                l.Show();
            }
            myserver.loginp(txtCNIC.Text, txtConfirmPassword.Text, out login, out loginpassed);
            if (login)
            {
                Login l = new Login();
                this.Hide();
                l.Show();
            }

            else
            {
                LoginD k = new LoginD();
                this.Hide();
                k.Show();
            }
        }
示例#3
0
        private void linklblDoctorinfo_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            localhost.Service1 myserver = new localhost.Service1();
            bool login;
            bool loginpassed;

            myserver.logina(txtCNIC.Text, txtPassword.Text, out login, out loginpassed);
            if (login)
            {
                Doctor_Info DoctorInfo = new Doctor_Info();
                this.Hide();
                DoctorInfo.Show();
            }
        }