public JsonResult WallMessages(int pageNumber) { var sb = new StringBuilder(); if (Request.UrlReferrer != null) { string referrring = Request.UrlReferrer.ToString(); string[] partsOfreferring = referrring.Split('/'); var ua = new UserAccount(partsOfreferring[partsOfreferring.Length - 1]); var wallItems = new WallMessages(); wallItems.GetWallMessagessPageWise(pageNumber, 5, ua.UserAccountID); if (_mu != null && Convert.ToInt32(_mu.ProviderUserKey) == ua.UserAccountID) { wallItems.IsUsersWall = true; } foreach (WallMessage cnt in wallItems) { cnt.IsUsersWall = wallItems.IsUsersWall; sb.Append(cnt.ToUnorderdListItem); } } return Json(new { ListItems = sb.ToString() }); }
public JsonResult WallMessages(int pageNumber) { string referrring = Request.UrlReferrer.ToString(); string[] partsOfreferring = referrring.Split('/'); UserAccount ua = new UserAccount(partsOfreferring[partsOfreferring.Length - 1]); WallMessages wallItems = new WallMessages(); wallItems.GetWallMessagessPageWise(pageNumber, 5, ua.UserAccountID); MembershipUser mu = Membership.GetUser(); if (mu != null && Convert.ToInt32(mu.ProviderUserKey) == ua.UserAccountID) { wallItems.IsUsersWall = true; } StringBuilder sb = new StringBuilder(); foreach (BootBaronLib.AppSpec.DasKlub.BOL.WallMessage cnt in wallItems) { cnt.IsUsersWall = wallItems.IsUsersWall; sb.Append(cnt.ToUnorderdListItem); } return Json(new { ListItems = sb.ToString() }); }