Пример #1
0
 public ActionResult LeftBlock(int index = 0)
 {
     ViewBag.menuIndex  = index;
     ViewBag.attends    = relationshipService.GetAttentionCount(CurrentUser.UserId);
     ViewBag.fans       = relationshipService.GetFansCount(CurrentUser.UserId);
     ViewBag.integral   = _integrationManager.GetUserTotalIntegral(CurrentUser.UserId);
     ViewBag.learnScore = _userLevelService.GetUserLearnScore(CurrentUser.UserId);
     return(View());
 }
Пример #2
0
        public JsonResult GetHomeNumber()
        {
            //晋升路径
            int promotionWays = _promotionWayManager.GetUserPromotionWaysCount(CurrentUser.UserId);
            //新上传的知识
            //int newKnowledge =
            //    _resourceManager.GetResourceCountByTime(SampleLoginLog.GetLastLoginTime(CurrentUser.UserId));
            //积分
            int integral = 0;// IntegrationManager.Instence.GetUserRankIntegral(CurrentUser.UserId).TotalIntegral;
            //粉丝数
            int fcount = _shipService.GetFansCount(CurrentUser.UserId);
            //关注
            int acount = _shipService.GetAttentionCount(CurrentUser.UserId);
            //待参与的问卷
            int partSurveyCount = _surveyManager.GetParticipateSurveyCount(CurrentUser.UserId, CurrentUser.TenantId);


            //指派的课程数量
            int designateCourseCount = _learningDesignate.GetDesignateCourseCount(CurrentUser.UserId, -1);
            var totalCount           = 0;
            //待参与的培训数量
            int trainCount = _trainLearningManager.GetMyClassList(out totalCount, CurrentUser.UserId, " tt.EndTime>=getdate()", 1, int.MaxValue).Count();//SystemCache.Instance.ParticipationTrainCount(CurrentUser.TenantId, CurrentUser.UserId,_trainManager.GetMyNotParticipationTrainCount);
            //待参与考试的数量
            int examCount = _examTestManager.GetMyparticipateExamTestCount(CurrentUser.UserId);
            //学时
            int mylearnTime = _learningRecord.GetMyLearnTime(CurrentUser.UserId);
            //学分
            var        learnScore    = _userLevelService.GetUserLearnScore(CurrentUser.UserId);
            List <int> messageCounts = _userMessageManager.GetAllNotReadSysRecMessageCount(CurrentUser.UserId);
            var        messageCount  = messageCounts[0];

            return(Json(new
            {
                acount,
                fcount,
                mylearnTime,
                learnScore,
                partSurveyCount,
                promotionWays,
                designateCourseCount,
                examCount,
                trainCount,
                messageCount,
                integral,
            }, JsonRequestBehavior.AllowGet));
        }