コード例 #1
0
        //[Authorize(Roles = "Admin,Client,Employee")]
        public ActionResult TaskDetails(string Id, string AssignedTo, short TaskStatus = 0)
        {
            var    userDetails = generic.GetUserDetail(User.Identity.GetUserId());
            string UserId      = User.Identity.GetUserId();

            ViewBag.UserId = userDetails.SubscriberId;
            // var taskCommentsCount = new TaskCommentsCount();
            //var TasktrainingCount = new TaskTrainingCount();
            ViewData["UserProfile"] = generic.GetUserDetail(UserId);
            ViewData["EmpDetails"]  = emsMgr.GetEmployeeBasicDetails(UserId).FirstOrDefault();
            ViewData["CompanyLogo"] = cmsMgr.GetCompanyLogo(userDetails.SubscriberId).FirstOrDefault();
            var plandetail = admin.GetUserplanDetails(userDetails.SubscriberId).Where(c => c.AddOnId == 3).FirstOrDefault();

            ViewData["plandetail"] = plandetail;

            if (Id != null && TaskStatus > 0)
            {
                admin.UpdateTaskStatus(Id, TaskStatus, AssignedTo);
            }
            ViewData["TaskItems"] = admin.GetTaskItems(Id);
            var TaskComment = emsMgr.GetTaskComments(Id);

            ViewData["TaskReplies"] = emsMgr.GetTaskReplies();
            ViewData["Attachment"]  = admin.GetTaskAttachments(Id).FirstOrDefault();
            ViewData["FinalAttach"] = cmsMgr.GetTaskFinalAttachments(Id);
            //int taskCommentsCount = emsMgr.GetTaskCommentsCount(Id);
            ViewData["TaskComments"] = TaskComment;
            ViewBag.CommentsCount    = TaskComment.Count();//taskCommentsCount.TotalTaskComments;
            ViewBag.TrainingCount    = tmsMgr.GetTaskTrainingCount(Id);
            return(View(admin.GetTaskMasters(userDetails.SubscriberId, Id).FirstOrDefault()));
        }