Ejemplo n.º 1
0
        private void mdiFrmOrder_Load(object sender, EventArgs e)
        {
            login = new DAO.LoginDAO();
            String userName = frmLogin.User.user_name;

            tsUser.Text = userName.ToString();
            timer1.Start();
        }
Ejemplo n.º 2
0
        private void mdiFrmInv_Load(object sender, EventArgs e)
        {
            login = new DAO.LoginDAO();
            String userName = frmLogin.User.user_name;

            login.catchUsername(userName);
            if (login.hasReports())
            {
                tsReporting.Enabled = true;
            }
            tsUser.Text = userName.ToString();
            timer1.Start();
        }
Ejemplo n.º 3
0
        private void frmDlgRefund_Load(object sender, EventArgs e)
        {
            terminalSelect = fl.tN;
            login          = new DAO.LoginDAO();
            String userName = frmLogin.User.user_name;

            login.catchUsername(userName);
            rdVAT.Text = TaxDisplay;
            if (login.hasUser_Accounts())
            {
                lbl1.Visible       = true;
                cBTerminal.Visible = true;
            }
        }
Ejemplo n.º 4
0
        private void onFormClose()
        {
            MySqlConnection con = new MySqlConnection();

            login = new DAO.LoginDAO();
            String userName = frmLogin.User.user_name;

            login.catchUsername(userName);
            frmMenu fm = new frmMenu();

            if (login.hasSales())
            {
                fm.unlockSales();
            }
            if (login.hasOrder())
            {
                fm.unlockOrder();
            }
            if (login.hasCustomers())
            {
                fm.unlockCustomers();
            }
            if (login.hasInventory())
            {
                fm.unlockInventory();
            }
            if (login.hasReports())
            {
                fm.unlockGeneralReports();
            }
            if (login.hasGC())
            {
                fm.unlockGiftCards();
            }
            if (login.hasUser_Accounts())
            {
                fm.unlockUserAccounts();
            }
            if (login.hasUserConf())
            {
                fm.unlockConfig();
            }
            con.Close();
            fm.Show();
            this.Hide();
        }
Ejemplo n.º 5
0
        private void checkRes()
        {
            login = new DAO.LoginDAO();
            String userName = frmLogin.User.user_name;

            login.catchUsername(userName);
            if (login.hasUser_Accounts())
            {
                lblX.Visible          = true;
                cBTerminalX.Visible   = true;
                lblZ.Visible          = true;
                cBTerminalZ.Visible   = true;
                lblSR.Visible         = true;
                cBTerminalSR.Visible  = true;
                lblSDR.Visible        = true;
                cBTerminalSDR.Visible = true;
                lblCDR.Visible        = true;
                cBTerminalCDR.Visible = true;
                lblCC.Visible         = true;
                cBCC.Visible          = true;
            }
        }