-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathupdate_schedule.aspx
146 lines (124 loc) · 6.17 KB
/
update_schedule.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
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage1.master" AutoEventWireup="true" CodeFile="update_schedule.aspx.cs" Inherits="update_schedule" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Stylesheets" runat="Server">
<link href="timetablestyle.css" rel="stylesheet" />
<script type="text/javascript">
function removeSession() {
confirm("Delete This Session?");
}
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder3" runat="Server">
<div class="menu_nav">
<ul>
<li><a href="admin.aspx">Home</a></li>
<li><a href="schedule.aspx">Schedule</a></li>
<li><a href="Messages.aspx">Messages</a></li>
<li><a href="user.aspx"><%=((ELearn.User)Session["user"]).username %></a></li>
<li><a href="logout.aspx">Logout</a></li>
</ul>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<div class="content">
<%
//Session.Add("userType", "staff");
List<List<string>> schedule = null;
if (((string)Session["schType"]).Equals("class"))
schedule = ClassRoom.GetSchedule(Convert.ToInt32(((string)Session["classID"])));
else Response.Redirect("Default.aspx");
ClassRoom.GetClassRoomById(Convert.ToInt32(Session["classID"]));
%>
<div class="content_resize">
<div class="row">
<div class="col-md-4">
<form runat="server">
<div class="panel panel-default">
<div class="panel-heading">
<h4>Add Session</h4>
</div>
<div class="panel-body form-horizontal">
<%int lvlID = ClassRoom.GetClassRoomById(Convert.ToInt32(Session["classID"])).levelID;
int clsID = Convert.ToInt32(Session["classID"]); %>
<input type="text" class="register-input" value="<%= Level.GetLevelById(lvlID).levelName+" - "+clsID %>" disabled="disabled" />
<asp:DropDownList runat="server" ID="teachers" CssClass="form-control">
</asp:DropDownList>
<asp:DropDownList runat="server" ID="subjects" CssClass="form-control">
</asp:DropDownList>
<asp:DropDownList runat="server" ID="slotes" CssClass="form-control">
</asp:DropDownList>
<asp:Button runat="server" CssClass="register-button" OnClick="add_Click" Text="Add" />
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h4>Remove Session</h4>
</div>
<div class="panel-body form-horizontal">
<asp:DropDownList runat="server" ID="removed" CssClass="form-control">
</asp:DropDownList>
<asp:Button runat="server" CssClass="register-button" OnClick="remove_Click" Text="Remove" />
</div>
</div>
</form>
</div>
<div class="col-md-8">
<div class="panel panel-default">
<div class="panel-heading">
<h4>Schedule</h4>
</div>
<div class="panel-body">
<table width="80%" align="center">
<div id="head_nav">
<tr>
<th>Time</th>
<th>saturday</th>
<th>sunday</th>
<th>monday</th>
<th>tuesday</th>
<th>wednesday</th>
<th>thursday</th>
</tr>
</div>
<tr>
<th>10:00 - 11:00</th>
<%foreach (string entry in schedule[0])
{%>
<td><%=entry%></td>
<%} %>
</tr>
<tr>
<th>11:00 - 12:00</td>
<%foreach (string entry in schedule[1])
{%>
<td><%=entry%></td>
<%} %>
</tr>
<tr>
<th>12:00 - 01:00</td>
<%foreach (string entry in schedule[2])
{%>
<td><%=entry%></td>
<%} %>
</tr>
<tr>
<th>01:00 - 02:00</td>
<%foreach (string entry in schedule[3])
{%>
<td><%=entry%></td>
<%} %>
</tr>
<tr>
<th>02:00 - 03:00</td>
<%foreach (string entry in schedule[4])
{%>
<td><%=entry%></td>
<%} %>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</asp:Content>