public StandingTeeTime FindStandingTeeTimeRequest(int MemberNumber) { StandingTeeTimes dataManager = new StandingTeeTimes(); var request = dataManager.FindStandingTeeTimeRequest(MemberNumber); return(request); }
public List <StandingTeeTime> GetStandingTeeTimeList() { List <StandingTeeTime> standingTeeTimes = new List <StandingTeeTime>(); StandingTeeTimes standingManager = new StandingTeeTimes(); standingTeeTimes = standingManager.GetStandingTeeTimeRequests("", ""); return(standingTeeTimes); }
public bool ModifyStandingTeeTime(StandingTeeTime newStandingTeeTimeRequest) { bool Confirmation; StandingTeeTimes standingTeeTimeManager = new StandingTeeTimes(); Confirmation = standingTeeTimeManager.ModifyStandingTeeTimeRequest(newStandingTeeTimeRequest, "", ""); return(Confirmation); }
public bool CancelStandingTeeTimeRequest(int StandingTeeTimeID) { bool Confirmation = false; StandingTeeTimes dataManager = new StandingTeeTimes(); Confirmation = dataManager.CancelStandingTeeTimeRequest(StandingTeeTimeID); return(Confirmation); }
public bool CreateStandingTeeTimeRequest(StandingTeeTime request) { bool Confirmation = false; StandingTeeTimes dataManager = new StandingTeeTimes(); Confirmation = dataManager.CreateStandingTeeTimeRequest(request); return(Confirmation); }
protected void ApproveButton_Click(object sender, EventArgs e) { foreach (Control item in teeTimeRequests.Items) { if ((item.FindControl("Approved") as CheckBox).Checked) { StandingTeeTimes teeTimeMgr = new StandingTeeTimes(); teeTimeMgr.ApproveStandingTeeTime(int.Parse((item.FindControl("StandingTeeTimeID") as Label).Text)); } } }
protected void Submit_Click(object sender, EventArgs e) { try { Message.Text = ""; if (Convert.ToDateTime(StartDateTextBox.Text) < DateTime.Now || Convert.ToDateTime(EndDateTextBox.Text) < Convert.ToDateTime(StartDateTextBox.Text)) { throw new Exception("Please select a valid start and end date"); } StandingTeeTimes standingTeeTimeMGR = new StandingTeeTimes(); DateTime selectedDate = DayOfWeek.SelectedDate; string[] time = TimeOfDay.SelectedItem.Text.Split(':'); standingTeeTimeMGR.CreateStandingTeeTime(new DateTime(selectedDate.Year, selectedDate.Month, selectedDate.Day, int.Parse(time[0]), int.Parse(time[1]), int.Parse(time[2])), Convert.ToDateTime(StartDateTextBox.Text), Convert.ToDateTime(EndDateTextBox.Text), int.Parse(Member1IDTextBox.Text)); } catch (Exception ex) { Message.Text = ex.Message; } }
protected void Page_Load(object sender, EventArgs e) { CustomPrincipal cp = (CustomPrincipal)HttpContext.Current.User; if (cp.IsMember()) { FormsAuthentication.SignOut(); Response.Redirect("~/Logon.aspx"); } else { if (!Page.IsPostBack) { StandingTeeTimes teeTimeMgr = new StandingTeeTimes(); List <StandingTeeTime> teeTimes = teeTimeMgr.GetStandingRequests(); teeTimeRequests.DataSource = teeTimes; teeTimeRequests.DataBind(); } } }