public ActionResult Articles() { int totalRecords = 0; int pageSize = 10; var model = new BootBaronLib.AppSpec.DasKlub.BOL.UserContent.Contents(); if (string.IsNullOrEmpty(Request.QueryString[SiteEnums.QueryStringNames.pg.ToString()])) { totalRecords = model.GetContentPageWiseAll(1, pageSize); } else { int pageNumber = Convert.ToInt32(Request.QueryString[SiteEnums.QueryStringNames.pg.ToString()]); totalRecords = model.GetContentPageWiseAll(pageNumber, pageSize); } ViewBag.PageCount = (totalRecords + pageSize - 1) / pageSize; return View(model); }
public ActionResult Articles() { mu = Membership.GetUser(); int totalRecords = 0; int pageSize = 10; var model = new BootBaronLib.AppSpec.DasKlub.BOL.UserContent.Contents(); if (string.IsNullOrEmpty(Request.QueryString[SiteEnums.QueryStringNames.pg.ToString()])) { //totalRecords = model.GetContentForUser(Convert.ToInt32(mu.ProviderUserKey)); model.Sort(delegate(Content p1, Content p2) { return p2.ReleaseDate.CompareTo(p1.ReleaseDate); }); } else { int pageNumber = Convert.ToInt32(Request.QueryString[SiteEnums.QueryStringNames.pg.ToString()]); totalRecords = model.GetContentPageWiseAll(pageNumber, pageSize); } ViewBag.PageCount = (totalRecords + pageSize - 1) / pageSize; return View(model); }
public JsonResult Items(int pageNumber) { var model = new BootBaronLib.AppSpec.DasKlub.BOL.UserContent.Contents(); model.GetContentPageWiseAll(pageNumber, pageSize ); StringBuilder sb = new StringBuilder(); foreach (BootBaronLib.AppSpec.DasKlub.BOL.UserContent.Content cnt in model) { sb.Append(cnt.ToUnorderdListItem); } return Json(new { ListItems = sb.ToString() }); }
public ActionResult Index() { var model = new BootBaronLib.AppSpec.DasKlub.BOL.UserContent.Contents(); //model.GetContentPageWise(1, pageSize, Utilities.GetCurrentLanguageCode()); model.GetContentPageWiseAll(1, pageSize); LoadTagCloud(); LoadLang(); return View(model); }