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

<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">
                        <span class="label label-primary">Journal Categories</span>
                    </header>

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

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

                        <div style="width: 102%; height: 250px; overflow: scroll">


                            <div class="table table-responsive">


                                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
                                    CssClass="table table-striped table-bordered table-hover" CellPadding="0" OnRowCommand="GridView1_RowCommand">
                                    <Columns>
                                        <asp:TemplateField HeaderText="Source" ControlStyle-Width="250px" ItemStyle-Width="100px">
                                            <ItemTemplate>
                                                <asp:HiddenField ID="hid_source" runat="server" Value='<%#Bind("JE_SOURCE_ID")%>' />
                                                <asp:TextBox ID="txt_source" runat="server" Text='<%#Bind("JE_SOURCE_NAME") %>' CssClass="form-control"></asp:TextBox>
                                                <asp:RequiredFieldValidator SetFocusOnError="true"
                                                    ValidationGroup='<%# "add1" + Container.DataItemIndex %>'
                                                    runat="server" ID="req" ControlToValidate="txt_source"
                                                    ErrorMessage="Source is Required!" />
                                            </ItemTemplate>
                                        </asp:TemplateField>

                                        <asp:TemplateField HeaderText="Source Key" ControlStyle-Width="250px" ItemStyle-Width="100px">
                                            <ItemTemplate>
                                                <asp:TextBox ID="txt_src_key" runat="server" Text='<%#Bind("JE_SOURCE_KEY") %>' CssClass="form-control"></asp:TextBox>
                                                <asp:RequiredFieldValidator SetFocusOnError="true"
                                                    ValidationGroup='<%# "add1" + Container.DataItemIndex %>'
                                                    runat="server" ID="req2" ControlToValidate="txt_src_key"
                                                    ErrorMessage="Source Key is Required!" />
                                            </ItemTemplate>
                                        </asp:TemplateField>

                                        <asp:TemplateField HeaderText="Description" ControlStyle-Width="350px" ItemStyle-Width="100px">
                                            <ItemTemplate>
                                                <asp:TextBox ID="txt_desc" runat="server" Text='<%#Bind("DESCRIPTION") %>' CssClass="form-control"></asp:TextBox>
                                                <asp:RequiredFieldValidator SetFocusOnError="true"
                                                    ValidationGroup='<%# "add1" + Container.DataItemIndex %>'
                                                    runat="server" ID="req3" ControlToValidate="txt_desc"
                                                    ErrorMessage="Description Key is Required!" />
                                            </ItemTemplate>
                                        </asp:TemplateField>

                                        <asp:TemplateField HeaderText="Import Journal References" ControlStyle-Width="150px" ItemStyle-Width="100px">
                                            <ItemTemplate>
                                                <asp:CheckBox ID="chk_imp_journal_ref" runat="server" Checked='<%#bool.Parse(Eval("JOURNAL_REFERENCE_FLAG")+""=="Y"?"True":"False") %>' CssClass="checkbox" />
                                            </ItemTemplate>
                                        </asp:TemplateField>

                                        <asp:TemplateField HeaderText="Require Journal Approval" ControlStyle-Width="150px" ItemStyle-Width="100px">
                                            <ItemTemplate>
                                                <asp:CheckBox ID="chk_req_journal_app" Checked='<%#bool.Parse(Eval("JOURNAL_APPROVAL_FLAG")+""=="Y"?"True":"False") %>' runat="server" CssClass="checkbox" />
                                            </ItemTemplate>
                                        </asp:TemplateField>


                                        <asp:TemplateField HeaderText="Import Using Key" ControlStyle-Width="150px" ItemStyle-Width="100px">
                                            <ItemTemplate>
                                                <asp:CheckBox ID="chk_imp_using_key" runat="server" Checked='<%#bool.Parse(Eval("IMPORT_USING_KEY_FLAG")+""=="Y"?"True":"False") %>' CssClass="checkbox" />
                                            </ItemTemplate>
                                        </asp:TemplateField>


                                        <asp:TemplateField HeaderText="Freze Journals" ControlStyle-Width="150px" ItemStyle-Width="100px">
                                            <ItemTemplate>
                                                <asp:HiddenField ID="hid_freze_jr" runat="server" />
                                                <asp:DropDownList ID="ddl_freze_jr" runat="server" CssClass="form-control select2"></asp:DropDownList>
                                            </ItemTemplate>
                                        </asp:TemplateField>


                                        <asp:TemplateField HeaderText="Effective Date Rule" ControlStyle-Width="150px" ItemStyle-Width="100px">
                                            <ItemTemplate>
                                                <asp:HiddenField ID="hid_eff_dt_rule" runat="server" />
                                                <asp:DropDownList ID="ddl_eff_dt_rule" runat="server" CssClass="form-control select2"></asp:DropDownList>
                                            </ItemTemplate>
                                        </asp:TemplateField>


                                        <asp:TemplateField HeaderText="Action">
                                            <ItemTemplate>
                                                <asp:LinkButton ID="lnk_add"
                                                    ValidationGroup='<%# "add1" + Container.DataItemIndex %>'
                                                    runat="server" CommandName="gadd"><i class="fa fa-plus"
                                                            style="font-size:20px !important;"></i>
                                                </asp:LinkButton>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                    <FooterStyle CssClass="footerStyle" />
                                    <HeaderStyle CssClass="headerStyle" />
                                    <RowStyle CssClass="rowStyle" />
                                </asp:GridView>
                            </div>
                        </div>
                    </div>
                </section>
            </div>
        </div>
    </div>
</asp:Content>
