Ejemplo n.º 1
0
        private void newButton_Click(object sender, EventArgs e)
        {
            if (originModuleID == globalConstants.RETUR_PEMBELIAN_KE_SUPPLIER)
            {
                if (null == returPembelianForm || returPembelianForm.IsDisposed)
                {
                    returPembelianForm = new dataReturPermintaanForm(globalConstants.RETUR_PEMBELIAN_KE_SUPPLIER);
                }

                returPembelianForm.Show();
                returPembelianForm.WindowState = FormWindowState.Normal;
            }
            else if (originModuleID == globalConstants.RETUR_PEMBELIAN_KE_PUSAT)
            {
                if (null == returMutasiForm || returMutasiForm.IsDisposed)
                {
                    returMutasiForm = new dataReturPermintaanForm(globalConstants.RETUR_PEMBELIAN_KE_PUSAT);
                }

                returMutasiForm.Show();
                returMutasiForm.WindowState = FormWindowState.Normal;
            }
            else if (originModuleID == globalConstants.RETUR_PENJUALAN)
            {
                if (null == returPenjualanForm || returPenjualanForm.IsDisposed)
                {
                    returPenjualanForm = new dataInvoiceForm(globalConstants.RETUR_PENJUALAN);
                }

                returPenjualanForm.Show();
                returPenjualanForm.WindowState = FormWindowState.Normal;
            }
        }
Ejemplo n.º 2
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();
            }
        }
Ejemplo n.º 3
0
        public dataProdukForm(int moduleID, dataReturPermintaanForm thisParentForm)
        {
            InitializeComponent();

            originModuleID      = moduleID;
            parentReturBeliForm = 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;
        }