Пример #1
0
        public IActionResult Delete(Seller seller)
        {
            var result = _sellerService.Delete(seller);

            if (result.Success)
            {
                return(Ok(result));
            }
            return(BadRequest(result));
        }
Пример #2
0
        public IActionResult DeleteSeller(int id)
        {
            var Seller = service.FindById(id);

            if (Seller == null)
            {
                return(NotFound());
            }

            service.Delete(Seller);
            return(Ok());
        }
Пример #3
0
 public ActionResult Delete(int id)
 {
     try
     {
         _sellerService.Delete(_sellerService.GetById(id));
         SuccessNotification("Kayıt Silindi");
         return(RedirectToAction("SellerIndex"));
     }
     catch
     {
         return(View());
     }
 }
Пример #4
0
 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();
         }
     }
 }
Пример #5
0
 public IActionResult Delete(int id)
 {
     return(Ok(_sellerService.Delete(id)));
 }