コード例 #1
0
        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));
        }
コード例 #2
0
        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>()));
        }
コード例 #3
0
        //[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>()));
        }
コード例 #4
0
        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));
        }
コード例 #5
0
        //[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>()));
        }
コード例 #6
0
        //[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));
        }