<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="OpenClose.aspx.cs" Inherits="HRMS.GL.Accounting_Calender.OpenClose" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="main-panel">
        <div class="row">
            <div class="col-md-12">
                <section class="panel">
                    <header class="panel-heading">
                        Open and Close Periods
                    </header>

                    <div class="panel-body">
                        <div class="span6">
                            <div id="divmessage" runat="server" visible="false" class="alert alert-info alert-dismissable">
                                <asp:Label ID="lbl_msg" runat="server" CssClass="msg" Text=""> </asp:Label>
                            </div>
                        </div>

                        <div class="span6">
                            <div id="diverrmessage" runat="server" visible="false" class="alert alert-danger alert-dismissable">
                                <asp:Label ID="lbl_err_msg" runat="server" CssClass="msg" Text=""> </asp:Label>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-6">



                                <div class="row">
                                    <label class="control-label col-md-2">Ledger</label>
                                    <div class="col-md-7">
                                        <asp:DropDownList ID="ddl_ledg" runat="server" CssClass="form-control select2"></asp:DropDownList>
                                    </div>
                                </div>

                                <div class="row" style="padding-top: 05px">
                                    <label class="control-label col-md-2">Status</label>
                                    <div class="col-md-7">
                                        <asp:DropDownList ID="ddl_status" runat="server" CssClass="form-control select2"></asp:DropDownList>
                                    </div>
                                </div>


                                <div class="row" style="padding-top: 05px">
                                    <label class="control-label col-md-2">Period</label>
                                    <div class="col-md-7">
                                        <asp:DropDownList ID="ddl_period" runat="server" CssClass="form-control select2"></asp:DropDownList>
                                    </div>
                                </div>

                                <div class="row" style="padding-top: 05px">
                                    <div class="col-md-2 col-md-offset-2">
                                        <asp:Button ID="btn_find" runat="server" CssClass="btn btn-info" Text="Find" OnClick="btn_find_Click" />
                                    </div>
                                </div>


                            </div>

                            <div class="col-md-6" >
                                <div class="row">
                                    <label class="control-label col-md-3">Latest Open</label>
                                    <div class="col-md-7">
                                        <asp:TextBox ID="txt_ltst" Enabled="false" runat="server" CssClass="form-control"></asp:TextBox>
                                    </div>
                                </div>

                                <div class="row" style="padding-top: 05px">
                                    <label class="control-label col-md-3">Target Period</label>
                                    <div class="col-md-7">
                                        <asp:DropDownList ID="ddl_trgt" runat="server" Enabled="false" CssClass="form-control select2"></asp:DropDownList>
                                    </div>
                                </div>

                                <div class="row" style="padding-top: 05px">
                                    <div class="col-md-2 col-md-offset-3">
                                        <asp:Button ID="btn_opn" runat="server" Enabled="false" CssClass="btn btn-info" Text="Open Period" OnClick="btn_opn_Click" />
                                    </div>
                                </div>
                            </div>
                        </div>
                        <hr />
                        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CssClass="display" CellPadding="0" OnRowDataBound="GridView1_RowDataBound" OnRowCommand="GridView1_RowCommand">
                            <Columns>
                                <asp:TemplateField HeaderText="Status" ItemStyle-Width="150px" ControlStyle-Width="100%">
                                    <ItemTemplate>
                                        <asp:HiddenField ID="hid_pr_status" Value='<%# Eval("PERIOD_STATUS_ID") %>' runat="server" />
                                        <asp:HiddenField ID="hid_status" Value='<%# Eval("STATUS") %>' runat="server" />
                                        <asp:HiddenField ID="hid_qtr" Value='<%# Eval("QUARTER_NUM") %>' runat="server" />
                                        <asp:DropDownList ID="ddl_status" runat="server" CssClass="form-control select2"></asp:DropDownList>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Period">
                                    <ItemTemplate>
                                        <asp:TextBox ID="txt_name" Enabled="false" Text='<%#Eval("PERIOD_NAME") %>' runat="server" CssClass="form-control"></asp:TextBox>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Number">
                                    <ItemTemplate>
                                        <asp:TextBox ID="txt_num" Enabled="false" Text='<%#Eval("PERIOD_NUM") %>' runat="server" CssClass="form-control"></asp:TextBox>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Year">
                                    <ItemTemplate>
                                        <asp:TextBox ID="txt_year" Enabled="false" runat="server" Text='<%#Eval("PERIOD_YEAR") %>' CssClass="form-control"></asp:TextBox>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="From Date">
                                    <ItemTemplate>
                                        <asp:TextBox ID="txt_fdate" Enabled="false" Text='<%#Eval("START_DATE") %>' runat="server" CssClass="form-control"></asp:TextBox>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="To Date">
                                    <ItemTemplate>
                                        <asp:TextBox ID="txt_tdate" Enabled="false" Text='<%#Eval("END_DATE") %>' runat="server" CssClass="form-control"></asp:TextBox>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Action" ItemStyle-Width="6%">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="linkadd" runat="server" CommandName="gAdd"><i class="fa fa-plus" style="font-size:20px !important;"></i></asp:LinkButton>
                                        <asp:LinkButton ID="linkdlt" Visible="false" CausesValidation="false" CommandName="gDelete" runat="server" OnClientClick="return confirm('Are you sure to delete?')"><i class="fa fa-trash" style="font-size:20px !important"></i></asp:LinkButton>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>

                        </asp:GridView>

                    </div>
                </section>
            </div>
        </div>
    </div>

    <script src="../../ThemeScrips/jquery.min.js"></script>
    <link href="../../ThemeScrips/select2.min.css"
        rel="stylesheet" />
    <script src="../../ThemeScrips/select2.min.js"></script>
    <%--<script src="/ThemeScrips/select2.min.js"></script>--%>
    <script>
        $('.select2').select2();
    </script>
</asp:Content>
