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

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <!-- Modal -->
    <div id="myModal" class="modal fade" role="dialog">
        <div class="modal-dialog">

            <!-- Modal content-->
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
                    <h4 class="modal-title">Choose an option:</h4>
                </div>
                <div class="modal-body">

                    <div class="row">
                        <div class="col-md-4">
                            <asp:Button ID="btn_update" class="btn btn-info btn-block" runat="server" Text="Update" ValidationGroup="save" OnClick="btn_update_Click"></asp:Button>
                        </div>
                        <label class="control-label">Keep history of existing information</label>
                    </div>
                    <br />
                    <div class="row">
                        <div class="col-md-4">
                            <asp:Button ID="btn_correct" class="btn btn-info btn-block" runat="server" Text="Correction" OnClick="btn_save_Click" ValidationGroup="save"></asp:Button>
                        </div>
                        <label class="control-label">Correct existing information</label>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
                </div>
            </div>

        </div>
    </div>



    <div class="main_panel">
        <div class="row">
            <div class="col-md-12">
                <section class="panel">
                    <header class="panel-heading">
                        Over Time Rate Setup
                        <div class="pull-right">
                            <a data-toggle="modal" data-target="#myModal" id="btn_modal_popup" runat="server" class="btn btn-info">Save</a>
                            <asp:Button ID="btn_save" runat="server" CssClass="btn btn-info" Text="Save" OnClick="btn_save_Click" />
                            <asp:Button ID="btn_clear" runat="server" CssClass="btn btn-info" Text="Add New Record" OnClick="btn_clear_Click" />
                        </div>
                    </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">
                            <label class="control-label col-md-2">Business Group</label>
                            <div class="col-md-3">
                                <asp:DropDownList ID="ddl_bg" runat="server" CssClass="form-control select2"></asp:DropDownList>
                            </div>
                        </div>

                        <div class="row">
                            <asp:HiddenField ID="hid_ovt" runat="server" />
                            <label class="control-label col-md-2">Group</label>
                            <div class="col-md-3">
                                <asp:DropDownList ID="ddl_grp" runat="server" CssClass="form-control select2"></asp:DropDownList>
                            </div>


                            <label class="control-label  col-md-2">Rate</label>
                            <div class="col-md-2">
                                <asp:TextBox ID="txt_rate" runat="server" Style="text-align: right" CssClass="form-control"></asp:TextBox>
                            </div>
                        </div>

                        <div class="row">
                            <label class="control-label col-md-2">Description</label>
                            <div class="col-md-4">
                                <asp:TextBox ID="txt_desc" runat="server" CssClass="form-control"></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_datefrm" runat="server" CssClass="form-control datetime"></asp:TextBox>
                            </div>

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

                        <hr />

                        <asp:GridView ID="grd" runat="server" AutoGenerateColumns="False"
                            CellPadding="0" border="0" class="display"
                            OnRowCommand="grd_RowCommand">
                            <Columns>
                                <asp:BoundField HeaderText="ID" DataField="OVT_RATE_ST_ID" />
                                <asp:BoundField DataField="BUSINESS_GROUP_ID" ItemStyle-CssClass="hidden" HeaderStyle-CssClass="hidden" />
                                <asp:BoundField HeaderText="Business Group" DataField="BG_NAME" />
                                <asp:BoundField DataField="GROUP_ID" ItemStyle-CssClass="hidden" HeaderStyle-CssClass="hidden" />
                                <asp:BoundField HeaderText="Group" DataField="Group_" />
                                <asp:BoundField HeaderText="Rate" DataField="RATE" />
                                <asp:BoundField HeaderText="Description" DataField="DESCRIPTION" />
                                <asp:BoundField HeaderText="Date From" DataField="DATE_FROM" />
                                <asp:BoundField HeaderText="Date To" DataField="DATE_TO" />
                                <asp:TemplateField HeaderText="Action" ItemStyle-Width="6%">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="linkedit" CommandName="gEdit" CausesValidation="false" runat="server"><i class="fa fa-pencil" style="font-size:20px !important"></i></asp:LinkButton>
                                        <%--<asp:LinkButton ID="linkdelete" CommandName="gDelete" CausesValidation="false" runat="server"><i class="fa fa-trash" style="font-size:20px !important"></i></asp:LinkButton>--%>
                                    </ItemTemplate>
                                </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").GridviewFix().dataTable();
                //Passing class names
                        </script>


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