/// <summary> /// Handles the OnClick event of the cmdSetCurrent control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> protected void cmdSetCurrent_OnClick(object sender, EventArgs e) { string currentContextValue = Request.Form[ResolveClientId(currentContext.ClientID)]; string[] args = currentContextValue.Split(new Char[] { ':' }); string spaid = args[0]; ISalesProcesses salesProcess = Sage.SalesLogix.SalesProcess.Helpers.GetSalesProcess(this.EntityContext.EntityID.ToString()); if (args[1] == "False") { string result = salesProcess.CanMoveToStage(spaid); if (result == string.Empty) { salesProcess.SetToCurrentStage(spaid); salesProcess.Save(); } else { if (DialogService != null) { DialogService.ShowMessage(result); } return; } } }
/// <summary> /// Handles the SelectedIndexChanged event of the ddlStages control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> protected void ddlStages_SelectedIndexChanged(object sender, EventArgs e) { object manageStagesDialog = Page.Session["MANAGESTAGESACTIVE"]; if (manageStagesDialog != null) { return; } string stageId = ddlStages.SelectedItem.Value; ISalesProcesses salesProcess = Helpers.GetSalesProcess(this.EntityContext.EntityID.ToString()); string result = salesProcess.CanMoveToStage(stageId); if (result == string.Empty) { salesProcess.SetToCurrentStage(stageId); salesProcess.Save(); } else { if (DialogService != null) { DialogService.ShowMessage(result); } } IPanelRefreshService refresher = PageWorkItem.Services.Get <IPanelRefreshService>(); refresher.RefreshAll(); }
/// <summary> /// Handles the OnClick event of the cmdSetCurrent control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> protected void cmdSetCurrent_OnClick(object sender, EventArgs e) { string[] args = currentContext.Value.Split(':'); string spaid = args[0]; ISalesProcesses salesProcess = Helpers.GetSalesProcess(EntityContext.EntityID.ToString()); if (args[1] == "False") { string result = salesProcess.CanMoveToStage(spaid); if (result == string.Empty) { salesProcess.SetToCurrentStage(spaid); salesProcess.Save(); } else { if (DialogService != null) { DialogService.ShowMessage(result); } } } }