Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
 public ReportPrintUI(ExpenseUI frmExpense)
 {
     InitializeComponent();
     this.frmExpense   = frmExpense;
     expenseRepository = ServiceLocator.GetObject <IExpenseRepository>();
 }
Esempio n. 3
0
 public ExpenseHistoryUI(ExpenseUI frmExpense)
 {
     expenseRepository = ServiceLocator.GetObject <IExpenseRepository>();
     this.frmExpense   = frmExpense;
     InitializeComponent();
 }