public List <TeeTime> GetAvilableTeeTime(List <TeeTime> AvailableTeeTimeList, string Date) { TeeTimes TeeTImeManager = new TeeTimes(); List <TeeTime> AvailableTeeTime = TeeTImeManager.GetAvailableTeeTimeList(AvailableTeeTimeList, Date); return(AvailableTeeTime); }
protected void Search_Click(object sender, EventArgs e) { CustomPrincipal cp = (CustomPrincipal)HttpContext.Current.User; TeeTimes teeTimeMGR = new TeeTimes(); if (!cp.IsMember()) { int selectedMember; if (int.TryParse(MemberSelection.Text, out selectedMember)) { TeeTimesTable.DataSource = teeTimeMGR.GetTeeTimeByMemberAndDate(selectedMember, DatePicker.SelectedDate); TeeTimesTable.DataBind(); Message.Text = "Search executed"; } else { Message.Text = "Please select a valid member"; } } else { TeeTimesTable.DataSource = teeTimeMGR.GetTeeTimeByMemberAndDate(cp.GetId(), DatePicker.SelectedDate); TeeTimesTable.DataBind(); } }
protected void Search_Click(object sender, EventArgs e) { CustomPrincipal cp = (CustomPrincipal)HttpContext.Current.User; TeeTimes teeTimeMGR = new TeeTimes(); if (!cp.IsMember()) { int selectedMember; if (int.TryParse(MemberSelection.Text, out selectedMember)) { List <TeeTime> teeTimes = teeTimeMGR.GetTeeTimeByMember(selectedMember); TeeTimesTable.DataSource = teeTimes; MemberID.Text = selectedMember.ToString(); TeeTimesTable.DataBind(); carts.Text = teeTimes[0].Carts.ToString(); } else { Message.Text = "Please select a valid member"; } } else { TeeTimesTable.DataSource = teeTimeMGR.GetTeeTimeByMember(cp.GetId()); TeeTimesTable.DataBind(); } }
public DailyTeeTimeSheet GetBookedTeeTime(string MemberNumber, string Date, string TeeTime) { TeeTimes TeeTImeManager = new TeeTimes(); DailyTeeTimeSheet BookedTeeTime = TeeTImeManager.GetBookedTeeTime(MemberNumber, Date, TeeTime); return(BookedTeeTime); }
public TeeTime FindTeeTime(DateTime Date, TimeSpan time) { TeeTimes dataManager = new TeeTimes(); var teeTime = dataManager.FindTeeTime(Date, time); return(teeTime); }
public List <DailyTeeTimeSheet> GetDailyTeeTimeSheet(List <DailyTeeTimeSheet> InitialDailyTeeTimeSheet, string Date) { TeeTimes TeeTImeManager = new TeeTimes(); List <DailyTeeTimeSheet> DailyTeeSheet = TeeTImeManager.GetDailyTeeTimeSheet(InitialDailyTeeTimeSheet, Date); return(DailyTeeSheet); }
protected void Cancel_Command(object sender, CommandEventArgs e) { CustomPrincipal cp = (CustomPrincipal)HttpContext.Current.User; TeeTimes teeTimeMGR = new TeeTimes(); if (!cp.IsMember()) { int selectedMember; if (int.TryParse(MemberID.Text, out selectedMember)) { int cartsInt = int.Parse(carts.Text); teeTimeMGR.UpdateTeeTime(int.Parse(e.CommandArgument.ToString()), cartsInt); MemberSelection.DataBind(); } else { Message.Text = "something went wrong"; } } else { int cartsInt = int.Parse(carts.Text); teeTimeMGR.UpdateTeeTime(int.Parse(e.CommandArgument.ToString()), cartsInt); MemberSelection.DataBind(); } }
public bool DeleteTeeTime(string MemberNumber, string Date, string TeeTime) { bool confirmation = false; TeeTimes TeeTImeManager = new TeeTimes(); confirmation = TeeTImeManager.DeleteTeeTime(MemberNumber, Date, TeeTime); return(confirmation); }
public bool DeleteTeeTime(TeeTime selectedTeeTime) { bool Confirmation = false; TeeTimes dataManager = new TeeTimes(); Confirmation = dataManager.DeleteTeeTime(selectedTeeTime); return(Confirmation); }
public TeeTime GetTeeTime(DateTime teeDate, DateTime teeTime) { TeeTime getTeeTime; TeeTimes teeTimeManager = new TeeTimes(); getTeeTime = teeTimeManager.GetTeeTime(teeDate, teeTime, "", ""); return(getTeeTime); }
public List <TeeTime> GetDailyTeeTimeSheet(DateTime searchParam) { List <TeeTime> itemList = new List <TeeTime>(); TeeTimes teeTimeManager = new TeeTimes(); itemList = teeTimeManager.GetDailyTeeSheetByDay(searchParam, "", ""); return(itemList); }
public bool UpdateTeeTime(TeeTime newTeeTime) { bool Confirmation; TeeTimes teeTimeManager = new TeeTimes(); Confirmation = teeTimeManager.ModifyTeeTime(newTeeTime, "", ""); return(Confirmation); }
public bool RemoveTeeTime(TeeTime newTeeTime) { bool Confirmation; TeeTimes teeTimeManager = new TeeTimes(); Confirmation = teeTimeManager.DeleteTeeTime(newTeeTime, "", ""); return(Confirmation); }
public bool BookNewTeeTime(TeeTime newTeeTime) { bool Confirmation; TeeTimes teeTimeManager = new TeeTimes(); Confirmation = teeTimeManager.InsertTeeTime(newTeeTime, "", ""); return(Confirmation); }
public DailyTeeSheet ViewDailyTeeSheet(DateTime date) { DailyTeeSheet dailyTeeSheet = new DailyTeeSheet(); TeeTimes dataManager = new TeeTimes(); dailyTeeSheet = dataManager.FindDailyTeeSheet(date); return(dailyTeeSheet); }
public bool AddTeeTime(DailyTeeTimeSheet DedesireTeeTime, List <TeeTimeMember> Members) { bool confirmation; TeeTimes TeeTImeManager = new TeeTimes(); confirmation = TeeTImeManager.AddTeeTime(DedesireTeeTime, Members); return(confirmation); }
public bool UpdateTeeTime(DailyTeeTimeSheet ModifyTeeTime, List <TeeTimeMember> Members) { bool confirmation = false; TeeTimes TeeTImeManager = new TeeTimes(); confirmation = TeeTImeManager.UpdateTeeTime(ModifyTeeTime, Members); return(confirmation); }
protected void Cancel_Command(object sender, CommandEventArgs e) { CustomPrincipal cp = (CustomPrincipal)HttpContext.Current.User; TeeTimes teeTimeMGR = new TeeTimes(); if (!cp.IsMember()) { teeTimeMGR.CancelTeeTime(int.Parse(e.CommandArgument.ToString())); MemberSelection.DataBind(); } else { teeTimeMGR.CancelTeeTime(int.Parse(e.CommandArgument.ToString())); MemberSelection.DataBind(); } }
// protected void GetAvailableTimes_Click(object sender, EventArgs e) // { //try //{ // Message.Text = ""; // if (DateSelection.SelectedDate < DateTime.Now || DateSelection.SelectedDate > DateTime.Now.AddDays(7)) // { // throw new Exception("Date must be within this week"); // } // TeeTimes teeTimeMGR = new TeeTimes(); // DateTime selectedDate = DateSelection.SelectedDate; // DateTime start = new DateTime(selectedDate.Year, selectedDate.Month, selectedDate.Day, 7, 0, 0); // DateTime end = new DateTime(selectedDate.Year, selectedDate.Month, selectedDate.Day, 20, 0, 0); // List<DateTime> dates = getTimesInRange(start, end); // List<DateTime> bookedDates = teeTimeMGR.GetScheduledTeeTimes(selectedDate); // foreach (var date in bookedDates) // { // dates.Remove(date); // } // TimeSelection.DataSource = dates; // TimeSelection.DataBind(); //} //catch (Exception ex) //{ // Message.Text = ex.Message; //} // } protected void Submit_Click(object sender, EventArgs e) { try { Message.Text = "Tee time scheduled"; if (DateSelection.SelectedDate < DateTime.Now || DateSelection.SelectedDate > DateTime.Now.AddDays(7)) { throw new Exception("Date must be within this week"); } TeeTimes teeTimeMGR = new TeeTimes(); string[] time = TimeSelection.SelectedItem.Text.Split(':'); DateTime teeTimeDate = Convert.ToDateTime(TimeSelection.SelectedValue); teeTimeMGR.ScheduleTeeTime(new DateTime(teeTimeDate.Year, teeTimeDate.Month, teeTimeDate.Day, int.Parse(time[0]), int.Parse(time[1]), int.Parse(time[2])), int.Parse(Member.Text), int.Parse(Carts.Text)); } catch (Exception ex) { Message.Text = ex.Message; } }
public void CreateTeeSheet(DateTime searchParam) { TeeTimes teeTimeManager = new TeeTimes(); teeTimeManager.CreateDailySheet(searchParam, "", ""); }