/// <summary> /// Loads the sales process. /// </summary> /// <param name="opportunityId">The opportunity id.</param> private void LoadSalesProcess(string opportunityId) { ISalesProcesses salesProcess = Helpers.GetSalesProcess(opportunityId); _salesProcess = salesProcess; if (salesProcess != null) { IList <ISalesProcessAudit> list = salesProcess.GetSalesProcessAudits(); LoadStagesDropDown(list); SalesProcessGrid.DataSource = list; SalesProcessGrid.DataBind(); SetDDLSalesProcess(salesProcess.Name); txtNumOfStepsCompleted.Value = Convert.ToString(salesProcess.NumberOfStepsCompleted()); txtCurrentSalesProcessName.Value = salesProcess.Name; txtCurrentSalesProcessId.Value = salesProcess.Id.ToString(); } else { LoadStagesDropDown(null); List <ISalesProcessAudit> list = new List <ISalesProcessAudit>(); SalesProcessGrid.DataSource = list; SalesProcessGrid.DataBind(); IUserOptionsService userOption = ApplicationContext.Current.Services.Get <IUserOptionsService>(); string defSalesProcess = userOption.GetCommonOption("cboSalesProcess", "OpportunityDefaults"); if (string.IsNullOrEmpty(defSalesProcess)) { defSalesProcess = "NONE"; } SetDDLSalesProcess(defSalesProcess); txtNumOfStepsCompleted.Value = "0"; txtCurrentSalesProcessName.Value = String.Empty; txtCurrentSalesProcessId.Value = String.Empty; } }