コード例 #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"));
 }
コード例 #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)));
        }
コード例 #3
0
 public bool Delete(int id)
 {
     return(_carrierService.Delete(id));
 }
コード例 #4
0
 public bool Delete(Guid CarrierId)
 {
     return(CarrierService.Delete(EmployeeEntity, CarrierId));
 }