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

<asp:Content ID="cont" ContentPlaceHolderID="MainContent" runat="server">
    <asp:ScriptManagerProxy ID="ScriptManagerProxy11" runat="server">
    </asp:ScriptManagerProxy>
    <asp:UpdatePanel ID="UpdatePanelCP" runat="server">
        <ContentTemplate>
            <style>
                .hidden {
                    display:none;
                
                }

            </style>
            <script type="text/javascript" language="javascript">
                function checkShortcut() {
                    if (event.keyCode == 8 || event.keyCode == 13) {
                        return false;
                    }
                }
            </script>
           <%-- <table class="Filter">--%>
             <table>
                  <tr>
                    <td>
                        <asp:Label ID="lblerror" runat="server" CssClass="lblError"></asp:Label>
                        <asp:Label ID="lblInfo" runat="server" CssClass="lblInfo"></asp:Label>
                        <asp:Label ID="lblSuccess" runat="server" CssClass="lblSuccess"></asp:Label>
                    </td>
                </tr>
            </table>
           <%-- <table class="Filter">--%>
                <table style="margin-top:20px" >
              
                <tr>
                    <td>
                            <%--<asp:Label ID="lblEntity" runat="server" TabIndex="7">Entity</asp:Label>--%>
                        <asp:Label ID="lblEntity" runat="server" TabIndex="7" Text="<%$ Resources:LocalizedText, Entity %>" CssClass="lbl"></asp:Label>
                   
                  </td>
                    <td>
                         <asp:DropDownList ID="cboEntity" runat="server" CssClass="ddl" width="150">
                        </asp:DropDownList>
                     </td>
                  
                    <td style="padding-left:20px">
                          <asp:Label ID="lblLogin" runat="server">Search</asp:Label>
                     </td>
                    <td>
                          <asp:TextBox ID="txtSearch" Width="150" runat="server"></asp:TextBox>
                          
                        </td>

                    <td style="padding-left:20px">
                        <asp:Button ID="btnLoad" runat="server" CssClass="btn" Text="Load"  Width="70px"
                            TabIndex="1"></asp:Button>
                       </td>
                    <td style="padding-left:10px">
                        <asp:Button ID="btnAdd" runat="server" CssClass="btn" Text="Add"  Width="70px"
                            TabIndex="2"></asp:Button>
                       </td>
                    <td style="padding-left:10px"> 
                         <asp:Button ID="btnSave" runat="server" CssClass="btn" Text="Save"
                            Width="70px" TabIndex="4"></asp:Button>
                 </td>
                    
                
                        <td style="padding-left:20px">
                      <asp:Label ID="LblRecordPerPage" runat="server">Row(s) Per Page :</asp:Label>
                  </td>
                    
                       <td>
                      <asp:TextBox ID="TxtRecordPerPage" runat="server" Width="40px" Text="10" AutoPostBack="true"  MaxLength="3"  onkeypress="return event.charCode >= 48 && event.charCode <= 57" ondragstart="return false;" ondrop="return false;" onpaste="return false" oncut="return false" oncopy="return false" OnTextChanged="TxtRecordPerPage_TextChanged1"></asp:TextBox>
                          
                  </td> 
                    
                      <%--  <td style="padding-left:5px">
                      <asp:Label ID="lblPerPage" runat="server"  >Per Page</asp:Label>
                  </td>--%>
                     <td style="padding-left:20px">
                      <asp:Label ID="LblTotalRecordCount" runat="server" >Total Record(s) :</asp:Label>
                  </td>
                    
                       <td>
                     <%-- <asp:TextBox ID="TxtTotalRecordCount" runat="server" Width="70px" Enabled ="false" ></asp:TextBox>--%>
                           <asp:Label ID="TxtTotalRecordCount" runat="server" ></asp:Label>
                       </td>
                    <td style="padding-left:10px">
                        <asp:Button ID="btnUpdate" runat="server" CssClass="btn" Visible="false" Text="Edit" 
                            Width="70px" TabIndex="3"></asp:Button>
                       
                        </td>
                    <td style="padding-left:10px">
                        <asp:Button ID="btnDelete" runat="server" Visible="false"  CssClass="btn" Text="Delete"
                            Width="70px" TabIndex="5"></asp:Button>
                        </td>
                    <td style="padding-left:10px">
                        <asp:Button ID="btnCancel" runat="server" Visible="false"  CssClass="btn" Text="Cancel"
                            Width="70px" TabIndex="6"></asp:Button>
                  </td>
                    <td>
                        <asp:DropDownList ID="cboLogin" runat="server" Visible="false" TabIndex="6" width="140" AutoPostBack="false">
                        </asp:DropDownList>
                    </td>
                </tr>
                 </table>
            <table style="margin-top:20px">
                <tr>
                    <td>
  
                          <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always">
                            <ContentTemplate>
                                <asp:DataGrid ID="dgLoginEntity" runat="server" AllowSorting="True" AutoGenerateColumns="False" GridLines="None" CssClass="Grid"
                                    AllowPaging="True" PageSize="20" Width="100%">
                                    <ItemStyle CssClass="GridItem" />
                                  <%--  <AlternatingItemStyle CssClass="AlternatItemStyle" />--%>
                                    <HeaderStyle CssClass="GridHeader" Wrap="true"/>
                                    <%--   <FooterStyle CssClass="GridFooter"></FooterStyle>--%>

                                    <SelectedItemStyle CssClass="GridItemSelect" />
                                    <%--<AlternatingItemStyle CssClass="AlternatItemStyle" />--%>
                                    <Columns>
                                        <asp:EditCommandColumn ButtonType="LinkButton" ItemStyle-Width="40px" Visible="false" UpdateText="" CancelText="Cancel"
                                            EditText="Edit"  ItemStyle-HorizontalAlign="Center"></asp:EditCommandColumn>
                                        <%--ItemStyle-Font-Underline="true" --%>
                                        <asp:TemplateColumn>
                                            <ItemTemplate>
                                                <asp:LinkButton ID="lnkbtn" runat="server" CausesValidation="false"
                                                    CommandName="Delete" OnClientClick="return confirm('Are you sure you want to delete this record?');"
                                                    Text="Delete"></asp:LinkButton>
                                            </ItemTemplate>
                                            <ItemStyle Wrap="true" HorizontalAlign="Center" VerticalAlign="Middle" />
                                            <%-- Font-Underline="true"--%>
                                        </asp:TemplateColumn>
                                      
                                
                                <asp:TemplateColumn HeaderText="Login">
                                            <HeaderStyle HorizontalAlign="Center" Wrap="true"></HeaderStyle>
                                            <ItemStyle Wrap="true" HorizontalAlign="Left" VerticalAlign="Middle" />
                                            <ItemTemplate>
                                                <asp:Label ID="lblLogin" Width="220px" CssClass="lbl" Style="text-align: left" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(If(DataBinder.Eval(Container, "DataItem.L_Id") Is DBNull.Value, "", DataBinder.Eval(Container, "DataItem.L_Id"))).toString %>'></asp:Label>
                                            </ItemTemplate>
                                            <EditItemTemplate>
                                                <asp:DropDownList ID="ddl_Login" Width="220px" CssClass="ddl" runat="server">
                                                </asp:DropDownList>
                                            </EditItemTemplate>
                                        </asp:TemplateColumn>

                                     
                                       

                                        <asp:TemplateColumn HeaderText="<%$ Resources:LocalizedText, Entity %>">
                                            <HeaderStyle HorizontalAlign="Center" Wrap="true" ></HeaderStyle>
                                            <ItemStyle Wrap="true" HorizontalAlign="Left" VerticalAlign="Middle" />
                                            <ItemTemplate>
                                                <asp:Label ID="lblEntity" Width="120px" CssClass="lbl" runat="server" Style="text-align: left" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(If(DataBinder.Eval(Container, "DataItem.entity_name") Is DBNull.Value, "", DataBinder.Eval(Container, "DataItem.entity_name"))).ToString%>' ></asp:Label>
                                            </ItemTemplate>
                                            <EditItemTemplate>
                                                <asp:DropDownList ID="ddl_Entity" Width="120px" CssClass="ddl" runat="server" >
                                                </asp:DropDownList>
                                            </EditItemTemplate>
                                        </asp:TemplateColumn>

                                     
                                      
                                        <asp:TemplateColumn HeaderText="Flag" Visible="True">
                                            <HeaderStyle Wrap="true" HorizontalAlign="Center" CssClass="hidden" VerticalAlign="Middle"></HeaderStyle>
                                            <ItemStyle Wrap="False" HorizontalAlign="Center" CssClass="hidden" VerticalAlign="Middle"></ItemStyle>
                                            <ItemTemplate>
                                                <asp:Label ID="lblFlag" CssClass="lbl" runat="server" Style="text-align: right" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Flag").ToString())%>'>               
                                                </asp:Label>
                                            </ItemTemplate>
                                         
                                        </asp:TemplateColumn>

                                           <asp:TemplateColumn HeaderText="Entity_Id" Visible="False">
                                            <HeaderStyle Wrap="true" HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                            <ItemStyle Wrap="False" HorizontalAlign="Center" VerticalAlign="Middle"></ItemStyle>
                                            <ItemTemplate>
                                                <asp:Label ID="lblEntityID" CssClass="lbl" runat="server" Style="text-align: right" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Entity_Id").toString()) %>'>               
                                                </asp:Label>
                                            </ItemTemplate>
                                         
                                        </asp:TemplateColumn>


                                           <asp:TemplateColumn HeaderText="Login Id" Visible="False">
                                            <HeaderStyle Wrap="true" HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                            <ItemStyle Wrap="False" HorizontalAlign="Center" VerticalAlign="Middle"></ItemStyle>
                                            <ItemTemplate>
                                                <asp:Label ID="lblLoginId" CssClass="lbl" runat="server" Style="text-align: right" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Login_entity_Id").ToString())%>'>               
                                                </asp:Label>
                                            </ItemTemplate>
                                         
                                        </asp:TemplateColumn>


                                           <asp:TemplateColumn HeaderText="Entity Member Map ID" Visible="True">
                                            <HeaderStyle Wrap="true" HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                            <ItemStyle Wrap="False" HorizontalAlign="Center" VerticalAlign="Middle"></ItemStyle>
                                            <ItemTemplate>
                                                <asp:Label ID="lblEntity_MemberMap_Id" CssClass="lbl" runat="server" Style="text-align: right" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.entity_membermap_id").toString()) %>'>               
                                                </asp:Label>
                                            </ItemTemplate>
                                         
                                        </asp:TemplateColumn>




                                    </Columns>
                                    <PagerStyle HorizontalAlign="Left" Mode="NumericPages" CssClass="GridPager"></PagerStyle>
                                </asp:DataGrid>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                        <%--<asp:DataGrid ID="dgLoginEntity" runat="server" AllowPaging="true" PageSize="15"
                            AutoGenerateColumns="False" CssClass="Grid">
                            <SelectedItemStyle CssClass="GridItemSelect" />
                            <ItemStyle CssClass="GridItem" />
                            <HeaderStyle CssClass="GridHeader" />
                            <FooterStyle CssClass="GridFooter" />
                            <PagerStyle CssClass="GridPager" />
                            <Columns>
                                <asp:ButtonColumn Text="Select" CommandName="Select"></asp:ButtonColumn>
                                <asp:BoundColumn HeaderText="Sr. No.">
                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                    <ItemStyle Wrap="False" HorizontalAlign="Right" VerticalAlign="Middle"></ItemStyle>
                                </asp:BoundColumn>
                                <asp:BoundColumn DataField="L_Id" HeaderText="Login">
                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                    <ItemStyle Wrap="False" HorizontalAlign="Left" VerticalAlign="Middle"></ItemStyle>
                                </asp:BoundColumn>
                                <asp:BoundColumn DataField="Entity_Name" HeaderText="Entity">
                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                    <ItemStyle Wrap="False" HorizontalAlign="Left" VerticalAlign="Middle"></ItemStyle>
                                </asp:BoundColumn>
                                <asp:BoundColumn Visible="true" DataField="entity_membermap_id"></asp:BoundColumn>
                                <asp:BoundColumn Visible="true" DataField="flag"></asp:BoundColumn>
                            </Columns>
                            <PagerStyle CssClass="GridFooter" HorizontalAlign="Left" Mode="NumericPages" />
                        </asp:DataGrid>--%>
                    </td>
                </tr>
                   <tr>
                    <td>
                        <input id="saveScrollPos" type="hidden" name="saveScrollPos" runat="server" />
                        <asp:TextBox ID="txt_ID" runat="server" Width="112px" Visible="False"></asp:TextBox><asp:TextBox
                            ID="txt_tag" runat="server" Width="128px" Visible="False"></asp:TextBox>
                        <asp:HiddenField runat="server" ID="hdnFetchAllEntities" />
 <asp:HiddenField runat="server" ID="hdnENTMAP_EnableBackwardCompatibility" />
  <asp:HiddenField runat="server" ID="hdntext" />
                    </td>
                </tr>
                </table>
             
           
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
