Beispiel #1
0
        //设置我的评估中参与人员
        public ActionResult SetParticipate(int id)
        {
            SurveyInfo        surveyInfo = _surveyManager.GetCdeSurveyInfoById(id);
            Cde_Configuration config     = _configManager.GetConfig(CurrentTenant.TenantId);

            ViewBag.surveyConfig = config;
            int userSurveyId = _userSurveyManager.GetUserSurveyId(CurrentUser.UserId, id);

            ViewBag.userSurvey = _userSurveyManager.GetUserSurvey(userSurveyId);
            List <Cde_SurveySendUsers> list = _userSendSurveyManager.GetSurveySendUsers(userSurveyId);

            ViewBag.userSurveyId = userSurveyId;
            ViewBag.plist        = list;

            ViewBag.leader = _userManager.GetUserById(CurrentUser.Leader);

            return(View(surveyInfo));
        }
Beispiel #2
0
        public JsonResult GenerateResult(int userSurveyId)
        {
            string errorMsg;

            UserSurvey usy = _userSurveyManager.GetUserSurvey(userSurveyId);

            usy.Survey = _cdeSurveyManager.GetCdeSurveyInfoById(usy.SurveyId);
            if (usy.Survey.EndTime > DateTime.Now)
            {
                return(Json(new { result = 0, msg = CdeQuestion.Prompt14 }, JsonRequestBehavior.AllowGet));
            }
            bool result = _cdeSurveyManager.GenerateSurveyResult(userSurveyId, CurrentUser.UserId, out errorMsg);

            if (result)
            {
                return(Json(new { result = 1, msg = CdeQuestion.BuildSuccess }, JsonRequestBehavior.AllowGet));
            }
            return(Json(new { result = 0, msg = errorMsg }, JsonRequestBehavior.AllowGet));
        }