Esempio n. 1
0
        public async Task <PartialViewResult> PersonalSchedule(string displayDate)
        {
            var interviewScheduleViewModel = new InterviewScheduleViewModel(displayDate);

            var response = await this.GetHttpClient().GetAsync(String.Format("Interview?username={0}", User.Identity.Name));

            if (response.IsSuccessStatusCode)
            {
                interviewScheduleViewModel.Interviews.AddRange(Mapper.Map <List <Interview>, List <InterviewListViewModel> >(await response.Content.ReadAsAsync <List <Interview> >()));
            }

            return(PartialView("_PersonalSchedule", interviewScheduleViewModel));
        }
Esempio n. 2
0
        private async Task <InterviewScheduleViewModel> CreateModel(string start, string end)
        {
            var request = new GetAppointmentsRequest
            {
                Start = start,
                End   = end
            };

            var response = await _client.GetAppointments(request);

            var events = new List <EventObject>();
            int i      = 0;

            foreach (var app in response.Appointments)
            {
                events.Add(new EventObject
                {
                    title           = app.Subject,
                    start           = app.Start.ToString("o"),
                    end             = app.End.ToString("o"),
                    allDay          = false,
                    backgroundColor = "green"
                });

                response.Appointments.ElementAt(i).StartViewTime = response.Appointments.ElementAt(i).Start.ToString("t");
                response.Appointments.ElementAt(i).EndViewTime   = response.Appointments.ElementAt(i).End.ToString("t");
                i++;
            }
            var model = new InterviewScheduleViewModel
            {
                Appointments = response.Appointments,
                Events       = events,
                Start        = start,
                End          = end
            };

            return(model);
        }
Esempio n. 3
0
 public ActionResult SendFollowUpEmail(InterviewScheduleViewModel model)
 {
     return(RedirectToAction("Index"));
 }