コード例 #1
0
        public dataProdukDetailForm(int moduleID, stokPecahBarangForm thisParentForm)
        {
            InitializeComponent();

            originModuleID = moduleID;
            parentForm     = thisParentForm;
        }
コード例 #2
0
        public dataProdukForm(int moduleID, stokPecahBarangForm thisParentForm)
        {
            InitializeComponent();

            originModuleID = moduleID;
            parentForm     = thisParentForm;

            // accessed from other form other than Master -> Data Produk
            // it means that this form is only displayed for browsing / searching purpose only
            newButton.Visible = false;
        }
コード例 #3
0
        private void displaySpecificForm()
        {
            switch (originModuleID)
            {
            case globalConstants.STOK_PECAH_BARANG:
                if (null == displayStokPecahBarangForm || displayStokPecahBarangForm.IsDisposed)
                {
                    displayStokPecahBarangForm = new stokPecahBarangForm(selectedProductID);
                }

                displayStokPecahBarangForm.Show();
                displayStokPecahBarangForm.WindowState = FormWindowState.Normal;
                break;

            case globalConstants.PENYESUAIAN_STOK:
                if (null == displayPenyesuaianStokForm || displayPenyesuaianStokForm.IsDisposed)
                {
                    displayPenyesuaianStokForm = new penyesuaianStokForm(selectedProductID);
                }

                displayPenyesuaianStokForm.Show();
                displayPenyesuaianStokForm.WindowState = FormWindowState.Normal;
                break;

            case globalConstants.BROWSE_STOK_PECAH_BARANG:
                parentForm.setNewSelectedProductID(selectedProductID);
                this.Close();
                break;

            case globalConstants.CASHIER_MODULE:
                parentCashierForm.addNewRowFromBarcode(selectedkodeProduct, selectedProductName, selectedRowIndex);
                this.Close();
                break;

            case globalConstants.PENERIMAAN_BARANG:
                parentPenerimaanBarangForm.addNewRowFromBarcode(selectedkodeProduct, selectedProductName, selectedRowIndex);
                this.Close();
                break;

            case globalConstants.NEW_PURCHASE_ORDER:
                parentPOForm.addNewRowFromBarcode(selectedkodeProduct, selectedProductName, selectedRowIndex);
                this.Close();
                break;

            case globalConstants.MUTASI_BARANG:
                parentMutasiForm.addNewRowFromBarcode(selectedkodeProduct, selectedProductName, selectedRowIndex);
                this.Close();
                break;

            case globalConstants.NEW_REQUEST_ORDER:
                parentRequestForm.addNewRowFromBarcode(selectedkodeProduct, selectedProductName, selectedRowIndex);
                this.Close();
                break;

            case globalConstants.RETUR_PENJUALAN:
            case globalConstants.RETUR_PENJUALAN_STOCK_ADJUSTMENT:
                parentReturJualForm.addNewRowFromBarcode(selectedkodeProduct, selectedProductName, selectedRowIndex);
                this.Close();
                break;

            case globalConstants.RETUR_PEMBELIAN_KE_PUSAT:
            case globalConstants.RETUR_PEMBELIAN_KE_SUPPLIER:
                parentReturBeliForm.addNewRowFromBarcode(selectedkodeProduct, selectedProductName, selectedRowIndex, selectedProductID);
                this.Close();
                break;

            case globalConstants.PRODUCT_BC:
                parentBarcodeForm.addNewRowFromBarcode(selectedkodeProduct, selectedProductName, selectedRowIndex);
                this.Close();
                break;

            default:     // MASTER DATA PRODUK
                if (null == editProductForm || editProductForm.IsDisposed)
                {
                    editProductForm = new dataProdukDetailForm(globalConstants.EDIT_PRODUK, selectedProductID);
                }

                editProductForm.Show();
                editProductForm.WindowState = FormWindowState.Normal;
                break;
            }
        }