-
Notifications
You must be signed in to change notification settings - Fork 0
/
StandingReservation.aspx.cs
71 lines (68 loc) · 2.41 KB
/
StandingReservation.aspx.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class StandingReservation : System.Web.UI.Page
{
string S = "Njangaria1";
protected void Page_Load(object sender, EventArgs e)
{
string memberno = (string)Session["memberno"];
string membername = (string)Session["membername"];
}
protected void Button1_Click(object sender, EventArgs e)
{
DropDownList newlist = new DropDownList();
newlist = DropDownList1;
ClubBaistSampleHandler RequestDirector;
RequestDirector = new ClubBaistSampleHandler();
List<string> Reserve;
Reserve = RequestDirector.GetStandingtime(DropDownList2.SelectedItem.ToString());
foreach (string Time in Reserve)
{
DropDownList1.Items.FindByValue(Time).Enabled = false;
DropDownList1.DataBind();
}
}
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
DropDownList newlist = new DropDownList();
newlist = DropDownList1;
ClubBaistSampleHandler RequestDirector;
RequestDirector = new ClubBaistSampleHandler();
List<string> Reserve;
Reserve = RequestDirector.GetStandingtime(DropDownList2.SelectedItem.ToString());
foreach (string Time in Reserve)
{
DropDownList1.Items.FindByValue(Time).Enabled = false;
DropDownList1.DataBind();
}
}
protected void Button2_Click(object sender, EventArgs e)
{
ClubBaistSampleHandler RequestDirector;
RequestDirector = new ClubBaistSampleHandler();
StandingReserve Reserve = new StandingReserve();
Reserve.MemberNo = S;
Reserve.RequestedStartDate = TextBox2.Text;
Reserve.RequestedEndDate = TextBox3.Text;
Reserve.day = DropDownList2.SelectedItem.ToString();
Reserve.time = DropDownList1.SelectedItem.ToString();
Reserve.MemberNo1 = TextBox1.Text;
Reserve.MemberNo2 = TextBox4.Text;
Reserve.MemberNo3 = TextBox5.Text;
Reserve.MemberNo = S;
Boolean Confirmation;
Confirmation = RequestDirector.AddStandingTime(Reserve);
if (Confirmation)
{
Msg.Text = " Standing Tee Time Reserved";
}
else
{
Msg.Text = "Standing Tee Time Not Reserved";
}
}
}