private void cmdPELUNASAN_Click(object sender, EventArgs e) { // cek dulu mesti kepilih 1 data baru bisa melakukan proses pembayaran if (dgDenda.SelectedCells.Count > 0) { Guid SrcRowID; Guid PenjRowID; Guid PenjHistRowID; String Source; SrcRowID = (Guid)dgDenda.SelectedCells[0].OwningRow.Cells["SrcDendaRowID"].Value; PenjRowID = (Guid)dgDenda.SelectedCells[0].OwningRow.Cells["PenjRowID"].Value; PenjHistRowID = (Guid)Tools.isNull(dgDenda.SelectedCells[0].OwningRow.Cells["PenjHistRowID"].Value, Guid.Empty); Source = dgDenda.SelectedCells[0].OwningRow.Cells["SrcDenda"].Value.ToString(); Penjualan.frmDendaUpdate ifrmChild = new Penjualan.frmDendaUpdate(this, SrcRowID, PenjRowID, Source, PenjHistRowID); ifrmChild.ShowDialog(); // refreshGrid(); refreshGrids(PenjRowID, SrcRowID, Source); } else { MessageBox.Show("Pilih data denda yg ingin dilunasi terlebih dahulu."); } }
private void frmDendaIden_FormClosed(object sender, FormClosedEventArgs e) { if (this.Caller is Penjualan.frmDendaUpdate) { Penjualan.frmDendaUpdate frmCaller = (Penjualan.frmDendaUpdate) this.Caller; frmCaller.RefreshControlsTitipan(); } }