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


<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="Server">
    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
    </asp:ScriptManagerProxy>
        <link rel="stylesheet" type="text/css" href='<%=ResolveClientUrl("~/FinIQJS/jquery-ui.min.css")%>' />
        <script src="../FinIQJS/external/jquery/jquery.min.js"></script>
    <script src="../FinIQJS/jquery-ui.min.js"></script>
     <link href="../App_Themes/Style1.css" rel="stylesheet" type="text/css" />
    <script src="../FinIQJS/SortFilter_Grid.js"></script> 
    <style type="text/css">
        /*.ddl
        {
            font-size: 11px !important;
            font-family: Verdana !important;
            font-weight: normal !important;
        }*/

        .labels
        {
            width: 60px;
        }


        /*.GridItems
        {
            width:250px;
            height:35px;
            text-indent:2px;
            font-weight: normal !important;
        }

        .GridItems th
        {
            font-size: 12px;
            font-weight: normal;
        }*/
        .lblDisplay
        {
            display:inline !important;
        }

        .Gridview 
        {
            table-layout:fixed;
            /*width:100%;*/
        }
        .HeaderRight
        {
            padding-left:20px;
            padding-top:3px;
        }
        .tblWhole
        {
            padding-left:11px;
        }

                            .lblsuccess_TSM {
   color: #008000;
     font-size: 11px !important;
    padding: 5px 0px 5px 0px;
}
        .lblerror_TSM{
    color: #FF4E4E !important;
    font: normal 11px Verdana  !important;
    padding: 5px 0px 5px 0px;
    z-index: 99999;
     /*position: absolute;
      top: 110px;
    left: 32px;*/
}

    </style>     
    
     <asp:UpdatePanel ID="UpdatePanelCP" runat="server">
          <ContentTemplate>
                     <div>
                                    <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanelCP"
                                        DisplayAfter="0">
                                        <ProgressTemplate>
                                            <div class="divLoading">
                                                <img alt="Loading" src="../App_Resources/loading.gif" /><span class="lbl">Loading...&nbsp;&nbsp;</span>
                                            </div>
                                        </ProgressTemplate>
                                    </asp:UpdateProgress>
                                   </div>

                  <div>
        <table class="tblWhole">
            <tr>
                <td>
                    <table>
                        <tr>
                            <td style="height:20px;">
                              <%--  <asp:Label ID="lblError" CssClass="lbl" runat="server" Visible="True" ForeColor="Red"></asp:Label>
                                <asp:Label ID="lblMsg" CssClass="lbl" runat="server" Visible="True" ForeColor="Green"></asp:Label>--%>

                                       <asp:Label ID="lblError" Text="" Width ="500px" runat="server"  CssClass="lblerror_TSM labelMargin btnSpacing"  />
                         <asp:Label ID="lblSuccess" Text="" Width ="500px" runat="server" CssClass="lblsuccess_TSM labelMargin btnSpacing"  style="display :none;"/>
                         <asp:Label ID="lblInfo" Text="" Width ="500px" runat="server" CssClass="lblInfo labelMargin btnSpacing" style="display :none;"/>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td>
                    <table id="tblHeaderLeft">
                        <tr>
                            <td style="width:95px;">
                                <asp:Label ID="lblSchemeName" runat="server" CssClass="lbl" Text="Scheme Name" Visible="True" ></asp:Label>
                            </td>
                
                            <td>
                                <asp:DropDownList ID="cboScheme" runat="server" CssClass="ddl" AppendDataBoundItems="true" 
                                                            Width="250px" Visible="True" AutoPostBack="True" >
                                </asp:DropDownList>
                            </td>
                            <td style="padding-left:10px;">
                                <asp:Button ID="btnLoad" runat="server" Width="88px" Text="Load" CssClass="btn" />           
                            </td>
                            <td>
                                <asp:Button ID="btnAdd" runat="server" Width="88px" Text="Add" CssClass="btn" />                                
                            </td>
                            <td>
                                <asp:Button ID="btnSave" runat="server" Width="88px" Text="Save" CssClass="btn" Enabled ="false" /> 
                            </td>
                            <td>
                                <asp:Button ID="btnExcel" runat="server" Width="88px" Text="Excel" Visible="false" CssClass="btn" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="lblTemplateName" runat="server" CssClass="lbl" Text="Template Name" Visible="True" ></asp:Label>
                            </td>
                            <td>
                                <asp:DropDownList ID="cboTemplate" runat="server" AutoPostBack="True" CssClass="ddl"
                                                            Width="250px" Visible="True" AppendDataBoundItems="true">
                                </asp:DropDownList>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>

        <table id="tblGrid" class="tblWhole">
            <tr>
                <td>
                    <asp:GridView ID="dgvDetails" runat="server" AllowSorting="True" AutoGenerateColumns="False" BorderStyle="Solid" 
                        BorderWidth="1px" CellPadding="3" CssClass="Grid Gridview" AllowPaging="true" PageSize="25" ShowHeaderWhenEmpty="true">
                        <SelectedRowStyle CssClass="GridItemSelect" />
                        <RowStyle CssClass="GridItem" />
                        <HeaderStyle CssClass="GridHeader" />
                        <FooterStyle CssClass="GridFooter" />
                        <PagerStyle CssClass="GridPager" />
                        <EditRowStyle CssClass="GridItemSelect" />
                        <EmptyDataTemplate>
                            <asp:Label ID="lblEmpty" runat="server" Text="No data found" />
                        </EmptyDataTemplate>
                        <Columns>
                            
                            <%--<asp:commandfield buttontype="Link" HeaderStyle-Width="45px" ItemStyle-Width="45px" ItemStyle-HorizontalAlign="Center" showeditbutton="true" edittext="edit" UpdateText="" ControlStyle-Width="45px"/>--%>
                                        
                            <asp:commandfield buttontype="Link" showeditbutton="true" edittext="Edit" UpdateText="" ItemStyle-HorizontalAlign="Center" ControlStyle-Width="40px" >
                                <HeaderStyle Width="45px" HorizontalAlign="Center"/>
                                <ItemStyle Width="45px" HorizontalAlign="Center"/>
                            </asp:CommandField>
                                                                
                            <asp:TemplateField HeaderText="UDF ID">
                                <HeaderStyle Wrap="False" Width="40px"></HeaderStyle>
                                <ItemStyle Wrap="false" Width="40px" HorizontalAlign="Right" />
                                <ItemTemplate>
                                    <asp:Label ID="lblUAId" CssClass="lbl" runat="server" Width="40px" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.UA_Id").ToString)%>'>
                                    </asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>

<%--                            <asp:TemplateField HeaderText="Template ID" Visible="False" >
                                <HeaderStyle Wrap="False"></HeaderStyle>
                                <ItemStyle Wrap="false" />
                                <ItemTemplate>
                                    <asp:Label ID="lblUATemplateID" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.UA_Template_ID").ToString)%>'>
                                    </asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>--%>

                            <asp:TemplateField HeaderText="Action Type" ControlStyle-Width="70px" >
                                <HeaderStyle Wrap="False" Width="80px"></HeaderStyle>
                                <ItemStyle Wrap="false" Width="80px"/>
                                <ItemTemplate>
                                    <asp:Label ID="lblUAActionType" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.UA_Action_Type").ToString)%>'>
                                    </asp:Label>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:DropDownList ID="ddlUAActionType" CssClass="ddl" runat="server" AutoPostBack="true" >   
                                    </asp:DropDownList>
                                </EditItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Field Name" ControlStyle-Width="190px">
                                <HeaderStyle Wrap="False" Width="200px"></HeaderStyle>
                                <ItemStyle Wrap="false" width="200px"/>
                                <ItemTemplate>
                                    <asp:Label ID="lblUAFieldName" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.UA_Field_Name").ToString)%>'>
                                    </asp:Label>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:DropDownList ID="ddlUAFieldName" CssClass="ddl" runat="server" AutoPostBack="true" >   
                                    </asp:DropDownList>
                                </EditItemTemplate>
                            </asp:TemplateField>
                        <asp:TemplateField HeaderText="Link ID" Visible="False">
                                <HeaderStyle Wrap="False"></HeaderStyle>
                                <ItemStyle Wrap="false" />
                                <ItemTemplate>
                                    <asp:Label ID="lblUALINKID" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.UA_LINK_ID").ToString)%>'>
                                    </asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Link Rule" ControlStyle-Width="190px">
                                <HeaderStyle Wrap="False" Width="200px"></HeaderStyle>
                                <ItemStyle Wrap="True" Width="200px" />
                                <ItemTemplate>
                                    <asp:Label ID="lblUALINKRule" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.UA_LINK_Rule").ToString)%>'>
                                    </asp:Label>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:DropDownList ID="ddlUALINKRule" CssClass="ddl" runat="server" AutoPostBack="true" >   
                                    </asp:DropDownList>
                                </EditItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Created By" ControlStyle-Width="100px">
                                <HeaderStyle Wrap="False" Width="100px"></HeaderStyle>
                                <ItemStyle Wrap="false" width="100px"/>
                                <ItemTemplate>
                                    <asp:Label ID="lblUACreatedBy" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.UA_Created_By").ToString)%>'>
                                    </asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Created At" ControlStyle-Width="160px">
                                <HeaderStyle Wrap="False" Width="160px"></HeaderStyle>
                                <ItemStyle Wrap="false" HorizontalAlign="Center" Width="160px" />
                                <ItemTemplate>
                                    <asp:Label ID="lblUACreatedAt" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.UA_Created_At").ToString)%>'>
                                    </asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Updated By" ControlStyle-Width="100px">
                                <HeaderStyle Wrap="False" Width="100px"></HeaderStyle>
                                <ItemStyle Wrap="false" Width="100px" />
                                <ItemTemplate>
                                    <asp:Label ID="lblUAUpdatedBy" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.UA_Updated_By").ToString)%>'>
                                    </asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Updated At"  ControlStyle-Width="160px">
                                <HeaderStyle Wrap="False" Width="160px"></HeaderStyle>
                                <ItemStyle Wrap="false" HorizontalAlign="Center" width="160px"/>
                                <ItemTemplate>
                                    <asp:Label ID="lblUAUpdatedAT" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.UA_Updated_AT").ToString)%>'>
                                    </asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>

<%--                            <asp:TemplateField HeaderText="Scheme Alias" Visible="False">
                                <HeaderStyle Wrap="False"></HeaderStyle>
                                <ItemStyle Wrap="false" />
                                <ItemTemplate>
                                    <asp:Label ID="lblUASchemeAlias" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.UA_Scheme_Alias").ToString)%>'>
                                    </asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>--%>
                        </Columns>
                    </asp:GridView>
                </td>

            <tr>
                <td style="width: 163px">
                    <input id="hdnButtonClick" type="hidden" runat="server" />                            
                    <asp:HiddenField ID="FileName" runat="server" />  
                    <asp:HiddenField ID="HdnFileFullPath" runat="server" />  
                      <asp:HiddenField ID="Hidden_Insert_UpdateFlag" runat="server" />  
                    
                </td>
            </tr>

            <tr>
                <td>
                    <asp:Label ID="sSchemeAlias" runat="server" visible="false"></asp:Label>
                    <asp:Label ID="sTemplateCode" runat="server" visible="false"></asp:Label>
                    <asp:Label ID="sFieldName" runat="server" visible="false"></asp:Label>
                    <asp:Label ID="Label4" runat="server" visible="false"></asp:Label>
                </td>
            </tr>
        </table>


    </div>


              </ContentTemplate>
         </asp:UpdatePanel>   

 </asp:Content>