<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/FiniqAppMasterPage.Master" CodeBehind="FinIQ_Identifier_Setup.aspx.vb" Inherits="FinIQWebApp.FinIQ_Identifier_Setup" %>

<%--KavyaD || 5th Jan 2021 || UI layout changes UBPINT-17 --%>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server"></asp:ScriptManagerProxy>
    <script>
        function checkUniqueOrSpecialCharacters(evt) {
            var letters = /^[ A-Za-z0-9_@./#&+-]*$/;
            var charCode = (evt.which) ? evt.which : event.keyCode;
            var keyPressed = String.fromCharCode(charCode);
            //if (letters.test(keyPressed))              return true;
            //else                                       return false;
            return (letters.test(keyPressed));
        }

        //[UBPINT-17]
        function numberOnly(evt) {
            var charCode = (evt.which) ? evt.which : event.keyCode
            if (charCode > 31 && (charCode < 48 || charCode > 57))
                return false;

            return true;
        }
        function funRowsPerPageKeyDown(event) {
            if (event.keyCode === 13) {
                $("#<%= btnCancel.ClientID %>").focus();
                return event.charCode >= 48 && event.charCode <= 57
            }
        }
    </script>
    <script src="../FinIQJS/SortFilter_Grid.js"></script>
    <style>
        input[type="submit"]:focus, .btn:focus, input[type="checkbox"]:focus {
            border: solid 1px #CCCCCC !important;
            color: #000000 !important;
            background-color: #fffdfd !important;
            box-shadow: 0px 0px 5px 2px #ddd !important;
        }

        .tableContent {
            width: 100%;
        }

        .btn {
            margin-right: 0.4%;
        }

        .GridItem td, .Grid td {
            border: solid 1px #DDDDDD !important;
        }

        .GridHeader th:not(:first-child).filter_1 {
            padding-right: 16px !important;
        }
    </style>
    <link href="EmailCss/Css_EmailIdentifier.css" rel="stylesheet" />
    <%--INT1FIN47-149 || by suvarna 13Oct2021 || freeze header --%>
    <link href="../FinIQJS/FreezeGrid.css" type="text/css" rel="stylesheet">
    <script src="../FinIQJS/FreezeGrid.js" type="text/javascript"></script>
    <script src="EmailJS/Js_EmailIdentifier.js"></script>
    <asp:UpdatePanel ID="UpdatePanelCP" runat="server" class="PanelPad">
        <ContentTemplate>
            <%--UBPINT-25 || KAvyaD ||4thJAn2021--%>
            <div style="width: 100%; height: 20px; margin-top: -15px;" class="row">
                <div class="col">
                    <asp:UpdateProgress ID="UpdateProgress2" runat="server" AssociatedUpdatePanelID="UpdatePanelCP" DisplayAfter="0">
                        <ProgressTemplate>
                            <div style="position: absolute; top: 90px; left: 750px;">
                                <img alt="Loading" src="../App_Resources/ajax-loader7.gif" /><span class="">Loading...</span>
                            </div>
                        </ProgressTemplate>
                    </asp:UpdateProgress>
                </div>
                <div class="col">
                     <%--INT1FIN47-107 || by suvarna 10Oct2021 || Success msg not visible changes --%>
                    <table class="tableContent" style="margin-top:10px">
                        <tr>
                            <td>
                                <asp:Label ID="lblError" runat="server" Style="color: #FF4E4E !important;"></asp:Label>
                                <asp:Label ID="lblSuccess" runat="server" Style="color: #008000 !important;" ></asp:Label>
                                <asp:Label ID="lblmsg" runat="server" Style="color: #0368B6 !important;" ></asp:Label>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
            <div>
                <div style="width: 1500px">
                    <div class="row">
                        <table class="tableContent">
                            <tr>
                                <td>
                                    <div>
                                        <tr>
                                            <td>
                                                <div style="border: solid 1px #dddddd; width: 1852px; padding: 0.3%;">
                                                    <table class="tableContent">
                                                        <tr>
                                                            <td>
                                                                <div style="display: flex;">
                                                                    <div class="row" style="width: 100%;">
                                                                        <asp:Button runat="server" Text="Add New" CssClass="btn" ID="btnAddNew" Width="100px"></asp:Button>
                                                                        <asp:Button runat="server" Text="Save" CssClass="btn" ID="btnSave" OnClientClick="ClearIfModuleSelected()" Width="100px"></asp:Button>
                                                                        <%--OnClientClick="ClearIfModuleSelected();"--%>
                                                                        <asp:Button runat="server" Text="Cancel" CssClass="btn" ID="btnCancel" Width="100px"></asp:Button>
                                                                        <asp:Button runat="server" Text="Delete" CssClass="btn" ID="btnDelete" OnClientClick="return confirm('Are you sure you want to delete record(s)');" Width="100px"></asp:Button>
                                                                        <asp:Button runat="server" Text="Excel Export" CssClass="btn" ID="btnExportExcel" Width="150px"></asp:Button>
                                                                        <asp:Label runat="server" Text="Identifier " ID="lblIdentifier" CssClass="lbl lblSearch searchtemp" />                                       
                                                                        <asp:DropDownList ID="ddlIdentiferCode" runat="server" CssClass="ddl" AutoPostBack="true" Style="width: 200px;">                                                                                               
                                                                        </asp:DropDownList>
                                                                         
                                                                        <asp:Label ID="LblRowCountName" runat="server" CssClass="lbl" Text="Total Record(s): " Style="margin-left: 9%;"></asp:Label>
                                                                        <asp:Label ID="LblRowCount" runat="server" CssClass="lbl"></asp:Label>
                                                                        <asp:Label ID="lblRowsperpage" runat="server" CssClass="lbl" Text="Records(s) Per Page " Style="margin-left: 33px;" />
                                                                        <asp:TextBox ID="txtRowperpage" runat="server" CssClass="txt" AutoPostBack="true" MaxLength="3" oncopy="return false" onpaste="return false" oncut="return false" Width="35px" onkeypress="return numberOnly(event)" onkeyup="return funRowsPerPageKeyDown(event);" Style="text-align: right;"></asp:TextBox>

                                                                    </div>
                                                                </div>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </div>
                                            </td>
                                        </tr>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div style="height: 5px;">
                </div>
                <table class="tableContent">
                    <tr>
                        <td>
                            <table style="margin-left: -2px;">
                                <tr>
                                    <td>
                                        <div style="width: 2675px">
                                            <asp:GridView ID="grdIdentifierSetup" runat="server" CellPadding="3" EmptyDataText="No data found." AutoGenerateColumns="False"
                                                PageSize="30" CssClass="Grid" AllowPaging="True" ShowHeaderWhenEmpty="true" AllowSorting="true" TabIndex="6" BorderColor="White" GridLines="Both"
                                                RowHeadersWidthSizeMode="DisableResizing;" HeaderStyle-CssClass="GridHeaderTitle">
                                                <SelectedRowStyle CssClass="GridItemSelect" />
                                                <RowStyle CssClass="GridItem" />
                                                <HeaderStyle CssClass="GridHeader" Font-Size="X-Small" BackColor="#f5f5f5" Font-Bold="False" ForeColor="White" HorizontalAlign="Center" />
                                                <FooterStyle CssClass="GridFooter" />
                                                <PagerStyle CssClass="GridPager" />
                                                <PagerSettings FirstPageText="First" LastPageText="Last" Mode="NumericFirstLast" Position="Bottom" />
                                                <EmptyDataTemplate>
                                                    <asp:Label ID="lblEGMEmpty" runat="server" Text="No data found." CssClass="lbl"></asp:Label>
                                                </EmptyDataTemplate>

                                                <Columns>
                                                    <asp:TemplateField>
                                                        <HeaderTemplate>
                                                            <asp:CheckBox ID="chkAll" runat="server" AutoPostBack="true" OnCheckedChanged="chkAll_CheckedChanged" />
                                                        </HeaderTemplate>
                                                        <ItemTemplate>
                                                            <asp:CheckBox ID="chkSelect" runat="server" AutoPostBack="true" OnCheckedChanged="chkSelect_CheckedChanged" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:CommandField ButtonType="Link" ShowEditButton="true" EditText="Edit" UpdateText="" runat="server" />
                                                   
                                                    <%-- SCBUPINT-135 || by suvarna 24Feb2022 || reported by Sandip B sir || start --%>
                                                    <asp:TemplateField HeaderText="Id" HeaderStyle-CssClass="hiddencol" ItemStyle-CssClass="hiddencol" Visible="false">
                                                        <HeaderStyle Width="25px" />  <%-- change width by Suvarna P | 07Jul2021 |  issues reported by Sandip B. --%>
                                                        <ItemStyle Width="25px" />
                                                        <ItemTemplate>
                                                            <asp:Label ID="lbid" CssClass="lbl" runat="server" Text='<%# Eval("id")%>' />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="ES" HeaderStyle-CssClass="hiddencol" ItemStyle-CssClass="hiddencol" Visible="false">
                                                        <HeaderStyle Width="50px" />
                                                        <ItemStyle Width="50px" />
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblEmailSource" CssClass="lbl" runat="server" Text='<%# Eval("Email_Source")%>' />
                                                        </ItemTemplate>

                                                    </asp:TemplateField>

                                                    <%-- SCBUPINT-135 || by suvarna 24Feb2022 || reported by Sandip B sir || start --%>
                                                    <%--<asp:TemplateField HeaderText="Identifier Code">--%>
                                                    <asp:TemplateField HeaderText="Identifier Setup">
                                                        <HeaderStyle VerticalAlign="Middle" Wrap="False" Width="50px"></HeaderStyle>
                                                        <ItemStyle VerticalAlign="Middle" Wrap="false" Width="50px" />
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblIdentifier" CssClass="lbl" runat="server" Text='<%# Eval("Email_Identifier_code")%>' />
                                                        </ItemTemplate>
                                                        <EditItemTemplate>
                                                            <asp:TextBox ID="txtIdentifier" CssClass="txt" runat="server" Text='<%# Eval("Email_Identifier_code")%>' onkeypress="return checkUniqueOrSpecialCharacters(event)" 
                                                               style="min-width: 250px !important;" />
                                                            <%--OnTextChanged="txtIdentifier_TextChanged" --%>
                                                        </EditItemTemplate>
                                                    </asp:TemplateField>

                                                     <%-- SCBUPINT-135 || by suvarna 24Feb2022 || reported by Sandip B sir || start --%>
                                                    <%--<asp:TemplateField HeaderText="Module/Email">--%>
                                                        <asp:TemplateField HeaderText="Email Source">
                                                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="False" Width="50px" CssClass="lbl hdrEmailSourceCss"></HeaderStyle>
                                                        <ItemStyle VerticalAlign="Middle" Wrap="false" Width="50px" />
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblEmailSource2" CssClass="lbl" runat="server" Text='<%# Eval("Email_Source")%>' />
                                                        </ItemTemplate>
                                                        <EditItemTemplate>
                                                            <asp:DropDownList ID="ddlEmailSource" runat="server" CssClass="ddl" AutoPostBack="true" Style="width: 180px;" OnSelectedIndexChanged="ddlEmailSourceIndexChanged">
                                                            </asp:DropDownList>
                                                        </EditItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="Email ID(s)">
                                                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="False" CssClass="labels"></HeaderStyle>
                                                        <ItemStyle VerticalAlign="Middle" Wrap="false" />
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblDefEmailID" CssClass="lbl" runat="server" Style="min-width: 300px !important; width: fit-content;" Text='<%# Eval("EmailID")%>' />
                                                        </ItemTemplate>
                                                        <EditItemTemplate>
                                                            <asp:TextBox ID="txtDefEmailID" runat="server" Text='<%# Eval("EmailID")%>' ReadOnly="true" Enabled="false" Style="min-width: 1000px !important;" />
                                                        </EditItemTemplate>
                                                    </asp:TemplateField>

                                                   
                                                     <asp:TemplateField HeaderText="Created By">
                                                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="False" Width="100px" CssClass="labels CreatedByCss"></HeaderStyle>
                                                        <ItemStyle VerticalAlign="Middle" Wrap="false" Width="100px" />
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblCreatedBy1" CssClass="lbl" runat="server" Text='<%# Eval("CreatedBy")%>' />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="Created At">
                                                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="False" Width="100px" CssClass="lbl"></HeaderStyle>
                                                        <ItemStyle VerticalAlign="Middle" HorizontalAlign="Center" Wrap="false" Width="100px" />
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblCreatedAt1" CssClass="lbl" runat="server" Text='<%# FinIQWebApp.FinIQApp_Date.FinIQDateTime((Convert.ToString(Eval("CreatedAt"))))%>' />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    
                                                    <%-- SCBUPINT-135 || by suvarna 24Feb2022 || reported by Sandip B sir || start --%>
                                                    <asp:TemplateField HeaderText="Updated By">
                                                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="False" Width="100px" CssClass="labels CreatedByCss"></HeaderStyle>
                                                        <ItemStyle VerticalAlign="Middle" Wrap="false" Width="100px" />
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblUpdatedBy1" CssClass="lbl" runat="server" Text='<%# Eval("Updated_By")%>' />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Updated At">
                                                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="False" Width="100px" CssClass="lbl"></HeaderStyle>
                                                        <ItemStyle VerticalAlign="Middle" HorizontalAlign="Center" Wrap="false" Width="100px" />
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblUpdatedAt1" CssClass="lbl" runat="server" Text='<%# FinIQWebApp.FinIQApp_Date.FinIQDateTime((Convert.ToString(Eval("Updated_At"))))%>' />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                     
                                                    <%-- SCBUPINT-135 || by suvarna 24Feb2022 || reported by Sandip B sir || end --%>
                                                </Columns>
                                            </asp:GridView>
                                        </div>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </div>
            <asp:HiddenField ID="hdnUseSession" runat="server" />
            <asp:HiddenField ID="hdntxtIdentifier" runat="server" />
            <asp:HiddenField ID="hdnAddNewRow" runat="server" />

        </ContentTemplate>
        <Triggers>
            <asp:PostBackTrigger ControlID="btnExportExcel" />
        </Triggers>
    </asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="Footer">
</asp:Content>

