<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="CustomerSuitabilityCheck.aspx.vb" Inherits="FinIQWebApp.CustomerSuitabilityCheck" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<link href='<%=ResolveClientUrl("~/FinIQJS/jquery-ui.min.css")%>' rel="stylesheet">
<script src='<%=ResolveClientUrl("~/FinIQJS/external/jquery/jquery.min.js")%>'></script>
<script src='<%=ResolveClientUrl("~/FinIQJS/jquery-ui.min.js")%>'></script>
<script src='<%=ResolveClientUrl("~/FinIQJS/FinIQCommon.js")%>'></script>

<head id="Head1" runat="server">
    <link href="../../App_Themes/Style1.css" rel="stylesheet" type="text/css" />
    <script language="javascript" type="text/javascript" src="../../CustomerSuitabilityAssessment/JS_CustEligibility.js"></script>
    <%--<link href="../App_Themes/Styles.css" rel="stylesheet" type="text/css" />--%>
    <title>Customer Suitability Check</title>



    <style type="text/css">
        #tbl_filter {
            height: 29px;
            width: 32%;
        }
        hdnEntityId
        .style3 {
            width: 124px;
        }

        .style4 {
            width: 53px;
        }

        .style5 {
            width: 63px;
        }
         .button:focus, input:focus {
             /*background: #FFFFFF !important;*/
             border-color:	#D3D3D3 !important;
             border-width:2px !important;
             outline: 2px solid 	#D3D3D3 !important;
         }
    </style>

    <script type="text/javascript">
        $(document).ready(function () {
     $("input").each(function (i) {
          //  
            $(this).attr('tabindex', i + 1);
        });

        })
    function ClearMessage() {
            if (window.opener.document.getElementById("lblKYCMessage") != null) {
                window.opener.document.getElementById("lblKYCMessage").innerText = 'Suitability check overridden.'
            }
    }

    function CloseWindow() {
        window.close();
        $('#ModalBoxInside112', window.parent.document).next().remove()
        $('.ui-dialog, .ui-widget-overlay, div.ui-widget-overlay, #ModalBoxInside112', window.parent.document).remove();
        $('.ui-widget.ui-widget-content', window.parent.document).next().remove();
    }
    </script>

</head>

<body onload="self.focus();">
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>

                <table id="maintbl" runat="server" cellpadding="1" cellspacing="1" class="Filter" style="border:none !important;">

                    <tr>
                        <td>
                            <asp:Label ID="lbl_error" runat="server" CssClass="lblerror"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lbl_message" runat="server" CssClass="lblerror"></asp:Label>
                        </td>
                    </tr>

                    <tr>
                        <td>
                            <table cellpadding="0" cellspacing="2" border="0" class="Filter" style="border:none !important;" width="100%">
                                <%--<tr><td colspan="2" class="lbl" style="height: 2px; font-size: 0px; border: none 0px none; line-height: 0px"></td></tr>--%>
                                <tr >
                                    <td colspan="4" height="10px"></td>
                                </tr>
                                <tr>
                                    <td style="padding-left:10px;">
                                      &nbsp; <asp:Label ID="lblCustomerName" runat="server" Text="Customer " CssClass="lbl" ></asp:Label>
   			                    <asp:Label ID="lblCustomerNameValue" runat="server" CssClass="lbl" style="padding-left:20px;"></asp:Label>
                                    </td>
                                      <td style="padding-left:10px;">
                                      &nbsp; <asp:Label ID="lblDealNo" runat="server" Text="Deal " CssClass="lbl" visible="false"></asp:Label>
   			                    <asp:Label ID="lblDealNoValue" runat="server" CssClass="lbl" style="padding-left:20px;"  visible="false"></asp:Label>
                                    </td>
                                    <td>
                                        <asp:LinkButton ID="lnkDashboard" runat="server" Text="Target Asset Allocation" CssClass="lnkNavigator" style="padding-left:140px;"></asp:LinkButton>
                                    </td>

                                    <td align="right">
                                        <table cellpadding="0" cellspacing="0" border="0" align="right">
                                            <tr>
                                                <td>&nbsp;<asp:Button ID="btn_Load" runat="server" Visible="True" ToolTip="Load" Text="Load" CssClass="btn" />&nbsp;&nbsp;</td>
                                           
                                                <td>&nbsp;<asp:Button ID="btn_Apply" runat="server" Text="Apply" ToolTip="Apply" CssClass="btn" Width="70px" />&nbsp;</td>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="4" height="20px"></td>
                                </tr>
                                <%--<tr><td class="lbl" style="height: 2px; font-size: 0px; border: none 0px none; line-height: 0px"></td></tr>--%>

                                <tr style="display:none;">
                                    <td colspan="2">
                                      &nbsp;&nbsp;  <asp:Label ID="lbl_Product" runat="server" Text="Product:" CssClass="lbl" Width="95"></asp:Label>&nbsp;
   			                    <asp:DropDownList ID="lst_product" runat="server" AutoPostBack="True" Width="116px" Height="25px" CssClass="ddl"></asp:DropDownList>
                                    </td>

                                </tr>
                                <%--<tr><td colspan="2" class="lbl" style="height: 2px; font-size: 0px; border: none 0px none; line-height: 0px"></td></tr>--%>

                                <tr style="display:none;">
                                    <td width="400px">
                                       &nbsp;&nbsp; <asp:Label ID="lbl_Filter" runat="server" Text="Filter:" CssClass="lbl" Width="95"></asp:Label>&nbsp;
   			                    <asp:DropDownList ID="lst_Filter" runat="server" AutoPostBack="True" Width="116px" Height="25px" CssClass="ddl">
                                       <asp:ListItem Text="ALL" Value="ALL"  Selected="True"></asp:ListItem>
                                       <asp:ListItem Text="Passed" Value="PASSED"></asp:ListItem>
                                       <asp:ListItem Text="Failed" Value="FAILED"></asp:ListItem>
                                   </asp:DropDownList>
                                    </td>
                                    
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <%--<tr><td colspan="2" class="lbl" style="height: 2px; font-size: 0px; border: none 0px none; line-height: 0px"></td></tr>--%>
                </table>
                </td>
   			</tr>
   			<tr>
                   <td>

                       <asp:Panel ID="pnlSchemes" runat="server" Visible="false">
                           <table cellpadding="0" cellspacing="0" border="0" width="100%" class="Filter">
                               <tr>
                                   <td class="lbl" style="height: 10px; font-size: 0px; border: none 0px none; line-height: 0px"></td>
                               </tr>

                               <tr>
                                   <td class="lblHeader background_gray">&nbsp;Mapped Schemes Eligibility: </td>

                               </tr>
                               <tr>
                                   <td class="lbl" style="height: 2px; font-size: 0px; border: none 0px none; line-height: 0px"></td>
                               </tr>
                               <tr>
                                   <td class="lbl"><span style="color: Red">Not Eligible</span> / <span style="color: Black">Eligible</span></td>
                               </tr>
                               <tr>
                                   <td>
                                       <input id="hdnSchemeCode" name="hdnSchemeCode" runat="server" type="hidden" />
                                       <input id="hdnAssessmentNO" name="hdnAssessmentNO" runat="server" type="hidden" />
                                       <input id="hdnSchemeMapDate" name="hdnSchemeMapDate" runat="server" type="hidden" />
                                       <input id="hdnMode" name="hdnMode" runat="server" type="hidden" />
                                       <input id="hdnCustomerId" name="hdnCustomerId" runat="server" type="hidden" />
                                       <input id="hdnProductId" name="hdnProductId" runat="server" type="hidden" />
                                       <input id="hdnScreenMode" name="hdnScreenMode" runat="server" type="hidden" />
                                       <input id="hdnSignAuth" name="hdnSignAuth" runat="server" type="hidden" />
                                       <input id="hdnCIFToCheck" name="hdnCIFToCheck" runat="server" type="hidden" />
                                       <input id="hdnSaveOrderKYCDetails" name="hdnSaveOrderKYCDetails" runat="server" type="hidden" />
                                       <input id="hdnOrderNo" name="hdnOrderNo" runat="server" type="hidden" />
                                       <input id="hdnItemIndexForMultiPricer" name="hdnItemIndexForMultiPricer" runat="server" type="hidden" />
                                       <input id="hdnRFQId" name="hdnRFQId" runat="server" type="hidden" />
                                        <input id="hdnDealId" name="hdnDealId" runat="server" type="hidden" />
                                       <input id="hdnRulesManuallyOverriden" name="hdnRulesManuallyOverriden" runat="server" type="hidden" />
                                       <input id="hdnOverridenRulesDesc" name="hdnOverridenRulesDesc" runat="server" type="hidden" />
                                       <input id="hdnEntityId" name="hdnEntityId" runat="server" type="hidden" />
                                       <input id="hdnManagedCenter" name="hdnManagedCenter" runat="server" type="hidden" />
                                       <input id="hdnTokenId" name="hdnTokenId" runat="server" type="hidden" />
                                       <input id="hdnEvaluateOnlyHardBlockRules" name="hdnEvaluateOnlyHardBlockRules" runat="server" type="hidden" />
                                       <input id="hdnCustName" name="hdnCustName" runat="server" type="hidden" />

                                       <asp:DataList ID="dlSchemesMap" runat="server" CssClass="Grid"
                                           RepeatDirection="Horizontal" RepeatColumns="3" RepeatLayout="Table">
                                           <HeaderStyle CssClass="GridHeader" Font-Bold="True" />
                                           <ItemStyle CssClass="GridItem link" />
                                           <AlternatingItemStyle CssClass="GridItem" />
                                           <SelectedItemStyle CssClass="GridItemSelect" />

                                           <ItemTemplate>
                                               <table cellpadding="1" cellspacing="0"  width="100%">
                                                   <tr>
                                                       <td align="left" nowrap>
                                                           <input id="hdnSchemeCode" name="hdnSchemeCode" type="hidden" runat="server"
                                                               value='<%# DataBinder.Eval(Container.DataItem,"Scheme_Alias")%>' />

                                                           <asp:LinkButton ID="lblSchemeCode" runat="server" CssClass="lbl"
                                                               OnClick="GetCustomerEligibilityCriteria" ForeColor="Blue"
                                                               CommandArgument='<%# DataBinder.Eval(Container.DataItem,"Scheme_Alias") & "#" & DataBinder.Eval(Container.DataItem,"Created_At") %>'
                                                               Text='<%# DataBinder.Eval(Container.DataItem,"Scheme_Alias")%>'></asp:LinkButton>
                                                           <asp:Label ID="lblSchemeOfferings" runat="server" CssClass="lbl" ForeColor="Blue"
                                                               Text='<%# DataBinder.Eval(Container.DataItem,"Offering")%>'></asp:Label>
                                                       </td>
                                                       <td align="center" style="width: 30px">
                                                           <asp:Label ID="lblWorstOff_Scheme" runat="server" CssClass="lbl"></asp:Label>
                                                       </td>
                                                   </tr>
                                               </table>
                                           </ItemTemplate>
                                       </asp:DataList>
                                   </td>
                               </tr>
                               <tr>
                                   <td class="lbl" style="height: 10px; font-size: 0px; border: none 0px none; line-height: 0px"></td>
                               </tr>
                           </table>
                       </asp:Panel>

                   </td>
               </tr>

                <tr>
                    <td>

                        <asp:Panel ID="pnlCustomerEligibilityCheck" runat="server" Visible="true">
                            <table cellpadding="0" cellspacing="0" border="0" width="100%">
                                <tr>
                                    <td>
                                        <table cellpadding="0" cellspacing="0" border="0" width="100%" class="Filter" style="display:none;">
                                            <tr>
                                                <td class="lblHeader background_gray">&nbsp;<asp:Label ID="lblEligibilityCheck" runat="server" Text="Customer Suitability Check" Visible="false"></asp:Label></td>
                                                <td class="lblHeader background_gray_noicon" align="right" width="70px" valign="bottom">&nbsp;  
                                                    <asp:Button ID="btnCalculateWorstOff" runat="server" CssClass="btn" Text="Proceed" />
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>

                                <tr>
                                    <td style="padding-left:10px;">
                                        <asp:GridView ID="grdCustomer" runat="server" AutoGenerateColumns="False"
                                            CellPadding="0" BorderStyle="None" CssClass="Grid" BorderWidth="0"
                                            AllowPaging="False" OnRowUpdating="grdCustomer_RowUpdating" >
                                            <HeaderStyle CssClass="GridHeader"></HeaderStyle>
                                            <RowStyle CssClass="GridItem" />
                                            <AlternatingRowStyle CssClass="GridItem" />
                                            <FooterStyle CssClass="GridFooter"></FooterStyle>
                                            <Columns>
                                                <asp:TemplateField Visible="false">
                                                    <ItemTemplate>
                                                        <asp:TextBox ID="pkl_id" Enabled="false" CssClass="txt" Visible="false" runat="server" Text='<%# Bind("PKL_Id") %>'></asp:TextBox>
                                                    </ItemTemplate>
                                                    <HeaderStyle />
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="Parameters" InsertVisible="False" HeaderStyle-Width="190px" ControlStyle-BorderColor="LightGray">
                                                    <ItemTemplate>
                                                        <asp:LinkButton ID="btn_edit" runat="server" Width="190px" CommandName="Edit" CommandArgument="Value" Visible='<%# Bind("Allow_Editing") %>' Enabled='<%# Bind("Allow_Editing") %>' Text='<%# Bind("Parameters") %>'></asp:LinkButton>
                                                        <asp:Label ID="lblParameter" runat="server" Width="190px" Visible='<%# IIF((DataBinder.Eval(Container.DataItem, "Allow_Editing")=1),False,True) %>' Text='<%# Bind("Parameters") %>'></asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Width="190px"></HeaderStyle>
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="CIF A" ControlStyle-BorderColor="LightGray">
                                                    <HeaderTemplate>
                                                        <asp:CheckBox runat="server" ID="Chk_Cifa" Text="CIF A" onClick="desabled(this)" />
                                                        <asp:Label runat="server" ID="lbl_a" Text="CIF A"></asp:Label>
                                                        <input id="hdnCIFA" name="hdnCIFA" runat="server" type="hidden" value="CIFA" />
                                                    </HeaderTemplate>
                                                    <ItemTemplate>

                                                        <asp:TextBox ID="txt_cifa" Width="100" runat="server" CssClass="txt" Enabled="false" Text='<%# Bind("CifA") %>'></asp:TextBox>
                                                    </ItemTemplate>
                                                    <EditItemTemplate>
                                                        <asp:TextBox ID="txt_cifa" Width="100" runat="server" CssClass="txt"
                                                            onkeypress="isAlpha(this)" Enabled="true" Text='<%# Bind("CifA") %>'
                                                            MaxLength="1"></asp:TextBox>
                                                    </EditItemTemplate>
                                                    <HeaderStyle></HeaderStyle>
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="CIF B" ControlStyle-BorderColor="LightGray">
                                                    <HeaderTemplate>
                                                        <asp:CheckBox runat="server" ID="Chk_Cifb" Text="CIF B" onClick="desabled(this)" />
                                                        <asp:Label runat="server" ID="lbl_b" Text="CIF B"></asp:Label>
                                                        <input id="hdnCIFB" name="hdnCIFB" runat="server" type="hidden" value="CIFB" />
                                                    </HeaderTemplate>
                                                    <ItemTemplate>
                                                        <asp:TextBox ID="txt_Cifb" Width="100" runat="server" CssClass="txt" Enabled="false" Text='<%# Bind("CifB") %>'></asp:TextBox>
                                                    </ItemTemplate>
                                                    <EditItemTemplate>
                                                        <asp:TextBox ID="txt_Cifb" Width="100" runat="server" CssClass="txt" onkeypress="isAlpha(this)"
                                                            Enabled="true" Text='<%# Bind("CifB") %>' MaxLength="1"></asp:TextBox>
                                                    </EditItemTemplate>
                                                    <HeaderStyle></HeaderStyle>
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="CIF C">
                                                    <HeaderTemplate>
                                                        <asp:CheckBox runat="server" ID="Chk_Cifc" Text="CIF C" onClick="desabled(this)" />
                                                        <asp:Label runat="server" ID="lbl_c" Text="CIF C"></asp:Label>
                                                        <input id="hdnCIFC" name="hdnCIFC" runat="server" type="hidden" value="CIFC" />
                                                    </HeaderTemplate>
                                                    <ItemTemplate>
                                                        <asp:TextBox ID="txt_Cifc" Width="100" runat="server" CssClass="txt" Enabled="false" Text='<%# Bind("CifC") %>'></asp:TextBox>
                                                    </ItemTemplate>
                                                    <EditItemTemplate>
                                                        <asp:TextBox ID="txt_Cifc" Width="100" runat="server" CssClass="txt" onkeypress="isAlpha(this)"
                                                            Enabled="true" Text='<%# Bind("CifC") %>' MaxLength="1"></asp:TextBox>
                                                    </EditItemTemplate>
                                                    <HeaderStyle></HeaderStyle>
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="CIF D">
                                                    <HeaderTemplate>
                                                        <asp:CheckBox runat="server" ID="Chk_cifd" Text="CIF D" onClick="desabled(this)" />
                                                        <asp:Label runat="server" ID="lbl_d" Text="CIF D"></asp:Label>
                                                        <input id="hdnCIFD" name="hdnCIFD" runat="server" type="hidden" value="CIFD" />
                                                    </HeaderTemplate>
                                                    <ItemTemplate>
                                                        <asp:TextBox ID="txt_Cifd" Width="100" runat="server" CssClass="txt" Enabled="false" Text='<%# Bind("CifD") %>'></asp:TextBox>
                                                    </ItemTemplate>
                                                    <EditItemTemplate>
                                                        <asp:TextBox ID="txt_Cifd" Width="100" runat="server" CssClass="txt" onkeypress="isAlpha(this)"
                                                            Enabled="true" Text='<%# Bind("CifD") %>' MaxLength="1"></asp:TextBox>
                                                    </EditItemTemplate>
                                                    <HeaderStyle></HeaderStyle>
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="CIF E">
                                                    <HeaderTemplate>
                                                        <asp:CheckBox runat="server" ID="Chk_Cife" Text="CIF E" onClick="desabled(this)" />
                                                        <asp:Label runat="server" ID="lbl_e" Text="CIF E"></asp:Label>
                                                        <input id="hdnCIFE" name="hdnCIFE" runat="server" type="hidden" value="CIFE" />
                                                    </HeaderTemplate>
                                                    <ItemTemplate>
                                                        <asp:TextBox ID="txt_Cife" Width="100" runat="server" CssClass="txt" Enabled="false" Text='<%# Bind("CifE") %>'></asp:TextBox>
                                                    </ItemTemplate>
                                                    <EditItemTemplate>
                                                        <asp:TextBox ID="txt_Cife" Width="100" runat="server" CssClass="txt" onkeypress="isAlpha(this)"
                                                            Enabled="true" Text='<%# Bind("CifE") %>' MaxLength="1"></asp:TextBox>
                                                    </EditItemTemplate>
                                                    <HeaderStyle></HeaderStyle>
                                                </asp:TemplateField>

                                                <asp:TemplateField Visible="False" HeaderText="Account W/O" HeaderStyle-Width="70px">
                                                    <ItemTemplate>
                                                        <asp:TextBox ID="txt_Prev_WO" runat="server" CssClass="txt" Width="70px" Enabled="false" Text=''></asp:TextBox>
                                                    </ItemTemplate>
                                                    <HeaderStyle Width="70px"></HeaderStyle>
                                                </asp:TemplateField>



                                                <asp:TemplateField HeaderText="Eligible Y/N" HeaderStyle-Width="70px">
                                                    <ItemTemplate>
                                                        <asp:TextBox ID="txt_WO" runat="server" CssClass="txt" Width="70px" Enabled="false" Text='<%# Bind("[Eligible_YN]") %>'></asp:TextBox>
                                                    </ItemTemplate>
                                                    <HeaderStyle Width="70px"></HeaderStyle>
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="Failed Reason" HeaderStyle-Width="300px">
                                                    <ItemTemplate>
                                                        <asp:Label Width="300px" ID="lblFailedReason" runat="server" CssClass="lbl" Text='<%# Bind("[Failed_Reason]") %>' style="text-wrap:normal;"></asp:Label>
                                                        <asp:TextBox Width="300px" ID="txtFailedReason" runat="server" CssClass="txt" Visible="False" Enabled="False" Text='<%# Bind("[Failed_Reason]") %>' MaxLength="450"></asp:TextBox>
                                                    </ItemTemplate>
                                                    <EditItemTemplate>
                                                        <asp:TextBox Width="300px" ID="txtFailedReason" runat="server" CssClass="txt" Enabled="False" Text='<%# Bind("[Failed_Reason]") %>' MaxLength="450"></asp:TextBox>
                                                    </EditItemTemplate>
                                                    <HeaderStyle Width="300px"></HeaderStyle>
                                                </asp:TemplateField>

                                                <asp:TemplateField>
                                                    <HeaderTemplate >
                                                        <asp:CheckBox runat="server" ID="Chk_Override_A" Text="Override" OnCheckedChanged="Chk_Override_CheckedChanged" AutoPostBack="true" />
                                                    </HeaderTemplate>
                                                    <ItemTemplate>
                                                        <asp:CheckBox ID="chk_ACheck" runat="server" 
                                                            OnCheckedChanged="chk_ACheck_CheckedChanged"></asp:CheckBox>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="True"></HeaderStyle>
                                                    <ItemStyle HorizontalAlign="center" />
                                                </asp:TemplateField>

                                                <%--Javed-added Ref field- on 03-Apr-2020-mail by Parikshit K.-START--%>
                                                <asp:TemplateField Visible="true" HeaderText="Ref." HeaderStyle-Width="120px">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblRef" runat="server" CssClass="lbl" Width="120px" Enabled="false" Text='<%# Bind("ColumnName") %>'></asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Width="70px"></HeaderStyle>
                                                </asp:TemplateField>
                                                <%--Javed-added Ref field- on 03-Apr-2020-mail by Parikshit K.-END--%>

                                                <asp:TemplateField HeaderText="Override" HeaderStyle-Wrap="true">
                                                    <HeaderTemplate>
                                                        <asp:CheckBox runat="server" ID="Chk_Override_T" Text="Override" OnCheckedChanged="Chk_Override_CheckedChanged" AutoPostBack="true"  />

                                                    </HeaderTemplate>
                                                    <ItemTemplate>
                                                        <asp:CheckBox ID="chk_TXNCheck" runat="server"
                                                            OnCheckedChanged="chk_TXNCheck_CheckedChanged"></asp:CheckBox>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="True"></HeaderStyle>
                                                    <ItemStyle HorizontalAlign="center" />
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="" InsertVisible="False">
                                                    <ItemTemplate>

                                                        <asp:LinkButton ID="btnCalc" Text='<%# Bind("ColumnName") %>' runat="server"  Width="85px" CommandName="Update" CommandArgument="Value" Enabled='<%# Bind("Allow_Editing") %>'>
                             
                          
                                                        </asp:LinkButton><%--Font-Bold="true"--%>
                                                    </ItemTemplate>
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="" Visible="False">
                                                    <ItemTemplate>
                                                        <asp:TextBox ID="txt_EitherToSign" CssClass="txt" runat="server" Width="10px" Text='<%# Bind("EitherToSign") %>' Enabled="false"></asp:TextBox>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="true"></HeaderStyle>
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="" Visible="False" FooterStyle-Wrap="true">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lbl_AcOverriden" runat="server" Text='<%# Bind("AC_Overrided_YN") %>'></asp:Label>
                                                    </ItemTemplate>
                                                    <FooterStyle Wrap="True" />
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="" Visible="False" FooterStyle-Wrap="true">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lbl_TXNOverriden" runat="server" Text='<%# Bind("TXN_Overrided_YN") %>'></asp:Label>
                                                    </ItemTemplate>
                                                    <FooterStyle Wrap="True" />
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="" Visible="False" FooterStyle-Wrap="true">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lbl_Override_Allowed" runat="server" Text='<%# Bind("Override_Allowed") %>'></asp:Label>
                                                    </ItemTemplate>
                                                    <FooterStyle Wrap="True" />
                                                </asp:TemplateField>


                                                <asp:TemplateField HeaderText="" Visible="False" FooterStyle-Wrap="true">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lbl_Worst_Of_Value" runat="server" Text='<%# Bind("Worst_Of_Value") %>'></asp:Label>
                                                    </ItemTemplate>
                                                    <FooterStyle Wrap="True" />
                                                </asp:TemplateField>


                                                <asp:TemplateField HeaderText="" Visible="False" FooterStyle-Wrap="true">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lbl_Worst_Of_Cif" runat="server" Text='<%# Bind("Worst_Of_Cif") %>'></asp:Label>
                                                    </ItemTemplate>
                                                    <FooterStyle Wrap="True" />
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="Override Reason" HeaderStyle-Width="400px">
                                                    <ItemTemplate>
                                                        <asp:TextBox Width="400" ID="txtOverrideReason" runat="server" CssClass="txt" Enabled="False" Text='<%# Bind("[OverrideReason]") %>' MaxLength="100"></asp:TextBox>
                                                    </ItemTemplate>
                                                    <EditItemTemplate>
                                                        <asp:TextBox Width="400" ID="txtOverrideReason" runat="server" CssClass="txt" Enabled="False" Text='<%# Bind("[OverrideReason]") %>' MaxLength="100"></asp:TextBox>
                                                    </EditItemTemplate>
                                                    <HeaderStyle Width="400px"></HeaderStyle>
                                                </asp:TemplateField>


                                            </Columns>

                                        </asp:GridView>
                                    </td>
                                </tr>

                            </table>
                        </asp:Panel>

                        <asp:Panel ID="pnlReasonsAndJustification" runat="server" Visible="false">
                            <table cellpadding="0" cellspacing="0" border="0" width="100%">
                                <tr>
                                    <td>
                                        <table cellpadding="0" cellspacing="0" border="0" width="100%">
                                            <tr>
                                                <td class="lblHeader background_gray">&nbsp;<asp:Label ID="Label1" runat="server" Text="Reasons for conducting transaction"></asp:Label></td>

                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:DataList ID="dlReasons" runat="server" CssClass="Grid"
                                            RepeatDirection="Vertical" RepeatLayout="Table">
                                            <HeaderStyle CssClass="GridHeader" Font-Bold="True" />
                                            <ItemStyle CssClass="GridItem link" />
                                            <AlternatingItemStyle CssClass="GridItem" />
                                            <SelectedItemStyle CssClass="GridItemSelect" />

                                            <ItemTemplate>
                                                <table cellpadding="1" cellspacing="0"  width="100%">
                                                    <tr>
                                                        <td align="left" nowrap>
                                                            <input id="hdnReasonId" name="hdnReasonId" type="hidden" runat="server"
                                                                value='<%# DataBinder.Eval(Container.DataItem,"PKL_ID")%>' />
                                                            <input id="hdnPKLCode" name="hdnPKLCode" type="hidden" runat="server"
                                                                value='<%# DataBinder.Eval(Container.DataItem,"PKL_Code")%>' />
                                                            <asp:CheckBox ID="chkReason" runat="server" CssClass="lbl"
                                                                Text='<%# DataBinder.Eval(Container.DataItem,"PKL_Description")%>'
                                                                Checked='<%# IIF(DataBinder.Eval(Container.DataItem,"Eligible_YN") = "Y", True, False)%>'
                                                                OnCheckedChanged='OtherReasonChecked'
                                                                AutoPostBack='<%# IIF(((DataBinder.Eval(Container.DataItem,"PKL_Code").ToString.Trim.Toupper = "REASON 13")), True, False)%>' />


                                                        </td>
                                                    </tr>
                                                </table>
                                            </ItemTemplate>
                                        </asp:DataList>

                                    </td>
                                </tr>

                            </table>

                            <asp:Panel ID="pnlQuestions" runat="server" Visible="false">
                                <table cellpadding="0" cellspacing="0" border="0" width="100%">

                                    <tr>
                                        <td>
                                            <asp:DataList ID="dlTextFields" runat="server" CssClass="Grid"
                                                RepeatDirection="Vertical" RepeatLayout="Table">
                                                <HeaderStyle CssClass="GridHeader" Font-Bold="True" />
                                                <ItemStyle CssClass="GridItem link" />
                                                <AlternatingItemStyle CssClass="GridItem" />
                                                <SelectedItemStyle CssClass="GridItemSelect" />

                                                <ItemTemplate>
                                                    <table cellpadding="0" cellspacing="0" border="0" width="100%">
                                                        <tr>
                                                            <td align="left" nowrap>
                                                                <input id="hdnReasonId" name="hdnReasonId" type="hidden" runat="server"
                                                                    value='<%# DataBinder.Eval(Container.DataItem,"PKL_ID")%>' />
                                                                <asp:TextBox ID="txtField" Width="500" MaxLength="60"
                                                                    Text='<%# DataBinder.Eval(Container.DataItem,"CPK_FreeText")%>'
                                                                    runat="server" CssClass="txt"></asp:TextBox>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </ItemTemplate>
                                            </asp:DataList>

                                        </td>
                                    </tr>

                                </table>
                            </asp:Panel>
                        </asp:Panel>

                    </td>
                </tr>

                </table>  
                <asp:HiddenField ID="hdn_suitability_override" runat="server" />  <%--Aditya B || 22-Nov-2019 || For demo--%>
            </ContentTemplate>
        </asp:UpdatePanel>
    </form>
</body>
</html>
