private void dataSupplierDataGridView_KeyDown(object sender, KeyEventArgs e) { if (dataSupplierDataGridView.Rows.Count <= 0) return; if (e.KeyCode == Keys.Enter) { int selectedrowindex = dataSupplierDataGridView.SelectedCells[0].RowIndex; DataGridViewRow selectedRow = dataSupplierDataGridView.Rows[selectedrowindex]; selectedSupplierID = Convert.ToInt32(selectedRow.Cells["SUPPLIER_ID"].Value); if (originModuleID == globalConstants.PEMBAYARAN_HUTANG) { if (null == pembayaranHutangForm || pembayaranHutangForm.IsDisposed) pembayaranHutangForm = new pembayaranLumpSumForm(originModuleID, selectedSupplierID); pembayaranHutangForm.Show(); pembayaranHutangForm.WindowState = FormWindowState.Normal; } else { if (null == editSupplierForm || editSupplierForm.IsDisposed) editSupplierForm = new dataSupplierDetailForm(globalConstants.EDIT_SUPPLIER, selectedSupplierID); editSupplierForm.Show(); editSupplierForm.WindowState = FormWindowState.Normal; } } }
private void dataCabangGridView_DoubleClick(object sender, EventArgs e) { int selectedrowindex = dataCabangGridView.SelectedCells[0].RowIndex; DataGridViewRow selectedRow = dataCabangGridView.Rows[selectedrowindex]; selectedBranchID = Convert.ToInt32(selectedRow.Cells["BRANCH_ID"].Value); if (originModuleID == globalConstants.DATA_PIUTANG_MUTASI) { if (null == pembayaranPiutangForm || pembayaranPiutangForm.IsDisposed) pembayaranPiutangForm = new pembayaranLumpSumForm(originModuleID, selectedBranchID); pembayaranPiutangForm.Show(); pembayaranPiutangForm.WindowState = FormWindowState.Normal; } else { if (null == editBranchForm || editBranchForm.IsDisposed) editBranchForm = new dataCabangDetailForm(globalConstants.EDIT_BRANCH, selectedBranchID); editBranchForm.Show(); editBranchForm.WindowState = FormWindowState.Normal; } }
private void dataCabangGridView_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { int selectedrowindex = dataCabangGridView.SelectedCells[0].RowIndex; DataGridViewRow selectedRow = dataCabangGridView.Rows[selectedrowindex]; selectedBranchID = Convert.ToInt32(selectedRow.Cells["BRANCH_ID"].Value); if (originModuleID == globalConstants.DATA_PIUTANG_MUTASI) { gutil.saveSystemDebugLog(0, "CREATE PEMBAYARAN PIUTANG MUTASI, BRANCH ID [" + selectedBranchID + "]"); if (null == pembayaranPiutangForm || pembayaranPiutangForm.IsDisposed) pembayaranPiutangForm = new pembayaranLumpSumForm(originModuleID, selectedBranchID); pembayaranPiutangForm.Show(); pembayaranPiutangForm.WindowState = FormWindowState.Normal; } else { gutil.saveSystemDebugLog(0, "CREATE DATA BRANCH DETAIL, BRANCH ID [" + selectedBranchID + "]"); if (null == editBranchForm || editBranchForm.IsDisposed) editBranchForm = new dataCabangDetailForm(globalConstants.EDIT_BRANCH, selectedBranchID); editBranchForm.Show(); editBranchForm.WindowState = FormWindowState.Normal; } } }
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; } } }