public ActionResult List() { var vr = new ViaggioRepository(); var model = vr.GetUnapproved(); return(View(model)); }
public ActionResult ListMineNotApproved(int id) { var ar = new AgenziaRepository(); var agency = ar.GetById(id); var model = vr.GetUnapproved().Where(c => c.Agenzia.Id == agency.Id); return(View(model.ToList())); }
public ActionResult Confirm(int id) { var vr = new ViaggioRepository(); var trip = vr.GetById(id); trip.Approvato = true; trip.DataApprovazione = DateTime.Now; vr.Save(trip); var model = vr.GetUnapproved(); return(View("List", model)); }