// GET: PlanningBySalle
        public ActionResult Index(string date, string salle)
        {
            ReservationListeModel listModelIndex = new ReservationListeModel();

            listModelIndex = getPlanningBySalle(date, salle);
            return(View(listModelIndex));
        }
Пример #2
0
        // GET: Planning
        public ActionResult Index()
        {
            List <IndexViewModelPlanning> ListViewModel = new List <IndexViewModelPlanning>();
            ReservationListeModel         listModel     = new ReservationListeModel();

            ListViewModel          = initModelPlanning();
            listModel.Reservations = ListViewModel.ToList();
            return(View(listModel));
        }
        public ReservationListeModel getPlanningBySalle(string date, string salle)
        {
            List <IndexViewModelPlanning> ListViewModel        = new List <IndexViewModelPlanning>();
            List <IndexViewModelPlanning> ListViewModelFiltrer = new List <IndexViewModelPlanning>();
            ReservationListeModel         listModel            = new ReservationListeModel();

            ListViewModel = initModelPlanning(date, salle);
            foreach (var item in ListViewModel)
            {
                if (item.DATE == Convert.ToDateTime(date) && item.SALLE.Split('*')[0] == salle)
                {
                    ListViewModelFiltrer.Add(item);
                }
            }
            listModel.Reservations = ListViewModelFiltrer.ToList();
            //return View();
            return(listModel);//, viewmodelReservation
        }
Пример #4
0
        public ActionResult getPlanning(string selectedDate)
        {
            List <IndexViewModelPlanning> ListViewModel        = new List <IndexViewModelPlanning>();
            List <IndexViewModelPlanning> ListViewModelFiltrer = new List <IndexViewModelPlanning>();
            ReservationListeModel         listModel            = new ReservationListeModel();

            ListViewModel = initModelPlanning();
            foreach (var item in ListViewModel)
            {
                if (item.DATE == Convert.ToDateTime(selectedDate))
                {
                    ListViewModelFiltrer.Add(item);
                }
            }
            listModel.Reservations = ListViewModelFiltrer.ToList();
            //return View();
            return(PartialView("_ConsultationPlanning", listModel));//, viewmodelReservation
        }