/// <summary> /// Sets the status to Open if the dialog is cancelled. This is limited because it does not know the /// prior status so it resets to a pre-determined value. /// </summary> /// <param name="form">the instance of the OpportunityClosedLost dialog</param> /// <param name="args">empty</param> public static void cmdCancel_OnClickStep1( IOpportunityClosedLost form, EventArgs args) { IOpportunity opportunity = form.CurrentEntity as IOpportunity; object resOpen = System.Web.HttpContext.GetGlobalResourceObject("Opportunity", "Opp_Status_Open"); if(resOpen != null) opportunity.Status = resOpen.ToString(); //"Open"; }
/// <summary> /// Sets the flag, LostReplaced, on the opportunity competitor indicating that this opportunity /// competitor was associated as a competitor lost to. /// </summary> /// <param name="form">The opportunity closed lost form.</param> /// <param name="args">The event arguments.<see cref="System.EventArgs"/> instance containing the event data.</param> public static void lueCompetitorLoss_OnChange(IOpportunityClosedLost form, EventArgs args) { ICompetitor competitor = form.lueCompetitorLoss.LookupResultValue as ICompetitor; if (competitor != null) { IOpportunity opportunity = form.CurrentEntity as IOpportunity; opportunity.SetOppCompetitorReplacedFlag(competitor); } }
/// <summary> /// Sets the flag, LostReplaced, on the opportunity competitor indicating that this opportunity /// competitor was associated as a competitor lost to. /// </summary> /// <param name="form">The opportunity closed lost form.</param> /// <param name="args">The event arguments.<see cref="System.EventArgs"/> instance containing the event data.</param> public static void lueCompetitorLoss_OnChange(IOpportunityClosedLost form, EventArgs args) { ICompetitor competitor = form.lueCompetitorLoss.LookupResultValue as ICompetitor; if (competitor != null) { IOpportunity opportunity = form.CurrentEntity as IOpportunity; opportunity.SetOppCompetitorReplacedFlag(competitor); } Sage.Platform.WebPortal.Services.IPanelRefreshService panelRefresh = form.Services.Get<Sage.Platform.WebPortal.Services.IPanelRefreshService>(); if(panelRefresh != null) panelRefresh.RefreshMainWorkspace(); }
/// <summary> /// Sets the status to Open if the dialog is cancelled. This is limited because it does not know the /// prior status so it resets to a pre-determined value. /// </summary> /// <param name="form">the instance of the OpportunityClosedLost dialog</param> /// <param name="args">empty</param> public static void cmdCancel_OnClickStep1(IOpportunityClosedLost form, EventArgs args) { IOpportunity opportunity = form.CurrentEntity as IOpportunity; if (!(opportunity.Closed ?? false)) { object resOpen = System.Web.HttpContext.GetGlobalResourceObject("Opportunity", "Opp_Status_Open"); if (resOpen != null) { opportunity.Status = resOpen.ToString(); //"Open"; } } }
/// <summary> /// Sets the status to Open if the dialog is cancelled. This is limited because it does not know the /// prior status so it resets to a pre-determined value. /// </summary> /// <param name="form">the instance of the OpportunityClosedLost dialog</param> /// <param name="args">empty</param> public static void cmdCancel_OnClickStep1(IOpportunityClosedLost form, EventArgs args) { IOpportunity opportunity = form.CurrentEntity as IOpportunity; if (!(opportunity.Closed ?? false)) { object resOpen = form.GetResource("Opp_Status_Open").ToString(); if (resOpen != null) { opportunity.Status = resOpen.ToString(); } } }
/// <summary> /// Sets the flag, LostReplaced, on the opportunity competitor indicating that this opportunity /// competitor was associated as a competitor lost to. /// </summary> /// <param name="form">The opportunity closed lost form.</param> /// <param name="args">The event arguments.<see cref="System.EventArgs"/> instance containing the event data.</param> public static void lueCompetitorLoss_OnChange(IOpportunityClosedLost form, EventArgs args) { ICompetitor competitor = form.lueCompetitorLoss.LookupResultValue as ICompetitor; if (competitor != null) { IOpportunity opportunity = form.CurrentEntity as IOpportunity; opportunity.SetOppCompetitorReplacedFlag(competitor); } Sage.Platform.WebPortal.Services.IPanelRefreshService panelRefresh = form.Services.Get <Sage.Platform.WebPortal.Services.IPanelRefreshService>(); if (panelRefresh != null) { panelRefresh.RefreshMainWorkspace(); } }