Exemplo n.º 1
0
        private void captureAll(Keys key)
        {
            int rowcount = 0;
            switch (key)
            {
                case Keys.F1:
                    penerimaanBarangHelpForm displayHelp = new penerimaanBarangHelpForm();
                    displayHelp.ShowDialog(this);
                    break;

                case Keys.F2:
                    if (null == displayBarcodeForm || displayBarcodeForm.IsDisposed)
                    { 
                        displayBarcodeForm = new barcodeForm(this, globalConstants.NEW_REQUEST_ORDER);

                        displayBarcodeForm.Top = this.Top + 5;
                        displayBarcodeForm.Left = this.Left + 5;//(Screen.PrimaryScreen.Bounds.Width / 2) - (displayBarcodeForm.Width / 2);
                    }

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

                case Keys.F8:
                    //detailRequestOrderDataGridView.Focus();
                    rowcount = detailRequestOrderDataGridView.RowCount;
                    detailRequestOrderDataGridView.CurrentCell = detailRequestOrderDataGridView.Rows[rowcount - 1].Cells["productID"];
                    //addNewRow();
                    break;

                case Keys.F9:
                    saveButton.PerformClick();
                    break;

                case Keys.F11:
                    if (null == browseProdukForm || browseProdukForm.IsDisposed)
                        browseProdukForm = new dataProdukForm(globalConstants.NEW_REQUEST_ORDER, this);

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

                case Keys.Delete:
                    if (detailRequestOrderDataGridView.Rows.Count > 1)
                        if (detailRequestOrderDataGridView.ReadOnly == false)
                        {
                            if (DialogResult.Yes == MessageBox.Show("DELETE CURRENT ROW?", "WARNING", MessageBoxButtons.YesNo))
                            {
                                deleteCurrentRow();
                                calculateTotal();
                            }
                        }
                    break;

                case Keys.Up:
                    SendKeys.Send("+{TAB}");
                    break;

                case Keys.Down:
                    SendKeys.Send("{TAB}");
                    break;
            }
        }
        private void captureAll(Keys key)
        {
            int rowcount = 0;
            switch (key)
            {
                case Keys.F1:
                    penerimaanBarangHelpForm displayHelp = new penerimaanBarangHelpForm();
                    displayHelp.ShowDialog(this);
                    break;

                case Keys.F2:
                    if (directMutasiBarang)
                    {
                        ROInvoiceTextBox.Focus();

                        if (null == displayBarcodeForm || displayBarcodeForm.IsDisposed)
                        { 
                            barcodeForm displayBarcodeForm = new barcodeForm(this, globalConstants.MUTASI_BARANG);

                            displayBarcodeForm.Top = this.Top + 5;
                            displayBarcodeForm.Left = this.Left + 5;//(Screen.PrimaryScreen.Bounds.Width / 2) - (displayBarcodeForm.Width / 2);
                        }

                        displayBarcodeForm.Show();
                        displayBarcodeForm.WindowState = FormWindowState.Normal;
                        //                        detailRequestOrderDataGridView.Focus();
                    }
                    break;

                case Keys.F8:
                    if (directMutasiBarang)
                    {
                        //tailRequestOrderDataGridView.Select();
                        rowcount = detailRequestOrderDataGridView.RowCount;
                        detailRequestOrderDataGridView.CurrentCell = detailRequestOrderDataGridView.Rows[rowcount - 1].Cells["productID"];
                        //addNewRow();
                    }
                    break;

                case Keys.F9:
                    if (approveButton.Visible == true)
                        approveButton.PerformClick();
                    break;

                case Keys.F11:
                    if (directMutasiBarang)
                    {
                        ROInvoiceTextBox.Focus();

                        if (null == browseProdukForm || browseProdukForm.IsDisposed)
                        {
                            browseProdukForm = new dataProdukForm(globalConstants.MUTASI_BARANG, this);
                        }

                        browseProdukForm.Show();
                        browseProdukForm.WindowState = FormWindowState.Normal;

                        //detailRequestOrderDataGridView.Focus();
                    }
                    break;

                case Keys.Delete:
                    if (detailRequestOrderDataGridView.Rows.Count > 1)
                        if (detailRequestOrderDataGridView.ReadOnly == false)
                                if (DialogResult.Yes == MessageBox.Show("DELETE CURRENT ROW?", "WARNING", MessageBoxButtons.YesNo))
                                {
                                    deleteCurrentRow();
                                    calculateTotal();
                                }
                    break;
            }
        }
Exemplo n.º 3
0
        private void captureAll(Keys key)
        {
            int rowcount = 0;
            switch (key)
            {
                case Keys.F1:
                    penerimaanBarangHelpForm displayHelp = new penerimaanBarangHelpForm();
                    displayHelp.ShowDialog(this);
                    break;

                case Keys.F2:
                    if (detailGridView.ReadOnly == false)
                    {
                        PRDtPicker.Focus();

                        if (null == displayBarcodeForm || displayBarcodeForm.IsDisposed)
                        { 
                            displayBarcodeForm = new barcodeForm(this, globalConstants.PENERIMAAN_BARANG);

                            displayBarcodeForm.Top = this.Top + 5;
                            displayBarcodeForm.Left = this.Left + 5;//(Screen.PrimaryScreen.Bounds.Width / 2) - (displayBarcodeForm.Width / 2);
                        }

                        displayBarcodeForm.Show();
                        displayBarcodeForm.WindowState = FormWindowState.Normal;
                        //detailGridView.Focus();
                    }
                    break;

                case Keys.F8:
                    if (detailGridView.ReadOnly == false)
                    {
                        rowcount = detailGridView.RowCount;
                        detailGridView.CurrentCell = detailGridView.Rows[rowcount - 1].Cells["productID"];
                    }
                    //if (originModuleId != globalConstants.PENERIMAAN_BARANG_DARI_PO && originModuleId != globalConstants.PENERIMAAN_BARANG_DARI_MUTASI)
                    //{
                    //    addNewRow();
                    //}
                    break;

                case Keys.F9:
                    if (saveButton.Visible == true)
                        saveButton.PerformClick();
                    break;

                case Keys.F11:
                    if (detailGridView.ReadOnly == false)
                    {
                        PRDtPicker.Focus();
                        if (null == browseProdukForm || browseProdukForm.IsDisposed)
                                browseProdukForm = new dataProdukForm(globalConstants.PENERIMAAN_BARANG, this);

                        browseProdukForm.Show();
                        browseProdukForm.WindowState = FormWindowState.Normal;
                        //detailGridView.Focus();
                    }
                    break;

                case Keys.Delete:
                    if (detailGridView.Rows.Count > 1)
                        if (detailGridView.ReadOnly == false)
                                if (DialogResult.Yes == MessageBox.Show("DELETE CURRENT ROW?", "WARNING", MessageBoxButtons.YesNo))
                                {
                                    deleteCurrentRow();
                                    calculateTotal();
                                }
                    break;

                case Keys.Up:
                    SendKeys.Send("+{TAB}");
                    break;

                case Keys.Down:
                    SendKeys.Send("{TAB}");
                    break;
            }
        }
        private void captureAll(Keys key)
        {
            switch (key)
            {
                case Keys.F1:
                    penerimaanBarangHelpForm displayHelp = new penerimaanBarangHelpForm();
                    displayHelp.ShowDialog(this);
                    break;

                case Keys.F2:
                    if (detailPODataGridView.ReadOnly == false)
                    {
                        PODateTimePicker.Focus();
                        if (null == displayBarcodeForm || displayBarcodeForm.IsDisposed)
                        { 
                            displayBarcodeForm = new barcodeForm(this, globalConstants.NEW_PURCHASE_ORDER);

                            displayBarcodeForm.Top = this.Top + 5;
                            displayBarcodeForm.Left = this.Left + 5;//(Screen.PrimaryScreen.Bounds.Width / 2) - (displayBarcodeForm.Width / 2);
                        }

                        displayBarcodeForm.Show();
                        displayBarcodeForm.WindowState = FormWindowState.Normal;
                        //detailPODataGridView.Focus();
                    }
                    break;

                case Keys.F8:
                    if (detailPODataGridView.ReadOnly == false)
                    {
                        detailPODataGridView.Focus();
                        addNewRow();
                    }
                    break;

                case Keys.F9:
                    if (saveButton.Visible == true)
                        saveButton.PerformClick();
                    break;

                case Keys.F11:
                    if (detailPODataGridView.ReadOnly == false)
                    {
                        PODateTimePicker.Focus();
                        if (null == browseProdukForm || browseProdukForm.IsDisposed)
                                browseProdukForm = new dataProdukForm(globalConstants.NEW_PURCHASE_ORDER, this);

                        browseProdukForm.Show();
                        browseProdukForm.WindowState = FormWindowState.Normal;
                        //detailPODataGridView.Focus();
                    }
                    break;

                case Keys.Delete:
                    if (detailPODataGridView.Rows.Count > 1)
                        if (detailPODataGridView.ReadOnly == false)
                        {
                            if (DialogResult.Yes == MessageBox.Show("DELETE CURRENT ROW?", "WARNING", MessageBoxButtons.YesNo))
                            {
                                deleteCurrentRow();
                                calculateTotal();
                            }
                        }
                    break;

                case Keys.Up:
                    SendKeys.Send("+{TAB}");
                    break;

                case Keys.Down:
                    SendKeys.Send("{TAB}");
                    break;
            }
        }
Exemplo n.º 5
0
        private void captureAll(Keys key)
        {
            string searchParam = "";
            int rowcount = 0;
            switch (key)
            {
                case Keys.F1:
                    penerimaanBarangHelpForm displayHelp = new penerimaanBarangHelpForm();
                    displayHelp.ShowDialog(this);
                    break;

                case Keys.F2:
                    if (saveButton.Enabled == true)
                    {
                        invoiceInfoTextBox.Focus();

                        if (null == displayBarcodeForm || displayBarcodeForm.IsDisposed)
                        {
                            displayBarcodeForm = new barcodeForm(this, globalConstants.RETUR_PENJUALAN);

                            displayBarcodeForm.Top = this.Top + 5;
                            displayBarcodeForm.Left = this.Left + 5;//(Screen.PrimaryScreen.Bounds.Width / 2) - (displayBarcodeForm.Width / 2);
                        }

                        displayBarcodeForm.Show();
                        displayBarcodeForm.WindowState = FormWindowState.Normal;
                        //detailReturDataGridView.Focus();
                    }
                    break;

                case Keys.F8:
                    if (detailReturDataGridView.ReadOnly == false)
                    { 
                        //detailReturDataGridView.Focus();
                        rowcount = detailReturDataGridView.RowCount;
                        detailReturDataGridView.CurrentCell = detailReturDataGridView.Rows[rowcount - 1].Cells["productID"];
                        //addNewRow();
                    }
                    break;

                case Keys.F9:
                    if ( saveButton.Enabled == true )
                        saveButton.PerformClick();
                    break;

                case Keys.F11:
                    if (detailReturDataGridView.ReadOnly == false)
                    {
                        invoiceInfoTextBox.Focus();
                        if (null == browseProdukForm || browseProdukForm.IsDisposed)
                        {
                            if (originModuleID == globalConstants.RETUR_PENJUALAN)
                                searchParam = selectedSalesInvoice;
                            else if (originModuleID == globalConstants.RETUR_PENJUALAN_STOCK_ADJUSTMENT)
                                searchParam = selectedCustomerID.ToString();

                            browseProdukForm = new dataProdukForm(originModuleID, this, searchParam);
                        }

                        browseProdukForm.Show();
                        browseProdukForm.WindowState = FormWindowState.Normal;
                        //detailReturDataGridView.Focus();
                    }
                    break;
                case Keys.Delete:
                    if (detailReturDataGridView.Rows.Count > 1)
                        if (detailReturDataGridView.ReadOnly == false)
                                if (DialogResult.Yes == MessageBox.Show("DELETE CURRENT ROW?", "WARNING", MessageBoxButtons.YesNo))
                                {
                                    deleteCurrentRow();
                                    calculateTotal();
                                }
                    break;
            }
        }
        private void captureAll(Keys key)
        {
            int rowcount = 0;
            switch (key)
            {
                case Keys.F1:
                    penerimaanBarangHelpForm displayHelp = new penerimaanBarangHelpForm();
                    displayHelp.ShowDialog(this);
                    break;

                case Keys.F2:
                        ReturDtPicker_1.Focus();

                        if (null == displayBarcodeForm || displayBarcodeForm.IsDisposed)
                        {
                            displayBarcodeForm = new barcodeForm(this, globalConstants.RETUR_PEMBELIAN);

                            displayBarcodeForm.Top = this.Top + 5;
                            displayBarcodeForm.Left = this.Left + 5;//(Screen.PrimaryScreen.Bounds.Width / 2) - (displayBarcodeForm.Width / 2);
                        }

                        displayBarcodeForm.Show();
                        displayBarcodeForm.WindowState = FormWindowState.Normal;
                    //detailReturDataGridView.Focus();
                    break;

                case Keys.F8:
                    //detailReturDataGridView.Focus();
                    rowcount = detailReturDataGridView.RowCount;
                    detailReturDataGridView.CurrentCell = detailReturDataGridView.Rows[rowcount - 1].Cells["productID"];
                    //addNewRow();
                    break;

                case Keys.F9:
                        saveAndPrintButton.PerformClick();
                    break;

                case Keys.F11:
                        ReturDtPicker_1.Focus();

                        if (null == browseProdukForm || browseProdukForm.IsDisposed)
                            browseProdukForm = new dataProdukForm(originModuleID, this);

                        browseProdukForm.Show();
                        browseProdukForm.WindowState = FormWindowState.Normal;
                        //detailReturDataGridView.Focus();
                    break;

                case Keys.Delete:
                    if (detailReturDataGridView.ReadOnly == false)
                    {
                            if (DialogResult.Yes == MessageBox.Show("DELETE CURRENT ROW?", "WARNING", MessageBoxButtons.YesNo))
                            {
                                deleteCurrentRow();
                                calculateTotal();
                            }
                    }
                    break;
            }
        }