/// <summary> /// Form closing event /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void frmNewFinancialYear_FormClosing(object sender, FormClosingEventArgs e) { try { if (frmCompanyCreationObj != null) { if (isSave) { frmChangeCurrentDate frmChangeCurrenttDateObj = new frmChangeCurrentDate(); frmChangeCurrenttDateObj.MdiParent = formMDI.MDIObj; frmCompanyCreation CompanyCreationObj = new frmCompanyCreation(); CompanyCreationObj = frmCompanyCreationObj; frmCompanyCreationObj = null; frmChangeCurrenttDateObj.CallFromNewFinancialYear(CompanyCreationObj); } else { e.Cancel = true; } } } catch (Exception ex) { MessageBox.Show("NFY 15 : " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Form closing event /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void frmNewFinancialYear_FormClosing(object sender, FormClosingEventArgs e) { try { if (frmCompanyCreationObj != null) { if (isSave) { frmChangeCurrentDate frmChangeCurrenttDateObj = new frmChangeCurrentDate(); frmChangeCurrenttDateObj.MdiParent = formMDI.MDIObj; frmCompanyCreation CompanyCreationObj = new frmCompanyCreation(); CompanyCreationObj = frmCompanyCreationObj; frmCompanyCreationObj = null; frmChangeCurrenttDateObj.CallFromNewFinancialYear(CompanyCreationObj); } else { e.Cancel = true; } } } catch (Exception ex) { formMDI.infoError.ErrorString = "NFY 13 : " + ex.Message; } }