<%@ Page Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="DataGroup.aspx.cs"
    Inherits="HRMS.DataGroup" Title="Cloud HR - Data Group" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:Panel ID="main_pnl" runat="server">
        <div class="row">
            <div class="col-lg-12">
                <section class="panel">
                    <header class="panel-heading" style="padding-bottom:30px">
                           <span class="label label-primary">Data Group</span>


                    </header>
                    <div class="panel-body">
                        <div class="span6">
                            <div id="divMessage" runat="server" visible="false" class="alert alert-info alert-dismissable">
                                <i class="icon-check-sign"></i>
                                <asp:Label ID="lblMessage" class="msg" runat="server" Text=""></asp:Label>
                            </div>
                            <div class="span6">
                                <div id="diverrorMessage" runat="server" visible="false" class="alert alert-danger alert-dismissable">
                                    <i class="icon-check-sign"></i>
                                    <asp:Label ID="lblerrorMessage" class="msg" runat="server" Text=""></asp:Label>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-lg-1"></div>
                            <label for="inputPassword1" class="col-lg-2 col-sm-2 control-label"></label>
                            <div class="col-lg-4">
                                <asp:HiddenField ID="hid_DG_CODE" runat="server"></asp:HiddenField>
                            </div>
                        </div>
                        <div class="row">
                            <label for="inputPassword1" class="col-xs-4 col-sm-3 col-md-3 col-lg-4 control-label">Name</label>
                            <div class="col-xs-6 col-sm-7 col-md-3 col-lg-5">
                                <asp:TextBox ID="txt_DG_NAME" runat="server" placeholder="Name" CssClass="form-control"></asp:TextBox>
                                <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator_txt_DG_NAME" ControlToValidate="txt_DG_NAME" ErrorMessage="Name is required." SetFocusOnError="true" ValidationGroup="save"></asp:RequiredFieldValidator>
                            </div>

                            <label for="inputPassword1" class="col-xs-4 col-sm-3 col-md-2 col-lg-4 control-label">Description</label>
                            <div class="col-xs-6 col-sm-7 col-md-3 col-lg-5">
                                <asp:TextBox ID="txt_DESCRIPTION" runat="server" placeholder="Description" CssClass="form-control"></asp:TextBox>
                                <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator_txt_DESCRIPTION" ControlToValidate="txt_DESCRIPTION" ErrorMessage="Description is required." SetFocusOnError="true" ValidationGroup="save"></asp:RequiredFieldValidator>
                            </div>

                        </div>


                        <div class="row">
                            <asp:Repeater ID="add_info" runat="server">
                                <HeaderTemplate>
                                    <header class="panel-heading">Additional Information</header>
                                    <br />
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <div class="form-group">
                                        <div class="col-lg-1"></div>
                                        <asp:Label ID="r_lbl" runat="server" class="col-lg-2 col-sm-2 control-label" Text='<%# Eval("PROMPT") %>'></asp:Label><div class="col-lg-4">
                                            <asp:TextBox ID="txt_r_value" runat="server" placeholder='<%# Eval("PROMPT") %>' Text='<%# Eval("value") %>' CssClass="form-control"></asp:TextBox><asp:HiddenField ID="hid_field_name" runat="server" Value='<%# Eval("col_name") %>'></asp:HiddenField>
                                        </div>
                                    </div>
                                </ItemTemplate>
                            </asp:Repeater>
                        </div>
                        <br />
                        <div class="row">
                            <div class="col-xs-offset-4 col-sm-offset-3 col-md-offset-3 col-lg-offset-4 col-lg-8">
                                <asp:Button ID="btnSave" class="btn btn-info" runat="server" Text="Save" OnClick="btnSave_Click" ValidationGroup="save"></asp:Button>
                                <a href="#" id="aCancel" runat="server" class="btn btn-info">Back</a>
                            </div>
                        </div>
                        <div class="row">

                            <div class="col-lg-12">
                                <div class="panel">
                                    <div class="panel-heading">Data Group Detail</div>
                                    <div class="actions pull-right">
                                        <div class="btn-group">

                                            <a href="#" id="aNew" runat="server" class="btn btn-info">Add Detail</a>
                                        </div>
                                    </div>
                                    <br />
                                        <div class="table-responsive">
                                        <asp:GridView ID="grd_dtl" runat="server" AutoGenerateColumns="False"
                                            CellPadding="0" border="0" class="display" OnRowCommand="grd_dtl_RowCommand">
                                            <Columns>
                                                <asp:BoundField HeaderText="Id" DataField="dgd_code" />
                                                <asp:BoundField HeaderText="Business Group" DataField="bg_name" />
                                                <asp:BoundField HeaderText="location" DataField="loc_name" />
                                                <asp:BoundField HeaderText="Date From" DataField="EFF_START_DATE" />
                                                <asp:BoundField HeaderText="Date To" DataField="EFF_END_DATE" />
                                                <asp:TemplateField ItemStyle-Width="6%" HeaderText="Action">
                                                    <ItemTemplate>

                                                        <asp:LinkButton ID="lnkEdit" runat="server" CommandName="gEdit"><i class="fa fa-pencil" style="font-size:20px !important"></i></asp:LinkButton>
                                                        &nbsp<asp:LinkButton ID="lnkDelete" runat="server" CommandName="gDelete" OnClientClick="return confirm('Are you sure to delete?')"><i class="fa fa-trash" style="font-size:20px !important"></i></asp:LinkButton>


                                                    </ItemTemplate>

                                                    <ItemStyle Width="6%"></ItemStyle>
                                                </asp:TemplateField>
                                            </Columns>
                                            <%-- Mandatory--%>
                                            <RowStyle CssClass="rowStyle" />
                                            <%-- Mandatory--%>
                                            <HeaderStyle CssClass="headerStyle" />
                                            <%-- optional--%>
                                            <FooterStyle CssClass="footerStyle" />
                                        </asp:GridView>
                                            </div>
                                        <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">
                                            //without passing class names.
                                            $("#ContentPlaceHolder1_grd_dtl").GridviewFix().dataTable();
                                                                             //Passing class names
                                        </script>
                                        <br />
                                </div>
                            </div>
                        </div>
                    </div>
                </section>
            </div>
        </div>
    </asp:Panel>

</asp:Content>
