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(); }
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(); }
public frmAddCustomer(Branch branch, frmTransactions transactions) { InitializeComponent(); this.branch = branch; this.transactions = transactions; }