public async Task <ActionResult> RetirerEmploye(int offreId, FormCollection collection) { try { await manager.DeletePostulationAsync(offreId, EmployeConnecte.GetInstance().Id); } catch (Exception) { // Alerte } return(RedirectToAction("Details")); }
public async Task <ActionResult> AjouterEmploye(int offreId, FormCollection collection) { try { await manager.CreatePostulationAsync(offreId, EmployeConnecte.GetInstance().Id); } catch (EntityNotFoundException) { // Alerte } catch (EntityAlreadyExistException) { // Alerte } return(RedirectToAction("Details")); }