Example #1
0
        public dataProdukDetailForm(int moduleID, penerimaanBarangForm thisParentForm)
        {
            InitializeComponent();

            originModuleID = moduleID;
            penerimaanForm = thisParentForm;
        }
Example #2
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;
                }

                dataMutasiBarangDetailForm displayedForm = new dataMutasiBarangDetailForm(subModuleID, PMInvoice);
                displayedForm.ShowDialog(this);
                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();
        }
        private void dataPurchaseOrder_KeyDown(object sender, KeyEventArgs e)
        {
            string selectedPurchaseInvoice;

            if (e.KeyCode == Keys.Enter)
            {
                if (dataPurchaseOrder.Rows.Count <= 0)
                {
                    return;
                }

                int             rowSelectedIndex = (dataPurchaseOrder.SelectedCells[0].RowIndex);
                DataGridViewRow selectedRow      = dataPurchaseOrder.Rows[rowSelectedIndex];

                if (originModuleID == 0)
                {
                    if (null == editPOForm || editPOForm.IsDisposed)
                    {
                        selectedPOID = Convert.ToInt32(selectedRow.Cells["ID"].Value);
                        editPOForm   = new purchaseOrderDetailForm(globalConstants.EDIT_PURCHASE_ORDER, selectedPOID);
                    }

                    editPOForm.Show();
                    editPOForm.WindowState = FormWindowState.Normal;
                }
                else if (originModuleID == globalConstants.PENERIMAAN_BARANG_DARI_PO)
                {
                    selectedPurchaseInvoice = selectedRow.Cells["NO PURCHASE"].Value.ToString();
                    if (null != parentForm)
                    {
                        penerimaanBarangForm originForm = (penerimaanBarangForm)parentForm;
                        originForm.setSelectedInvoice(selectedPurchaseInvoice);
                    }
                    this.Close();
                    //penerimaanBarangForm displayedPenerimaanForm = new penerimaanBarangForm(originModuleID, selectedPurchaseInvoice);
                    //displayedPenerimaanForm.ShowDialog(this);
                }
                else if (originModuleID == globalConstants.PEMBAYARAN_HUTANG)
                {
                    if (null == displayPembayaranHutang || displayPembayaranHutang.IsDisposed)
                    {
                        selectedPurchaseInvoice = selectedRow.Cells["NO PURCHASE"].Value.ToString();
                        displayPembayaranHutang = new pembayaranHutangForm(selectedPurchaseInvoice);
                    }

                    displayPembayaranHutang.Show();
                    displayPembayaranHutang.WindowState = FormWindowState.Normal;
                }
                else if (originModuleID == globalConstants.REPRINT_PURCHASE_ORDER)
                {
                    if (DialogResult.Yes == MessageBox.Show("RE-PRINT PO ?", "WARNING", MessageBoxButtons.YesNo, MessageBoxIcon.Warning))
                    {
                        selectedPurchaseInvoice = selectedRow.Cells["NO PURCHASE"].Value.ToString();
                        printOutPurchaseOrder(selectedPurchaseInvoice);
                    }
                }

                //         loadPOData();
            }
        }
        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();
            }
        }
Example #5
0
        public dataProdukForm(int moduleID, penerimaanBarangForm thisParentForm, string productID = "", string productName = "", int rowIndex = -1)
        {
            InitializeComponent();

            originModuleID             = moduleID;
            parentPenerimaanBarangForm = thisParentForm;

            namaProdukTextBox.Text = productName;
            selectedRowIndex       = rowIndex;
        }
        public dataProdukForm(int moduleID, penerimaanBarangForm thisParentForm)
        {
            InitializeComponent();

            originModuleID             = moduleID;
            parentPenerimaanBarangForm = 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;
        }
        public POSSearchProductForm(int moduleID, penerimaanBarangForm thisParentForm, string productName = "", int rowIndex = -1)
        {
            InitializeComponent();

            originModuleID             = moduleID;
            parentPenerimaanBarangForm = thisParentForm;

            // accessed from other form other than Master -> Data Produk
            // it means that this form is only displayed for browsing / searching purpose only

            namaProdukTextBox.Text = productName;
            selectedRowIndex       = rowIndex;
        }
        private void dataPurchaseOrder_DoubleClick(object sender, EventArgs e)
        {
            string selectedPurchaseInvoice;

            if (dataPurchaseOrder.Rows.Count <= 0)
            {
                return;
            }

            int             rowSelectedIndex = (dataPurchaseOrder.SelectedCells[0].RowIndex);
            DataGridViewRow selectedRow      = dataPurchaseOrder.Rows[rowSelectedIndex];

            if (originModuleID == 0)
            {
                selectedPOID = Convert.ToInt32(selectedRow.Cells["ID"].Value);
                purchaseOrderDetailForm displayedForm = new purchaseOrderDetailForm(globalConstants.EDIT_PURCHASE_ORDER, selectedPOID);
                displayedForm.ShowDialog(this);
            }
            else if (originModuleID == globalConstants.PENERIMAAN_BARANG_DARI_PO)
            {
                selectedPurchaseInvoice = selectedRow.Cells["NO PURCHASE"].Value.ToString();
                if (null != parentForm)
                {
                    penerimaanBarangForm originForm = (penerimaanBarangForm)parentForm;
                    originForm.setSelectedInvoice(selectedPurchaseInvoice);
                }
                this.Close();
                //penerimaanBarangForm displayedPenerimaanForm = new penerimaanBarangForm(originModuleID, selectedPurchaseInvoice);
                //displayedPenerimaanForm.ShowDialog(this);
            }
            else if (originModuleID == globalConstants.PEMBAYARAN_HUTANG)
            {
                selectedPurchaseInvoice = selectedRow.Cells["NO PURCHASE"].Value.ToString();
                pembayaranHutangForm displayedPembayaranForm = new pembayaranHutangForm(selectedPurchaseInvoice);
                displayedPembayaranForm.ShowDialog(this);
            }
            else if (originModuleID == globalConstants.REPRINT_PURCHASE_ORDER)
            {
                selectedPurchaseInvoice = selectedRow.Cells["NO PURCHASE"].Value.ToString();
                printOutPurchaseOrder(selectedPurchaseInvoice);
            }

            loadPOData();
        }
        private void newButton_Click(object sender, EventArgs e)
        {
            penerimaanBarangForm displayedForm = new penerimaanBarangForm();

            displayedForm.ShowDialog(this);
        }