public ActionResult Index() { DM_VAITROBusiness = Get <DM_VAITROBusiness>(); var searchmodel = new DM_VAITRO_SEARCHBO(); SessionManager.SetValue("dmvaitroSearchModel", null); var data = DM_VAITROBusiness.GetDaTaByPage(null); return(View(data)); }
public JsonResult searchData(FormCollection form) { DM_VAITROBusiness = Get <DM_VAITROBusiness>(); var searchModel = SessionManager.GetValue("dmvaitroSearchModel") as DM_VAITRO_SEARCHBO; if (searchModel == null) { searchModel = new DM_VAITRO_SEARCHBO(); searchModel.pageSize = 20; } searchModel.QR_MA = form["QR_MA"]; searchModel.QR_VAITRO = form["QR_VAITRO"]; SessionManager.SetValue("dmvaitroSearchModel", searchModel); var data = DM_VAITROBusiness.GetDaTaByPage(searchModel, 1, searchModel.pageSize); return(Json(data)); }
public JsonResult getData(int indexPage, string sortQuery, int pageSize) { DM_VAITROBusiness = Get <DM_VAITROBusiness>(); var searchModel = SessionManager.GetValue("dmvaitroSearchModel") as DM_VAITRO_SEARCHBO; if (!string.IsNullOrEmpty(sortQuery)) { if (searchModel == null) { searchModel = new DM_VAITRO_SEARCHBO(); } searchModel.sortQuery = sortQuery; if (pageSize > 0) { searchModel.pageSize = pageSize; } SessionManager.SetValue("dmvaitroSearchModel", searchModel); } var data = DM_VAITROBusiness.GetDaTaByPage(searchModel, indexPage, pageSize); return(Json(data)); }