/// <summary> /// Save button click /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnSave_Click(object sender, EventArgs e) { try { if (txtCompanyCurrentdate.Text == string.Empty) { Messages.InformationMessage("Select a date in between financial year"); txtCompanyCurrentdate.Focus(); } else { PublicVariables._dtCurrentDate = Convert.ToDateTime(txtCompanyCurrentdate.Text); //CompanySP spCompany = new CompanySP(); CompanyCreationBll bllCompanyCreation = new CompanyCreationBll(); bllCompanyCreation.CompanyCurrentDateEdit(Convert.ToDateTime(txtCompanyCurrentdate.Text)); if (frmCompanyCreationObj != null) { if ((MessageBox.Show("Saved successfully...Do you want to save settings now? ", "Open Miracle", MessageBoxButtons.YesNo, MessageBoxIcon.Question)) == DialogResult.Yes) { frmSettings frmSettingsObj = new frmSettings(); frmSettingsObj.MdiParent = formMDI.MDIObj; frmSettingsObj.CallFromChangeCurrentDate(frmCompanyCreationObj); } } this.Close(); ShowReminderIfAny(); } } catch (Exception ex) { MessageBox.Show("CCD 11 : " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Save button click /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnSave_Click(object sender, EventArgs e) { try { if (txtCompanyCurrentdate.Text == string.Empty) { Messages.InformationMessage("Select a date in between financial year"); txtCompanyCurrentdate.Focus(); } else { PublicVariables._dtCurrentDate = Convert.ToDateTime(txtCompanyCurrentdate.Text); CompanySP spCompany = new CompanySP(); spCompany.CompanyCurrentDateEdit(Convert.ToDateTime(txtCompanyCurrentdate.Text)); if (frmCompanyCreationObj != null) { if ((MessageBox.Show("Saved successfully...Do you want to save settings now? ", "Openmiracle", MessageBoxButtons.YesNo, MessageBoxIcon.Question)) == DialogResult.Yes) { frmSettings frmSettingsObj = new frmSettings(); frmSettingsObj.MdiParent = formMDI.MDIObj; frmSettingsObj.CallFromChangeCurrentDate(frmCompanyCreationObj); } } this.Close(); if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmShortExpiry", "View") || CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmStock", "View") || CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmOverdueSalesOrder", "View") || CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmOverduePurchaseOrder", "View") || CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmPersonalReminder", "Delete") || CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmPersonalReminder", "Update") || CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmPersonalReminder", "Save")) { ShowReminderIfAny(); } } } catch (Exception ex) { formMDI.infoError.ErrorString = "CCD 11 : " + ex.Message; } }
/// <summary> /// Save button click /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnSave_Click(object sender, EventArgs e) { try { if (txtCompanyCurrentdate.Text == string.Empty) { Messages.InformationMessage("Select a date in between financial year"); txtCompanyCurrentdate.Focus(); } else { PublicVariables._dtCurrentDate = Convert.ToDateTime(txtCompanyCurrentdate.Text); CompanySP spCompany = new CompanySP(); spCompany.CompanyCurrentDateEdit(Convert.ToDateTime(txtCompanyCurrentdate.Text)); if (frmCompanyCreationObj != null) { if ((MessageBox.Show("Saved successfully...Do you want to save settings now? ", "Open Miracle", MessageBoxButtons.YesNo, MessageBoxIcon.Question)) == DialogResult.Yes) { frmSettings frmSettingsObj = new frmSettings(); frmSettingsObj.MdiParent = formMDI.MDIObj; frmSettingsObj.CallFromChangeCurrentDate(frmCompanyCreationObj); } } this.Close(); if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmShortExpiry", "View") || CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmStock", "View") || CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmOverdueSalesOrder", "View") || CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmOverduePurchaseOrder", "View") || CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmPersonalReminder", "Delete") || CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmPersonalReminder", "Update") || CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmPersonalReminder", "Save")) { ShowReminderIfAny(); } } } catch (Exception ex) { MessageBox.Show("CCD 11 : " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Save button click /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnSave_Click(object sender, EventArgs e) { try { if (txtCompanyCurrentdate.Text == string.Empty) { Messages.InformationMessage("Select a date in between financial year"); txtCompanyCurrentdate.Focus(); } else { PublicVariables._dtCurrentDate = Convert.ToDateTime(txtCompanyCurrentdate.Text); //CompanySP spCompany = new CompanySP(); CompanyCreationBll bllCompanyCreation = new CompanyCreationBll(); bllCompanyCreation.CompanyCurrentDateEdit(Convert.ToDateTime(txtCompanyCurrentdate.Text)); if (frmCompanyCreationObj != null) { if ((MessageBox.Show("Saved successfully...Do you want to save settings now? ", "Open Miracle", MessageBoxButtons.YesNo, MessageBoxIcon.Question)) == DialogResult.Yes) { frmSettings frmSettingsObj = new frmSettings(); frmSettingsObj.MdiParent = formMDI.MDIObj; frmSettingsObj.CallFromChangeCurrentDate(frmCompanyCreationObj); } } this.Close(); ShowReminderIfAny(); } } catch (Exception ex) { MessageBox.Show("CCD 11 : " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }