コード例 #1
0
ファイル: frmDashboard.cs プロジェクト: rashalismath2/POS
        private void frmdashboard_Load(object sender, EventArgs e)
        {
            lblUserName.Text = this.employee.first_name + " " + this.employee.last_name;

            if (this.employee.role == "cashier")
            {
                btnEmployees.Hide();
                btnReports.Hide();
                btnInventory.Hide();
            }
            else if (this.employee.role == "inventory_manager")
            {
                btnEmployees.Hide();
                btnTransaction.Hide();
            }
            else if (this.employee.role == "admin")
            {
                btnEmployees.Show();
                btnReports.Show();
                btnInventory.Show();
                btnTransaction.Show();
            }

            frmTransactions trans = new frmTransactions(this.employee);

            trans.TopLevel = false;
            pnlMain.Controls.Clear();
            pnlMain.Controls.Add(trans);
            trans.Show();
        }
コード例 #2
0
ファイル: frmDashboard.cs プロジェクト: rashalismath2/POS
        private void btnTransaction_Click(object sender, EventArgs e)
        {
            frmTransactions trans = new frmTransactions(this.employee);

            trans.TopLevel = false;
            pnlMain.Controls.Clear();
            pnlMain.Controls.Add(trans);
            trans.Show();
        }
コード例 #3
0
 public frmAddCustomer(Branch branch, frmTransactions transactions)
 {
     InitializeComponent();
     this.branch       = branch;
     this.transactions = transactions;
 }