当前位置: 首页>>代码示例>>C#>>正文


C# UserService.ProgramStage1Complete方法代码示例

本文整理汇总了C#中UserService.ProgramStage1Complete方法的典型用法代码示例。如果您正苦于以下问题:C# UserService.ProgramStage1Complete方法的具体用法?C# UserService.ProgramStage1Complete怎么用?C# UserService.ProgramStage1Complete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UserService的用法示例。


在下文中一共展示了UserService.ProgramStage1Complete方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Index

        public ActionResult Index()
        {
            AssessmentChecklistViewModel model = new AssessmentChecklistViewModel();
            UserService US = new UserService();

            model.user = CurrentUser;
            model.PreAssessmentState = AssessmentState.Disabled;
            model.ProgramStage1State = AssessmentState.Disabled;
            model.ProgramStage2State = AssessmentState.Disabled;
            model.PatientAssessmentState = AssessmentState.Disabled;
            model.ProgramStage3State = AssessmentState.Disabled;

            if (US.PreAssessmentComplete(CurrentUserID)) model.PreAssessmentState = AssessmentState.Complete; else model.PreAssessmentState = AssessmentState.Enabled;

            if (model.PreAssessmentState == AssessmentState.Complete)
            {
                if (US.ProgramStage1Complete(CurrentUserID)) model.ProgramStage1State = AssessmentState.Complete; else model.ProgramStage1State = AssessmentState.Enabled;
            }

            if (model.ProgramStage1State == AssessmentState.Complete)
            {
                if (US.ProgramStage2Complete(CurrentUserID)) model.ProgramStage2State = AssessmentState.Complete; else model.ProgramStage2State = AssessmentState.Enabled;
            }

            if (model.ProgramStage2State == AssessmentState.Complete)
            {
                //Only complete after 25 assessments
                if (US.PatientAssessmentComplete(CurrentUserID)) model.PatientAssessmentState = AssessmentState.Complete; else model.PatientAssessmentState = AssessmentState.Enabled;
                model.PatientAssessmentCount = US.PatientAssessmentCount(CurrentUserID);
            }

            if (model.PatientAssessmentState == AssessmentState.Complete)
            {
                //if (US.PatientAssessmentComplete(CurrentUserID)) model.PatientAssessmentState = AssessmentState.Complete; else model.PatientAssessmentState = AssessmentState.Enabled;
                if (US.ProgramStage3Complete(CurrentUserID)) model.ProgramStage3State = AssessmentState.Complete; else model.ProgramStage3State = AssessmentState.Enabled;
            }

            //if (model.ProgramStage2State == AssessmentState.Complete)
            //{
            //    if (US.ProgramStage3Complete(CurrentUserID)) model.ProgramStage3State = AssessmentState.Complete; else model.ProgramStage3State = AssessmentState.Enabled;
            //}

            return View(model);
        }
开发者ID:cbrooker,项目名称:Armor,代码行数:44,代码来源:AssessmentController.cs


注:本文中的UserService.ProgramStage1Complete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。