Example #1
0
        public SupplierListUI(PurchaseUI frmPurchase)
        {
            InitializeComponent();
            this.frmPurchase = frmPurchase;

            supplierRepository = ServiceLocator.GetObject <ISupplierRepository>();
            formActive         = "Purchase";
        }
Example #2
0
        public ProductListUI(PurchaseUI frmPurchase)
        {
            productQtyRepository = ServiceLocator.GetObject <IProductQtyRepository>();

            this.frmPurchase = frmPurchase;
            formActive       = "PurchaseUI";

            InitializeComponent();
        }
Example #3
0
        private void tsbPurchase_Click(object sender, EventArgs e)
        {
            var userAccess = userAccessRepository.GetAll();

            bool isAllowed = userAccess.Exists(u => u.FullName == Store.ActiveUser &&
                                               u.ObjectName == "Pembelian" && u.IsOpen);

            if (isAllowed || Store.IsAdministrator)
            {
                var frmPurchase = new PurchaseUI(this);
                frmPurchase.MdiParent = this;
                frmPurchase.Show();
            }
            else
            {
                MessageBox.Show("Anda tidak dapat membuka form ini", "Perhatian", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Example #4
0
 public PurchaseHistoryUI(PurchaseUI frmPurchase)
 {
     purchaseRepository = ServiceLocator.GetObject <IPurchaseRepository>();
     this.frmPurchase   = frmPurchase;
     InitializeComponent();
 }
Example #5
0
 public ReportPrintUI(PurchaseUI frmPurchase)
 {
     InitializeComponent();
     this.frmPurchase   = frmPurchase;
     purchaseRepository = ServiceLocator.GetObject <IPurchaseRepository>();
 }