private int GetUserAccessFlageByUserandForumID(ForumUser user, int forumID)
 {
     if (gms.GetUserGroup(user.Id).Count != 0)
     {
         int user_group_ID      = gms.GetGroupMemberByUserID(user.Id).GroupId;
         int user_AccessMask_ID = fas.GetForumAccess(forumID, user_group_ID).AccessMaskId;
         int user_AccessFlag    = ams.GetAccessMaskbyID(user_AccessMask_ID).AccessFlag;
         return(user_AccessFlag);
     }
     return(0);
 }
        public ActionResult Update(int id)
        {
            ForumUserManager   fum  = new ForumUserManager();
            GroupMemberService gms  = new GroupMemberService();
            ForumUser          user = fum.GetForumUser(id);
            //Add drop down list
            Dictionary <int, string> userGroupList = new UserGroupNameCollection().GetGroupNameDicList();
            List <SelectListItem>    dropDownList  = new List <SelectListItem>();

            dropDownList.Add(new SelectListItem {
                Text = "-- Select One--", Value = "0"
            });
            foreach (KeyValuePair <int, string> group in userGroupList)
            {
                dropDownList.Add(new SelectListItem {
                    Text = group.Value, Value = group.Key.ToString()
                });
            }

            ViewBag.UserGroupList = gms.GetUserGroup(id);
            ViewBag.groupList     = dropDownList;
            return(View(user));
        }