public ActionResult DeletePartner(int partnerId) { Partner deletedPartner = repository5.DeletePartner(partnerId); if (deletedPartner != null) { TempData["message"] = string.Format("Usunięto {0}", deletedPartner.Name); } return(RedirectToAction("Partner")); }
public IActionResult Delete(int id) { Partner abs = _PartnerRepository.GetPartnerById(id); if (abs == null) { return(NotFound()); } _PartnerRepository.DeletePartner(abs); return(RedirectToAction("index")); }
public void DeletePartner(PartnerDTO dto) { try { log.Debug(PartnerDTO.FormatPartnerDTO(dto)); R_Partner t = PartnerDTO.ConvertDTOtoEntity(dto); // delete Repository.DeletePartner(t); dto.IsDeleted = t.IsDeleted; log.Debug("result: 'success'"); } catch (System.Exception e) { // error log.Error(e.ToString()); throw; } }
public ActionResult DeleteConfirmed(int id) { try { _partnerRepository.DeletePartner(id); return(RedirectToAction("Index")); } catch (Exception ex) { ViewBag.Error = ex.Message; return(View("Error")); } }
public bool DeletePartner(System.Int32 PartnerId) { return(_iPartnerRepository.DeletePartner(PartnerId)); }