private void Sesion(DataBase.usuario u)
        {
            UsuarioCompleto uc = new UsuarioCompleto();

            try
            {
                uc.Usuario = u;
                Session.Add("UsuarioCompleto", uc);
            }
            catch (Exception)
            {
                throw;
            }
        }
        private DataBase.usuario MapeaFormUsuario()
        {
            DataBase.usuario u = new DataBase.usuario();

            try
            {
                u.email           = txtEmail.Text;
                u.clave           = txtPassword.Text;
                u.id_usuario_tipo = int.Parse(rblTipoUsuario.SelectedValue);

                return(u);
            }
            catch (Exception)
            {
                throw;
            }
        }
        protected void registrarse_Click(object sender, EventArgs e)
        {
            try
            {
                if (ValidaForm())
                {
                    DataBase.usuario  u  = MapeaFormUsuario();
                    UsuarioRepository ur = new UsuarioRepository();
                    ur.Insertar(u);

                    Sesion(u);

                    Response.Redirect("~/Pages/Perfil.aspx", false);
                }
            }
            catch (Exception)
            {
                Response.Redirect("~/Error.aspx");
            }
        }