예제 #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;
            }
        }
예제 #2
0
        private void toolStripButton7_Click(object sender, EventArgs e)
        {
            if (null == shortCutReturPembelianSupplierForm || shortCutReturPembelianSupplierForm.IsDisposed)
                shortCutReturPembelianSupplierForm = new dataReturPermintaanForm(globalConstants.RETUR_PEMBELIAN_KE_SUPPLIER);

            shortCutReturPembelianSupplierForm.Show();
            shortCutReturPembelianSupplierForm.WindowState = FormWindowState.Normal;
        }
예제 #3
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();
            }
        }
예제 #4
0
 private void captureAll(Keys key)
 {
     int userAccessOptions = 0;
     switch (key)
     {
         case Keys.F1:
             if (0 !=
                     (
                     DS.getUserAccessRight(globalConstants.MENU_PRODUK, gutil.getUserGroupID()) *
                     DS.getUserAccessRight(globalConstants.MENU_PURCHASE_ORDER, gutil.getUserGroupID()) *
                     DS.getUserAccessRight(globalConstants.MENU_PENJUALAN, gutil.getUserGroupID()) *
                     DS.getUserAccessRight(globalConstants.MENU_PEMBAYARAN_PIUTANG, gutil.getUserGroupID()) *
                     DS.getUserAccessRight(globalConstants.MENU_PEMBAYARAN_HUTANG_SUPPLIER, gutil.getUserGroupID()) *
                     DS.getUserAccessRight(globalConstants.MENU_TRANSAKSI_HARIAN, gutil.getUserGroupID()) *
                     DS.getUserAccessRight(globalConstants.MENU_RETUR_PEMBELIAN, gutil.getUserGroupID()) *
                     DS.getUserAccessRight(globalConstants.MENU_RETUR_PENJUALAN, gutil.getUserGroupID()) *
                     DS.getUserAccessRight(globalConstants.MENU_MODULE_MESSAGING, gutil.getUserGroupID())
                     )
                 )
             {
                 adminHelpForm displayHelp = new adminHelpForm();
                 displayHelp.ShowDialog(this);
             }
             break;
         case Keys.F2:
             userAccessOptions = DS.getUserAccessRight(globalConstants.MENU_PRODUK, gutil.getUserGroupID());
             if (userAccessOptions > 0)
             {
                 dataProdukForm displayedProdukForm = new dataProdukForm();
                 displayedProdukForm.ShowDialog(this);
             }
             break;
         case Keys.F3:
             userAccessOptions = DS.getUserAccessRight(globalConstants.MENU_PURCHASE_ORDER, gutil.getUserGroupID());
             if (userAccessOptions > 0)
             {
                 dataPOForm displayedPOForm = new dataPOForm();
                 displayedPOForm.ShowDialog(this);
             }
             break;
         case Keys.F4:
             userAccessOptions = DS.getUserAccessRight(globalConstants.MENU_PENJUALAN, gutil.getUserGroupID());
             if (userAccessOptions > 0)
             {
                 cashierForm displayedCashierForm = new cashierForm(1);
                 displayedCashierForm.ShowDialog(this);
             }
             break;
         case Keys.F5:
             userAccessOptions = DS.getUserAccessRight(globalConstants.MENU_PEMBAYARAN_PIUTANG, gutil.getUserGroupID());
             if (userAccessOptions > 0)
             {
                 dataInvoiceForm displayedInvoiceForm = new dataInvoiceForm(globalConstants.PEMBAYARAN_PIUTANG);
                 displayedInvoiceForm.ShowDialog(this);
             }
             break;
         case Keys.F6:
             userAccessOptions = DS.getUserAccessRight(globalConstants.MENU_PEMBAYARAN_HUTANG_SUPPLIER, gutil.getUserGroupID());
             if (userAccessOptions > 0)
             {
                 dataPOForm displayedPOSupplierForm = new dataPOForm(globalConstants.PEMBAYARAN_HUTANG);
                 displayedPOSupplierForm.ShowDialog(this);
             }
             break;
         case Keys.F7:
             userAccessOptions = DS.getUserAccessRight(globalConstants.MENU_TRANSAKSI_HARIAN, gutil.getUserGroupID());
             if (userAccessOptions > 0)
             {
                 dataTransaksiJurnalHarianDetailForm displayedDJForm = new dataTransaksiJurnalHarianDetailForm(globalConstants.NEW_DJ, selectedUserID);
                 displayedDJForm.ShowDialog(this);
             }
             break;
         case Keys.F8:
             userAccessOptions = DS.getUserAccessRight(globalConstants.MENU_RETUR_PEMBELIAN, gutil.getUserGroupID());
             if (userAccessOptions > 0)
             {
                 dataReturPermintaanForm displayedRetBeliForm = new dataReturPermintaanForm(globalConstants.RETUR_PEMBELIAN_KE_SUPPLIER);
                 displayedRetBeliForm.ShowDialog(this);
             }
             break;
         case Keys.F9:
             userAccessOptions = DS.getUserAccessRight(globalConstants.MENU_RETUR_PENJUALAN, gutil.getUserGroupID());
             if (userAccessOptions > 0)
             {
                 dataInvoiceForm displayedRetJualForm = new dataInvoiceForm(globalConstants.RETUR_PENJUALAN);
                 displayedRetJualForm.ShowDialog(this);
             }
             break;
     }
 }
예제 #5
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;
        }