public ActionResult Index() { AssignUserInfo(); QL_PHONGHOPBusiness = Get <QL_PHONGHOPBusiness>(); var data = QL_PHONGHOPBusiness.GetDaTaByPage(currentUser.DeptParentID, null); SessionManager.SetValue("TimKiemPhong", null); return(View(data)); }
public JsonResult searchData(FormCollection form) { AssignUserInfo(); QL_PHONGHOPBusiness = Get <QL_PHONGHOPBusiness>(); var searchModel = SessionManager.GetValue("TimKiemPhong") as QLPHONGHOP_SEARCHBO; if (searchModel == null) { searchModel = new QLPHONGHOP_SEARCHBO(); searchModel.pageSize = 20; } searchModel.TenPhong = form["sea_TenPhong"]; searchModel.MaPhong = form["sea_MaPhong"];; SessionManager.SetValue("TimKiemPhong", searchModel); var data = QL_PHONGHOPBusiness.GetDaTaByPage(currentUser.DeptParentID, searchModel, searchModel.pageSize, 1); return(Json(data)); }
public JsonResult getData(int indexPage, string sortQuery, int pageSize) { AssignUserInfo(); QL_PHONGHOPBusiness = Get <QL_PHONGHOPBusiness>(); var searchModel = SessionManager.GetValue("TimKiemPhong") as QLPHONGHOP_SEARCHBO; if (!string.IsNullOrEmpty(sortQuery)) { if (searchModel == null) { searchModel = new QLPHONGHOP_SEARCHBO(); } searchModel.sortQuery = sortQuery; if (pageSize > 0) { searchModel.pageSize = pageSize; } SessionManager.SetValue("TimKiemPhong", searchModel); } var data = QL_PHONGHOPBusiness.GetDaTaByPage(currentUser.DeptParentID, searchModel, pageSize, indexPage); return(Json(data)); }