public ActionResult ConfirmedDelete() { var user = Session["UsuarioLogado"].ToString(); var institution = institutionService.GetByUserEmail(user); institutionService.Delete(institution.InstitutionId); Session["UsuarioLogado"] = null; return(View()); }
public object Delete(string id, string destinationInstitutionId = null) { var inst = instService.GetById(id); if (!string.IsNullOrEmpty(destinationInstitutionId)) { var destInstitution = instService.GetById(destinationInstitutionId); inst.Proposals.ToList().ForEach(i => i.Institution = destInstitution); } instService.Delete(inst); instService.Save(); return(new { }); }
public IHttpActionResult Delete(MasterInstitution data) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } try { _institutionService.Delete(data); return(Ok()); } catch (Exception ex) { return(BadRequest(ex.Message)); } }
public void Delete(long id) { _uow.BeginTransaction(); _institutionService.Delete(id); _uow.Commit(); }
public async Task <ActionResponse <InstitutionDto> > Delete([FromBody] SimpleRequestBase request) { return(await institutionService.Delete(request.Id)); }
public async Task <bool> Delete([FromBody] Institution institution) { return(await institutionService.Delete(institution)); }