public async Task <ActionResult> GetAll() { string apiUrl = _appUrlHelper.GetApiUrl(ApiUrlPath.STORAGE_DEVICE_GET_ALL); var result = await HttpUtilities.GetAsyncApi <ReturnResult <StorageDevice> >(apiUrl); return(Json(result)); }
public async Task <ActionResult> GetAll() { string apiUrl = _appUrlHelper.GetApiUrl(ApiUrlPath.MONITOR_GET_ALL); var result = await HttpUtilities.GetAsyncApi <ReturnResult <Monitor> >(apiUrl); return(Json(result)); }
public async Task <ActionResult> GetAll() { string apiUrl = _appUrlHelper.GetApiUrl(ApiUrlPath.KEYBOARD_GET_ALL); var result = await HttpUtilities.GetAsyncApi <ReturnResult <Keyboard> >(apiUrl); return(Json(result)); }
public async Task <ActionResult> GetAll() { string apiUrl = _appUrlHelper.GetApiUrl(ApiUrlPath.OPTICAL_DISC_GET_ALL); var result = await HttpUtilities.GetAsyncApi <ReturnResult <OpticalDisc> >(apiUrl); return(Json(result)); }
public async Task <ActionResult> StudySchedulePaging(BaseCondition <StudySchedule> condition) { string apiUrl = _appUrlHelper.GetApiUrl(ApiUrlPath.STUDY_SCHEDULE_GET_PAGING); var result = await HttpUtilities.PostAsyncApi <ReturnResult <StudySchedule> >(apiUrl, JsonConvert.SerializeObject(condition)); ViewBag.PAGE_INDEX = condition.PAGE_INDEX; ViewBag.PAGE_SIZE = condition.PAGE_SIZE; ViewBag.StudyScheduleList = JsonConvert.SerializeObject(result.ItemList); ViewBag.ExistingStudySchedule = JsonConvert.SerializeObject(result.ItemList.Where(x => (x.EndDate >= DateTime.Now) && (x.Status == 1))); return(View(result)); }
public async Task <ActionResult> ComputerRoomPaging(BaseCondition <ComputerRoom> condition) { string apiUrl = _appUrlHelper.GetApiUrl(ApiUrlPath.COMPUTER_ROOM_GET_PAGING); var result = await HttpUtilities.PostAsyncApi <ReturnResult <ComputerRoom> >(apiUrl, JsonConvert.SerializeObject(condition)); ViewBag.PAGE_INDEX = condition.PAGE_INDEX; ViewBag.PAGE_SIZE = condition.PAGE_SIZE; return(View(result)); }
public async Task <ActionResult> EmployeePaging(BaseCondition <Employee> condition) { string apiUrl = _appUrlHelper.GetApiUrl(ApiUrlPath.EMPLOYEE_GET_PAGING); var result = await HttpUtilities.PostAsyncApi <ReturnResult <Employee> >(apiUrl, JsonConvert.SerializeObject(condition)); ViewBag.PAGE_INDEX = condition.PAGE_INDEX; ViewBag.PAGE_SIZE = condition.PAGE_SIZE; return(View(result)); }
public async Task <IActionResult> GetPagingByComputerId(BaseCondition <Computer> condition, int computerRoomId) { string apiUrl = _appUrlHelper.GetApiUrl(string.Format(ApiUrlPath.COMPUTER_GET_PAGING_BY_ROOM_ID, computerRoomId)); var result = await HttpUtilities.PostAsyncApi <ReturnResult <Computer> >(apiUrl, JsonConvert.SerializeObject(condition)); ViewBag.PAGE_INDEX = condition.PAGE_INDEX; ViewBag.PAGE_SIZE = condition.PAGE_SIZE; ComputerRoomId = computerRoomId; ViewBag.ComputerRoomId = computerRoomId; return(View("ComputerPagingByComputerRoom", result)); }
public async Task <ActionResult> ClassPaging(BaseCondition <Class> condition) { if (_userSessionHelper.GetUserSession().IsUserLoggedIn) { string apiUrl = _appUrlHelper.GetApiUrl(ApiUrlPath.CLASS_GET_PAGING); var result = await HttpUtilities.PostAsyncApi <ReturnResult <Class> >(apiUrl, JsonConvert.SerializeObject(condition)); ViewBag.PAGE_INDEX = condition.PAGE_INDEX; ViewBag.PAGE_SIZE = condition.PAGE_SIZE; return(View(result)); } else { return(RedirectToAction("Index", "Account")); } }