Example #1
0
        public ActionResult ToggleViaggio(int idFlyer, int idViaggio)
        {
            var vr      = new ViaggioRepository();
            var viaggio = vr.GetById(idViaggio);
            var flyer   = fr.GetById(idFlyer);

            FlyerHelper.ToggleViaggio(flyer, viaggio);
            fr.Save(flyer);
            return(null);
        }
Example #2
0
        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));
        }
        public ActionResult Details(int id)
        {
            var model = vr.GetById(id);

            return(View(model));
        }