コード例 #1
0
ファイル: CBS.cs プロジェクト: ChaseDDevelopment/ClubBAIST
        public StandingTeeTime FindStandingTeeTimeRequest(int MemberNumber)
        {
            StandingTeeTimes dataManager = new StandingTeeTimes();
            var request = dataManager.FindStandingTeeTimeRequest(MemberNumber);

            return(request);
        }
コード例 #2
0
        public List <StandingTeeTime> GetStandingTeeTimeList()
        {
            List <StandingTeeTime> standingTeeTimes = new List <StandingTeeTime>();
            StandingTeeTimes       standingManager  = new StandingTeeTimes();

            standingTeeTimes = standingManager.GetStandingTeeTimeRequests("", "");
            return(standingTeeTimes);
        }
コード例 #3
0
        public bool ModifyStandingTeeTime(StandingTeeTime newStandingTeeTimeRequest)
        {
            bool             Confirmation;
            StandingTeeTimes standingTeeTimeManager = new StandingTeeTimes();

            Confirmation = standingTeeTimeManager.ModifyStandingTeeTimeRequest(newStandingTeeTimeRequest, "", "");
            return(Confirmation);
        }
コード例 #4
0
ファイル: CBS.cs プロジェクト: ChaseDDevelopment/ClubBAIST
        public bool CancelStandingTeeTimeRequest(int StandingTeeTimeID)
        {
            bool             Confirmation = false;
            StandingTeeTimes dataManager  = new StandingTeeTimes();

            Confirmation = dataManager.CancelStandingTeeTimeRequest(StandingTeeTimeID);
            return(Confirmation);
        }
コード例 #5
0
ファイル: CBS.cs プロジェクト: ChaseDDevelopment/ClubBAIST
        public bool CreateStandingTeeTimeRequest(StandingTeeTime request)
        {
            bool             Confirmation = false;
            StandingTeeTimes dataManager  = new StandingTeeTimes();

            Confirmation = dataManager.CreateStandingTeeTimeRequest(request);
            return(Confirmation);
        }
コード例 #6
0
 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));
         }
     }
 }
コード例 #7
0
 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;
     }
 }
コード例 #8
0
    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();
            }
        }
    }