<%@ Page Language="VB" AutoEventWireup="false" CodeFile="ScheduleSP.aspx.vb" Inherits="mobile_recruit_ScheduleSP" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="page_header" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=yes" />
    <title>求人スケジュール</title>
    <link rel="stylesheet" type="text/css" href="../../css/common.css" />
    <link rel="stylesheet" type="text/css" href="../../css/mobile_master.css" />
    <link rel="stylesheet" type="text/css" href="../../css/mobile_recruit.css" />
</head>
<body>
    <form id="form1" runat="server">
        <ajaxToolkit:ToolkitScriptManager runat="server" ID="ScriptManager1" EnableScriptGlobalization="True" />
        <div style="margin-bottom:10px;">
            <table style="margin:auto;">
                <tr style="vertical-align:bottom">
                    <td>
                        <asp:Menu ID="Menu1" runat="server" BackColor="#FFFBD6" 
                            DynamicHorizontalOffset="2" 
                            ForeColor="#990000" Orientation="Horizontal" StaticSubMenuIndent="10px">
                            <StaticSelectedStyle BackColor="#FFCC66" />
                            <StaticMenuItemStyle HorizontalPadding="2px" VerticalPadding="2px" BorderStyle="Solid" BorderColor="#999999" BorderWidth="1px" />
                            <DynamicHoverStyle BackColor="#990000" ForeColor="White" />
                            <DynamicMenuStyle BackColor="#FFFBD6" />
                            <DynamicSelectedStyle BackColor="#FFCC66" />
                            <DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
                            <StaticHoverStyle BackColor="#990000" ForeColor="White" />
                            <Items>
                                <asp:MenuItem Text="　年　" Value="年"></asp:MenuItem>
                                <asp:MenuItem Selected="True" Text="　月　" Value="月"></asp:MenuItem>
                                <asp:MenuItem Text="　週　" Value="週"></asp:MenuItem>
                                <asp:MenuItem Text="　日　" Value="日"></asp:MenuItem>
                            </Items>
                        </asp:Menu>
                    </td>                    
                </tr>
                <tr style="height:35px; text-align:center;">
                    <td>
                        <asp:Button ID="lnkPrev" runat="server" Text="<" CssClass="button" />
                        &nbsp;
                        <asp:Button ID="lnkCurrent" runat="server" Text="今月" CssClass="button" />
                        &nbsp;            
                        <asp:Button ID="lnkNext" runat="server" Text=">" CssClass="button" />
                    </td>
                </tr>                
            </table>

            <table class="sheet header-color2" style="margin:auto; width:200px;" border="1">
                <colgroup>
                    <col style="width:25%" />
                    <col style="width:75%" />
                </colgroup>
                <tr style="height:25px; vertical-align:middle;">
                    <td class="header" style="text-align:center;">
                        <asp:Label runat="server" ID="lbl年月" Text="年月" />
                    </td>    
                    <td class="detail">
                        <asp:DropDownList runat="server" ID="ddl年" CssClass="input"/>
                        <asp:DropDownList runat="server" ID="ddl月" CssClass="input" >
                            <asp:ListItem Text="" Value="" />
                            <asp:ListItem Text="1月" Value="1" />
                            <asp:ListItem Text="2月" Value="2" />
                            <asp:ListItem Text="3月" Value="3" />
                            <asp:ListItem Text="4月" Value="4" />
                            <asp:ListItem Text="5月" Value="5" />
                            <asp:ListItem Text="6月" Value="6" />
                            <asp:ListItem Text="7月" Value="7" />
                            <asp:ListItem Text="8月" Value="8" />
                            <asp:ListItem Text="9月" Value="9" />
                            <asp:ListItem Text="10月" Value="10" />
                            <asp:ListItem Text="11月" Value="11" />
                            <asp:ListItem Text="12月" Value="12" />
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr style="height:25px; vertical-align:middle;">
                    <td class="header" style="text-align:center;">
                        <asp:Label runat="server" ID="lblDay" Text="日付" />
                    </td>
                    <td class="detail">
                        <asp:TextBox runat="server" ID="txtDay" Text="" MaxLength="10" Width="85%" 
                              CssClass="input" autocomplete="off" />            
                        <ajaxToolkit:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="txtDay" />
                    </td>
                </tr>
                <tr style="height:30px; vertical-align:middle;">
                    <td colspan="2" style="text-align:center;">
                        <asp:Button runat="server" ID="btn検索" Text="検索" CssClass="button"/>
                        <asp:Button runat="server" ID="btnクリア" Text="クリア" CssClass="button" />
                        <asp:HiddenField runat="server" ID="hidDate" Value="" />

                        <asp:Label runat="server" ID="lblMessage" Text="" ForeColor="Red" />
                    </td>
                </tr>
            </table>
        </div>
        
        <hr />

        <div class="hint">
            <asp:Label runat="server" ID="lbl表示期間" Text="" />
            <br />
            <asp:Label ID="Label1" runat="server" Text="(応):応募締切日　(説):説明会実施日　(試):試験実施日" Font-Bold="false"></asp:Label>
            
        </div>
        
        <asp:GridView runat="server" ID="grdSchedule" AllowPaging="True" PageSize="10" Width="90%" CssClass="job_list" 
                AutoGenerateColumns="False" DataSourceID="SqlDataSource1" 
                DataKeyNames="企業CD,拠点CD,求人年度,枝NO" HorizontalAlign="Center"
                CellSpacing="2" EmptyDataText="指定の期間にスケジュールはありません。">
            <EmptyDataRowStyle CssClass="EmptyRowStyle" />
            <Columns>
                <asp:BoundField DataField="企業CD" HeaderText="企業CD" SortExpression="企業CD" />
                <asp:BoundField DataField="拠点CD" HeaderText="拠点CD" SortExpression="拠点CD" />
                <asp:BoundField DataField="求人年度" HeaderText="採用年度" SortExpression="求人年度" />
                <asp:BoundField DataField="枝NO" HeaderText="NO" SortExpression="枝NO" />
                <asp:BoundField DataField="実施日" HeaderText="実施日" SortExpression="実施日" DataFormatString="{0:yyyy/MM/dd}" />

                <asp:TemplateField HeaderText="日付">
                    <ItemTemplate>
                        <asp:Label ID="lbl実施日" runat="server" Text='<%#Eval("実施日", "{0:yyyy/MM/dd (ddd)}")%>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle Width="120px" HorizontalAlign="Center" />
                </asp:TemplateField>                

                <asp:TemplateField HeaderText="企業">
                    <ItemTemplate>
                        <asp:HyperLink ID="hyp内容" runat="server" Text='<%#Eval("名前") %>' Target="_new" ></asp:HyperLink>
                    </ItemTemplate>                    
                </asp:TemplateField>

            </Columns>
            <AlternatingRowStyle CssClass="alt-row" />
            <pagersettings mode="NumericFirstLast" NextPageText="次" lastPageText=">>" FirstPageText="<<" PageButtonCount="5" />            
            <PagerStyle CssClass="GridViewPager" />
        </asp:GridView>            

        <asp:HiddenField runat="server" ID="hidMODE" Value="0" />
        <asp:HiddenField runat="server" ID="hid年" Value="0" />
        <asp:HiddenField runat="server" ID="hid月" Value="0" />
        <asp:HiddenField runat="server" ID="hid日" Value="0" />

        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConStr_PT %>" 
            SelectCommand="SPカレンダ一覧" SelectCommandType="StoredProcedure" >
            <SelectParameters>
                <asp:ControlParameter ControlID="hidMODE" Name="MODE" PropertyName="Value" 
                    Type="String" />
                <asp:ControlParameter ControlID="hid年" Name="年" PropertyName="Value" 
                    Type="Int32" />
                <asp:ControlParameter ControlID="hid月" Name="月" PropertyName="Value" 
                    Type="Int32" />
                <asp:ControlParameter ControlID="hid日" Name="日" PropertyName="Value" 
                    Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
        
        <div style="text-align:center; margin-top:15px; margin-bottom:15px;">
            <asp:Button runat="server" Text="閉じる" CssClass="button" OnClientClick='javascript: window.close();' />
        </div>
        
        
        
    </form>
</body>
</html>
