<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplicationUsingWebService._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">

    <head runat="server">
       <%-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>--%>
        <script type="text/javascript">
        function txtOnKeyPress(textId)
        {
            var el1 = document.getElementById("LiveSearchEnableCheckBox");
            var el22 = document.getElementById("hfServerValue");

            if (el1.checked) {
                document.getElementById("hfServerValue").value = textId;
                document.getElementById('<%= SearchButton.UniqueID %>').click();
            }
        }        
        </script>
        <link rel="stylesheet" runat="server" media="screen" href="styles.css" />
        
    </head>
    <body>
        
        <div style="padding: 1rem;background-color: #efefef; text-align: center">
                <asp:Label ID="FooterLabel" runat="server" Text="DataMatch Enterprise API Demo " />
        </div>

        <form id="form1" runat="server">
            <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
            <div>
                <asp:HiddenField ID="hfServerValue" runat="server" />


                <asp:Panel ID="Panel2" runat="server" Height="157px">
                        <asp:Image ID="Image1" runat="server" ImageUrl="Images/Data_Ladder_logo.png" />
                </asp:Panel>

                <br /><br />
                <asp:Button ID="ButtonLiveSearch" runat="server" OnClick="showLiveSearch_Click" Text="Show settings ..." Width="200px"/>
                <asp:Button ID="ButtonRealTimeInsert" runat="server" OnClick="showRealTimeInsert_Click" Text="Show demo ..."  Width="200px"/>
                <br /><br />
        
                <p>
                    <asp:Label ID="ErrorLabel" runat="server" Font-Bold="True" Font-Names="Arial" 
                        ForeColor="Red" Text="..."></asp:Label>
                </p>

                <asp:Panel ID="Panel1" runat="server" Font-Names="Arial" Height="300px" BackColor="White">
                    <div style="width:50%; min-width:400px">
                        <fieldset>
                            <legend> &nbsp Settings &nbsp </legend>
                            <br />
                            <asp:FileUpload ID="FileUploader" runat="server" Width="434px" />
                            <asp:Button ID="addProjectButton" runat="server" OnClick="addProjectButton_Click" Text="Add Project"/>
                            <asp:Button ID="InitButton" runat="server" onclick="InitButton_Click" Text="Load and Start project"/>
                            <asp:Button ID="unloadButton" runat="server" onclick="unloadButton_Click" Text="Stop project"/>
                            <asp:Button ID="testProjectButton" runat="server" onclick="testProjectButton_Click" Text="Test project"/>
                            <br /> <br />
                            <fieldset style="min-height:200px">
                                <legend> &nbsp Added projects &nbsp </legend>
                                <br/>
                                <asp:RadioButtonList ID="projectsRadioButtonList" runat="server" onselectedindexchanged="projectsRadioButtonList_SelectedIndexChanged" Width="554px">
                                    <asp:ListItem Selected="True">example1</asp:ListItem>
                                    <asp:ListItem>example2</asp:ListItem>
                                    <asp:ListItem>webnames cross column</asp:ListItem>
                                    <asp:ListItem>2 ds test</asp:ListItem>
                                    <asp:ListItem>person_names</asp:ListItem>
                                    <asp:ListItem>business_names</asp:ListItem>
                                    <asp:ListItem>parsed project</asp:ListItem>
                                    <asp:ListItem>ApiTest1ds</asp:ListItem>
                                </asp:RadioButtonList>
                                <br/>
                            </fieldset>                
                            <br /> <br />
                            <asp:Label ID="Label3" runat="server" Text="records: "></asp:Label>
                            <asp:TextBox ID="RecordsTextBox" runat="server">10</asp:TextBox>
                        </fieldset>
                    </div>
                    <br/>

            
                </asp:Panel>

                <asp:Panel ID="Panel3" runat="server" Font-Names="Arial" Height="300px" BackColor="White" Visible="false">
                    <table width="100%" cellpadding="6">
                        <thead align="left">
                            <tr>
                                <th width="50%" style="border: 2px solid #1C6EA4;background-color:#1C6EA4; color:white"> Fields </th>
                                <th>  </th>
                                <th width="50%" style="border: 2px solid #1C6EA4;background-color:#1C6EA4; color:white"> Tresholds </th>
                            </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td width="50%" style="border: 2px solid #1C6EA4;">
                                    <asp:Panel ID="DynamicSearchPanel" runat="server" Height="115px" 
                                        style="margin-top: 3px">
                                    </asp:Panel>
                            </td>
                            <td/>
                            <td width="50%" style="border: 2px solid #1C6EA4;">
                                    <br />
                                    <table>
                                        <tr>
                                            <td> <asp:Label ID="AutoMatchLabel" runat="server" Text="Auto Match"></asp:Label> &nbsp &nbsp <br /><br /></td>
                                            <td> <asp:TextBox ID="HighLevelTextBox" runat="server" Width="100" Text="90"></asp:TextBox> <br /><br /> </td>
                                        </tr>
                                        <tr>
                                            <td> <asp:Label ID="ManualLabel" runat="server" Text="Manual"></asp:Label> </td>
                                            <td> <asp:TextBox ID="LowLevelTextBox" runat="server"  Width="100"  Text="80"></asp:TextBox> </td>
                                        </tr>
                                        <tr>
                                            <td></td>
                                            <td> <br/> <asp:Button ID="SetThresholdsButton" runat="server" onclick="SetThresholdsButton_Click" Text="Set tresholds" /> </td>
                                        </tr>
                                    </table>                
                                    <br/><br />
                            </td>
                        </tr>
                        </tbody>
                    </table>
                    <br />
                    <p>
                        Live Search:   <asp:CheckBox ID="LiveSearchEnableCheckBox" runat="server" Checked="true"/>
                    </p>
                    <br /><br />
                    <asp:Button ID="SubmitButton" runat="server" onclick="insertButton_Click" Text="Write" Width="100" />
                    <br /><br />

                    <asp:UpdatePanel ID="UpdatePanel1"  runat="server">
                        <ContentTemplate>
                    
                            <asp:Button ID="SearchButton" runat="server" onclick="SearchButtonClick" Text="Search"  Width="100"  />
                            <br /><br />
                            <!--
                            <asp:GridView ID="ResultsGridView" runat="server" Font-Names="Arial" HtmlEncode="false"
                                HtmlEncodeFormatString="False"
                                onrowediting="GridView1_RowEditing" 
                                onselectedindexchanged="GridView1_SelectedIndexChanged">
                            </asp:GridView>
                            -->
                            <asp:Label ID="TimeLabel" runat="server" Font-Bold="True" Font-Names="Arial" Text="..."></asp:Label>
                            <br />
                            <asp:Table ID="Table1" runat="server" BorderColor="Black" BorderWidth="1px" CellPadding="3" CellSpacing="0"> 
                            </asp:Table>


                        </ContentTemplate>
                    </asp:UpdatePanel>
                    <p>
                        &nbsp;</p>
                    <p>
                        &nbsp;</p>
                    <asp:Panel ID="DynamicEditPanel" runat="server" Height="117px">
                    </asp:Panel>

                </asp:Panel>

                <asp:Panel ID="PanelDialog"  runat="server" Font-Names="Arial" Height="300px" BackColor="White" Visible="false">
                    <br /><br />
                    <asp:Label ID="MessageAboutDuplicatesLabel" runat="server" Font-Bold="True" Font-Names="Arial" Text="* * *"></asp:Label>
                    <br /><br /><br /><br />
                    <asp:Button ID="StrongWriteButton" runat="server" onclick="StrongWriteButton_Click" Text="Write"  Width="100"  />
                    <asp:Button ID="CancelWriteButton" runat="server" onclick="CancelWriteButtonClick" Text="Cancel"  Width="100"  />
                    <br /><br />

                    <asp:GridView ID="DuplicateGridView" runat="server" Font-Names="Arial" 
                        AutoGenerateSelectButton="False">
                    </asp:GridView>
                </asp:Panel>
            </div>
            <p>
                <asp:Button ID="insertButton" runat="server" Text="insert" 
                    onclick="insertButton_Click" />
                <asp:Button ID="updateButton" runat="server" onclick="updateButton_Click" 
                    Text="update" />
                <asp:Button ID="deleteButton" runat="server" onclick="deleteButton_Click" 
                    Text="delete" />
            </p>
        </form>
            
        

    </body>

</html>
