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

            var result = await _supplierApiClient.Delete(request.Supplier_ID);

            if (result.IsSuccessed)
            {
                TempData["result"] = "Xóa nhà sản xuất thành công";
                return(RedirectToAction("Index"));
            }

            ModelState.AddModelError("", result.Message);
            return(View(request));
        }
Beispiel #2
0
        public async Task <ApiResult <bool> > Delete(int id)
        {
            var data = await _supplierApiClient.Delete(id);

            return(data);
        }