コード例 #1
0
        public ActionResult List()
        {
            var vr    = new ViaggioRepository();
            var model = vr.GetUnapproved();

            return(View(model));
        }
コード例 #2
0
        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()));
        }
コード例 #3
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));
        }