Beispiel #1
0
        public ActionResult Acceptance(GroupAcceptanceDTO dto)
        {
            var svc = GetGroupService();
            var rao = new GroupAcceptanceRAO
            {
                GroupMemberId = dto.GroupMemberId,
                GroupId       = dto.GroupId,
                Accepted      = dto.Accepted
            };

            if (svc.Acceptance(rao))
            {
                return(RedirectToAction("Index", new { id = dto.GroupId }));
            }

            TempData["FailResult"] = "Cannot accept applicant.";
            return(RedirectToAction("Index", new { id = dto.GroupId }));
        }
Beispiel #2
0
        public IHttpActionResult AcceptApplicant(GroupAcceptanceDTO dto)
        {
            var service = GetGroupService();

            var rao = new GroupAcceptanceRAO
            {
                Accepted      = true,
                GroupId       = dto.GroupId,
                GroupMemberId = dto.GroupMemberId
            };

            if (service.Acceptance(rao))
            {
                return(Ok());
            }
            else
            {
                return(BadRequest());
            }
        }