public ActionResult ShowGroupPostingForm(int wallId, bool onlyImage, int groupId) { InputPostDto newPost = new InputPostDto(); newPost.WallId = wallId; newPost.OnlyImage = onlyImage; UserDto user = (UserDto)Session["session"]; GroupRoles role = groupService.GetUserRoleInGroup(user.Id, groupId); ViewData["role"] = role; return(PartialView("GroupPostingForm", newPost)); }
public ActionResult ShowGroupPage(int groupId) { int userId = ((UserDto)Session["session"]).Id; GroupDto groupDto = groupService.GetGroupDtoById(groupId, userId); ViewData["mainWallId"] = groupService.GetGroupMainWallId(groupId); GroupRoles role = groupService.GetUserRoleInGroup(userId, groupId); ViewData["role"] = role; ViewData["groupId"] = groupId; ViewData["requestIsSent"] = groupService.CheckRequest(userId, groupId); return(View("GroupPage", groupDto)); }