public ActionResult AddProject(RTC_Project project)
        {
            try
            {
                var session = (AccountLogin)Session[CommonConstants.USER_SESSION];

                project.DateStarted = DateTime.Now;
                projectService.Add(project);
                projectService.SaveChanges();

                var member = new RTC_ProjectMember();
                member.ProjectID = project.ProjectID;
                member.UserID    = session.UserID;
                member.FullName  = session.FullName;

                projectMemberService.Add(member);
                projectMemberService.SaveChanges();
                return(AjaxResult(true));
            }
            catch (Exception e)
            {
                return(AjaxResult(false, "Lỗi hệ thống", null, e.Message));
            }
        }
示例#2
0
 public void Update(RTC_ProjectMember member)
 {
     projectMemberRepository.Update(member);
 }
示例#3
0
 public void Add(RTC_ProjectMember member)
 {
     projectMemberRepository.Add(member);
 }