Exemple #1
0
        public PartialViewResult AddFormPartial()
        {
            CategoryShortInfoResponse response1 = WebApiOperation.SendPost <int, CategoryShortInfoResponse>(Constants.PRODUCT_API_BASE_URI, Constants.PRODUCT_API_GET_CATEGORY_SHORT_INFO, 1);

            ViewData["shortInfoCategories"] = response1.CategoryShortInfos;

            return(PartialView("_PartialAddCategory"));
        }
Exemple #2
0
        public IActionResult GetCategoryBranch([FromBody] int ID)
        {
            CategoryShortInfoResponse response = new CategoryShortInfoResponse();

            try
            {
                response.CategoryShortInfos = _service.GetCategoryBranch(ID);
                response.SetStatus(Constants.ResponseCode.SUCCESS);
            }
            catch (Exception ex)
            {
                response.SetStatus(Constants.ResponseCode.SYSTEM_ERROR, ex.Message);
            }
            return(response.Code != (int)Constants.ResponseCode.SUCCESS ? StatusCode(500, response) : StatusCode(200, response));
        }
Exemple #3
0
        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));
        }
Exemple #4
0
        public JsonResult GetCategoryShortInfo()
        {
            CategoryShortInfoResponse response = WebApiOperation.SendPost <int, CategoryShortInfoResponse>(Constants.PRODUCT_API_BASE_URI, Constants.PRODUCT_API_GET_CATEGORY_SHORT_INFO, 1);

            return(Json(response));
        }