Example #1
0
 public ActionResult Index()
 {
     try
     {
         return(View(_appointmentsRepo.GetAppointments(ApplicationHelper.LoggedUser.Id, ApplicationHelper.LoggedUser.RoleId)));
     }
     catch (Exception e)
     {
         return(HttpNotFound());
     }
 }
        private void init()
        {
            _appointmentsRepository = new AppointmentsRepository();
            _allAppointments        = new ObservableCollection <AppointmentViewModel>();

            if (_appointmentsRepository == null)
            {
                throw new ArgumentNullException("Problem with fetching Data From Database");
            }

            this.createObservableAppointmentsFromList(_appointmentsRepository.GetAppointments(_allAppointmentsQuery));
        }
        public BsJsonResult GetEvents()
        {
            var userData = Session["UserData"] as UserData;

            var currentAppointments = _appointmentsRepository.GetAppointments(userData).Appointments;

            var events = _appointmentsRepository.ConvertAppointmentsToEvents(currentAppointments);

            return(new BsJsonResult(new
            {
                Events = events
            }));
        }
 public List <Appointment> GetAppointments()
 {
     return(_repository.GetAppointments());
 }