// // GET: /SystemMaint/UserInfo/ public ActionResult Index(VM.UserInfoSearch search) { SetViewBage(); ViewBag.IsSortable = true; var model = new VM.UserInfoModel(); ViewBag.DisplayDate = BasicParam.DatetimeFormat; BL.UserInfo empBL = new BL.UserInfo(); model.List = empBL.GetItems(search); model.Search = search; if (Request.IsAjaxRequest()) { return(PartialView("_List", model.List)); } return(View(model)); }
public ActionResult GridView() { string json = Request.Params["searchModel"]; VM.UserInfoSearch searchModel = new VM.UserInfoSearch(); if (json != null) { try { searchModel = JsonConvert.DeserializeObject(json, typeof(VM.UserInfoSearch)) as VM.UserInfoSearch; } catch { return(Json("error", JsonRequestBehavior.AllowGet)); } } BL.UserInfo empBL = new BL.UserInfo(); var model = empBL.GetItems(searchModel); ViewBag.DisplayDate = BasicParam.DatetimeFormat; return(PartialView("_List", model)); }