Ejemplo n.º 1
0
        private void btnMenu_Click(object sender, EventArgs e)
        {
            this.Visible = false;
            WFAMenu wfaMenu = new WFAMenu();

            wfaMenu.Visible = true;
        }
Ejemplo n.º 2
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            string sql = "select * from tbl_user where user_name = '" + txtUserName.Text.Trim() + "' and password = '******'";

            Console.WriteLine(sql);
            this.Ds = this.Da.ExecuteQuery(sql);

            if (this.Ds.Tables[0].Rows.Count == 1 && this.Ds.Tables[0].Rows[0][6].ToString() == "Admin")
            {
                //MessageBox.Show("Admin");

                this.Visible = false;
                AdminPanel ap = new AdminPanel();
                ap.Visible = true;
            }
            else if (this.Ds.Tables[0].Rows.Count == 1 && this.Ds.Tables[0].Rows[0][6].ToString() == "Sale")
            {
                //MessageBox.Show("Sale");

                this.Visible = false;
                WFAMenu wfaMenu = new WFAMenu();
                wfaMenu.Visible = true;
            }
            else if (this.Ds.Tables[0].Rows.Count == 1 && this.Ds.Tables[0].Rows[0][6].ToString() == "Accountant")
            {
                //MessageBox.Show("Accountant");
                this.Visible = false;
                Accountant ac = new Accountant();
                ac.Visible = true;
            }
        }