Ejemplo n.º 1
0
 public ActionResult Delete(string id)
 {
     try
     {
         _carrierService.Delete(id);
         TempData["AlertSuccess"] = "Operation Done!";
     }
     catch (Exception e)
     {
         this.ModelState.AddModelError("CustomError", e.Message);
     }
     return(RedirectToAction("Index"));
 }
Ejemplo n.º 2
0
        public IActionResult DeleteConfirmed(int id)
        {
            log.Info(nameof(DeleteConfirmed) + ":Post");

            try
            {
                carrierService.Delete(id);
            }
            catch (Exception e)
            {
                log.Error(e);

                return(BadRequest());
            }

            return(RedirectToAction(nameof(Index)));
        }
Ejemplo n.º 3
0
 public bool Delete(int id)
 {
     return(_carrierService.Delete(id));
 }
Ejemplo n.º 4
0
 public bool Delete(Guid CarrierId)
 {
     return(CarrierService.Delete(EmployeeEntity, CarrierId));
 }