Esempio n. 1
0
        private void barcodeTextBox_KeyPress(object sender, KeyPressEventArgs e)
        {
            string productID = "";

            if (e.KeyChar == 13)
            {
                productNameTextBox.Text = getProductName(barcodeTextBox.Text);
                productID = getProductID(barcodeTextBox.Text);

                if (productNameTextBox.Text.Length > 0)
                {
                    switch (originModuleID)
                    {
                    case globalConstants.CASHIER_MODULE:
                        originCashierForm = (cashierForm)parentForm;
                        originCashierForm.addNewRowFromBarcode(productID, productNameTextBox.Text);
                        break;

                    case globalConstants.PENERIMAAN_BARANG:
                        originPenerimaanForm = (penerimaanBarangForm)parentForm;
                        originPenerimaanForm.addNewRowFromBarcode(productID, productNameTextBox.Text);
                        break;

                    case globalConstants.NEW_PURCHASE_ORDER:
                        originPOForm = (purchaseOrderDetailForm)parentForm;
                        originPOForm.addNewRowFromBarcode(productID, productNameTextBox.Text);
                        break;

                    case globalConstants.MUTASI_BARANG:
                        originMutasiForm = (dataMutasiBarangDetailForm)parentForm;
                        originMutasiForm.addNewRowFromBarcode(productID, productNameTextBox.Text);
                        break;

                    case globalConstants.NEW_REQUEST_ORDER:
                        originRequestForm = (permintaanProdukForm)parentForm;
                        originRequestForm.addNewRowFromBarcode(productID, productNameTextBox.Text);
                        break;

                    case globalConstants.RETUR_PENJUALAN:
                        originReturJualForm = (dataReturPenjualanForm)parentForm;
                        originReturJualForm.addNewRowFromBarcode(productID, productNameTextBox.Text);
                        break;

                    case globalConstants.RETUR_PEMBELIAN:
                        originReturBeliForm = (dataReturPermintaanForm)parentForm;
                        originReturBeliForm.addNewRowFromBarcode(productID, productNameTextBox.Text);
                        break;
                    }
                }
                barcodeTextBox.SelectAll();
            }
            else if (e.KeyChar == 27)
            {
                this.Close();
            }
        }
Esempio n. 2
0
        public dataProdukForm(int moduleID, dataMutasiBarangDetailForm thisParentForm)
        {
            InitializeComponent();

            originModuleID   = moduleID;
            parentMutasiForm = 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;
        }
Esempio n. 3
0
        private void displaySpecificForm(string PMInvoice = "")
        {
            int subModuleID;

            switch (originModuleID)
            {
            case globalConstants.CEK_DATA_MUTASI:
                if (!PMInvoice.Equals(""))
                {
                    subModuleID = globalConstants.VIEW_PRODUCT_MUTATION;
                }
                else
                {
                    subModuleID = globalConstants.MUTASI_BARANG;
                }

                if (null == newMutasiForm || newMutasiForm.IsDisposed)
                {
                    newMutasiForm = new dataMutasiBarangDetailForm(subModuleID, PMInvoice);
                }

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

            case globalConstants.PENERIMAAN_BARANG:
                if (null != parentForm)
                {
                    penerimaanBarangForm originForm = (penerimaanBarangForm)parentForm;
                    originForm.setSelectedMutasi(PMInvoice);
                }
                this.Close();
                //penerimaanBarangForm penerimaanBarangDisplayedForm = new penerimaanBarangForm(globalConstants.PENERIMAAN_BARANG_DARI_MUTASI, selectedROID);
                //penerimaanBarangDisplayedForm.ShowDialog(this);
                break;
            }

            loadROdata();
        }
Esempio n. 4
0
        private void displaySpecificForm(int roID = 0)
        {
            switch (originModuleID)
            {
            case globalConstants.PERMINTAAN_BARANG:
                if (roID == 0)
                {
                    if (null == newPermintaanForm || newPermintaanForm.IsDisposed)
                    {
                        newPermintaanForm = new permintaanProdukForm(globalConstants.NEW_REQUEST_ORDER);
                    }

                    newPermintaanForm.Show();
                    newPermintaanForm.WindowState = FormWindowState.Normal;
                }
                else
                {
                    if (null == editPermintaanForm || editPermintaanForm.IsDisposed)
                    {
                        editPermintaanForm = new permintaanProdukForm(globalConstants.EDIT_REQUEST_ORDER, roID);
                    }

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

            case globalConstants.CEK_DATA_MUTASI:
                if (null == browseDataMutasiDetailForm || browseDataMutasiDetailForm.IsDisposed)
                {
                    browseDataMutasiDetailForm = new dataMutasiBarangDetailForm(globalConstants.CEK_DATA_MUTASI, roID);
                }

                browseDataMutasiDetailForm.Show();
                browseDataMutasiDetailForm.WindowState = FormWindowState.Normal;
                break;
            }
        }
Esempio n. 5
0
        private void displaySpecificForm(int moduleID, string identifierNo)
        {
            int productID = 0;

            switch (moduleID)
            {
            case globalConstants.MENU_TRANSAKSI_PENJUALAN:
                pembayaranPiutangForm displayPiutangForm = new pembayaranPiutangForm(identifierNo);
                displayPiutangForm.ShowDialog(this);
                break;

            case globalConstants.MENU_PURCHASE_ORDER:
                pembayaranHutangForm displayHutangForm = new pembayaranHutangForm(identifierNo);
                displayHutangForm.ShowDialog(this);
                break;

            case globalConstants.MENU_PEMBAYARAN_PIUTANG:
                pembayaranPiutangForm displayPiutangFormConfirm = new pembayaranPiutangForm(identifierNo);
                displayPiutangFormConfirm.ShowDialog(this);
                break;

            case globalConstants.MENU_PEMBAYARAN_HUTANG_SUPPLIER:
                pembayaranHutangForm displayHutangFormConfirm = new pembayaranHutangForm(identifierNo);
                displayHutangFormConfirm.ShowDialog(this);
                break;

            case globalConstants.MENU_REQUEST_ORDER:
                dataMutasiBarangDetailForm displayedForm = new dataMutasiBarangDetailForm(globalConstants.CEK_DATA_MUTASI, identifierNo);
                displayedForm.ShowDialog(this);
                break;

            case globalConstants.MENU_PRODUK:
                productID = Convert.ToInt32(DS.getDataSingleValue("SELECT ID FROM MASTER_PRODUCT WHERE PRODUCT_ID = '" + identifierNo + "'"));
                dataProdukDetailForm displayProdukDetail = new dataProdukDetailForm(globalConstants.EDIT_PRODUK, productID);
                displayProdukDetail.ShowDialog(this);
                break;
            }
        }