private void dataPelangganDataGridView_DoubleClick(object sender, EventArgs e)
        {
            if (dataPelangganDataGridView.Rows.Count <= 0)
            {
                return;
            }

            int selectedrowindex = dataPelangganDataGridView.SelectedCells[0].RowIndex;

            DataGridViewRow selectedRow = dataPelangganDataGridView.Rows[selectedrowindex];

            selectedCustomerID = Convert.ToInt32(selectedRow.Cells["CUSTOMER_ID"].Value);

            if (originModuleID == globalConstants.CASHIER_MODULE)
            {
                parentForm.setCustomerID(selectedCustomerID);
                this.Close();
            }
            else if (originModuleID == globalConstants.RETUR_PENJUALAN_STOCK_ADJUSTMENT)
            {
                dataReturPenjualanForm displayedReturForm = new dataReturPenjualanForm(originModuleID, "", selectedCustomerID);
                displayedReturForm.ShowDialog(this);
            }
            else if (originModuleID == globalConstants.PEMBAYARAN_PIUTANG)
            {
                pembayaranLumpSumForm pembayaranForm = new pembayaranLumpSumForm(originModuleID, selectedCustomerID);
                pembayaranForm.ShowDialog(this);
            }
            else
            {
                dataPelangganDetailForm displayedForm = new dataPelangganDetailForm(globalConstants.EDIT_CUSTOMER, selectedCustomerID);
                displayedForm.ShowDialog(this);
            }
        }
Esempio n. 2
0
        private void newButton_Click(object sender, EventArgs e)
        {
            if (null == newPelangganForm || newPelangganForm.IsDisposed)
            {
                newPelangganForm = new dataPelangganDetailForm(globalConstants.NEW_CUSTOMER);
            }

            newPelangganForm.Show();
            newPelangganForm.WindowState = FormWindowState.Normal;
        }
Esempio n. 3
0
        private void dataPelangganDataGridView_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                if (dataPelangganDataGridView.Rows.Count <= 0)
                {
                    return;
                }

                int selectedrowindex = dataPelangganDataGridView.SelectedCells[0].RowIndex;

                DataGridViewRow selectedRow = dataPelangganDataGridView.Rows[selectedrowindex];
                selectedCustomerID = Convert.ToInt32(selectedRow.Cells["CUSTOMER_ID"].Value);

                if (originModuleID == globalConstants.CASHIER_MODULE)
                {
                    parentForm.setCustomerID(selectedCustomerID);
                    this.Close();
                }
                else if (originModuleID == globalConstants.RETUR_PENJUALAN_STOCK_ADJUSTMENT)
                {
                    if (null == returPenjualanForm || returPenjualanForm.IsDisposed)
                    {
                        returPenjualanForm = new dataReturPenjualanForm(originModuleID, "", selectedCustomerID);
                    }

                    returPenjualanForm.Show();
                    returPenjualanForm.WindowState = FormWindowState.Normal;
                }
                else if (originModuleID == globalConstants.PEMBAYARAN_PIUTANG)
                {
                    if (null == pembayaranPiutangLumpSumForm || pembayaranPiutangLumpSumForm.IsDisposed)
                    {
                        pembayaranPiutangLumpSumForm = new pembayaranLumpSumForm(originModuleID, selectedCustomerID);
                    }

                    pembayaranPiutangLumpSumForm.Show();
                    pembayaranPiutangLumpSumForm.WindowState = FormWindowState.Normal;
                }
                else
                {
                    if (null == editPelangganForm || editPelangganForm.IsDisposed)
                    {
                        editPelangganForm = new dataPelangganDetailForm(globalConstants.EDIT_CUSTOMER, selectedCustomerID);
                    }

                    editPelangganForm.Show();
                    editPelangganForm.WindowState = FormWindowState.Normal;
                }
            }
        }
        private void newButton_Click(object sender, EventArgs e)
        {
            dataPelangganDetailForm displayForm = new dataPelangganDetailForm(globalConstants.NEW_CUSTOMER);

            displayForm.ShowDialog(this);
        }