public ActionResult TalkNowReSchedule(Guid bookingId) { var booking = Services.Booking.GetById(bookingId); var model = new BookingDeferAndReSchedule(); if (booking != null) { int addedDate = booking.Deferral == 1440 ? 1 : 2; var maximumLeadTime = Services.SystemConfig.GetValueByKey(ParamatricBusinessRules.MAXIMUM_LEAD_TIME.ToString()); model = new BookingDeferAndReSchedule { BookingId = booking.Id, FirstName = booking.Specialist.FirstName, LastName = booking.Specialist.LastName, Name = booking.Specialist.Name, DateReschedule = DateTime.Now.AddDays(addedDate).ToString(Constants.GlobalDateFormat), StartTimeReschedule = booking.StartTime.HasValue ? booking.StartTime.Value.ToString("hh:mm") : DateTime.Now.ToString("hh:mm"), EndTimeReschedule = booking.StartTime.HasValue ? booking.StartTime.Value.ToString("hh:mm") : DateTime.Now.ToString("hh:mm"), MinutesDefer = booking.Deferral }; } return PartialView("/Areas/My/Views/Shared/_TalkNowReSchedule.cshtml", model); }
public ActionResult TalkNowDefer(Guid bookingId) { var booking = Services.Booking.GetById(bookingId); var model = new BookingDeferAndReSchedule(); if (booking != null) { model = new BookingDeferAndReSchedule { BookingId = booking.Id, FirstName = booking.Specialist.FirstName, LastName = booking.Specialist.LastName, Name = booking.Specialist.Name, MinutesDefer = (int)booking.Deferral }; } return PartialView("/Areas/My/Views/Shared/_TalkNowDefer.cshtml", model); }