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

<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">
                            Actions
                            <div class="pull-right">
                                <asp:button text="Save" CssClass="btn btn-info" ID="btn_save" Width="120px"
                                    ValidationGroup="save" runat="server" onclick="btn_save_Click" />
                                <asp:button text="New Record" CssClass="btn btn-info" ID="btn_cancel" runat="server"
                                    onclick="btn_cancel_Click" />
                            </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" style="padding-top:10px">

                                <asp:HiddenField ID="hid_Actionid" runat="server" />
                                
                                <label class="control-label col-md-4">Bussiness Unit</label>
                                <div class="col-md-3">
                                    <asp:DropDownList ID="ddl_Busunit" runat="server" CssClass="form-control select2">
                                    </asp:DropDownList>
                                <asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server" id="req1" controltovalidate="ddl_Busunit" errormessage="Business Group is Required!" />
                                </div>


                            </div>

                            <div class="row" style="padding-top:10px">



                                <label class="control-label col-md-4">Title</label>
                                <div class="col-md-3">
                                    <asp:TextBox CssClass="form-control" ID="txt_title" runat="server">
                                    </asp:TextBox>
                                    <asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save"
                                        runat="server" id="RequiredFieldValidator1" controltovalidate="txt_title"
                                        errormessage="Title is Required!" />
                                </div>


                            </div>

                            <div class="row" style="padding-top:10px">

                                <label class="col-md-4 control-label">Description</label>
                                <div class="col-md-3">

                                    <asp:TextBox CssClass="form-control" ID="txt_desc" runat="server">
                                    </asp:TextBox>
                                    <asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save"
                                        runat="server" id="req_desc" controltovalidate="txt_desc"
                                        errormessage="Description is Required!" />


                                </div>
                            </div>



                            <hr />
                          
                                    <asp:GridView ID="GridView1" CssClass="display" CellPadding="0" Border="0"
                                        AutoGenerateColumns="false" runat="server" onrowcommand="GridView1_RowCommand">
                                        <Columns>
                                            <asp:BoundField DataField="Action" HeaderText="ID" />
                                            <asp:BoundField DataField="GroupName" HeaderText="Bussiness Group" />
                                            <asp:BoundField DataField="title" HeaderText="Title" />
                                            <asp:BoundField DataField="Description" HeaderText="Description" />

                                            <asp:TemplateField HeaderText="Action">
                                                <ItemTemplate>
                                                    <asp:HiddenField ID="hid_ActionID" runat="server"
                                                        
                                                        Value='<%#Bind("Action")%>' />
                                                    
                                                    <asp:HiddenField ID="hid_busgroupid" runat="server" 
                                                        Value='<%#Bind("BUSINESS_GROUP_ID")%>' />
                                                    <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 class="row">
                                <asp:Label CssClass="control-label col-md-offset-2" ID="lbl_due" runat="server">
                                </asp:Label>
                            </div>

                        </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>
