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

<%@ Register Src="~/FinIQ_User_Controls/DateControl.ascx" TagName="DateControl" TagPrefix="uc1" %>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <script type="text/javascript">
        //commented by RuchiraM on 3-5-2018
        //function ConformDelete() {
        //    if (confirm("Are you sure, you want to delete Customer Type? ")) {
        //        return true
        //    }
        //    else {
        //        return false
        //    }
        //}

        function textboxMultilineMaxNumber(txt, maxLen) {
            try {

                if (txt.value.length > (maxLen - 1)) return false;
            } catch (e) {
            }
        }

          <%--Added by SailiD on 19/09/18 for enter key event generation--%>
        function EnterKeyEvent(evt) {
            var code = (evt.which) ? evt.which : evt.keyCode;

            if (code == 13) {
                __doPostBack('<%=txtrowsperpage.ClientID%>', 'TextChanged');

            }
        }

        //function AllowOnlyDescription() {
        //    //
        //    var key = window.event.charCode;

        //    if (key >= 48 && key <= 57 || key >= 65 && key <= 90 || key >= 97 && key <= 122 || key == 32 || key == 40 || key == 41 || key == 45 || key == 46 || key == 95)
        //        return true;
        //    else
        //        return false;
        //}
    </script>
    <style>
        .Header
        {
            font: normal 13px/28px verdana !important;
            color: #000000 !important;
            height: 28px;
            background-color: #FFFFFF;
        }

        .buttons
        {
            width: 70px;
        }

        /*<Change by SailiD on 24/08/18>*/
        .ddlWidth
        {
            width: 190px;
        }
        /*</Change by SailiD on 24/08/18>*/
     
     

        .gridCol
        {
            min-width: 110px !important;
            max-width: 110px !important;
               overflow:hidden;
        }

        .DateCol
        {
            min-width: 160px !important;
            max-width: 160px !important;
            overflow:hidden;
        }
    </style>
    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
    </asp:ScriptManagerProxy>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <table>
                <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>
                    </td>
                </tr>

            </table>
            <table>
                <tr>
                    <td class="lblBlotterPaddingRight ">
                        <asp:Label ID="Label1" Text="<%$ Resources:LocalizedText, Entity %>" runat="server"></asp:Label>
                    </td>
                    <td class=" ctlBlotterPaddingRight">
                        <asp:DropDownList ID="ddlentityname" CssClass="ddl ddlWidth" runat="server" AutoPostBack="True">
                        </asp:DropDownList>
                    </td>
                    <td class="lblBlotterPaddingRight " rowspan="2">
                        <asp:Label ID="Label3" Text="Description" runat="server" CssClass="lbl"></asp:Label>
                    </td>
                    <td rowspan="2" class=" ctlBlotterPaddingRight">
                        <asp:TextBox ID="txtdesc" CssClass="txt ddlWidth" runat="server" MaxLength="50" Height="44px" AutoPostBack="false"
                            TextMode="MultiLine" TabIndex="8" onkeypress="return textboxMultilineMaxNumber(this,80);" onpaste="return false" oncut="return false" oncopy="return false"></asp:TextBox>
                        <%--onkeypress="return textboxMultilineMaxNumber(this,80);"--%>
                    </td>
                    <td class=" ctlBlotterPaddingRight">
                        <asp:RadioButton ID="rdbindivisual" CssClass="RadioBtn" Text="Individual" runat="server" 
                            GroupName="DocFormat" Enabled="false"></asp:RadioButton>
                    </td>
                    <td class="lblBlotterPaddingRight">
                        <asp:Label ID="Label6" runat="server" text="Total Record(s)" CssClass="lbl"></asp:Label></td>
                    <td class="ctlBlotterPaddingRight">
                        <asp:Label ID="LblRowCount" runat="server" CssClass="lbl"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="lblBlotterPaddingRight">
                        <asp:Label ID="Label2" Text="Customer Type" runat="server"></asp:Label>
                    </td>
                    <td class=" ctlBlotterPaddingRight">
                        <asp:TextBox ID="txtcusttype" CssClass="txt ddlWidth" runat="server" AutoPostBack="false" MaxLength="15" onpaste="return false" oncut="return false" oncopy="return false"></asp:TextBox>
                        <%--onkeypress="return DisAllowSpecialChar();"--%>
                    </td>
                   
                    <td class=" ctlBlotterPaddingRight">
                        <asp:RadioButton ID="rdbnonindivisual" CssClass="RadioBtn" Text="Non-Individual"
                            runat="server" GroupName="DocFormat" Enabled="false"></asp:RadioButton>
                    </td>

                    <td class="lblBlotterPaddingRight ">
                        <asp:Label ID="lblRowsperpage" runat="server" CssClass="lbl" Text="Record(s) Per Page" />
                    </td>
                    <td class=" ctlBlotterPaddingRight">
                        <%--change by SailiD on 19/09/18 for enter key event generation--%>
                        <asp:TextBox ID="txtrowsperpage" runat="server" CssClass="txt" MaxLength="2" Style="text-align: center;" AutoPostBack="true" onkeydown="EnterKeyEvent(event)" Width="30px" onkeypress='return event.charCode >= 48 && event.charCode <= 57' />
                    </td>
                    <td class="lblBlotterPaddingRight">
                        <asp:Label ID="Label4" Text="Type" runat="server" Visible="false"></asp:Label>
                    </td>
                </tr>
            </table>
            <table>
                <tr>
                    <td style="height: 10px"></td>
                </tr>
                <tr>
                    <td>
                        <asp:Button ID="btninsert" CssClass="btn buttons" Text="Add" runat="server" TabIndex="1"></asp:Button>
                    </td>
                    <td>
                        <asp:Button ID="btnsave" CssClass="btn buttons" Text="Save" runat="server" TabIndex="2"></asp:Button>
                    </td>
                    <td>
                        <asp:Button ID="btnupdate" CssClass="btn buttons" Text="Edit" runat="server" TabIndex="3"></asp:Button>
                    </td>
                    <%--<td style="padding-left:10px">
                                    <asp:Button ID="btndelete" CssClass="btn" Text="Delete" runat="server" Enabled="false"
                                        TabIndex="4"  Width="70px"></asp:Button>
                                </td>--%>
                    <td>
                        <asp:Button ID="btndelete" CssClass="btn buttons" Text="Delete" runat="server" TabIndex="4"
                            CommandName="Delete"   />
                    </td>
                    <td class="ctlBlotterPaddingRight">
                        <asp:Button ID="btncancel" CssClass="btn buttons" Text="Cancel" runat="server" TabIndex="5"></asp:Button>
                    </td>
                </tr>
            </table>
            <table>
                <tr>
                    <td style="height: 10px"></td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="Label5" Text="Customer Type Details (Existing)" runat="server" CssClass="Header"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td style="height: 5px"></td>
                </tr>
            </table>
            <table>
                <tr>
                    <td>
                        <asp:DataGrid ID="dgcustomeridformat" runat="server" AutoGenerateColumns="False"
                            AllowPaging="True" CssClass="Grid">
                            <%--<SelectedItemStyle CssClass="GridItemSelect" />--%>
                            <ItemStyle CssClass="GridItem" Wrap="true" />
                            <HeaderStyle CssClass="GridHeader" HorizontalAlign="Center" Wrap="true" />
                            <%--Wrap="true"--%>
                            <FooterStyle CssClass="GridFooter" />
                            <PagerStyle CssClass="GridPager" />
                            <Columns>
                                <asp:ButtonColumn Text="Select" ItemStyle-HorizontalAlign="Center" HeaderText=""
                                    CommandName="Select"></asp:ButtonColumn>
                                <asp:BoundColumn DataField="Entity_name" ItemStyle-HorizontalAlign="Left" HeaderText="<%$ Resources:LocalizedText, Entity %>">
                                    <HeaderStyle CssClass="gridCol" />
                                    <ItemStyle CssClass="gridCol" Wrap="true" HorizontalAlign="Left" />
                                </asp:BoundColumn>
                                <asp:BoundColumn DataField="Customer_type" ItemStyle-HorizontalAlign="Left" HeaderText="Customer Type">
                                    <HeaderStyle CssClass="gridCol" />
                                    <ItemStyle CssClass="gridCol" Wrap="true" HorizontalAlign="Left" />
                                </asp:BoundColumn>
                                <%-- <asp:BoundColumn DataField="Type_description" ItemStyle-HorizontalAlign="Left"  ItemStyle-Width="100px" ItemStyle-Wrap="true"    HeaderText="Description">
                                            </asp:BoundColumn>--%>

                                <asp:BoundColumn DataField="Type_description" HeaderText="Description">
                                    <HeaderStyle CssClass="DateCol" />
                                    <ItemStyle CssClass="DateCol" Wrap="true" HorizontalAlign="Left" />
                                </asp:BoundColumn>

                                <asp:BoundColumn DataField="misc1" ItemStyle-HorizontalAlign="Center" HeaderText="Individual / NonIndividual">
                                    <HeaderStyle CssClass="gridCol" />
                                    <ItemStyle CssClass="gridCol" Wrap="true" HorizontalAlign="Center" />
                                </asp:BoundColumn>
                                <asp:BoundColumn DataField="Created_At" ItemStyle-HorizontalAlign="Center" HeaderText="Created At">
                                    <HeaderStyle CssClass="DateCol" />
                                    <ItemStyle CssClass="DateCol" Wrap="false" HorizontalAlign="Center" />
                                </asp:BoundColumn>
                                <asp:BoundColumn DataField="Created_By" ItemStyle-HorizontalAlign="Left" HeaderText="Created By">
                                    <HeaderStyle CssClass="gridCol" />
                                    <ItemStyle CssClass="gridCol" Wrap="true" HorizontalAlign="Left" />
                                </asp:BoundColumn>
                                <asp:BoundColumn Visible="False" DataField="Customer_Type_Id" HeaderText="CustomerTypeId"></asp:BoundColumn>
                                <asp:BoundColumn Visible="False" DataField="entity_membermap_id" HeaderText="entitymemberID"></asp:BoundColumn>
                            </Columns>
                            <PagerStyle Mode="NumericPages"></PagerStyle>
                        </asp:DataGrid>
                    </td>
                </tr>
            </table>
            <asp:TextBox ID="txtCustomer_type" Style="z-index: 104; left: 8px; position: absolute; top: 344px"
                runat="server" Visible="False"></asp:TextBox>
            <asp:TextBox ID="txtCustomer_Type_Id" Style="z-index: 105; left: 8px; position: absolute; top: 344px"
                runat="server" Visible="False"></asp:TextBox>
            <asp:TextBox ID="txtinsertupdate" Style="z-index: 107; left: 8px; position: absolute; top: 344px"
                runat="server" Visible="False"></asp:TextBox>
            <asp:TextBox ID="txtType_description" Style="z-index: 101; left: 8px; position: absolute; top: 344px"
                runat="server" Visible="False" Wrap="true"></asp:TextBox>
            <asp:TextBox ID="txtentitymemberID" Style="z-index: 102; left: 8px; position: absolute; top: 344px"
                runat="server" Visible="False"></asp:TextBox>
            <asp:TextBox ID="TextBox4" Style="z-index: 106; left: 8px; position: absolute; top: 344px"
                runat="server" Visible="False"></asp:TextBox>
            <asp:TextBox ID="txtIndNonInd" Style="z-index: 103; left: 8px; position: absolute; top: 344px"
                runat="server" Visible="False"></asp:TextBox>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
