public ActionResult AddGroup(GroupViewModel vm)
        {
            Group group = new Group
            {
                Active = 1,
                Created = DateTime.Now,
                OwnerId = Convert.ToInt32(GetSUD()),
                Title = vm.Title
            };

            Rep.AddGroup(group);
            Rep.Save();

            foreach (var member in vm.AccessList.Where(e => e.Selected))
            {
                GroupMember gm = new GroupMember
                {
                    AccountId = Convert.ToInt32(member.SimpleId),
                    Active = 1,
                    Created = DateTime.Now,
                    GroupId = group.Id
                };

                Rep.AddGroupMember(gm);
            }

            Rep.Save();

            return RedirectToAction("Index");
        }
 public ActionResult AddGroup()
 {
     GroupViewModel vm = new GroupViewModel();
     vm.AccessList = GetFriendInfo().Result;
     return View("AddGroup", vm);
 }