public void LoadFromApprovalToLegalEffectiveness(PMIDetailsModel pmi) { var transformed = new { MaxLevel = pmi.PmiEscalarBenchmark.ListPMIEscalar .Where(x => x.PmiTypeId == pmi.MasterToEFF) .Select(x => x.MaxLevel) .FirstOrDefault(), AlertLevel = pmi.PmiEscalarBenchmark.ListPMIEscalar .Where(x => x.PmiTypeId == pmi.MasterToEFF) .Select(x => x.AlertLevel) .FirstOrDefault(), ProblemLevel = pmi.PmiEscalarBenchmark.ListPMIEscalar .Where(x => x.PmiTypeId == pmi.MasterToEFF) .Select(x => x.ProblemLevel) .FirstOrDefault(), resultSum = pmi.PmiEscalarBenchmark.ListPMIEscalar .Where(x => x.PmiTypeId == pmi.MasterToEFF) .Select(x => x.ProblemLevel) .FirstOrDefault() - pmi.PmiEscalarBenchmark.ListPMIEscalar .Where(x => x.PmiTypeId == pmi.MasterToEFF) .Select(x => x.MaxLevel) .FirstOrDefault(), Efectiveness = pmi.LegalEfectiveness, }; ViewBag.FromApprovalToLegalEffectiveness = transformed; }
public virtual ActionResult Index( string operationNumber, bool calculateInMemory = true, bool isLive = false) { ViewBag.OperationNUmber = operationNumber; string cacheName = CacheHelper.GetCacheName(isLive, IDBContext.Current.Operation); var pmiOperation = _cacheData.Get <PMIOperation>(cacheName) ?? _cacheData.Add( cacheName, _clientPMIDetails.LoadOperationContext(operationNumber, calculateInMemory, isLive), _timeCachingVal); IDBContext.Current.ContextPMIOperation = pmiOperation; ViewData["OperationNumber"] = operationNumber; ViewBag.Tab = "S1G"; PMIDetailsModel model = _clientPMIDetails.GetCurrentPMIEscalarBenchmark( operationNumber, pmiOperation, isLive); model.IsLiveMode = isLive; LoadFromApprovalToLegalEffectiveness(model); LoadFromApprovalToLegalEffectivenessToEligibility(model); LoadNormalClausesPriorToEligibility(model); LoadSpecialClausesPriorToEligibility(model); //TODO: The entire model should be sent to the view instead of using the viewbag return(View(isLive)); }
public void LoadSpecialClausesPriorToEligibility(PMIDetailsModel pmi) { var transformed = new { DatesForTypeAndSpecial = pmi.ForTypeAndSpecial, DatesClausesIsSpecial = pmi.PercentageSpecial, }; ViewBag.SpecialClausesPriorToEligibility = transformed; }
public void LoadNormalClausesPriorToEligibility(PMIDetailsModel pmi) { var transformed = new { DatesForTypeAndNormal = pmi.ForTypeAndNormal, DatesClausesIsNormalCompleted = pmi.PercentageNormal, }; ViewBag.NormalClausesPriorToEligibility = transformed; }
public void LoadFromApprovalToLegalEffectivenessToEligibility(PMIDetailsModel pmi) { var transformed = new { MaxLevel2 = pmi.PmiEscalarBenchmark.ListPMIEscalar .Where(x => x.PmiTypeId == pmi.MasterToELIG) .Select(x => x.MaxLevel) .FirstOrDefault(), AlertLevel2 = pmi.PmiEscalarBenchmark.ListPMIEscalar .Where(x => x.PmiTypeId == pmi.MasterToELIG) .Select(x => x.AlertLevel) .FirstOrDefault(), ProblemLevel2 = pmi.PmiEscalarBenchmark.ListPMIEscalar .Where(x => x.PmiTypeId == pmi.MasterToELIG) .Select(x => x.ProblemLevel) .FirstOrDefault(), Eligibility = pmi.ToEligibility, }; ViewBag.FromApprovalToLegalEffectivenessToEligibility = transformed; }