-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdatesheet.aspx
167 lines (160 loc) · 6.53 KB
/
datesheet.aspx
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="datesheet.aspx.cs" Inherits="datesheet" Title="Untitled Page" %>
<%@ Import Namespace="inst_mgmt" %>
<script runat="server">
protected void Button3_Click(object sender, EventArgs e)
{
Label1.Visible = false;
Label2.Visible = false;
Label10.Visible = false;
Label3.Visible = false;
Label4.Visible = false;
Label5.Visible = false;
Label7.Visible = false;
Label8.Visible = false;
Button1.Visible = false;
GridView1.Visible = true;
}
protected void Button1_Click(object sender, EventArgs e)
{
mdatesheet d = new mdatesheet();
d.course = TextBox5.Text;
d.sem = TextBox6.Text;
d.sub = TextBox1.Text;
d.subcode = TextBox2.Text;
d.date = TextBox3.Text;
d.shift = TextBox7.Text;
d.timing = TextBox4.Text;
d.examination = TextBox8.Text;
mdatesheet.insert(d);
mdatesheet.select();
}
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GridView1.PageIndex = e.NewPageIndex;
mdatesheet.select();
}
</script>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table style="width: 128%">
<tr>
<td align="center" style="width: 381px">
<asp:Button ID="Button2" runat="server" Text="ADD NEW DATESHEET"
onclick="Button2_Click" />
</td>
<td align="center">
<asp:Button ID="Button3" runat="server" Text="VIEW DATESHEET"
onclick="Button3_Click" />
</td>
</tr>
<tr>
<td align="left" style="width: 381px">
</td>
<td align="left">
</td>
</tr>
<tr>
<td align="center" style="width: 381px">
<asp:Label ID="Label2" runat="server" Text="ENTER COURSE"></asp:Label>
</td>
<td align="left">
<asp:TextBox ID="TextBox5" runat="server" Width="220px"></asp:TextBox>
</td>
</tr>
<tr>
<td align="center" style="width: 381px">
<asp:Label ID="Label3" runat="server" Text="ENTER SEMESTER"></asp:Label>
</td>
<td align="left">
<asp:TextBox ID="TextBox6" runat="server" Width="220px"></asp:TextBox>
</td>
</tr>
<tr>
<td align="center" style="width: 381px">
<asp:Label ID="Label4" runat="server" Text="SUBJECT"></asp:Label>
</td>
<td align="left">
<asp:TextBox ID="TextBox1" runat="server" Width="220px"></asp:TextBox>
</td>
</tr>
<tr>
<td align="center" style="width: 381px">
<asp:Label ID="Label5" runat="server" Text="SUBJECT CODE"></asp:Label>
</td>
<td align="left">
<asp:TextBox ID="TextBox2" runat="server" Width="220px"></asp:TextBox>
</td>
</tr>
<tr>
<td align="center" style="width: 381px">
<asp:Label ID="Label10" runat="server" Text="DATE"></asp:Label>
</td>
<td align="left">
<asp:TextBox ID="TextBox3" runat="server" Width="220px"></asp:TextBox>
</td>
</tr>
<tr>
<td align="center" style="width: 381px">
<asp:Label ID="Label7" runat="server" Text="SHIFT"></asp:Label>
</td>
<td align="left">
<asp:TextBox ID="TextBox7" runat="server" Width="220px"></asp:TextBox>
</td>
</tr>
<tr>
<td align="center" style="width: 381px">
<asp:Label ID="Label8" runat="server" Text="TIMING"></asp:Label>
</td>
<td align="left">
<asp:TextBox ID="TextBox4" runat="server" Width="220px"></asp:TextBox>
</td>
</tr>
<tr>
<td align="center" style="width: 381px">
<asp:Label ID="Label11" runat="server" Text="EXAMINATION" Visible="False"></asp:Label>
</td>
<td align="left">
<asp:TextBox ID="TextBox8" runat="server" Width="220px" Visible="False"></asp:TextBox>
</td>
</tr>
</table>
<table style="width: 95%">
<tr>
<td style="width: 264px; height: 273px;" align="center">
<asp:Button ID="Button1" runat="server" Text="SUBMIT" Width="120px"
onclick="Button1_Click" />
<br />
<table align="center" style="width: 330%">
<tr>
<td align="center">
<asp:Label ID="Label1" runat="server" ForeColor="#FFCC66" Height="20px"
Text="DATESHEET" Width="50px"></asp:Label>
</td>
</tr>
</table>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
Height="295px" Width="867px" AllowPaging="True"
onpageindexchanging="GridView1_PageIndexChanging"
AutoGenerateEditButton="True" ForeColor="White" DataSourceID="objdash"
Visible="False">
<Columns>
<asp:BoundField HeaderText="COURSE" DataField="course"/>
<asp:BoundField HeaderText="SEMESTER" DataField="sem"/>
<asp:BoundField HeaderText="SUBJECT" DataField="sub"/>
<asp:BoundField HeaderText="SUB-CODE" DataField="subcode"/>
<asp:BoundField HeaderText="DATE" DataField="date"/>
<asp:BoundField HeaderText="SHIFT" DataField="shift"/>
<asp:BoundField HeaderText="TIMINGS" DataField="timing"/>
<asp:BoundField HeaderText="EXAM-TYPE" DataField="examination"/>
</Columns>
</asp:GridView>
<asp:ObjectDataSource runat="server" ID="objdash" TypeName="mdatesheet" DataObjectTypeName="mdatesheet" SelectMethod="select" InsertMethod="insert" UpdateMethod="update"></asp:ObjectDataSource>
<br />
</td>
</tr>
<tr>
<td style="width: 264px" align="justify">
</td>
</tr>
</table>
</asp:Content>