internal TimeSpan getTimeRemaining(ServiceReference1.Booking booking) { DateTime dateNow = DateTime.Now; TimeSpan time = dateNow - booking.BookingEnd; TimeSpan returnTime = new TimeSpan(Math.Abs(time.Hours), Math.Abs(time.Minutes), Math.Abs(time.Seconds)); return(returnTime); }
internal TimeSpan getTimeToBooking(ServiceReference1.Booking booking) { if (booking != null) { DateTime now = DateTime.Now; return(now - booking.BookingStart); } else { return(new TimeSpan(2, 0, 0)); } }