Example #1
0
        public ActionResult AtualizarAgendamento(CalendarEvent evento)
        {
            Agenda agendaAtualizar = agendaRepositorio.SelecionarPorId(evento.id);
            agendaAtualizar.Paciente.Nome = evento.title;

            agendaRepositorio.Atualizar(agendaAtualizar);
            return View("Index", agendaRepositorio.SelecionarTodos());
        }
Example #2
0
        public JsonResult ObterEventos(double start, double end)
        {
            IList<CalendarEvent> eventos =  new List<CalendarEvent>();
            CalendarEvent evento ;

            foreach (Agenda agenda in agendaRepositorio.SelecionarTodos())
            {
                evento = new CalendarEvent();
                evento.id = agenda.Id;
                evento.title = agenda.Paciente.Nome;
                evento.description = agenda.Paciente.Nome + " - " + agenda.Especialidade.Nome;
                evento.start = ToUnixTimespan(agenda.DataInicio).ToString();
                evento.end = ToUnixTimespan(agenda.DataFim).ToString()  ;
                evento.allDay = false;
                evento.resourceId = agenda.Medico.Id;
                //evento.url = "";
                eventos.Add(evento);
            }

            return Json(eventos.ToArray(),JsonRequestBehavior.AllowGet);
        }
Example #3
0
 public ActionResult InserirAgendamento(CalendarEvent evento)
 {
     agendaRepositorio.Inserir(agendaRepositorio.SelecionarPorId(evento.id));
      return View("Index", agendaRepositorio.SelecionarTodos());
 }