Example #1
0
        public ActionResult SearchPostGroup(string postString, int groupId)
        {
            int         userConnectedId = Int32.Parse(Session["UserId"].ToString());
            KoombuBll   kBll            = new KoombuBll();
            var         postList        = kBll.SearchPost(postString, 0, groupId);
            GroupPostVm groupPostVm     = new GroupPostVm
            {
                PostList            = kBll.SetPostUserObject(postList),
                GroupMembersObjects = kBll.GroupMembersObjects(groupId),
                Group         = kBll.GetGroup(groupId),
                UserConnected = kBll.GetUser(userConnectedId)
            };

            return(View(groupPostVm));
        }
Example #2
0
        public ActionResult GroupWall(int groupId)
        {
            if (Session["UserName"] == null)
            {
                return(RedirectToAction("Error"));
            }

            int       userId = Int32.Parse(Session["UserId"].ToString());
            KoombuBll kBll   = new KoombuBll();

            GroupPostVm groupPostVm = new GroupPostVm();

            groupPostVm.PostList            = kBll.GetAllPostForGroup(groupId);
            groupPostVm.Group               = kBll.GetGroup(groupId);
            groupPostVm.UserConnected       = kBll.GetUser(userId);
            groupPostVm.GroupMembersObjects = kBll.GroupMembersObjects(groupId);
            return(View(groupPostVm));
        }