public async Task <IActionResult> Index(int hocKy, int namHoc, int pageIndex = 1, int pageSize = 1000) { if (TempData["result"] != null) { ViewBag.SuccessMessage = TempData["result"]; } var request = new LopHocPhanManagePagingRequest() { HocKy = hocKy, NamHoc = namHoc, PageIndex = pageIndex, PageSize = pageSize }; var data = await _lopHocPhanApiClient.GetSchedule(request); ViewBag.HocKy = hocKy; ViewBag.NamHoc = namHoc; var requestRoom = new PhongManagePagingRequest() { PageIndex = 1, PageSize = 1000 }; var rooms = await _phongApiClient.GetAllPaging(requestRoom); int RoomCount = rooms.Items.Count(); ViewBag.Rooms = rooms.Items; ViewBag.RoomCount = RoomCount; return(View(data)); }
public async Task <IActionResult> Index(string keyword, int pageIndex = 1, int pageSize = 10) { var request = new PhongManagePagingRequest() { Keyword = keyword, PageIndex = pageIndex, PageSize = pageSize }; var data = await _phongApiClient.GetAllPaging(request); ViewBag.Keyword = keyword; if (TempData["result"] != null) { ViewBag.SuccessMessage = TempData["result"]; } return(View(data)); }