<%@ Page Title="Cloud HR - Flex Field::." Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true"
    CodeBehind="FlexFieldSetup.aspx.cs" Inherits="HRMS.FlexFieldSetup" %>

<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">Flex Field Setup</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="form-group">
                                  <div class="col-lg-1"></div>
                                     <label for="inputPassword1" class="col-lg-2 col-sm-2 control-label">Table</label>
                                      <div class="col-lg-4">
                                      <asp:HiddenField ID="hidSatId" runat="server"></asp:HiddenField>
                                        <asp:DropDownList ID="ddl_tname" runat="server" CssClass="form-control select2"></asp:DropDownList>
                                           <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator_ddl_tname" ControlToValidate="ddl_tname" ErrorMessage="Table is required." setfocusonerror="true" ValidationGroup="save"></asp:RequiredFieldValidator>
                                      </div>
                            </div>

                            <div class="form-group">
                                  <div class="col-lg-1"></div>
                                     <label for="inputPassword1" class="col-lg-2 col-sm-2 control-label">Description</label>
                                      <div class="col-lg-4">
                                      <asp:TextBox ID="txtdesc" runat="server" placeholder="Description" MaxLength="200" CssClass="form-control"></asp:TextBox>
                                       <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator_txtdesc" ControlToValidate="txtdesc" ErrorMessage="Description is required." setfocusonerror="true" ValidationGroup="save"></asp:RequiredFieldValidator>
                                      </div>
                            </div>

                            <div class="form-group">
                                  <div class="col-lg-1"></div>
                                     <label for="inputPassword1" class="col-lg-2 col-sm-2 control-label">Date From</label>
                                      <div class="col-lg-4">
                                      <asp:TextBox ID="Txtfdate" runat="server" placeholder="Date From" MaxLength="10" 
                                              CssClass="form-control datetime"></asp:TextBox>
                                               <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator_Txtfdate" ControlToValidate="Txtfdate" ErrorMessage="Date From is required." setfocusonerror="true" ValidationGroup="save"></asp:RequiredFieldValidator>
                                      </div>
                            </div>
 
                            <div class="form-group">
                                  <div class="col-lg-1"></div>
                                     <label for="inputPassword1" class="col-lg-2 col-sm-2 control-label">Date To</label>
                                      <div class="col-lg-4">
                                     <asp:TextBox ID="Txttdate" runat="server" placeholder="Date To" MaxLength="10" CssClass="form-control datetime"></asp:TextBox>
                                      </div>
                            </div>

                            <div class="form-group">
                                  <div class="col-lg-1"></div>
                                      <div class="col-lg-offset-2 col-lg-8">
                                      <asp:Button ID="btnSave" class="btn btn-info" runat="server" Text="Save" ValidationGroup="save"
                                              onclick="btnSave_Click" ></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">Flex Field 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>
                                            <div id="dtl_div" runat="server" class="panel-body">
                                             <asp:GridView ID="grd_ff_dtl" runat="server"  AutoGenerateColumns="False"   cellpadding="0" border="0" class="display" onrowcommand="grd_ff_dtl_RowCommand" >
                                                <Columns>
                                                    <asp:BoundField HeaderText="Id" DataField="ID" />
                                                    <asp:BoundField HeaderText="Column Name" DataField="Col_name" />
                                                    <asp:BoundField HeaderText="Prompt" DataField="PROMPT" />
                                                    <asp:BoundField HeaderText="Seq" DataField="SEQ_NO" />
                                                    <asp:BoundField HeaderText="Date From" DataField="date_from" />
                                                    <asp:BoundField HeaderText="Date To" DataField="date_to" />                
                                                    <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" Visible="false" CommandName="gDelete" OnClientClick="return confirm('Are you sure to delete?')"><i class="fa fa-trash" style="font-size:20px !important"></i></asp:LinkButton>
                                                    <asp:HiddenField id="hid_sat_id" runat="server" Value='<%# bind("sat_id") %>' />
                                                    <asp:HiddenField id="hid_desc" runat="server" Value='<%# bind("description") %>' />
                                                    <asp:HiddenField id="hid_length" runat="server" Value='<%# bind("length") %>' />
                                                    
                                                    </ItemTemplate>

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

     <script src="../../ThemeScrips/jquery.min.js"></script>
    <link href="../../ThemeScrips/select2.min.css"
        rel="stylesheet" />
    <script src="../../ThemeScrips/select2.min.js"></script>
    <%--<script src="/ThemeScrips/select2.min.js"></script>--%>
    <script>
        $('.select2').select2();
    </script>
</asp:Content>
