// Assignation des budget public ActionResult GestionBudget() { CComptable comptable = new CComptable(); ViewBag.listeDesPostes = comptable.ConsulterListePoste(); return(View()); }
// GET: Comptable public ActionResult Index() { CFestival festival = new CFestival(); festival.InfoFestival(); CComptable comptable = new CComptable(); ViewBag.budgetTotalDisponible = comptable.ConsultertotalDisponible(); return(View(festival)); }
public ActionResult Index(string email, string pass) { CPersonnel p = new CPersonnel(); object user = p.Connexion(email, pass); if (p.Role == "Admin") { CAdministrateur admin = (CAdministrateur)user; Session["user"] = admin; return(Redirect("GestionPoste")); } else if (p.Role == "Comptable") { CComptable comp = (CComptable)user; Session["user"] = comp; return(Redirect("Comptable")); } else if (p.Role == "Responsable") { CResponsable resp = (CResponsable)user; Session["user"] = resp; return(Redirect("Responsable")); } else if (p.Role == "Participant") { CParticipant part = (CParticipant)user; Session["user"] = part; return(Redirect("Participant")); } else if (p.Role == "Personnel") { Session["user"] = p; return(Redirect("Personnel")); } return(Redirect("Login?error=Login ou mot de passe incorrect")); }
public ActionResult UpdateBudget(int id, string budget) { double montant; CComptable comptable = new CComptable(); bool result = double.TryParse(budget, out montant); if (result && montant > 0) { ViewBag.message = "Budget confirmé"; comptable.AllouerBudget(id, montant); } else { ViewBag.message = "Veuillez entrer une valeur correcte"; } ViewBag.listeDesPostes = comptable.ConsulterListePoste(); return(View("GestionBudget")); }
public ActionResult DemandeDeBudget(int idDemande, double budget, int idPers) { CComptable comptable = new CComptable(); if (idPers != 0) { comptable.AccepterDemandeBudget(idPers, budget, idDemande); ViewBag.message = "La demande a été acceptée"; } else { comptable.RefuserDemandeBudget(idDemande); ViewBag.message = "La demande a été refusée"; } listDemande listDemande = new listDemande(); ViewBag.listeDemande = listDemande.GetList(); return(View("GestionDemande")); }