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

<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">
                        Skills
                         <div class="pull-right">
                            <asp:button text="Back" 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">
                            <asp:HiddenField ID="hid_requisition" runat="server" />
                            <asp:HiddenField ID="hid_req_line_id" runat="server" />
                            <asp:HiddenField ID="hid_bg_grp" runat="server" />
                            <asp:HiddenField ID="hid_position" runat="server" />
                        </div>
                          <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
                                CssClass="table table-striped table-bordered table-hover" CellPadding="0" OnRowCommand="GridView2_RowCommand" OnRowDataBound="GridView2_RowDataBound">
                                <Columns>
                                <asp:TemplateField HeaderStyle-Width="1%">
                                    <ItemTemplate>
                                        <asp:HiddenField ID="hid_skill" runat="server" Value='<%#Bind("REQUEST_SKILL_LINE_ID")%>' />
                                        <%--<asp:HiddenField ID="hid_position" runat="server" Value='<%#Bind("POSITION_ID")%>' />                                              --%>
                                    </ItemTemplate>
                                </asp:TemplateField>   
                                    
                                <asp:TemplateField HeaderText="Position" HeaderStyle-Width="230px">
                                    <ItemTemplate>
                                        <asp:TextBox ID="txt_pos_name" Enabled="false" runat="server"  CssClass="form-control"></asp:TextBox>
                                        <%--<asp:DropDownList ID="ddl_position" runat="server" CssClass="form-control select2"></asp:DropDownList>
                                        <asp:RequiredFieldValidator runat="server" ID="rq1" ControlToValidate="ddl_position" ErrorMessage="Position is required." setfocusonerror="true" ValidationGroup = '<%# "add2_" + Container.DataItemIndex %>'></asp:RequiredFieldValidator>--%>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Skill Type" HeaderStyle-Width="16%">
                                    <ItemTemplate>

                                        <asp:HiddenField ID="hid_request" runat="server" 
                                            Value='<%#Bind("REQUEST_TYPE")%>' />                                        

                                        <asp:DropDownList CssClass="form-control select2"
                                        ID="ddl_request" runat="server">
                                        </asp:DropDownList>
                                        <asp:RequiredFieldValidator runat="server" ID="rq2" ControlToValidate="ddl_request" ErrorMessage="Request Type is required." setfocusonerror="true" ValidationGroup = '<%# "add2_" + Container.DataItemIndex %>'></asp:RequiredFieldValidator>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Total Score" HeaderStyle-Width="08%">
                                    <ItemTemplate>
                                        <asp:TextBox ID="txt_totalscore" runat="server" onkeypress="return numbersOnly(event);" Text='<%#Bind("TOTAL_SCORE")%>' CssClass="form-control"></asp:TextBox>
                                        <asp:RequiredFieldValidator runat="server" ID="rq3" ControlToValidate="txt_totalscore" ErrorMessage="Total Score is required." setfocusonerror="true" ValidationGroup = '<%# "add2_" + Container.DataItemIndex %>'></asp:RequiredFieldValidator>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Min Score"  HeaderStyle-Width="08%">
                                    <ItemTemplate>
                                        <asp:TextBox ID="txt_minscore" runat="server" onkeypress="return numbersOnly(event);" Text='<%#Bind("MIN_SCORE")%>' CssClass="form-control"></asp:TextBox>
                                        <asp:RequiredFieldValidator runat="server" ID="rq4" ControlToValidate="txt_minscore" ErrorMessage="Min Score is required." setfocusonerror="true" ValidationGroup = '<%# "add2_" + Container.DataItemIndex %>'></asp:RequiredFieldValidator>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Publish">
                                    <ItemTemplate>
                                        <asp:CheckBox ID="chk_publish" runat="server" Checked='<%# bool.Parse(Eval("PUBLISH").ToString() == "T" ? "True" : "False") %>'/>
                                        <%--<span class="checkbox text-center"><input id="chk_publish" runat="server" checked='<%# bool.Parse(Eval("PUBLISH").ToString() == "Y" ? "True" : "False") %>' type="checkbox" name="chk_publish" /></span>--%>
                                        <%--<asp:RequiredFieldValidator runat="server" ID="rq5" ControlToValidate="chkbox_publish" ErrorMessage="Publish is required." setfocusonerror="true" ValidationGroup = '<%# "add_" + Container.DataItemIndex %>'></asp:RequiredFieldValidator>--%>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Sequence">
                                    <ItemTemplate>
                                        <asp:TextBox ID="txt_sequence" runat="server" onkeypress="return numbersOnly(event);" Text='<%#Bind("Sequence")%>'  CssClass="form-control"></asp:TextBox>
                                        <asp:RequiredFieldValidator runat="server" ID="rq6" ControlToValidate="txt_sequence" ErrorMessage="Sequence is required." setfocusonerror="true" ValidationGroup = '<%# "add2_" + Container.DataItemIndex %>'></asp:RequiredFieldValidator>
                                    </ItemTemplate>
                                </asp:TemplateField>


                                     <asp:TemplateField HeaderText="Description" ItemStyle-Width="30%">
                                    <ItemTemplate>
                                        <asp:TextBox ID="txt_desc" runat="server" Text='<%#Bind("DESCRIPTION")%>'  CssClass="form-control"></asp:TextBox>
                                        <asp:RequiredFieldValidator runat="server" ID="rq7" ControlToValidate="txt_desc" ErrorMessage="Description is required." setfocusonerror="true" ValidationGroup = '<%# "add2_" + Container.DataItemIndex %>'></asp:RequiredFieldValidator>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                
                                    <asp:TemplateField HeaderText="Action" HeaderStyle-Width="8%" ItemStyle-Width="5px">
                                                            <ItemTemplate>
                                                                <asp:LinkButton ID="linkedit" runat="server"
                                                                    Visible="false" CommandName="gEdit"><i
                                                                        class="fa fa-pencil"
                                                                        style="font-size:20px !important;"></i>
                                                                </asp:LinkButton>
                                                                <asp:LinkButton ID="lnk_add" ValidationGroup= '<%# "add2_" + Container.DataItemIndex %>'
                                                                    runat="server" CommandName="gadd"><i
                                                                        class="fa fa-plus"
                                                                        style="font-size:20px !important;"></i>
                                                                </asp:LinkButton>
                                                                <asp:linkbutton ID="linkdlt" CausesValidation="false"
                                                                    CommandName="gDelete" runat="server"
                                                                    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>
                                    <%--<FooterStyle CssClass="footerStyle" />
                                    <HeaderStyle CssClass="headerStyle" />
                                    <RowStyle CssClass="rowStyle" />--%>
                            </asp:GridView>

                    </div>

                </section>
            </div>
        </div>
    </div>
</asp:Content>
