public ActionResult ProjectDetail(int projectID) { var session = (AccountLogin)Session[CommonConstants.USER_SESSION]; var list = taskMemberService.GetUserProject(session.UserID); var list2 = projectMemberService.GetUserProject(session.UserID); if (list.Contains(projectID) == true || list2.Contains(projectID) == true) { var data = projectService.GetByProjectID(projectID); ViewBag.ProjectName = data.ProjectCode + " " + data.ProjectName; return(View(data.ProjectID)); } else { return(RedirectToAction("Index", "ProjectManager")); } }
public ActionResult GetListUserOwnedProject() { try { var session = (AccountLogin)Session[CommonConstants.USER_SESSION]; var list = projectMemberService.GetUserProject(session.UserID); List <RTC_Project> result = new List <RTC_Project>(); foreach (var i in list) { var temp = projectService.GetByProjectID(i); result.Add(temp); } return(AjaxResult(true, "success", result)); } catch (Exception e) { return(AjaxResult(false, "Lỗi hệ thống", null, e.Message)); } }