<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="Rate_year.aspx.cs" Inherits="VMT.Rate_year" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphJavaScriptContentPlaceHolder" runat="server">
    <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"/>
      <link rel="stylesheet" href="/resources/demos/style.css"/>
      <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
      <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>

     <script type="text/javascript">
         $(document).ready(function () {
             pageLoad();
             Sys.WebForms.PageRequestManager.getInstance().add_endRequest(pageLoad);
         });
         function pageLoad() {
             $("#<%= txtStartDate.ClientID %>").datepicker({
                 dateFormat: 'mm-dd-yy',
                 changeMonth: true,
                 changeYear: true,
                 gotoCurrent: true,
                 yearRange: '-0:+1',
                 constrainInput: false
             });

             $("#<%= txtEndDate.ClientID %>").datepicker({
                 dateFormat: 'mm-dd-yy',
                 changeMonth: true,
                 changeYear: true,
                 gotoCurrent: true,
                 yearRange: '-0:+1',
                 constrainInput: false
             });
         }
    </script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphPageTitleContentPlaceHolder" runat="server">
    <div id="CssPageTitle">
        <h1>
            Cycle Year
        </h1>
    </div>
    <div id="SubPageTitle">
        <!-- OPTIONAL SUB PAGE TITLE -->
        
    </div>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="cphMainContentPlaceHolder" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
 <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                    <ContentTemplate> 
                        <div style="text-align:right;"><a href="default.aspx">Home</a> <strong>&#8249;&#8249;</strong> <a href="Administration.aspx">Administration</a> <strong>&#8249;&#8249;</strong> Cycle Years</div>
    <div id="wrapper" class="clear">
        <div id="left">
            <fieldset class="masterform">
                <legend>Cycle Year Detail</legend>
                <div style=" width: 100%; height:300px; ">
                    <table cellpadding="3" class="auto-style1">
                        <tr>
                            <td colspan="2"><strong>Add or Update Cycle Year</strong></td>
                        </tr>
                        <tr>
                            <td style="width:50%;">&nbsp;</td>
                            <td>
                                <asp:HiddenField ID="hdn_keyid" runat="server" />
                                <asp:Button ID="btn_create" runat="server" OnClick="btn_create_Click" Text="Create New" CssClass="FormButton" />
                            </td>
                        </tr>
                        <tr>
                            <td style="width:50%;">Year</td>
                            <td>
                                <asp:TextBox ID="txt_rateyear" runat="server" MaxLength="4"></asp:TextBox>
                            </td>
                        </tr>
                         <tr>
                            <td style="width:50%;">Start Date</td>
                            <td>
                                <asp:TextBox ID="txtStartDate" runat="server" MaxLength="10"></asp:TextBox>
                            </td>
                        </tr>
                         <tr>
                            <td style="width:50%;">End Date</td>
                            <td>
                                <asp:TextBox ID="txtEndDate" runat="server" MaxLength="10"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="width:50%;">&nbsp;</td>
                            <td>&nbsp;</td>
                        </tr>
                        <tr>
                            <td style="width:50%; text-align:right;">
                                <asp:Button ID="btn_add" runat="server" OnClick="btn_add_Click" Text="Add New" CssClass="FormButton" />
                            </td>
                            <td style="width:50%; text-align:left;">
                                <asp:Button ID="btn_delete" runat="server" OnClick="btn_delete_Click" Text="Delete" CssClass="FormButton" />
                                &nbsp;<asp:Button ID="btn_reset" runat="server" OnClick="btn_reset_Click" Text="Reset" CssClass="FormButton" />
                            </td>
                        </tr>
                    </table>
                </div>
            </fieldset>
        </div>
        <div id="right">
            <fieldset class="masterform">
                <legend>Cycle Year List</legend>
                  <div style=" width: 100%; height:300px; overflow-y: scroll;">
               
                    <asp:GridView ID="gdv_list" runat="server" BorderColor="#014567" CellPadding="3" OnSelectedIndexChanging="gdv_list_SelectedIndexChanging" Width="96%" OnRowCreated="gdv_list_RowCreated">
                        <AlternatingRowStyle BackColor="#E9EFF2" />
                        <Columns>
                            <asp:TemplateField ShowHeader="False">
                                <ItemTemplate>
                                    <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Select"><img src="resource_gallery/graphics/select.png" /></asp:LinkButton>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="30px" />
                            </asp:TemplateField>
                        </Columns>
                        <HeaderStyle BackColor="#98C8DE" Font-Bold="True" />
                         <SelectedRowStyle BackColor="#FFE98F" />
                    </asp:GridView>
                </div>
            </fieldset>
        </div>
    </div>
        </ContentTemplate>
            </asp:UpdatePanel>
</asp:Content>
