protected void btnAceptar_Click(object sender, EventArgs e)
        {
            try
            {
                proxySeguridad.SrvClienteClient proxy = new proxySeguridad.SrvClienteClient();

                var Usuario = this.txtUsuario.Text.Trim();
                var Contraseña = this.txtContraseña.Text.Trim();
                oUsuario = proxy.Autenticar(Usuario, Contraseña);
                if (oUsuario != null)
                {
                    Limpiar();
                    Page_Load(this, e);
                }
                proxy.Close();
                ScriptManager.RegisterStartupScript(this.updLogin, this.updLogin.GetType(), "", "dialog('Login', 'hide');", true);
            }
            catch (FaultException fEx)
            {
                this.pnlLoginMensaje.Visible = true;
                this.lblLogin.Text = fEx.Message;
            }
            catch (Exception ex)
            {
                this.pnlLoginMensaje.Visible = true;
                this.lblLogin.Text = ex.Message;
            }
        }
        protected void btnRegistrar_Click(object sender, EventArgs e)
        {
            try
            {

                if (this.txtContraseñaRegis.Text.Trim() != this.txtContraseñaConfirRegis.Text.Trim())
                    throw new Exception("Las contraseñas deben ser iguales.");

                AnonymousDAO.USUARIO vUSUARIO = new AnonymousDAO.USUARIO();

                vUSUARIO.PERSONA = new AnonymousDAO.PERSONA();

                vUSUARIO.Usuario = this.txtUsuarioRegis.Text.Trim();
                vUSUARIO.Contrasenha = this.txtContraseñaRegis.Text.Trim();
                vUSUARIO.Estado = "A";
                vUSUARIO.TipoUsuario = "Cliente";

                vUSUARIO.PERSONA.ApeMaterno = this.txtApeMaterno.Text.Trim();
                vUSUARIO.PERSONA.ApePaterno = this.txtApePaterno.Text.Trim();
                vUSUARIO.PERSONA.Direccion = this.txtDireccion.Text.Trim();
                vUSUARIO.PERSONA.Distrito = this.ddlDistrito.SelectedValue;
                vUSUARIO.PERSONA.dni = this.txtDNI.Text.Trim();
                vUSUARIO.PERSONA.Email = this.txtEmail.Text.Trim();
                vUSUARIO.PERSONA.Estado = "A";
                vUSUARIO.PERSONA.Genero = this.ddlGenero.SelectedValue;
                vUSUARIO.PERSONA.Nombre = this.txtNombre.Text.Trim();
                vUSUARIO.PERSONA.Telefono = this.txtTelefono.Text.Trim();

                using (proxySeguridad.SrvClienteClient proxy = new proxySeguridad.SrvClienteClient())
                {
                    var vResult = proxy.RegistrarUsuario(ref vUSUARIO);

                    if (vResult)
                    {
                        oUsuario = vUSUARIO;
                        Limpiar();
                        Page_Load(this, e);
                    }
                    else
                        throw new Exception("Ocurrio un error y no se pudo registrar el Usuario");

                    proxy.Close();
                    ScriptManager.RegisterStartupScript(this.updLogin, this.updLogin.GetType(), "", "dialog('RegistrarUsuario', 'hide');", true);
                }

            }
            catch (FaultException Fex)
            {
                this.pnlRegistrarUsuarioMensaje.Visible = true;
                this.lblRegistrarUsuarioMensaje.Text = Fex.Message;
            }
            catch (Exception ex)
            {
                this.pnlRegistrarUsuarioMensaje.Visible = true;
                this.lblRegistrarUsuarioMensaje.Text = ex.Message;
            }
        }