private void tsbExpense_Click(object sender, EventArgs e) { var userAccess = userAccessRepository.GetAll(); bool isAllowed = userAccess.Exists(u => u.FullName == Store.ActiveUser && u.ObjectName == "Biaya" && u.IsOpen); if (isAllowed || Store.IsAdministrator) { var frmExpense = new ExpenseUI(this); frmExpense.MdiParent = this; frmExpense.Show(); } else { MessageBox.Show("Anda tidak dapat membuka form ini", "Perhatian", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
public ReportPrintUI(ExpenseUI frmExpense) { InitializeComponent(); this.frmExpense = frmExpense; expenseRepository = ServiceLocator.GetObject <IExpenseRepository>(); }
public ExpenseHistoryUI(ExpenseUI frmExpense) { expenseRepository = ServiceLocator.GetObject <IExpenseRepository>(); this.frmExpense = frmExpense; InitializeComponent(); }