<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="Category.aspx.cs" Inherits="HRMS.GL.Category.Category" %>
<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>

                         <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="Category" ControlStyle-Width="250px" ItemStyle-Width="100px">
                                                <ItemTemplate>
                                                    <asp:HiddenField ID="hid_cat" runat="server"  Value='<%#Bind("JE_CATEGORY_ID")%>'  />
                                                    <asp:TextBox ID="txt_cat" runat="server" Text='<%#Bind("JE_CATEGORY_NAME") %>' CssClass="form-control"></asp:TextBox>
                                                    <asp:RequiredFieldValidator SetFocusOnError="true"
                                                        ValidationGroup='<%# "add1" + Container.DataItemIndex %>'
                                                        runat="server" id="req" controltovalidate="txt_cat"
                                                        errormessage="Category is Required!" />
                                                </ItemTemplate>
                                            </asp:TemplateField>

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

                                            <asp:TemplateField HeaderText="Description" ControlStyle-Width="450px" 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_cat_key"
                                                        errormessage="Description Key is Required!" />
                                                </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>
                </section>
            </div>
        </div>
    </div>
</asp:Content>
