/// <summary> /// Call Corresponding Voucher to View details for updation in edit mode /// </summary> public void GotoPDCReceivable() { try { frmPdcReceivable frmobj = new frmPdcReceivable(); frmPdcReceivable _isOpen = Application.OpenForms["frmPDCReceivable"] as frmPdcReceivable; if (_isOpen == null) { frmobj.WindowState = FormWindowState.Normal; frmobj.MdiParent = formMDI.MDIObj; frmobj.Show(); frmobj.CallThisFormFromVoucherSearch(this, Convert.ToDecimal(dgvVoucherSearch.CurrentRow.Cells["Id"].Value.ToString())); } else { _isOpen.MdiParent = formMDI.MDIObj; if (_isOpen.WindowState == FormWindowState.Minimized) { _isOpen.WindowState = FormWindowState.Normal; } else { _isOpen.Activate(); } _isOpen.ClearFunction(); _isOpen.CallThisFormFromVoucherSearch(this, Convert.ToDecimal(dgvVoucherSearch.CurrentRow.Cells["Id"].Value.ToString())); _isOpen.BringToFront(); } } catch (Exception ex) { MessageBox.Show("VS17:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }