Advertisement
Guest User

Untitled

a guest
Oct 29th, 2012
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ASP 3.15 KB | None | 0 0
  1. <%@ Page Title="" Language="C#" MasterPageFile="~/Pages/SubPage.master" AutoEventWireup="true" CodeFile="AllCoursesYear.aspx.cs" Inherits="Pages_FullYear" %>
  2.  
  3. <script runat="server">
  4.  
  5.     protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
  6.     {
  7.  
  8.     }
  9.    
  10. </script>
  11.  
  12.  
  13.  
  14. <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
  15. <style type="text/css">
  16. table.sample {
  17.     border-width: 1px;
  18.     border-spacing: 2px;
  19.     border-style: outset;
  20.     border-color: black;
  21.     border-collapse: collapse;
  22. }
  23. table.sample th {
  24.     border-width: 1px;
  25.     padding: 1px;
  26.     border-style: inset;
  27.     border-color: gray;
  28.     -moz-border-radius: 0px 0px 0px 0px;
  29. }
  30. table.sample td {
  31.     border-width: 1px;
  32.     padding: 1px;
  33.     border-style: inset;
  34.     border-color: gray;
  35.     -moz-border-radius: 0px 0px 0px 0px;
  36. }
  37. </style>
  38.     <table width="520" border="1" class="sample">
  39.       <tr align="center">
  40.         <td width="150">Start Date</td>
  41.         <td width="">Course Name</td>
  42.         <td width="">Location</td>
  43.         <td width="">Register</td>
  44.       </tr>
  45.             <asp:Repeater ID="Repeater1" runat="server" DataSourceID="sdsOperator"
  46.                 onitemdatabound="Repeater1_ItemDataBound"
  47.                 onitemcommand="Repeater1_ItemCommand">
  48.                 <ItemTemplate>
  49.                   <tr>
  50.                     <td><%# getDateRange((DateTime)DataBinder.Eval(Container.DataItem, "course_time"), (DateTime)DataBinder.Eval(Container.DataItem, "course_end_time"))%></td>
  51.                     <td><%#Eval("[\"course_name\"]")%></td>
  52.                     <td><%#Eval("[\"course_location\"]")%></td>
  53.                     <td><%# getSignUp((string)DataBinder.Eval(Container.DataItem, "course_name").ToString(), Convert.ToString((Int32)DataBinder.Eval(Container.DataItem, "course_id")))%></td>
  54.                   </tr>
  55.                 </ItemTemplate>
  56.                 <FooterTemplate>
  57.                  <asp:Label ID="lblEmptyData"
  58.                         Text="There Are Currently No Courses To Display, Please Check Back Soon" runat="server" Visible="false">
  59.                  </asp:Label>
  60.                 </FooterTemplate>            
  61.             </asp:Repeater>  
  62.         </table>
  63.     <div runat="server" id="theEmpty"></div>        
  64.     <p>
  65.         <asp:SqlDataSource ID="sdsOperator" runat="server"
  66.             ConnectionString="<%$ ConnectionStrings:ConnectionString %>"            
  67.            
  68.             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 &gt;= GETDATE()) ORDER BY table_course_time.course_time">
  69.         </asp:SqlDataSource>
  70.     </p>
  71. </asp:Content>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement