public void OnPost() { AvailableWeekDays = Weekdays; string day = Request.Query["day"]; RequestedStandingTeeTimeRequests = _requestDirector.FindStandingTeeTimeRequests(day); }
public void OnGet() { string dayOfWeek = Request.Query["day"]; var time = DateTime.Parse(Request.Query["time"]); StandingTeeTimeRequests = _requestDirector.FindStandingTeeTimeRequests(dayOfWeek); foreach (var standingTeeTimeRequest in StandingTeeTimeRequests.Where(standingTeeTimeRequest => standingTeeTimeRequest.DayOfWeek == dayOfWeek && standingTeeTimeRequest.Time.ToString("hh:mm tt") == time.ToString("hh:mm tt"))) { InputtedShareholder1 = standingTeeTimeRequest.Shareholder1.FullName; InputtedShareholder2 = standingTeeTimeRequest.Shareholder2.FullName; InputtedShareholder3 = standingTeeTimeRequest.Shareholder3.FullName; InputtedShareholder4 = standingTeeTimeRequest.Shareholder4.FullName; InputtedStartDate = standingTeeTimeRequest.StartDate; InputtedEndDate = standingTeeTimeRequest.EndDate; _selectedStandingTeeTimeRequest = standingTeeTimeRequest; } }