Пример #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            int check;

            if ((txtuserId.Text == "") && (txtPassword.Text == ""))
            {
                MessageBox.Show("Please Enter USERID & PASSWORD!");
            }

            else
            {
                check = lip.GetStatus(txtuserId.Text, txtPassword.Text);

                if (check == 1)
                {
                    AdminPanel ap = new AdminPanel(txtuserId.Text);
                    ap.Show();
                    this.Hide();
                }
                else if (check == 2)
                {
                    SalesPanel sp = new SalesPanel(txtuserId.Text);
                    sp.Show();
                    this.Hide();
                }
                else
                {
                    MessageBox.Show("Invalid username or password");
                }
            }
        }
Пример #2
0
        private void pictureBox4_Click(object sender, EventArgs e)
        {
            int status = lp.GetIdStatus(userId);

            if (status == 1)
            {
                AdminPanel ap = new AdminPanel(userId);
                ap.Show();
                this.Hide();
            }

            else if (status == 2)
            {
                SalesPanel sp = new SalesPanel(userId);
                sp.Show();
                this.Hide();
            }
        }