<%@ Page Language="VB" Inherits="System.Web.Mvc.ViewPage" %>

<%@ Register TagPrefix="uc" TagName="Menu" Src="~/Views/Shared/Menu.ascx" %>
<%@ Register TagPrefix="uc" TagName="ClientMenu" Src="~/Views/Course/CourseMenu.ascx" %>
<%@ Register TagPrefix="uc" TagName="CreateTab" Src="~/Views/Course/Create.ascx" %>
<%@ Register TagPrefix="uc" TagName="InscriptionTab" Src="~/Views/Course/Inscription.ascx" %>
<%@ Register TagPrefix="uc" TagName="SeanceTab" Src="~/Views/Course/Seance.ascx" %>
<%@ Register TagPrefix="uc" TagName="FancyTab" Src="~/Views/Shared/FancyBox.ascx" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
        <uc:FancyTab id="FancyTab" 
        runat="server" />

    <title>Détails du cours</title>
</head>
<body>
    <uc:Menu id="MenuTop" 
        runat="server"/>
    <uc:ClientMenu id="SubMenu" 
        runat="server" />
    <div runat="server">
    <%                 

        Dim dt As CoursE.coursedata.courseRow = Me.ViewData.Item("rowcourse")%>

        <table><tr style="vertical-align:top;"><td>
        <form id="create" runat="server" method="post" action="../Create">
    <uc:CreateTab id="Creation1"
        runat="server"/>
        </form>
        </td><td>
                    <uc:InscriptionTab id="InscriptionTab1" 
        runat="server" />
        </td></tr></table>
        <%  If Not IsNothing(Session.Item("couresschedule")) Then
                Dim dtSchedule As CoursE.coursedata.scheduleDataTable = ViewData.Item("courseschedule")
                
                %>
        <div>
        <table>
        <tr><th>Début de la séance</th><th>Fin de la séance</th><th>Note</th><th>État</th><th></th></tr>
        <%For intCpt As Integer = 0 To dtSchedule.Rows.Count - 1%>
        <tr>
        <td><% Response.Write(dtSchedule.Rows(intCpt).Item("SCHEDULE_START"))%></td>
        <td><% Response.Write(dtSchedule.Rows(intCpt).Item("SCHEDULE_END"))%></td>
        <td><% Response.Write(dtSchedule.Rows(intCpt).Item("SCHEDULE_NOTE"))%></td>
        <td><%  
                'Response.Write(dtSchedule.Rows(intCpt).Item("SCHEDULE_STATUS"))
                Response.Write(dtSchedule.Rows(intCpt).Item("À venir"))
                %></td>
                <td><a href="Schedule/AnnulerSeance/<%Response.Write(dtSchedule.Rows(intCpt).Item("SCHEDULE_ID") & """>")
                    If dtSchedule.Rows(intCpt).Item("SCHEDULE_STATUS") = 1 Then
                        Response.Write("Annuler</a>")
                    Else
                        Response.Write("Reprendre</a>")
                    End If
                    %>
                </td>
        </tr>
        <% Next%>
        </table>
        </div>
        <% End If%>
        <uc:SeanceTab id="SeanceTab1" 
        runat="server" />

    </div>
</body>
</html>
