コード例 #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));
        }
コード例 #2
0
        public JsonResult GetSurveyWrited(int userSurveyId)
        {
            UserSurvey surveyInfo = _cdeSurveyManager.GetSurveyInfoByUserSurveyId(userSurveyId);
            SysUser    userInfo   = _userManager.GetUserById(surveyInfo.UserId);
            List <Cde_SurveySendUsers> writedlist;

            if (surveyInfo.ApproveFlag != 2)
            {
                writedlist = new List <Cde_SurveySendUsers>();
            }
            else
            {
                writedlist = _sendUserManager.GetSurveySendUsers(userSurveyId);
            }

            return(Json(new
            {
                userSurveyId,
                surveyInfo.Realname,
                CurrentTenant.TenantName,
                userInfo.PostName,
                userInfo.DeptLevelPath,
                surveyInfo.Survey.ExampaperName,
                surveyInfo.Survey.ExampaperId,
                StartTime = surveyInfo.Survey.StartTime.ToString("yyyy-MM-dd HH:mm:ss"),
                EndTime = surveyInfo.Survey.EndTime.ToString("yyyy-MM-dd HH:mm:ss"),
                WriteList = writedlist.Select(p => new
                {
                    p.UserId,
                    p.Realname,
                    p.RelationshipStr,
                    IsWrited = p.Status == 3 ? "1" : "0",
                    IsWritedStr = p.Status == 3 ? ExamTest.submitted : LanguageResources.Common.NoSubmit,
                    SubmitTime =
                        (p.Status == 3 && p.SubmitTime.HasValue)
                            ? p.SubmitTime.Value.ToString("yyyy-MM-dd HH:mm:ss")
                            : "/",
                    p.SendUserId
                })
            }, JsonRequestBehavior.AllowGet));
        }