<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="consultaRUCf.aspx.vb" Inherits="SGHweb.consultaRUCf" %>

<!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">
    <title></title>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="../Scripts/noty/jquery.noty.js"></script>
    <script type="text/javascript" src="../Scripts/noty/themes/default.js"></script>
    <script type="text/javascript" src="../Scripts/noty/layouts/center.js"></script>
    <link rel="stylesheet" type="text/css" href="../Scripts/noty/buttons.css" />
      
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type ="text/javascript">
            function GenerarAlerta(type, texto) {
                var n = noty({
                    text: texto,
                    type: type,
                    dismissQueue: true,
                    layout: 'center',
                    modal: true,
                    theme: 'defaultTheme',
                    buttons: [
                    { addClass: 'btn btn-primary', text: 'Ok', onClick: function ($noty) {
                        $noty.close();
                    }
                    },
                  ]
                });
                console.log(type + ' - ' + n.options.id);
                return n;
            }

            function validar(e) {
                tecla = (document.all) ? e.keyCode : e.which;
                if (tecla == 13) {
                    var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");
                    ajaxManager.ajaxRequest('validarRuc');
                    console.log('Enter')
                    e.preventDefault();
                    return false;
                    alert("ss");
                }
            }
        </script>
    </telerik:RadCodeBlock>

    <style type="text/css">
        .divResponsables {
	        border:1px solid #8db2e3;
	        padding:0.1em;
	        font-size:1em;
	        overflow:hidden;
	        width:99%;
	        text-align:center;
        }
        .divFiltros
        {
	        border:1px solid #8db2e3;
	        padding:0.2em;
	        font-size:1em;
	        overflow:hidden;
	        width:99%;
	        text-align:center;
        }
        .divBoton
        {
	        border:1px solid #8db2e3;
	        padding:0.28em;
	        font-size:1em;
	        overflow:hidden;
	        width:100%;
        }
        .styleMe{
            border:1px solid #25729a; 
            -webkit-border-radius: 3px; 
            -moz-border-radius: 3px;
            border-radius: 3px;
            font-size:12px;
            font-family:arial, helvetica, sans-serif; 
            padding: 3px 0px 3px 0px; 
            text-decoration:none; 
            display:inline-block;
            text-shadow: -1px -1px 0 rgba(0,0,0,0.3);
            font-weight:bold; 
            color: #FFFFFF;
            background-color: #3093c7; 
            background-image: linear-gradient(to bottom, #3093c7, #1c5a85);
        }

        .styleMe:hover{
            border:1px solid #1c5675;
            background-color: #26759e; 
            background-image: linear-gradient(to bottom, #26759e, #133d5b);
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <div style=" width: 100%; height: 30px; text-align: left;">
            &nbsp; &nbsp; &nbsp; &nbsp;
            <asp:Label ID="Label2" runat="server" Font-Bold="True" Font-Names="Arial, Helvetica, sans-serif"
                Font-Size="14pt" Text=" Validacion de RUC "> 
            </asp:Label>
        </div>
<center>
    <dt class="divFiltros">
        <table border="0px" width="100%"
            style="font-family: Arial, Helvetica, sans-serif; font-size: 9pt;">
            <tr>
                <td style=" text-align:right; width:30%" >
                    Ruc :&nbsp; 
                </td>
                <td style=" text-align:left;">
                    <asp:TextBox ID="rucTB" runat="server" Width="50%" 
                        style="margin-right: 12px" TabIndex="1" onkeypress="validar(event)"></asp:TextBox>
                    <asp:Button ID="buscarB" runat="server" 
                        class="styleMe" Text="BUSCAR" 
                        Width="18%" TabIndex="2" />
                </td>
            </tr>
            <tr>
                <td style=" text-align:right;">
                    Razon Social :&nbsp; 
                </td>
                <td style=" text-align:left;">
                    <asp:TextBox ID="rsocialTB" runat="server"
                        Width="70%" TabIndex="3"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td style=" text-align:right;">
                    Direccion :&nbsp; 
                </td>
                <td style=" text-align:left;">
                    <asp:TextBox ID="direccionTB" runat="server" 
                        TextMode="MultiLine" Width="70%" TabIndex="4" ></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td style=" text-align:right;">
                    Condicion :&nbsp;
                </td>
                <td style=" text-align:left;">
                    <asp:TextBox ID="condicionTB" runat="server" 
                        Width="70%" TabIndex="5"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td style=" text-align:right; ">
                    Agente :&nbsp;
                </td>
                <td style=" text-align:left;">
                    <asp:TextBox ID="agenteTB" runat="server"
                        Width="70%" style="display:none">
                    </asp:TextBox>
                    <asp:CheckBox ID="agenteCHB" runat="server" TabIndex="6" />
                </td>
            </tr>
            <tr>
                <td style=" text-align:right;">
                    Estado :&nbsp;  
                </td>
                <td style=" text-align:left;">
<%--                    <asp:TextBox ID="estadoTB1" runat="server" 
                        Width="70%">
                    </asp:TextBox>--%>
                    <asp:Label ID="estadoTB" runat="server" Text="Label" TabIndex="7"></asp:Label>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <table width="100%">
                        <tr>
                            <td style=" text-align:center;">
                                <asp:Button ID="guardarB" runat="server" 
                                    class="styleMe" Text="GUARDAR" Width="230px" TabIndex="8"/>
                            </td>
                            <%--<td style=" text-align:left;">
                                <asp:Button ID="cancelarB" runat="server" 
                                    class="styleMe" Text="CANCELAR" Width="130px"/>
                            </td>--%>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </dt>
    <asp:RequiredFieldValidator
        ID="RequiredFieldValidator4" runat="server" ControlToValidate="rucTB" Display="None"
        ErrorMessage="Ingrese el Nro. de RUC ::">
    </asp:RequiredFieldValidator>
    <asp:RegularExpressionValidator ID="RegExp1" runat="server"    
        ErrorMessage=" El RUC consta de 11 digitos máximo (0-9) :: " Display="None"
        ControlToValidate="rucTB"    
        ValidationExpression="^[0-9]{11,11}$" />
    <asp:ValidationSummary ID="ValidationSummary1" runat="server" 
        ShowMessageBox="False" ShowSummary="True" ForeColor="#CC0000" 
        DisplayMode="SingleParagraph" Font-Names="Arial,Helvetica,sans-serif" 
        Font-Bold="false" Font-Size="9pt" Font-Italic="True" />
</center>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="rucTB">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="rsocialTB" UpdatePanelCssClass="" />
                        <telerik:AjaxUpdatedControl ControlID="direccionTB" UpdatePanelCssClass="" />
                        <telerik:AjaxUpdatedControl ControlID="condicionTB" UpdatePanelCssClass="" />
                        <telerik:AjaxUpdatedControl ControlID="agenteCHB" UpdatePanelCssClass="" />
                        <telerik:AjaxUpdatedControl ControlID="estadoTB" UpdatePanelCssClass="" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="buscarB">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="rsocialTB" UpdatePanelCssClass="" />
                        <telerik:AjaxUpdatedControl ControlID="direccionTB" UpdatePanelCssClass="" />
                        <telerik:AjaxUpdatedControl ControlID="condicionTB" UpdatePanelCssClass="" />
                        <telerik:AjaxUpdatedControl ControlID="agenteCHB" UpdatePanelCssClass="" />
                        <telerik:AjaxUpdatedControl ControlID="estadoTB" UpdatePanelCssClass="" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="rsocialTB" UpdatePanelCssClass="" />
                        <telerik:AjaxUpdatedControl ControlID="direccionTB" UpdatePanelCssClass="" />
                        <telerik:AjaxUpdatedControl ControlID="condicionTB" UpdatePanelCssClass="" />
                        <telerik:AjaxUpdatedControl ControlID="agenteTB" UpdatePanelCssClass="" />
                        <telerik:AjaxUpdatedControl ControlID="agenteCHB" UpdatePanelCssClass="" />
                        <telerik:AjaxUpdatedControl ControlID="estadoTB" UpdatePanelCssClass="" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
    </form>
</body>
</html>
