Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%@ Page Title="" Language="C#" MasterPageFile="~/Pages/SubPage.master" AutoEventWireup="true" CodeFile="AllCoursesYear.aspx.cs" Inherits="Pages_FullYear" %>
- <script runat="server">
- protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
- {
- }
- </script>
- <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
- <style type="text/css">
- table.sample {
- border-width: 1px;
- border-spacing: 2px;
- border-style: outset;
- border-color: black;
- border-collapse: collapse;
- }
- table.sample th {
- border-width: 1px;
- padding: 1px;
- border-style: inset;
- border-color: gray;
- -moz-border-radius: 0px 0px 0px 0px;
- }
- table.sample td {
- border-width: 1px;
- padding: 1px;
- border-style: inset;
- border-color: gray;
- -moz-border-radius: 0px 0px 0px 0px;
- }
- </style>
- <table width="520" border="1" class="sample">
- <tr align="center">
- <td width="150">Start Date</td>
- <td width="">Course Name</td>
- <td width="">Location</td>
- <td width="">Register</td>
- </tr>
- <asp:Repeater ID="Repeater1" runat="server" DataSourceID="sdsOperator"
- onitemdatabound="Repeater1_ItemDataBound"
- onitemcommand="Repeater1_ItemCommand">
- <ItemTemplate>
- <tr>
- <td><%# getDateRange((DateTime)DataBinder.Eval(Container.DataItem, "course_time"), (DateTime)DataBinder.Eval(Container.DataItem, "course_end_time"))%></td>
- <td><%#Eval("[\"course_name\"]")%></td>
- <td><%#Eval("[\"course_location\"]")%></td>
- <td><%# getSignUp((string)DataBinder.Eval(Container.DataItem, "course_name").ToString(), Convert.ToString((Int32)DataBinder.Eval(Container.DataItem, "course_id")))%></td>
- </tr>
- </ItemTemplate>
- <FooterTemplate>
- <asp:Label ID="lblEmptyData"
- Text="There Are Currently No Courses To Display, Please Check Back Soon" runat="server" Visible="false">
- </asp:Label>
- </FooterTemplate>
- </asp:Repeater>
- </table>
- <div runat="server" id="theEmpty"></div>
- <p>
- <asp:SqlDataSource ID="sdsOperator" runat="server"
- ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
- SelectCommand="SELECT table_course_time.course_time, table_course_time.course_end_time, table_course_time.course_location, table_courses.course_name, table_course_type.course_type_name, table_courses.course_id, table_staff.staff_fname, table_staff.staff_lname, table_staff.staff_position, table_staff.staff_id FROM table_course_time INNER JOIN table_courses ON table_course_time.course_id = table_courses.course_id INNER JOIN table_course_type ON table_courses.course_type = table_course_type.course_type_id INNER JOIN table_staff ON table_courses.course_instructor = table_staff.staff_id WHERE (table_course_time.course_time >= GETDATE()) ORDER BY table_course_time.course_time">
- </asp:SqlDataSource>
- </p>
- </asp:Content>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement