<%@ Page Language="VB" MasterPageFile="~/mobile.master" AutoEventWireup="false" CodeFile="TopSP.aspx.vb" Inherits="_TopSP" %>

<%-- [Webフォーム]head Start --%>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<%-- [Webフォーム]head End --%>

<%-- [Webフォーム]body Start --%>
<asp:Content ID="Content2" ContentPlaceHolderID="msp_asp_cph1" runat="server">
    <%-- SqlDataSource Start --%>
    <asp:SqlDataSource ID="sql_info_midoku" runat="server"></asp:SqlDataSource>
    <asp:SqlDataSource ID="sql_info_public_midoku" runat="server" ></asp:SqlDataSource>
    <asp:SqlDataSource ID="sql_info_class_midoku" runat="server" ></asp:SqlDataSource>
    <%-- SqlDataSource End --%>

    <div id ="info_div_titlebar" class="adaptiveWidth500">
        <asp:Label ID="lb_info" runat="server" Text="未読のお知らせ" ></asp:Label>
    </div>

    <div id="div_info" class="adaptiveWidth500">
        <asp:GridView ID="gv_未読のお知らせ" runat="server" AutoGenerateColumns="False"
            DataKeyNames="掲示NO" DataSourceID="sql_info_midoku" BorderStyle="None" CellPadding="1" 
            GridLines="Horizontal" AllowPaging="True" PageSize="20" 
            ShowHeader="False" CssClass="grv_info">
            <RowStyle Height="25px" BorderStyle="Solid" BorderWidth="1px" BorderColor="#D8D8D8" HorizontalAlign="Center" VerticalAlign="Middle" />
            <EmptyDataRowStyle BorderColor="White" BorderStyle="None" />
        <Columns>            
             <asp:TemplateField>
                <ItemTemplate>
                    <table style="vertical-align:middle;" Class="grv_info">
                        <colgroup>
                            <col style="width:30%;" />
                            <col style="width:70%;" />
                        </colgroup>
                        <tr>
                            <td colspan="2">
                                <asp:Image ID="img_new" runat="server" ImageUrl="~/img/bbs/new.png" Width="28px" ImageAlign="Middle" />
                                
                                <asp:Image ID="img_添付" runat="server" ImageUrl="~/img/bbs/tenpu.png" Width="20px" ImageAlign="Middle" />

                                <asp:Label ID="lb_レベル_重要" runat="server" Text="重要" Forecolor="#ff0000"></asp:Label>
                                <asp:Label ID="lb_レベル_緊急" runat="server" Text="緊急" Forecolor="#0000ff"></asp:Label>
                                
                                <asp:LinkButton ID="title" runat="server" CommandArgument="read" CommandName="select" 
                                    Text='<%# Bind("掲示件名略") %>' ForeColor="#2E6CBA" ToolTip='<%# Eval("掲示件名")%>'></asp:LinkButton>                                
                            </td>                            
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="lbl_掲示開始日" runat="server" Text='<%# Bind("掲示開始日", "{0:yyyy/MM/dd}")%>'></asp:Label>
                            </td>
                            <td style="text-align:right;">
                                <asp:Label ID="Lb_掲示者" runat="server" Text='<%# Bind("掲示者略") %>'></asp:Label>      
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>                
            </asp:TemplateField>
            <asp:TemplateField visible="false">
                <ItemTemplate>
                    <%-- 非表示--%>                   
                    <asp:Label ID="lbl_掲示NO" runat="server" Text='<%# Bind("掲示NO") %>' Visible="false"></asp:Label>
                    <asp:Label ID="lbl_掲示種別CD" runat="server" Text='<%# Bind("掲示種別CD")%>' Visible="false"></asp:Label>
                    <asp:Label ID="lb_new" runat="server" Text='<%# Bind("新着掲示") %>' Visible="False"></asp:Label>
                    <asp:Image ID="img_lv" runat="server" Width="13px" ImageAlign="Middle" Visible="False" />                    
                    <asp:Label ID="lb_img_path" runat="server" Text='<%# Bind("IMG_PATH") %>' Visible="False"></asp:Label>
                    <asp:Label ID="lb_レベル" runat="server" Text='<%# Bind("掲示レベル") %>' Visible="False"></asp:Label>
                    <asp:Label ID="lb_添付" runat="server" Text='<%# Bind("添付有無") %>' Visible="False"></asp:Label>                      
                    <asp:Image ID="img_未読" runat="server" ImageUrl="~/img/bbs/midoku.png" Width="20px" ImageAlign="Middle" />
                    <asp:Label ID="lb_未読" runat="server" Visible="False" Text='<%# Bind("既読掲示") %>'></asp:Label>                              
                </ItemTemplate>
            </asp:TemplateField>                    
        </Columns>           
             <EmptyDataTemplate>
                 &nbsp;&nbsp;&nbsp;
                <asp:Label ID="Label8" runat="server" Text="未読のお知らせはありません。"></asp:Label>
            </EmptyDataTemplate>
            <SelectedRowStyle BackColor="#EEEEEE" />
            <HeaderStyle CssClass="info_header" />
            <RowStyle CssClass="info_row"/>
            <EmptyDataRowStyle CssClass="info_empty"/>           
            <PagerStyle CssClass="GridViewPager" />
            <AlternatingRowStyle BorderStyle="Solid" BorderWidth="1px" BorderColor="#D8D8D8" />
        </asp:GridView>
    </div>

    <div style="height:40px;"></div>
    
    <div id ="info_div_titlebar" class="adaptiveWidth500">
        <asp:Label ID="Label1" runat="server" Text="未読の連絡事項" ></asp:Label>
    </div>

    <div id="div_info" class="adaptiveWidth500">
        <asp:GridView ID="gv_未読の連絡事項" runat="server" AutoGenerateColumns="False"
            DataKeyNames="掲示NO" DataSourceID="sql_info_public_midoku" BorderStyle="None" CellPadding="1" 
            GridLines="Horizontal" AllowPaging="True" PageSize="20" 
            ShowHeader="False" CssClass="grv_info">
            <RowStyle Height="25px" BorderStyle="Solid" BorderWidth="1px" BorderColor="#D8D8D8" HorizontalAlign="Center" VerticalAlign="Middle" />
            <EmptyDataRowStyle BorderColor="White" BorderStyle="None" />
        <Columns>         
            <asp:TemplateField>
                <ItemTemplate>
                    <table style="vertical-align:middle;" Class="grv_info">
                        <colgroup>
                            <col style="width:30%;" />
                            <col style="width:70%;" />
                        </colgroup>
                        <tr>
                            <td colspan="2">
                                <asp:Image ID="img_new" runat="server" ImageUrl="~/img/bbs/new.png" Width="28px" ImageAlign="Middle" />
                                <asp:Image ID="img_添付" runat="server" ImageUrl="~/img/bbs/tenpu.png" Width="20px" ImageAlign="Middle" />                                
                                <asp:Label ID="lb_レベル_重要" runat="server" Text="重要" Forecolor="#ff0000"></asp:Label>
                                <asp:Label ID="lb_レベル_緊急" runat="server" Text="緊急" Forecolor="#0000ff"></asp:Label>
                                <asp:LinkButton ID="title" runat="server" CommandArgument="read" CommandName="select" 
                                    Text='<%# Bind("掲示件名略") %>' ForeColor="#2E6CBA" ToolTip='<%# Eval("掲示件名")%>'></asp:LinkButton>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="lbl_掲示開始日" runat="server" Text='<%# Bind("掲示開始日", "{0:yyyy/MM/dd}")%>'></asp:Label>
                            </td>
                            <td style="text-align:right;">
                                <asp:Label ID="Lb_掲示者" runat="server" Text='<%# Bind("掲示者略") %>'></asp:Label>     
                            </td>
                        </tr>
                    </table>                    
                </ItemTemplate>                
            </asp:TemplateField>
            <asp:TemplateField Visible="false">
                <ItemTemplate>
                    <%-- 非表示--%>
                    <asp:Label ID="lb_new" runat="server" Text='<%# Bind("新着掲示") %>' Visible="False"></asp:Label>
                    <asp:Label ID="lbl_掲示NO" runat="server" Text='<%# Bind("掲示NO") %>' Visible="false"></asp:Label>
                    <asp:Label ID="lbl_掲示種別CD" runat="server" Text='<%# Bind("掲示種別CD")%>' Visible="false"></asp:Label>

                    <asp:Image ID="img_未読" runat="server" ImageUrl="~/img/bbs/midoku.png" Width="20px" ImageAlign="Middle" />
                    <asp:Label ID="lb_未読" runat="server" Visible="False" Text='<%# Bind("既読掲示") %>'></asp:Label>
                    <asp:Image ID="img_lv" runat="server" Width="13px" ImageAlign="Middle" Visible="False" />
                    <asp:Label ID="lb_img_path" runat="server" Text='<%# Bind("IMG_PATH") %>' Visible="False"></asp:Label>                    
                    <asp:Label ID="lb_レベル" runat="server" Text='<%# Bind("掲示レベル") %>' Visible="False"></asp:Label>
                    <asp:Label ID="lb_添付" runat="server" Text='<%# Bind("添付有無") %>' Visible="False"></asp:Label>                 
                </ItemTemplate>                
            </asp:TemplateField>                   
        </Columns>           
             <EmptyDataTemplate>
                 &nbsp;&nbsp;&nbsp;
                <asp:Label ID="Label8" runat="server" Text="未読の連絡事項はありません。"></asp:Label>
            </EmptyDataTemplate>
            <SelectedRowStyle BackColor="#EEEEEE" />
            <HeaderStyle CssClass="info_header" />
            <RowStyle CssClass="info_row"/>
            <EmptyDataRowStyle CssClass="info_empty"/>
            <PagerStyle CssClass="GridViewPager" />
            <AlternatingRowStyle BorderStyle="Solid" BorderWidth="1px" BorderColor="#D8D8D8" />
        </asp:GridView>
    </div>

    <div style="height:40px;"></div>

    <div id ="info_div_titlebar" class="adaptiveWidth500">
        <asp:Label ID="Label2" runat="server" Text="未読の授業関連" ></asp:Label>
    </div>

    <div id="div_info" class="adaptiveWidth500">
        <asp:GridView ID="gv_未読の授業関連" runat="server" AutoGenerateColumns="False"
            DataKeyNames="掲示NO" DataSourceID="sql_info_class_midoku" BorderStyle="None" CellPadding="1" 
            GridLines="Horizontal" AllowPaging="True" PageSize="20" 
            ShowHeader="False" CssClass="grv_info">
            <RowStyle Height="25px" BorderStyle="Solid" BorderWidth="1px" BorderColor="#D8D8D8" HorizontalAlign="Center" VerticalAlign="Middle" />
            <EmptyDataRowStyle BorderColor="White" BorderStyle="None" />
        <Columns>           
             <asp:TemplateField>
                 <ItemTemplate>
                     <table style="vertical-align:middle;" Class="grv_info">
                        <colgroup>
                            <col style="width:60%;" />
                            <col style="width:40%;" />
                        </colgroup>
                        <tr>
                            <td colspan="2">
                               <asp:Image ID="img_new" runat="server" ImageUrl="~/img/bbs/new.png" Width="28px" ImageAlign="Middle" />
                               <asp:Label ID="lb_対象予定区分" runat="server" Text='<%# Bind("対象予定区分")%>'></asp:Label>
                                &nbsp;
                               <asp:LinkButton ID="title" runat="server" CommandArgument="read" CommandName="select" 
                                    Text='<%# Bind("掲示件名略") %>' ForeColor="#2E6CBA" ToolTip='<%# Eval("授業名")%>'></asp:LinkButton>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="lbl_対象予定開始日" runat="server" Text='<%# Bind("対象予定開始日", "{0:yyyy/MM/dd}")%>'></asp:Label>
                                <span>～</span>
                                <asp:Label ID="lbl_対象予定終了日" runat="server" Text='<%# Bind("対象予定終了日", "{0:yyyy/MM/dd}")%>'></asp:Label>
                            </td>
                            <td style="text-align:right;">
                                <asp:Label ID="Lb_掲示者略" runat="server" Text='<%# Bind("掲示者略") %>'></asp:Label> 
                            </td>
                        </tr>
                    </table>
                 </ItemTemplate>
             </asp:TemplateField>
            <asp:TemplateField Visible ="false">
                <ItemTemplate>
                    <%-- 非表示--%>
                    <asp:Label ID="lbl_掲示NO" runat="server" Text='<%# Bind("掲示NO") %>' Visible="false"></asp:Label>
                    <asp:Label ID="lbl_掲示種別CD" runat="server" Text='<%# Bind("掲示種別CD")%>' Visible="false"></asp:Label>
                    <asp:Label ID="lb_new" runat="server" Text='<%# Bind("新着掲示") %>' Visible="False"></asp:Label>
                    <asp:Image ID="img_未読" runat="server" ImageUrl="~/img/bbs/midoku.png" 
                        Width="20px" ImageAlign="Middle" />
                    <asp:Label ID="lb_未読" runat="server" Visible="False" Text='<%# Bind("既読掲示") %>'></asp:Label>

                    <asp:Label ID="lb_科目CD" runat="server" Text='<%# Bind("科目CD")%>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>   
        </Columns>           
             <EmptyDataTemplate>
                 &nbsp;&nbsp;&nbsp;
                <asp:Label ID="Label8" runat="server" Text="未読の授業関連お知らせはありません。"></asp:Label>
            </EmptyDataTemplate>
            <SelectedRowStyle BackColor="#EEEEEE" />
            <HeaderStyle CssClass="info_header" />
            <RowStyle CssClass="info_row"/>
            <EmptyDataRowStyle CssClass="info_empty"/>
            <PagerStyle CssClass="GridViewPager" />
            <AlternatingRowStyle BorderStyle="Solid" BorderWidth="1px" BorderColor="#D8D8D8" />
        </asp:GridView>
    </div>
</asp:Content>
<%-- [Webフォーム]body End --%>