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) { 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 unknownCustomerButton_Click(object sender, EventArgs e) { if (null == unknownCustReturPenjualanForm || unknownCustReturPenjualanForm.IsDisposed) { unknownCustReturPenjualanForm = new dataReturPenjualanForm(originModuleID, "", 0); } unknownCustReturPenjualanForm.Show(); unknownCustReturPenjualanForm.WindowState = FormWindowState.Normal; }