Esempio n. 1
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");
            }
        }
Esempio n. 2
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");
            }
        }