public virtual PartialViewResult _ActionButtons(int id) { var plans = (List <SupervisionPlanModel>)Session["SupervisionPlan"]; if (plans == null) { plans = new List <SupervisionPlanModel> { SupervisionPlanRepository.GetById(id) } } ; Session["SupervisionPlan"] = plans; var model = plans.Find(p => p.SupervisionPlanId == id); return(PartialView(model)); }
public virtual PartialViewResult CommentsPartial(int id) { var plans = (List <SupervisionPlanModel>)Session["SupervisionPlan"]; if (plans == null) { plans = new List <SupervisionPlanModel> { SupervisionPlanRepository.GetById(id) } } ; Session["SupervisionPlan"] = plans; return(PartialView(plans.Find(p => p.SupervisionPlanId == id).ActualVersion != null ? plans.Find(p => p.SupervisionPlanId == id).ActualVersion.UserComments : new List <UserCommentModel>())); }
//[HasPermission(Permissions = "Supervision Plan Write")] public virtual PartialViewResult BudgetPartial(int id) { var plans = (List <SupervisionPlanModel>)Session["SupervisionPlan"]; if (plans == null) { plans = new List <SupervisionPlanModel> { SupervisionPlanRepository.GetById(id) } } ; Session["SupervisionPlan"] = plans; LocalizeAndCompleteBudgetMatrix(plans); return(PartialView(plans.Find(p => p.SupervisionPlanId == id).ActualVersion != null ? plans.Find(p => p.SupervisionPlanId == id).ActualVersion.Costs : new List <CostModel>())); }
public virtual PartialViewResult PriorPlanVersionPartial(int id) { var plans = (List <SupervisionPlanModel>)Session["SupervisionPlan"]; if (plans == null) { plans = new List <SupervisionPlanModel> { SupervisionPlanRepository.GetById(id) } } ; Session["SupervisionPlan"] = plans; ViewBag.SelectedYear = plans.Find(p => p.SupervisionPlanId == id).Year; var priorVersionModel = new PriorVersionModel(); priorVersionModel.SupervisionPlanList = plans; priorVersionModel.SupervisionPlanVersionList = plans.Find(p => p.SupervisionPlanId == id).SupervisionPlanVersions.OrderByDescending(x => x.ValidationDate).ToList(); return(PartialView(priorVersionModel)); }
//[HasPermission(Permissions = "Supervision Plan Write")] public virtual PartialViewResult CriticalProductsPartial(int id) { var spService = Globals.Resolve <ISupervisionPlanService>(); var plans = (List <SupervisionPlanModel>)Session["SupervisionPlan"]; if (plans == null) { plans = new List <SupervisionPlanModel> { SupervisionPlanRepository.GetById(id) } } ; Session["SupervisionPlan"] = plans; ViewBag.ModalityType = spService.GetModalityCodeById(id); SetLocalizedValues(); return(PartialView(plans.Find(p => p.SupervisionPlanId == id).ActualVersion != null ? plans.Find(p => p.SupervisionPlanId == id).ActualVersion.CriticalProducts : new List <CriticalProductModel>())); }
//[HasPermission(Permissions = "Supervision Plan Write")] public virtual PartialViewResult ActivitiesPartial(int id) { var plans = (List <SupervisionPlanModel>)Session["SupervisionPlan"]; if (plans == null) { plans = new List <SupervisionPlanModel> { SupervisionPlanRepository.GetById(id) } } ; Session["SupervisionPlan"] = plans; SetLocalizedValues(); var spService = Globals.Resolve <ISupervisionPlanService>(); ViewBag.ModalityType = spService.GetModalityCodeById(id); ViewBag.SourceList = _viewModelMapperHelper.GetListMasterData(SpGlobalValues.ListSource); ViewBag.ActivityType = _viewModelMapperHelper.GetListMasterData(SpGlobalValues.ActivityType); var model = spService.AddCriticalProductModels(plans, id); return(PartialView(model)); }