public IActionResult Delete(Seller seller) { var result = _sellerService.Delete(seller); if (result.Success) { return(Ok(result)); } return(BadRequest(result)); }
public IActionResult DeleteSeller(int id) { var Seller = service.FindById(id); if (Seller == null) { return(NotFound()); } service.Delete(Seller); return(Ok()); }
public ActionResult Delete(int id) { try { _sellerService.Delete(_sellerService.GetById(id)); SuccessNotification("Kayıt Silindi"); return(RedirectToAction("SellerIndex")); } catch { return(View()); } }
private void label13_Click(object sender, EventArgs e) { if (sellerService == null) { if (MessageBox.Show("Your can't undo your action. Are you sure you want to delete your account ?", "Winkel", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { customerService.Delete(new Contracts.Request.Customer.CustomerDeleteRequest(customer.CustomerID)); Application.Restart(); } } else { if (MessageBox.Show("Your can't undo your action. Are you sure you want to delete your account ?", "Winkel", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { sellerService.Delete(new Contracts.Request.Seller.SellerDeleteRequest(seller.SellerID)); Application.Restart(); } } }
public IActionResult Delete(int id) { return(Ok(_sellerService.Delete(id))); }