/// <summary> /// 得到自己的留言列表 /// </summary> /// <returns></returns> public ActionResult GetGuestGrid(PageDto pag) { int? userId = Op.CurrentUser.UserId; DataGrid dg = _guestBookRepository.GetDataGrid(u => u.CreatorUserId == userId, pag, ""); return(Result(dg)); }
public ActionResult GetAduitDataGrid(PageDto pag, string search = "") { if (pag.Sort.IsNullOrEmpty()) { pag.Sort = "Id"; } if (pag.Order.IsNullOrEmpty()) { pag.Order = "desc"; } if (pag.Limit > 20) { pag.Limit = 10; } return(Result(_guestBookRepository.GetDataGrid(u => u.IsAduit == true, pag, search))); }
/// <summary> /// 留言互动页面 /// </summary> /// <returns></returns> public ActionResult GuestBook() { PageDto pag = new PageDto { Sort = "Id", Order = "desc", Limit = 10, Offset = 0 }; DataGrid dg = _gusetbookRepository.GetDataGrid(u => u.IsAduit == true, pag, ""); ViewBag.ViewModel = dg.ToJson(); return(View()); }