<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/FiniqAppMasterPage.Master" EnableEventValidation="false"
    CodeBehind="Dealer_RM_Setup.aspx.vb" Inherits="FinIQWebApp.Dealer_RM_Setup1"
    Title="Dealer RM Setup" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
            <%--Start Added by shubham k on 09-Feb-21 for UBP UI Standard--%>
    <%--<change done by Nitin N On 23-Nov-2021 : INT1FIN47-196 Portfolio - RM Setup Table Issue >--%>
<%--        <link href="../FinIQJS/FreezeGrid.css" type="text/css" rel="stylesheet">
        <script src="../FinIQJS/FreezeGrid.js" type="text/javascript"></script> --%>
    <%--</change done by Nitin N On 23-Nov-2021 : INT1FIN47-196 Portfolio - RM Setup Table Issue >--%>
    <%--End Added by shubham k on 09-Feb-21 for UBP UI Standard--%>
    <script type="text/javascript">

        function isNumberKey(evt) {
            var charCode = (evt.which) ? evt.which : evt.keyCode;
            if (charCode > 31 && (charCode < 48 || charCode > 57))
                return false;
            return true;
        }
        function EnterKeyEvent(evt) {
            var code = (evt.which) ? evt.which : evt.keyCode;
// Changes done by Nitin N on 1-Apr-2020 : Mail Ref : RM setup postbacks on each tab, fix asap and integrate : suggested by Pari Sir.>
            if (code == 13) {
                document.getElementById('<%=btnPageCnt.ClientID%>').click();
            }
        }
        //Function Added by Nitin 25-Nov-2019 : blocked special charaters
        function DisAllowSpecialChar(evt) {
            var key = (evt.which) ? evt.which : evt.keyCode;
            if (key > 32 && key < 48 || key > 57 && key < 65 || key > 90 && key < 97 || key > 122 && key < 127)
                return false;
            else
                return true;
        }        
        //End
      //<Change done by Nitin N :27-Oct-2021 : 1FinIQ4.7_Internal INT1FIN47-170 Alignment Issue: Menu Panel overlapping Popup.>
     $(document).ready(function () {
            dragAndDrop();
            Sys.WebForms.PageRequestManager.getInstance().add_endRequest(dragAndDrop);

        });

        function dragAndDrop() {
            $(".draggable").draggable();
        }
		//</Change done by Nitin N :27-Oct-2021 : 1FinIQ4.7_Internal INT1FIN47-170 Alignment Issue: Menu Panel overlapping Popup.>
    </script>
    <%-- <script language="javascript" src="AjaxServer_FINIQ_Dealer_RM_Setup.js" type="text/javascript">
        function ValidPhoneNumber(tbControl) {
            var ControlText = document.getElementById(tbControl).value
            var C, d;
            CheckStartSpace(tbControl)

            if (ControlText.length > 0) {
                for (i = 0; i < ControlText.length; i++) {
                    d = ControlText.charAt(i)

                    if (((d == '(')) || ((d == ')')) || ((d == '-')) || ((d >= '0') && (d <= '9'))) {



                    }
                    else {
                        C = ControlText.substring(0, i)
                        document.getElementById(tbControl).value = C
                        document.getElementById(tbControl).focus();


                        return false
                    }
                }
            }
            return true
        }


    </script>--%>
    <%--   <script type="text/javascript">
          $(document).ready(function () {
              SetSorting_Filter();
          });

        </script>--%>
    <style>
        .ButtonEnableDisable:disabled
        {
            /*color: #8ca2bb !important;*/
            /* color: #c9c5c0 !important;*/
            color: #c9c5c0;
        }

        .ButtonEnableDisable:enabled
        {
            /*color: #ffffff !important;*/
            color: #ffffff;
        }

        .Grid
        {
            margin-bottom: 4px;
        }
                /*Start Added by shubham k on 10-Feb-2021 for UBP*/
        .btn_padding {
            padding-right: 10px !important;
            padding-top: 5px !important;
        }
        /*End Added by shubham k on 10-Feb-2021 for UBP*/
		/*<Change Done By Nitin N On 14-Jun-2021 : Email Ref : RM Setup changes for Mashreq by Kartik S> */
        .tdleftWidth {
            width :5px;
        }
	    /*</Change Done By Nitin N On 14-Jun-2021 : Email Ref : RM Setup changes for Mashreq by Kartik S> */
    </style>
    <script src="AjaxServer_FINIQ_Dealer_RM_Setup.js" type="text/javascript">
    function btnSave_onclick() { }
    </script>
    <script type="text/javascript">
         //Start Added by shubham k on 10-Feb-2021 for UBP
        document.onkeyup = function (e) {
            if (e.ctrlKey && e.key == "r") {
                document.getElementById('<%= btn_cancel.ClientID %>').click();
            } else if (e.ctrlKey && e.shiftKey && e.key == "E") {
                document.getElementById('<%= btn_export.ClientID %>').click();
            }
        }
        //End Added by shubham k on 10-Feb-2021 for UBP
        function ConformDelete() {
            if (confirm("Are you sure, you want to delete RM? ")) {
                return true
            }


            else {
                return false
            }
        }

        //Function Added by Dhanashri 09-JUL-2014 : allow only *,/,-,@,&,(,)
        function DisAllowSpecialChar_Specified() {
            var key = window.event.keyCode;
            //alert(key);
            if (key > 32 && key < 38 || key == 39 || key == 44 || key == 43 || key == 46 || key > 57 && key < 64 || key > 90 && key < 97 || key > 122 && key < 127 || key == 94)
                window.event.returnValue = null;
            else
                return;
        }
        //End
		  function EnterKeyOnRMSearch(evt) {
            var code = (evt.which) ? evt.which : evt.keyCode;

            if (code == 13 ) {
                document.getElementById('<%=btnFind.ClientID%>').click();
            }
        }

        function EnterKeySearchByBook(evt) {
            var code = (evt.which) ? evt.which : evt.keyCode;

            if (code == 13 || code == 9) {
                document.getElementById('<%=btnSearchTypeBooksFind.ClientID%>').click();
            }
        }
        /*<Change Done By Nitin N On 14-Jun-2021 : Email Ref : RM Setup changes for Mashreq by Kartik S> */
        var dialogConfirmed = false;
        function ViewDialogDuplicate(obj, title, dialogText) {
            if ($("#pageName").html() != null) {
                // title = "View - " + $("#pageName").html();
            }
            // alert("hi " + title + "" + obj);

            if (!dialogConfirmed) {
                //  $('html').append(String.Format("<div id='dialog' title='{0}'><p style='float:left;'><span class='ui-icon ui-icon-alert' style='float:left; margin:0 5px 20px 0;'></span>{1}</p></div>", title, dialogText));
                $('html').append(String.Format("<div id='dialog' title='{0}'><div class='infoConfirmationBox' style='float:left; height:22px !important; width:22px !important; margin: 13px 15px 20px 10px;'></div><p> " + dialogText + " </p></div>", title));

                $('#dialog').dialog
                        ({
                            height: 180,
                            width: 350,
                            modal: true,
                            resizable: false,
                            draggable: true,
                            close: function (event, ui) { $('html').find('#dialog').remove(); },
                            buttons:
                            {
                                'Yes': function () {
                                   
                                        $("#ctl00_MainContent_btnConfirmation").click();
                                        $(this).dialog('close');
                                  
                                   

                                },
                                'No': function () {
                                    $(this).dialog('close');
                                    $('html').find("#dialog").remove();
                                    return false;
                                }
                            }
                        });
            }

            return dialogConfirmed;

            $(".ui-widget-overlay").height($("body").height());

        }
        /*</Change Done By Nitin N On 14-Jun-2021 : Email Ref : RM Setup changes for Mashreq by Kartik S> */

    </script>

        <script type="text/javascript">



            var dialogConfirmed = false;
            function ViewDialogDuplicate(obj, title, dialogText) {
                if ($("#pageName").html() != null) {
                }
                if (!dialogConfirmed) {
                    $('html').append(String.Format("<div id='dialog' title='{0}'><div class='infoConfirmationBox' style='float:left; height:22px !important; width:22px !important; margin: 13px 15px 20px 10px;'></div><p> " + dialogText + " </p></div>", title));
                    $('#dialog').dialog
                            ({
                                height: 180,
                                width: 350,
                                modal: true,
                                resizable: false,
                                draggable: true,
                                close: function (event, ui) { $('html').find('#dialog').remove(); },
                                buttons:
                                {
                                    'Yes': function () {
                                        if (obj == "btnhdnMap") {
                                            $("#ctl00_MainContent_btnhdnMap").click();
                                        }
                                       
                                        $(this).dialog('close');
                                    },
                                    'No': function () {
                                        $(this).dialog('close');
                                        $('html').find("#dialog").remove();
                                        return false;
                                    }
                                }
                            });
                }

                return dialogConfirmed;
                $(".ui-widget-overlay").height($("body").height());
            }

    </script>

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:UpdateProgress ID="UpdateProgress2" runat="server" AssociatedUpdatePanelID="UpdatePanel1" DisplayAfter="0">
                <ProgressTemplate>
                    <div class="divLoading">
                        <img alt="Loading" src="../App_Resources/loading.gif" /><span class="lbl"> 
                        </span>
                    </div>
                </ProgressTemplate>
            </asp:UpdateProgress>
            <table>
                <%--   <tr>
                    <td>
                        <asp:Label ID="lbl_dealer_name" Text="RM Setup" runat="server"></asp:Label><asp:Label
                            ID="lbl_login" runat="server" CssClass="lbl"></asp:Label>
                    </td>
                </tr>--%>


                <tr>
                    <td>
                        <asp:Label ID="lblError" runat="server" CssClass="lblerror"></asp:Label>
                        <asp:Label ID="lblWarning" runat="server" CssClass="lblinfo"></asp:Label>
                        <asp:Label ID="lblInfo" runat="server" CssClass="lblinfo"></asp:Label>
                        <%--Added By Shubham K on 10-Jul-2020 for ANZ--%>
                        <asp:Label ID="lblSuccess" runat="server" CssClass="lblSuccess"></asp:Label>
                    </td>

                </tr>
            </table>
            <table>
                <tr>
                    <td class="tdleftWidth">
                    </td> 
                    <td>
                        <asp:Label ID="lblEntity" Text="<%$ Resources:LocalizedText, Entity %>" runat="server" CssClass="lbl"></asp:Label>

                    </td>
                    <td class="ctlBlotterPaddingRight">
                        <asp:DropDownList ID="ddlEntity" runat="server" AutoPostBack="True" Width="170px" CssClass="ddl">
                        </asp:DropDownList>
                    </td>
                    <td class="tdleftWidth">
                         </td> 
                    <td >
                        <asp:Label ID="lbl_ph" runat="server" CssClass="lbl" Text="Phone Number"></asp:Label>
                    </td>
                    <td class="ctlBlotterPaddingRight">
                        <asp:TextBox ID="txt_phone" runat="server" CssClass="txt" MaxLength="16" Width="170px"></asp:TextBox>
                        <ajaxToolkit:FilteredTextBoxExtender ID="ftbSelection" runat="server" FilterMode="ValidChars" ValidChars="0123456789.-" TargetControlID="txt_phone" />
                    </td>
                    <td class="ctlBlotterPaddingRight">
                        <asp:CheckBox CssClass="lbl" ID="chk_deactivate" runat="server" Text="Deactivate" Style="margin-left: 7px;" />
                    </td>
                    <td >
                        <asp:Label ID="Label3" runat="server" CssClass="lbl">Total Record(s):</asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="lblRecord" runat="server" Text="" Style="text-align: right !important"></asp:Label>
                    </td>
                </tr>
                <tr>
                     <td class="tdleftWidth">
                           <span style="color: #FF0000">*</span>
                    </td> 
                    <td class="lblBlotterPaddingRight">                      
                        <asp:Label ID="lbl_dealer" runat="server" CssClass="lbl" Text="Dealer Name"></asp:Label>
                        <%--<span style="color: #FF0000">*</span>--%>
                    </td>
                    <td>
                        <asp:TextBox ID="txt_dealerName" runat="server" CssClass="txt" ValidationGroup="Grp" MaxLength="50" Width="170px"></asp:TextBox>
                         <ajaxToolkit:FilteredTextBoxExtender ID="filtertxt_dealerName" runat="server"  FilterType ="Custom,LowercaseLetters,UppercaseLetters,Numbers"   FilterMode="ValidChars" ValidChars=" -/" TargetControlID="txt_dealerName" />
                    </td>
                    <td class="tdleftWidth">
                        <span style="color: #FF0000" id="sptxt_staffYN" runat="server">*</span>
                         </td> 
                    <td class="lblBlotterPaddingRight">
                        <asp:Label ID="lbl_staff" runat="server" Text="Account Officer Code"></asp:Label><%--Account Officer Code--%>
                        <%--<span style="color: rgb(255, 0, 0);">*</span>--%>
                        
                    </td>
                    <td>
                        <asp:TextBox ID="txt_staff" runat="server" CssClass="txt" onkeypress="return DisAllowSpecialChar(event)" MaxLength="50" Width="170px"></asp:TextBox>
                    </td>
                    <td>
                        <asp:CheckBox ID="ChkTreasuryDashBoard" runat="server" Text=" " Visible="true" Style="margin-left: 7px; margin-top: 10px;" />
                        <asp:Label ID="lbltreasuryDashboard" runat="server" Text="Treasury Dashboard" CssClass="lbl" Style="margin-left: 1px;"></asp:Label><%-- --%>
                    </td>
                    <td class="lblBlotterPaddingRight">
                        <asp:Label ID="Label4" runat="server" CssClass="lbl">Record(s) Per Page:</asp:Label>&nbsp;
                    </td>
                    <td>
                        <asp:TextBox ID="txtRowsPerPage" runat="server" MaxLength="2" Style="width: 30px; text-align: center;" CssClass="txt" onkeydown="EnterKeyEvent(event)" onkeypress="return isNumberKey(event)" onpaste="return false" oncut="return false" OnTextChanged="txtRowsPerPage_TextChanged"></asp:TextBox>
                    </td>
                    <td>
                        <asp:Button ID="btnPageCnt" runat="server" Text="" OnClick="txtRowsPerPage_TextChanged" Style="display: none;" />
                      <asp:Button ID="btnConfirmation" runat="server" Width="0" Style="width: 0px; height: 0px; font-size: 0; border: none; display: none;" />
                    </td>
                </tr>
                <tr>
                    <td class="tdleftWidth">
                      <asp:Label ID="lbl_typeMan" runat="server" Visible ="false"  CssClass="mandatory">*</asp:Label>
                    </td>
                    <td>
                       
                        <asp:Label ID="lbl_type" runat="server" CssClass="lbl" Text="Type"></asp:Label>
                    </td>
                    <td>
                        
                        <asp:DropDownList ID="ddl_type" runat="server" CssClass="ddl" Width="170px">
                        </asp:DropDownList>
                    </td>
                    <td class="tdleftWidth">
                         <asp:Label ID="lbl_emailMan" runat="server" CssClass="mandatory" Visible ="false" >*</asp:Label>
                         </td> 
                    <td>
                        
                        <asp:Label ID="lbl_email" runat="server" CssClass="lbl" Text="Email ID"></asp:Label>
                        <%-- <span style="color: rgb(255, 0, 0);">*</span>--%>
                    </td>
                    <td>

                        <asp:TextBox ID="txt_email" runat="server" CssClass="txt" MaxLength="50" AutoPostBack="true" ValidationGroup="Grp" Width="170px"></asp:TextBox>
                        <%-- <asp:RegularExpressionValidator
                                            ID="RegularExpressionValidator1"
                                            runat="server"
                                            ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                                            ControlToValidate="txt_email"
                                            ErrorMessage="Input valid email address!"
                                          ValidationGroup="btn_save"  
                                            >
                                    </asp:RegularExpressionValidator>--%>
                                              
                                   
                    </td>

                    <td></td>

                    <%--  --%>
                </tr>
                <tr>
                     <td class="tdleftWidth">
                         </td> 
                    <td>
                        <asp:Label ID="lbl_log" runat="server" Text="Long Name" CssClass="lbl" ></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="txt_log" runat="server" CssClass="txt" MaxLength="40" Width="170px"></asp:TextBox>
                        <ajaxToolkit:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" FilterType="Numbers, LowercaseLetters, UppercaseLetters,Custom" ValidChars=" '" TargetControlID="txt_log" />
                    </td>
                     <td class="tdleftWidth">
                         </td>
                    <td>
                        <asp:Label ID="lblMisc6" runat="server" Text="Sales ID" CssClass="lbl"></asp:Label><%----%>
                         <asp:Label ID="lblCloneDealer" runat="server" Text="Clone Dealer" CssClass="lbl"></asp:Label><%----%>
                    </td>
                    <td>
                        <asp:DropDownList ID="cboMisc6" runat="server" CssClass="ddl" Width="132px">
                            <%-- --%>
                        </asp:DropDownList>
                         <asp:DropDownList ID="ddlDealerList" runat="server" Width ="170px" CssClass="ddl"></asp:DropDownList>
                    </td>

                    <td >                        
                        <asp:Button ID="btnCloneDealer" runat="server" Text="Clone Dealer" style="margin-left: 11px;" CssClass="btn"  Width="100px" ToolTip="Export" />
                    </td>
                    <td></td>

                </tr>
                <tr>
                     <td class="tdleftWidth">
                         </td> 
                    <td>
                        <asp:Label ID="lbl_add" runat="server" CssClass="lbl" Text="Address" ></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="txt_add" runat="server" CssClass="txt" MaxLength="50" Width="170px"></asp:TextBox>
                    </td>
                      <td class="tdleftWidth">
                          <asp:Label ID="lblSegmantMan" runat="server" Visible ="false"  CssClass="mandatory">*</asp:Label>
                      </td>
                    <td>
                        <asp:Label ID="Label1" runat="server" Text="Rm Ref Id" Visible="false"> </asp:Label>
                         <asp:Label ID="lblSegmant" runat="server" CssClass="lbl" Visible ="true" Text="Segment"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="txtref_id" runat="server" CssClass="txt" MaxLength="50" AutoPostBack="true" ValidationGroup="Grp" Width="132px" Visible="false"></asp:TextBox>
                        <asp:DropDownList ID="ddlSegment" runat="server" CssClass="ddl" Visible ="true" Width="170px"></asp:DropDownList>
                    </td>
                    <td></td>
                    <td></td>


                </tr>

                <tr>
                     <td class="tdleftWidth">
                         </td> 
                    <td>
                        <asp:Label ID="lblRMClass" runat="server" Text="RM Class Name" CssClass="lbl" Visible="false"></asp:Label><%-- false--%>
                    </td>
                    <td>
                        <asp:DropDownList ID="cboRMClassName" runat="server" CssClass="ddl" Width="132px" Visible="false">
                            <%-- false--%>
                        </asp:DropDownList>
                    </td>
                      <td class="tdleftWidth">
                         </td>
                    <td>
                        <asp:Label ID="lblPCCCCode" runat="server" CssClass="lbl" Text="PC CC Code" Visible="true"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="txtPCCCCode" runat="server" CssClass="txt" MaxLength="50" Width="132px"></asp:TextBox>
                    </td>

                </tr>

                <tr>
                     <td class="tdleftWidth">
                         </td> 
                    <td>
                        <asp:Label ID="lblMobileNo" runat="server" Text="Mobile No" CssClass="lbl" Visible="false" ></asp:Label><%-- false--%>
                    </td>
                    <td>
                        <asp:TextBox ID="txtMobileNo" runat="server" CssClass="txt" MaxLength="50" Width="132px" Visible="false"></asp:TextBox><%-- false--%>
                    </td>
                      <td class="tdleftWidth">
                         </td>
                    <td>
                        <asp:Label ID="lblGrp" runat="server" Text="Group" CssClass="lbl" Visible="false"></asp:Label><%-- false--%>
                    </td>
                    <td>
                        <asp:DropDownList ID="cboGroup" runat="server" CssClass="ddl" Width="132px" Visible="false">
                            <%-- false--%>
                        </asp:DropDownList>
                    </td>

                </tr>

                <tr>
                     <td class="tdleftWidth">
                         </td> 
                    <td>
                        <asp:Label ID="lblFaxNo" runat="server" Text="Fax No" CssClass="lbl" Visible="false" ></asp:Label><%-- false--%>
                    </td>
                    <td>
                        <asp:TextBox ID="txtMisc3" runat="server" CssClass="txt" MaxLength="50" Width="132px" Visible="false"></asp:TextBox><%-- false--%>
                    </td>
                      <td class="tdleftWidth">
                         </td>
                    <td>
                        <asp:Label ID="lblTargetFq" runat="server" Text="Target Frequency" CssClass="lbl"></asp:Label><%-- --%>
                    </td>
                    <td>
                        <asp:DropDownList ID="cboTargetFq" runat="server" CssClass="ddl" Width="132px">
                            <%-- --%>
                        </asp:DropDownList>
                    </td>


                </tr>


                <tr>
                     <td class="tdleftWidth">
                         </td> 
                    <td>
                        <asp:Label ID="lblTargetValue" runat="server" Text="Treasury Dashboard" CssClass="lbl" ></asp:Label><%-- --%>
                    </td>
                    <td>
                        <asp:TextBox ID="txtTargetValue" runat="server" CssClass="txt" MaxLength="50" Width="132px"></asp:TextBox><%-- --%>

                    </td>
                    <%--<td>&nbsp;
                                </td>
                                <td>&nbsp;
                                </td> commented by sumit--%>
                </tr>

            </table>
            <table>
                <tr>
                    <td>
                        <asp:Label ID="lbl_click" CssClass="lbl" runat="server" Text="Click on column header to sort"
                            Visible="false" Style="margin-left: 11px; margin-top: 10px;"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Panel ID="pnlMapping" runat="server" CssClass="filter" Style="position: absolute; top: 433px; left: 564px; width: 350px; margin-left: 11px;"
                            Visible="false" ScrollBars="Both">

                            <table class="filter">
                                <tr>
                                    <td class="background_gray" nowrap="nowrap">
                                        <asp:Label ID="lblM" runat="server" Text="   RM Group Mapping" Width="200px"></asp:Label>
                                    </td>
                                    <td align="right" valign="top" width="18">
                                        <asp:Button ID="btnMappingClose" runat="server" CssClass="btn" Text="X"
                                            Width="18" ToolTip="close" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:DropDownList ID="cboRMGroupName" runat="server" AutoPostBack="True"></asp:DropDownList>
                                    </td>
                                    <td>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; 
									&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                                        <asp:Button ID="btnApplyMapping" runat="server" Text="Apply" CssClass="btn" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:CheckBoxList ID="lstRMGroups" runat="server" RepeatLayout="Flow"
                                            Width="100%" AutoPostBack="true">
                                        </asp:CheckBoxList>
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                    </td>
                </tr>

            </table>

            <table>
                <tr>
                    <td class="ctlBlotterPaddingRight">
                        <span style="color: #FF0000">*</span>
                        <asp:TextBox ID="txt_BookName" runat="server" CssClass="txt" ReadOnly="true" ValidationGroup="Grp" MaxLength="50" Width="258px"></asp:TextBox>
                    </td>

                    <td>
                        <asp:Button ID="btnFindbook" runat="server" CssClass="btn" ToolTip="Find Branch"
                            Text="Find Branch" Width="85px"/>
                         <%--//<Change done by Nitin N :27-Oct-2021 : 1FinIQ4.7_Internal INT1FIN47-170 Alignment Issue: Menu Panel overlapping Popup.> --%>
                        <asp:Panel ID="PnlSearchedBooks" runat="server" CssClass="Filter draggable" Style="position: absolute; top: 318px; padding: 5px; width: auto; height: auto; z-index: 2;"
                            Visible="False">
                            <%--ScrollBars="Both"--%>
                            <table class="tbl">
                                <tr>
                                    <td class="lbl" style="height: 28px; font-size: 13px;">Branch List
                                    </td>
                                    <td style="float: right;">
                                        <asp:Button ID="btnSearchTypeBooksClose" runat="server" Text="X" Height="18px" Width="18px"
                                            CssClass="btn"></asp:Button>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2"></td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <asp:Label ID="lblSearchTypeBooks" runat="server" CssClass="lblinfo_Panel"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <table>
                                            <td class="lblBlotterPaddingRight ">
                                                <asp:Label ID="lblbranchName" runat="server" CssClass="lbl" Text="Branch Name"></asp:Label>
                                                <%--       </td>
                                                <td>--%>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtSearchTypeBooks" runat="server" CssClass="txt"  onkeydown="EnterKeySearchByBook(event)" Width="132px"></asp:TextBox>
                                            </td>
                                            <td>
                                                <asp:Button ID="btnSearchTypeBooksFind" runat="server" CssClass="btn" Text="Find"
                                                    Width="56px" />
                                            </td>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <asp:DataGrid ID="dgSearchTypeBooks" runat="server" AutoGenerateColumns="False" CssClass="Grid noFreeze"
                                            CellPadding="3" BorderStyle="None" AllowPaging="True" PageSize="10" ShowHeaderWhenEmpty="true" EmptyDataText="No Records Found">
                                            <SelectedItemStyle CssClass="GridItemSelect"></SelectedItemStyle>
                                            <AlternatingItemStyle CssClass="GridItem"></AlternatingItemStyle>
                                            <ItemStyle CssClass="GridItem"></ItemStyle>
                                            <HeaderStyle CssClass="GridHeader"></HeaderStyle>
                                            <FooterStyle CssClass="GridFooter"></FooterStyle>
                                            <PagerStyle CssClass="GridFooter" />
                                            <Columns>
                                                <%--     <asp:TemplateColumn HeaderText="SR.No.">
                                                                <ItemTemplate>
                                                                    <%#Container.ItemIndex + 1%>
                                                                </ItemTemplate>
                                                                <ItemStyle  />
                                                            </asp:TemplateColumn>--%>
                                                <asp:BoundColumn HeaderText="Sr No">
                                                    <HeaderStyle Wrap="False" HorizontalAlign="center" />
                                                    <ItemStyle Width="10%" Wrap="False" HorizontalAlign="Right" />
                                                </asp:BoundColumn>
                                                <asp:ButtonColumn CommandName="Select" HeaderText="Branch ID" DataTextField="Id"
                                                    ButtonType="LinkButton" ItemStyle-ForeColor="Blue">
                                                    <HeaderStyle Wrap="False" HorizontalAlign="center"></HeaderStyle>
                                                    <ItemStyle Wrap="False" HorizontalAlign="Right"></ItemStyle>
                                                </asp:ButtonColumn>
                                                <asp:BoundColumn DataField="Name" HeaderText="Branch Name">
                                                    <HeaderStyle Wrap="False" HorizontalAlign="center"></HeaderStyle>
                                                    <ItemStyle Wrap="False"></ItemStyle>
                                                </asp:BoundColumn>
                                            </Columns>
                                            <PagerStyle Mode="NumericPages" CssClass="GridPager" />
                                        </asp:DataGrid>
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                    </td>

                    <td class="btn_padding">
                        <asp:Button ID="btn_add" runat="server" Text="Add" CssClass="btn" Width="70px"
                            ToolTip="Add Dealer" />
                    </td>
                    <td class="btn_padding">
                        <asp:Button ID="btn_edit" runat="server" Text="Edit" CssClass="btn"
                            Width="70px" ToolTip="Edit Data" />
                    </td>
                    <td class="btn_padding">
                        <asp:Button ID="btn_save" runat="server" Text="Save" CssClass="btn"
                            Width="70px" ToolTip="Save Data" />

                    </td>
                    <td colspan="5">
                        <asp:Button ID="btn_maintain" runat="server" Text="Mapping Maintance" CssClass="btn"
                            Width="120px" Visible="false" /><%-- false--%>

                    </td>
                </tr>

                <tr>
                    <td>
                        <%--Changed width from 247 to 248--%>
                        <asp:TextBox ID="txtDealerSearch" runat="server" CssClass="txt" ToolTip="Enter dealer name" MaxLength="50" onkeydown="EnterKeyOnRMSearch(event)"
                            Width="258px" Visible="true" Style="margin-left: 8px;"></asp:TextBox>

                    </td>
                    <td class="btn_padding">
                        <asp:Button ID="btnFind" runat="server" Text="Find RM" ToolTip="Find dealer details by name"
                            CssClass="btn" Width="85px" Visible="true" />
                    </td>
                    <td class="btn_padding">
                        <asp:Button ID="btn_delete" runat="server" Text="Delete" CssClass="btn"
                            Width="70px" ToolTip="Delete Dealer" ValidationGroup="Grp" />
                    </td>
                    <td class="btn_padding">
                        <asp:Button ID="btn_cancel" runat="server" Text="Cancel" CssClass="btn"
                            Width="70px" ToolTip="Cancel (ctrl + r)" />
                    </td>
                    <td class="btn_padding">
                        <asp:Button style="margin-right:30px;" ID="btn_export" runat="server" CssClass="Export2Excel" Text=""
                            Width="100px" ToolTip="Export Excel (ctrl + shift + e)" />
                    </td>
                     <td>
                         &nbsp;</td>
                </tr>
            </table>
            <table class="tbl" id="tblGrid" runat="server" style="padding-left: 11px; margin-top: 10px;">

                <tr>
                    <td>

                        <asp:Label ID="Label2" runat="server" CssClass="lbl" Text="Dealer Details" Style="font-size: 13px;"></asp:Label>
                    </td>
                </tr>
            </table>
            <table style="margin-top: 10px; padding-left: 11px;">
                <tr>
                    <td>
                        <asp:GridView ID="dgv_dealerRm" runat="server" CssClass="Grid frozenGrid" HeaderStyle-Font-Bold="false"
                            AutoGenerateColumns="False" AllowPaging="True" PageSize="10" DataKeyNames="ID,DealerName" ShowHeaderWhenEmpty="true" EmptyDataText="No Records Found">
                            <AlternatingRowStyle CssClass="GridItem"></AlternatingRowStyle>
                            <RowStyle CssClass="GridItem"></RowStyle>
                            <HeaderStyle CssClass="GridHeader" Font-Bold="false" Font-Italic="false"></HeaderStyle>
                            <FooterStyle CssClass="GridFooter"></FooterStyle>
                            <PagerStyle CssClass="GridPager" />
                            <Columns>
                                <%--  <asp:CommandField ItemStyle-CssClass="HiddenColumn" HeaderStyle-CssClass="HiddenColumn"
                                                ShowSelectButton="true" SelectText="" HeaderText="" ButtonType="Link" ItemStyle-ForeColor="Blue">
                                                <HeaderStyle CssClass="HiddenColumn" Width="0px" />
                                                <ItemStyle CssClass="HiddenColumn" ForeColor="Blue" Width="0px" />
                                            </asp:CommandField>--%>
                                <asp:BoundField DataField="ID" HeaderText="Dealer ID" Visible="True">
                                    <HeaderStyle Font-Bold="False" Width="60px" />
                                    <ItemStyle HorizontalAlign="right" />
                                </asp:BoundField>
                                <asp:BoundField DataField="DealerName" HeaderText="Dealer Name">
                                    <HeaderStyle Font-Bold="False"  Width="110px"/>
                                </asp:BoundField>
                                <asp:BoundField DataField="Phone_No" HeaderText="Phone Number">
                                    <HeaderStyle Font-Bold="False" />
                                    <ItemStyle HorizontalAlign="Right" />
                                </asp:BoundField>
                                <asp:BoundField DataField="Active" HeaderText="Status">
                                    <HeaderStyle Font-Bold="False" />
                                    <ItemStyle HorizontalAlign="Center" />
                                </asp:BoundField>
                                <asp:BoundField DataField="Dealer_Type" HeaderText="Dealer Type">
                                    <HeaderStyle Font-Bold="False" />
                                </asp:BoundField>
                                <asp:BoundField DataField="Book_Name" HeaderText="Branch Name">
                                    <HeaderStyle Font-Bold="False" />
                                </asp:BoundField>
                                <asp:BoundField DataField="LongName" HeaderText="Long Name">
                                    <HeaderStyle Font-Bold="False" />
                                </asp:BoundField>
                                <asp:BoundField DataField="Address_Branch" HeaderText="Address">
                                    <HeaderStyle Font-Bold="False" />
                                </asp:BoundField>
                              <%--  <asp:TemplateField HeaderText="Address">
                                    <ItemTemplate>
                                        <asp:Label id="lblAddr" runat="server"  Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Address_Branch").ToString)%>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>--%>
                                <asp:BoundField DataField="Fax_No" HeaderText="Fax No" Visible="false">
                                    <HeaderStyle Font-Bold="False" />
                                    <ItemStyle HorizontalAlign="Right" />
                                </asp:BoundField>
                                <%--DSR ID--%>
                                <asp:BoundField DataField="Email" HeaderText="Email">
                                    <HeaderStyle Font-Bold="False" />
                                </asp:BoundField>
                                <asp:BoundField DataField="" HeaderText="RM Ref Id" Visible="false"><%--added by sumit--%>
                                    <HeaderStyle Font-Bold="False" />
                                    <ItemStyle HorizontalAlign="Right" />
                                </asp:BoundField>
                                <asp:BoundField DataField="Staff_ID" HeaderText="Account Officer Code">
                                    <HeaderStyle Font-Bold="False" />
                                    <ItemStyle HorizontalAlign="Right" />
                                </asp:BoundField>
                                <%--Account Officer Code--%>
                                <asp:BoundField DataField="Mobile_No" HeaderText="Mobile No" Visible="false">
                                    <HeaderStyle Font-Bold="False" />
                                    <ItemStyle HorizontalAlign="Right" />
                                </asp:BoundField>
                                <asp:BoundField DataField="Treasury_Dashboard_YN" HeaderText="Treasury Dashboard YN" Visible="false">
                                    <HeaderStyle Font-Bold="False" />
                                    <ItemStyle HorizontalAlign="Right" />
                                </asp:BoundField>
                                <asp:BoundField DataField="Misc9" HeaderText="PC CC Code" Visible="false">
                                    <HeaderStyle Font-Bold="False" />
                                    <ItemStyle HorizontalAlign="Right" />
                                </asp:BoundField>
                                  <asp:BoundField DataField="DealerSegment" HeaderText="Segment" visible ="false">
                                    <HeaderStyle Font-Bold="False" />
                                    <ItemStyle HorizontalAlign="Right" />
                                </asp:BoundField>
                            </Columns>
                        </asp:GridView>
                    </td>
                </tr>
            </table>


            <asp:HiddenField ID="hdnFlag" runat="server" />
            <asp:HiddenField ID="hdn_CheckRMDealOrderReference" runat="server" />
            <asp:HiddenField ID="hdn_AllowRMDeletionWhenMaturedDealExist" runat="server" />
            <asp:HiddenField ID="hdn_CaptureTreasuryDashboard" runat="server" />
            <asp:HiddenField ID="hdn_CaptureTargetFrequencyFieldsInRMSetup" runat="server" />
            <asp:HiddenField ID="hdn_BankBaseCurrency" runat="server" />
            <asp:HiddenField ID="hdn_CapturePCCCCodeOnDealerDetails" runat="server" />
            <asp:HiddenField ID="hdn_EnableCrossEntityStaticSetup" runat="server" />
            <asp:HiddenField ID="hdn_EnableSalesAndSharedDistribution" runat="server" />
            <asp:HiddenField ID="hdn_EnableMainRMGroupHistory" runat="server" />
            <asp:HiddenField ID="hdn_DelayAutoMappingInRMGrouping" runat="server" />
            <asp:HiddenField ID="hdn_AutoRefreshLRCForNewRM" runat="server" />
            <asp:HiddenField ID="hdn_AutoRefreshLRCConfirmationMessage" runat="server" />
            <asp:HiddenField ID="hdn_EnableGroupBasedMapping" runat="server" />
            <asp:HiddenField ID="hdn_StoreIDFieldsInLRCMappingTables" runat="server" />
            <asp:HiddenField ID="hdn_EnableGroupBasedAutoLRMap" runat="server" />
            <asp:HiddenField ID="hdn_InsertAuditTrailForAutoLRCMapping" runat="server" />
            <asp:HiddenField ID="hdn_EnableCustomerRMMapHistory" runat="server" />
            <%--Jira Number:- ANZDCIUPIN-115 Added By Shubham K on 10-Jul-2020--%>
            <asp:HiddenField ID="hdn_StrCloneDealerRMSetup" runat="server" />
            <asp:HiddenField ID="HiddenField4" runat="server" />
            <asp:HiddenField ID="HiddenField5" runat="server" />
            <asp:HiddenField ID="hdnCustSegment" runat="server" /> 


        </ContentTemplate>
        <Triggers>
            <asp:PostBackTrigger ControlID="btn_export" />
        </Triggers>
    </asp:UpdatePanel>
   <%-- <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1"
        DisplayAfter="0">
        <ProgressTemplate>
            <div>
                <img alt="Loading" src="../App_Resources/loading.gif" style="height: 16px; width: 20px" /><span
                    class="lbl">Loading...</span>
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>--%>
    <asp:Button ID="btnhdnMap" runat="server" Width="0" Style="width: 0px; height: 0px; font-size: 0; border: none; display:none;" />
</asp:Content>
