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

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <%--<asp:ScriptManager ID="scriptManager" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel runat="server" ID="upMain" UpdateMode="Conditional" ChildrenAsTriggers="true">
        <ContentTemplate>--%>
            <div class="main-panel">
                <div class="row">
                    <div class="col-md-12">
                        <section class="panel">
                <header class="panel-heading">
                    List Of Journal Vouchers
                        <div class="pull-right">
                            <asp:button text="New Record" ID="btn_addnew" CssClass="btn btn-info" 
                                runat="server" onclick="btn_addnew_Click"/>
                            <asp:Button ID="btn" runat="server" CssClass="btn btn-info" Text="Search" OnClick="btn_Click" ValidationGroup="search" />
                        </div>
                </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">
                        <label class="control-label col-md-2">Date From</label>
                    <div class="col-md-2">
                            <asp:TextBox ID="txt_frm" runat="server" CssClass="form-control datetime"></asp:TextBox>
                        <asp:RequiredFieldValidator SetFocusOnError="true"  ValidationGroup="search" runat="server" id="req1" controltovalidate="txt_frm" errormessage="Date From is Required!" />
                        </div>

                <label class="control-label col-md-2">Date To</label>
                    <div class="col-md-2">
                            <asp:TextBox ID="txt_to" runat="server" CssClass="form-control datetime"></asp:TextBox>
                        </div>
                 
                </div>
                <hr />
         
          <asp:GridView ID="GridView1" runat="server" CssClass="display" AutoGenerateColumns="false" 
                     border="0" CellPadding="0" 
                    onrowcommand="GridView1_RowCommand">
                <Columns>
                    <asp:BoundField DataField="JE_HEADER_ID" HeaderText="ID" ItemStyle-CssClass="hidden" HeaderStyle-CssClass="hidden"/>
                    <asp:BoundField DataField="EXTERNAL_REFERENCE" HeaderText="Voucher No." />
                    <asp:BoundField DataField="DEFAULT_EFFECTIVE_DATE" HeaderText="Transaction Date" />
                    <asp:BoundField DataField="NAME" HeaderText="Journal Name" />
                    <asp:BoundField DataField="DESCRIPTION" HeaderText="Description" />
                    <asp:BoundField DataField="BALANCED_JE_FLAG" HeaderText="Posted" />
                    
                    <asp:TemplateField HeaderText="Acion" ItemStyle-Width="6%">
                        <ItemTemplate>
                            <asp:LinkButton ID="lnkedit" runat="server" CausesValidation="false" ClientIDMode="static" CommandName="gedit"><i class="fa fa-pencil" style="font-size:20px !important;"></i></asp:LinkButton>
                            <asp:LinkButton ID="lnkdelete" Visible="false" runat="server" Enabled='<%#bool.Parse(Eval("BALANCED_JE_FLAG").ToString() == "Yes" ? "False":"True") %>' OnClientClick="return confirm('Are you sure to delete?')" CommandName="gdelete"><i class="fa fa-trash" style="font-size:20px !important"></i></asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <FooterStyle CssClass="footerStyle" />
                            <HeaderStyle CssClass="headerStyle" />
                            <RowStyle CssClass="rowStyle" />
            </asp:GridView>
                

                    <script src="/ThemeScrips/Datatables/media/js/jquery.js" type="text/javascript"></script>
                    <script src="/ThemeScrips/Datatables/media/js/jquery.datatables.min.js" type="text/javascript"></script>
                    <script src="/ThemeScrips/Datatables/media/js/jquery.Datatables.js" type="text/javascript"></script>
                    <script src="/ThemeScrips/Datatables/media/js/GridviewFix.js" type="text/javascript"></script>
                    <script type="text/javascript">
                        $("#ContentPlaceHolder1_GridView1").GridviewFix().dataTable();
                    </script>




                

                </div>
            </section>
                    </div>
                </div>
            </div>
       <%-- </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="GridView1" EventName="RowCommand" />
        </Triggers>
    </asp:UpdatePanel>--%>
</asp:Content>
