Пример #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            localhost.Service1 v = new localhost.Service1();
            v.register(textBox1.Text, textBox2.Text, textBox3.Text, comboBox1.Text, textBox5.Text);

            MessageBox.Show(" Successfully Register");
        }
Пример #2
0
 private void Form4_Load(object sender, EventArgs e)
 {
     localhost.Service1 s=new localhost.Service1();
     BindingSource bs = new BindingSource();
     bs.DataSource =s.search_servant("tutor") ;
     dataGridView1.DataSource = bs;
 }
Пример #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            bool isfound, found;

            localhost.Service1 s = new localhost.Service1();
            s.change_password(comboBox1.Text, textBox2.Text, textBox3.Text, out found, out isfound);
            if (found)
            {
                MessageBox.Show("your password has been changed");
            }
            else
            {
                MessageBox.Show("incorrect information");
            }
        }
Пример #4
0
        private void button1_Click(object sender, EventArgs e)
        {
            bool change_p, c;

            localhost.Service1 s = new localhost.Service1();
            s.change(txtname.Text, txtpassword.Text, txtkey.Text, out change_p, out c);
            if (change_p)
            {
                MessageBox.Show("password has been changed");
            }
            else
            {
                MessageBox.Show("enter valid info");
            }
        }
Пример #5
0
        private void button1_Click(object sender, EventArgs e)
        {
            bool isval;
            bool isvalpass;

            localhost.Service1 ser = new localhost.Service1();
            ser.isvaliduser(textBox1.Text, textBox2.Text, out isval, out isvalpass);
            if (isval)
            {
                MessageBox.Show("Valid User");
            }
            else
            {
                MessageBox.Show("Invalid User");
            }
        }
Пример #6
0
        private void button1_Click(object sender, EventArgs e)
        {
            bool l, k;

            localhost.Service1 s = new localhost.Service1();
            s.isadmin(txtname.Text, txtpassword.Text, out l, out k);
            if (l)
            {
                Form7 f = new Form7();
                f.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("enter  valid information");
            }
        }
Пример #7
0
        private void button1_Click(object sender, EventArgs e)
        {
            bool isvalidresult;
            bool isvalidpassed;

            localhost.Service1 d = new localhost.Service1();
            d.isvalid(textBox1.Text, textBox2.Text, out isvalidresult, out isvalidpassed);

            if (isvalidresult)
            {
                MessageBox.Show("Valid user");
            }
            else
            {
                MessageBox.Show("Invalid user");
            }
        }
Пример #8
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text != "")
            {
                if (textBox2.Text != "")
                {
                    if ((textBox1.Text == "admin" || textBox1.Text == "Admin" || textBox1.Text == "ADMIN") && textBox2.Text == "admin786")
                    {
                        frmAdminPanel admin = new frmAdminPanel();
                        this.Hide();
                        admin.Show();
                    }
                    else
                    {
                        bool isval;
                        bool isvalpass;
                        localhost.Service1 ser = new localhost.Service1();
                        ser.isvaliduser(textBox1.Text, textBox2.Text, out isval, out isvalpass);
                        if (isval)
                        {
                            //frmEmployee emp = new frmEmployee();
                            frmGenerateBill gb = new frmGenerateBill();
                            gb.Show();

                            //emp.Show();
                            this.Hide();
                        }
                        else
                        {
                            MessageBox.Show("Invalid User");
                        }
                    }
                }
                else
                {
                    MessageBox.Show("Please Enter Password");
                }
            }
            else
            {
                MessageBox.Show("Please Enter User Name");
            }
        }
Пример #9
0
        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            bool isfound, found;

            localhost.Service1 s = new localhost.Service1();
            s.search(textBox1.Text, textBox2.Text, out isfound, out found);
            if (isfound)
            {
                MessageBox.Show("user has been login");
            }
            else
            {
                MessageBox.Show("plz enter valid information");
            }
            Form3 f = new Form3();

            this.Hide();
            f.Show();
        }
Пример #10
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (textBox1.Text != "")
     {
         if (textBox2.Text != "")
         {
             localhost.Service1 ser = new localhost.Service1();
             ser.registeruser(textBox1.Text, textBox2.Text);
             MessageBox.Show("User Has been Registered");
             textBox1.Text = "";
             textBox2.Text = "";
         }
         else
         {
             MessageBox.Show("Please Enter Password");
         }
     }
     else
     {
         MessageBox.Show("Please Enter User Name");
     }
 }
Пример #11
0
 private void button1_Click(object sender, EventArgs e)
 {
     localhost.Service1 ser = new localhost.Service1();
     ser.registeruser(textBox1.Text, textBox2.Text);
     MessageBox.Show("User Register");
 }
Пример #12
0
 private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     localhost.Service1 s = new localhost.Service1();
     s.add(txtname.Text, txtpassword.Text, comboq.Text, txtanswer.Text);
     MessageBox.Show("User has been registered");
 }