Пример #1
0
        public ActionResult DashBoard()
        {
            PLRScoreBoardStatus PLRScoreBoard = new PLRScoreBoardStatus();

            PLRScoreBoard.PLRScoreBoardDetail      = _DashboardDao.GetPLRScoreBoard(SessionManager.UserId);
            PLRScoreBoard.PLRClaimScoreBoardDetail = _DashboardDao.GetPLRClaimScoreBoard(SessionManager.UserId, 1, null);
            CheckAccess();


            ViewBag.TotalAssignedClaim     = PLRScoreBoard.PLRScoreBoardDetail.Distinct();
            ViewBag.TotalSubmittedClaim    = PLRScoreBoard.PLRScoreBoardDetail.Where(x => x.PLRStatus == PLRStatus.Submit || x.PLRStatus == PLRStatus.Approve).Distinct();
            ViewBag.TotalAssessmentPending = PLRScoreBoard.PLRScoreBoardDetail.Where(x => x.PLRStatus == null || x.PLRStatus == "").Distinct();
            ViewBag.TotalClosedClaim       = PLRScoreBoard.PLRScoreBoardDetail.Where(x => x.StageId == 4).Distinct();
            //ViewBag.TotalReportPending = PLRScoreBoard.PLRScoreBoardDetail.Where(x => x.PLRStatus == PLRStatus.Pending).Count();
            ViewBag.TotalReportPending = PLRScoreBoard.PLRClaimScoreBoardDetail;


            PLRScoreBoard.TotalAssignedClaim     = PLRScoreBoard.PLRScoreBoardDetail.Distinct().Count();
            PLRScoreBoard.TotalSubmittedClaim    = PLRScoreBoard.PLRScoreBoardDetail.Where(x => x.PLRStatus == PLRStatus.Submit || x.PLRStatus == PLRStatus.Approve).Count();
            PLRScoreBoard.TotalAssessmentPending = PLRScoreBoard.PLRScoreBoardDetail.Where(x => x.PLRStatus == null || x.PLRStatus == "").Count();
            PLRScoreBoard.TotalClosedClaim       = PLRScoreBoard.PLRScoreBoardDetail.Where(x => x.StageId == 4).Count();
            //PLRScoreBoard.TotalReportPending = PLRScoreBoard.PLRScoreBoardDetail.Where(x => x.PLRStatus == PLRStatus.Pending).Count();
            PLRScoreBoard.TotalReportPending = PLRScoreBoard.PLRClaimScoreBoardDetail.Distinct().Count();



            //new tabs Dashboard
            ViewBag.TotalPendingBills      = _DashboardDao.PLRClaimPendingBillsScoreBoard(SessionManager.UserId);
            ViewBag.TotalApprovalPending   = PLRScoreBoard.PLRScoreBoardDetail.Where(x => x.PLRStatus == PLRStatus.Submit);
            ViewBag.TotalPLRApprovalStatus = PLRScoreBoard.PLRScoreBoardDetail.Where(x => x.PLRStatus == PLRStatus.Approve || x.PLRStatus == PLRStatus.Revision ||
                                                                                     x.PLRStatus == PLRStatus.Decline);
            ViewBag.TotalLumpSumPLR = PLRScoreBoard.PLRScoreBoardDetail.Where(x => x.Disposition == (int)PLRDisposition.LSSPLR);
            ViewBag.TotalLossPLR    = PLRScoreBoard.PLRScoreBoardDetail.Where(x => x.Disposition == (int)PLRDisposition.TLPLR);



            PLRScoreBoard.TotalPendingBills      = _DashboardDao.PLRClaimPendingBillsScoreBoard(SessionManager.UserId).Distinct().Count();
            PLRScoreBoard.TotalApprovalPending   = PLRScoreBoard.PLRScoreBoardDetail.Where(x => x.PLRStatus == PLRStatus.Submit).Distinct().Count();
            PLRScoreBoard.TotalPLRApprovalStatus = PLRScoreBoard.PLRScoreBoardDetail.Where(x => x.PLRStatus == PLRStatus.Approve || x.PLRStatus == PLRStatus.Revision ||
                                                                                           x.PLRStatus == PLRStatus.Decline).Distinct().Count();
            PLRScoreBoard.TotalLumpSumPLR = PLRScoreBoard.PLRScoreBoardDetail.Where(x => x.Disposition == (int)PLRDisposition.LSSPLR).Distinct().Count();
            PLRScoreBoard.TotalLossPLR    = PLRScoreBoard.PLRScoreBoardDetail.Where(x => x.Disposition == (int)PLRDisposition.TLPLR).Distinct().Count();



            return(View(PLRScoreBoard));
        }