예제 #1
0
        public IHttpActionResult Get(int customGroupId, int projectGroupId)
        {
            CustomProjectGroupRepository customProjectGroupRepository = new CustomProjectGroupRepository(Convert.ToInt32(Request.Headers.GetValues("CurrentUserID").First()));
            List <CustomProjectGroup>    customProjectGroupList       = customProjectGroupRepository.GetCustomProjectGroups(customGroupId, projectGroupId);

            return(Json(new { CustomProjectGroups = customProjectGroupList }));
        }
예제 #2
0
        // POST: api/ProjectGroupUser
        public IHttpActionResult Post([FromBody] List <CustomProjectGroup> customProjectGroups, int customGroupId, int projectGroupId)
        {
            CustomProjectGroupRepository customProjectGroupRepository = new CustomProjectGroupRepository(Convert.ToInt32(Request.Headers.GetValues("CurrentUserID").First()));

            customProjectGroupRepository.SaveCustomProjectGroups(customProjectGroups, customGroupId, projectGroupId);
            return(Json(new { count = customProjectGroups.Count.ToString() }));
        }