public PartialViewResult UpdateFormPartial(int id) { CategoryShortInfoResponse response1 = WebApiOperation.SendPost <int, CategoryShortInfoResponse>(Constants.PRODUCT_API_BASE_URI, Constants.PRODUCT_API_GET_CATEGORY_SHORT_INFO, 1); ViewData["shortInfoCategories"] = response1.CategoryShortInfos; if (id == 0) { return(PartialView("_PartialUpdateCategory", null)); } CategoryDetailModelResponse response = WebApiOperation.SendPost <int, CategoryDetailModelResponse>(Constants.PRODUCT_API_BASE_URI, Constants.PRODUCT_API_GETBYID_CATEGORY, id); return(PartialView("_PartialUpdateCategory", response.Category)); }
public JsonResult GetCategoryByID(int id) { CategoryDetailModelResponse response = WebApiOperation.SendPost <int, CategoryDetailModelResponse>(Constants.PRODUCT_API_BASE_URI, Constants.PRODUCT_API_GETBYID_CATEGORY, id); return(Json(response)); }