Beispiel #1
0
        public async Task <IActionResult> Create(SupplierCreateRequest request)
        {
            if (!ModelState.IsValid)
            {
                return(View());
            }

            var result = await _supplierApiClient.Create(request);

            if (result.IsSuccessed)
            {
                //TempData["result"] = "Thêm mới nhà sản xuất thành công";
                return(RedirectToAction("Index"));
            }

            //ModelState.AddModelError("", result.Message);
            return(View());
        }
Beispiel #2
0
        public async Task <ApiResult <GetByIdListSupplier> > Create(SupplierCreate bundle)
        {
            var result = await _supplierApiClient.Create(bundle);

            return(result);
        }