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

<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">
                        Section
                        <div class="pull-right">
                            <asp:Button ID="btn_save" runat="server" CssClass="btn btn-info" Text="Save" OnClick="btn_save_Click" />
                            <asp:Button ID="btn_add_nw" runat="server" CssClass="btn btn-info" Text="Add New Record" />
                        </div>
                    </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 class="row">
                            <label class="col-md-2 control-label">Code</label>
                            <div class="col-md-3">
                                <asp:HiddenField ID="hid_sec" runat="server" />
                                <asp:TextBox ID="txt_code" runat="server" CssClass="form-control"></asp:TextBox>
                            </div>


                            <label class="col-md-2 control-label">Name</label>
                            <div class="col-md-4">
                                <asp:TextBox ID="txt_name" runat="server" CssClass="form-control"></asp:TextBox>
                            </div>
                        </div>


                        <div class="row" style="padding-top: 10px">
                            <label class="col-md-2 control-label">Description</label>
                            <div class="col-md-5">
                                <asp:TextBox ID="txt_desc" Height="80px" runat="server" CssClass="form-control" TextMode="MultiLine"></asp:TextBox>
                            </div>
                        </div>
                        <hr />
                        <div class="row">
                            <label class="control-label col-md-2">Date From</label>
                            <div class="col-md-3">
                                <asp:TextBox ID="txt_dt_frm" runat="server" CssClass="form-control datetime"></asp:TextBox>

                                  <asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save"
                                    runat="server" id="req_dt_frm" controltovalidate="txt_dt_frm"
                                    errormessage="Date From is Required!" />
                            </div>


                            <label class="control-label col-md-2">Date To</label>
                            <div class="col-md-3">
                                <asp:TextBox ID="txt_dt_to" runat="server" CssClass="form-control datetime"></asp:TextBox>
                            </div>
                        </div>



                        <hr />


                        <asp:GridView ID="GridView1" CssClass="display" CellPadding="0" Border="0"
                            AutoGenerateColumns="false" runat="server" OnRowCommand="GridView1_RowCommand">
                            <Columns>

                                <asp:BoundField DataField="PO_SECTION_ID" HeaderText="ID" />
                                <asp:BoundField DataField="PO_SECTION_CODE" HeaderText="Code" />
                                <asp:BoundField DataField="PO_SECTION_NAME" HeaderText="Section Name" />
                                <asp:BoundField DataField="DESCRIPTION" HeaderText="Description" />
                                <asp:BoundField DataField="START_DATE" HeaderText="Start Date" />
                                <asp:BoundField DataField="END_DATE" HeaderText="End Date" />


                                <asp:TemplateField HeaderText="Action">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="lnk_edit" CausesValidation="false" CommandName="gedit" runat="server"><i class="fa fa-pencil" style="font-size:20px !important"></i></asp:LinkButton>
                                        <asp:LinkButton ID="lnk_dlt" CausesValidation="false" CommandName="gdlt" OnClientClick="return confirm('Are you sure to delete?')" runat="server"><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>
</asp:Content>
