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

<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">
                        Factor Detail
                         <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_Reqplan" runat="server" />
                            <asp:HiddenField ID="hid_requisition" runat="server" />
                            <asp:HiddenField ID="hid_City" runat="server" />
                            <asp:HiddenField ID="hid_bg_grp" runat="server" />
                            <asp:HiddenField ID="hid_position" runat="server" />
                        </div>


                        <div style="width: 102%; height:250px; overflow: scroll" runat="server" visible="false">
                              <asp:GridView ID="GridView3" Visible="false" runat="server" AutoGenerateColumns="False"
                                        CssClass="table table-striped table-bordered table-hover" CellPadding="0"
                                        OnRowCommand="GridView3_RowCommand" OnRowDataBound="GridView3_RowDataBound">
                                        <Columns>
                                            <asp:TemplateField HeaderStyle-Width="1px">
                                                <ItemTemplate>
                                                    <asp:HiddenField ID="hid_REQUISITION_FACTOR_ID" runat="server" Value='<%#Bind("REQUISITION_FACTOR_ID")%>' />
                                                    <asp:HiddenField ID="hid_Acion_ID" runat="server"
                                                        Value='<%#Bind("Action_ID")%>' />
                                                    <asp:HiddenField ID="hid_FactorID" runat="server"
                                                        Value='<%#Bind("FACTOR_ID")%>' />
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                             <asp:TemplateField HeaderText="Request" ControlStyle-Width="250px" ItemStyle-Width="100px">
                                                <ItemTemplate>
                                                        <asp:TextBox ID="txt_ReqId" Enabled="false" runat="server"  CssClass="form-control"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Position" HeaderStyle-Width="15%">
                                                <ItemTemplate>
                                                    <asp:TextBox ID="txt_Pos" Enabled="false" runat="server"  CssClass="form-control"></asp:TextBox>
                                                    
                                     
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="City" HeaderStyle-Width="10%">
                                                <ItemTemplate>
                                                    <asp:TextBox ID="txt_City" Enabled="false" runat="server"  CssClass="form-control"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                          

                                            <asp:TemplateField HeaderText="Evaluation" HeaderStyle-Width="15%">
                                                <ItemTemplate>
                                                    <div class="input-group">
                                                        <asp:HiddenField ID="hid_evelID_Factor" runat="server"
                                                            Value='<%#Bind("Eval_HEADER_ID")%>' />
                                                        <asp:TextBox CssClass="form-control" ID="txt_evalName"
                                                            runat="server" Text='<%#Bind("EvalName") %>'>
                                                        </asp:TextBox>
                                                        <asp:RequiredFieldValidator SetFocusOnError="true"
                                                            ValidationGroup='<%# "add3" + Container.DataItemIndex %>'
                                                            runat="server" id="req_Eval" controltovalidate="txt_evalName"
                                                            errormessage="Evaluation is Required!" />
                                                        <span class="input-group-btn">
                                                            <button id="btn_lov_Eval_Factor" type="button" runat="server"
                                                                class="btn btn-white"
                                                                onserverclick="btn_lov_Eval_Factor_Click"><i
                                                                    class="fa fa-search"></i></button>
                                                        </span>
                                                    </div>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Action" HeaderStyle-Width="10%">
                                                <ItemTemplate>
                                                    <asp:TextBox ID="txt_Action" runat="server"
                                                        Text='<%#Bind("Action") %>' CssClass="form-control"
                                                        ></asp:TextBox>
                                                    <asp:RequiredFieldValidator SetFocusOnError="true"
                                                        ValidationGroup='<%# "add3" + Container.DataItemIndex %>'
                                                        runat="server" id="req_Action" controltovalidate="txt_Action"
                                                        errormessage="Action is Required!" />
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                              <asp:TemplateField HeaderText="Totalmarks" HeaderStyle-Width="10%">
                                                <ItemTemplate>


                                                    <asp:TextBox CssClass="form-control" ID="txt_Totalmarks"
                                                        runat="server" Text='<%#Bind("TOTAL_MARKS") %>'>
                                                    </asp:TextBox>
                                                    <asp:RequiredFieldValidator SetFocusOnError="true"
                                                        ValidationGroup='<%# "add3" + Container.DataItemIndex %>'
                                                        runat="server" id="req_Totalmarks"
                                                        controltovalidate="txt_Totalmarks"
                                                        errormessage="Total Marks is Required!" />

                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="PassingMarks" HeaderStyle-Width="10%">
                                                <ItemTemplate>


                                                    <asp:TextBox CssClass="form-control" ID="txt_PassingMarks"
                                                        runat="server" Text='<%#Bind("PASSING_MARKS") %>'>
                                                    </asp:TextBox>
                                                    <asp:RequiredFieldValidator SetFocusOnError="true"
                                                        ValidationGroup='<%# "add3" + Container.DataItemIndex %>'
                                                        runat="server" id="req_PassingMarks"
                                                        controltovalidate="txt_PassingMarks"
                                                        errormessage="Passing Marks is Required!" />

                                                </ItemTemplate>
                                            </asp:TemplateField>
                                             
                                            <asp:TemplateField HeaderText="Factor" HeaderStyle-Width="140px">
                                                <ItemTemplate>
                                                    <asp:DropDownList ID="ddl_Factor" runat="server"
                                                        CssClass="form-control"></asp:DropDownList>
                                                    <asp:RequiredFieldValidator SetFocusOnError="true"
                                                        ValidationGroup='<%# "add3" + Container.DataItemIndex %>'
                                                        runat="server" id="req_ddl_Factor"
                                                        controltovalidate="ddl_Factor"
                                                        errormessage="Factor is Required!" />
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Action" ItemStyle-Width="5%">
                                                <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='<%# "add3" + 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>




                          <div style="width: 102%; height:250px; overflow: scroll">
                              <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                                        CssClass="table table-striped table-bordered table-hover" CellPadding="0"
                                        OnRowCommand="GridView1_RowCommand" OnRowDataBound="GridView1_RowDataBound">
                                        <Columns>
                                            <asp:TemplateField HeaderStyle-Width="1px">
                                                <ItemTemplate>
                                                    <asp:HiddenField ID="hid_REQUISITION_FACTOR_ID" runat="server" Value='<%#Bind("REQUISITION_FACTOR_ID")%>' />
                                                    <asp:HiddenField ID="hid_Acion_ID" runat="server"
                                                        Value='<%#Bind("ACTION_ID")%>' />
                                                    <asp:HiddenField ID="hid_FactorID" runat="server"
                                                        Value='<%#Bind("FACTOR_ID")%>' />
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                             <asp:TemplateField HeaderText="Request" ControlStyle-Width="250px" ItemStyle-Width="100px">
                                                <ItemTemplate>
                                                        <asp:TextBox ID="txt_ReqId" Enabled="false" runat="server"  CssClass="form-control"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Position" ControlStyle-Width="200px" ItemStyle-Width="100px">
                                                <ItemTemplate>
                                                    <asp:TextBox ID="txt_Pos" Enabled="false" runat="server"  CssClass="form-control"></asp:TextBox>
                                                    
                                     
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="City" ControlStyle-Width="200px" ItemStyle-Width="100px">
                                                <ItemTemplate>
                                                    <asp:TextBox ID="txt_City" Enabled="false" runat="server"  CssClass="form-control"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                          

                                            <asp:TemplateField HeaderText="Evaluation" ControlStyle-Width="250px" ItemStyle-Width="100px">
                                                <ItemTemplate>
                                                     <asp:HiddenField ID="hid_evelID_Factor" runat="server"
                                                            Value='<%#Bind("EVAL_HEADER_ID")%>' />
                                                        <asp:TextBox CssClass="form-control" ID="txt_evalName" Enabled="false"
                                                            runat="server" Text='<%#Bind("Evaluation") %>'>
                                                        </asp:TextBox>
                                                    <div class="input-group">
                                                       
                                                        <span class="input-group-btn">
                                                            <button id="btn_lov_Eval_Factor" visible="false" type="button" runat="server"
                                                                class="btn btn-white"
                                                                onserverclick="btn_lov_Eval_Factor_Click"><i
                                                                    class="fa fa-search"></i></button>
                                                        </span>
                                                    </div>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Action" ControlStyle-Width="250px" ItemStyle-Width="100px">
                                                <ItemTemplate>
                                                    <asp:TextBox ID="txt_Action" runat="server" Enabled="false"
                                                        Text='<%#Bind("Action") %>' CssClass="form-control"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                              <asp:TemplateField HeaderText="Totalmarks" HeaderStyle-Width="8%">
                                                <ItemTemplate>


                                                    <asp:TextBox CssClass="form-control" ID="txt_Totalmarks"
                                                        runat="server" Text='<%#Bind("TOTAL_MARKS") %>'>
                                                    </asp:TextBox>
                                                    <asp:RequiredFieldValidator SetFocusOnError="true"
                                                        ValidationGroup='<%# "add3" + Container.DataItemIndex %>'
                                                        runat="server" id="req_Totalmarks"
                                                        controltovalidate="txt_Totalmarks"
                                                        errormessage="Total Marks is Required!" />

                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="PassingMarks" HeaderStyle-Width="8%">
                                                <ItemTemplate>


                                                    <asp:TextBox CssClass="form-control" ID="txt_PassingMarks"
                                                        runat="server" Text='<%#Bind("PASSING_MARKS") %>'>
                                                    </asp:TextBox>
                                                    <asp:RequiredFieldValidator SetFocusOnError="true"
                                                        ValidationGroup='<%# "add3" + Container.DataItemIndex %>'
                                                        runat="server" id="req_PassingMarks"
                                                        controltovalidate="txt_PassingMarks"
                                                        errormessage="Passing Marks is Required!" />

                                                    <asp:CompareValidator runat="server" id="cmpint_mrk" controltovalidate="txt_PassingMarks" controltocompare="txt_Totalmarks" operator="LessThanEqual" type="Integer" errormessage="Total Mark should be less than OR equal to Passing Marks!" ValidationGroup='<%# "add3" + Container.DataItemIndex %>' />

                                                </ItemTemplate>
                                            </asp:TemplateField>
                                             
                                            <asp:TemplateField HeaderText="Factor"  ControlStyle-Width="200px" ItemStyle-Width="100px">
                                                <ItemTemplate>
                                                     <asp:TextBox CssClass="form-control" ID="txt_factor" Enabled="false"
                                                        runat="server" Text='<%#Bind("Factor") %>'>
                                                    </asp:TextBox>
                                                    <asp:DropDownList ID="ddl_Factor" runat="server" Visible="false"
                                                        CssClass="form-control"></asp:DropDownList>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Action" ItemStyle-Width="5%">
                                                <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='<%# "add3" + 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>
                         </div>
                    

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