Exemplo n.º 1
0
        protected void BtnRecuperar_Click(object sender, EventArgs e)
        {
            TBL_USUARIO obj = new TBL_USUARIO();

            obj.NOMBREUSUARIO = this.TbxNombreCompleto.Text;
            obj.EMAIL         = this.TbxCorreo.Text;

            WCFServicio.Service1Client serv = new WCFServicio.Service1Client();

            SP_INICIO_SESION_Result sesion = serv.InicioSesion(obj);

            if (sesion == null)
            {
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Error al iniciar sesion')", true);
            }

            else
            {
                Main(Convert.ToString(obj.EMAIL), Convert.ToString(obj.CLAVEACCESO));
            }
        }
Exemplo n.º 2
0
        protected void BtnIngresar_Click(object sender, EventArgs e)
        {
            TBL_USUARIO obj = new TBL_USUARIO();

            obj.NOMBREUSUARIO = this.TbxUsuario.Text;
            obj.CLAVEACCESO   = cifrarPass(this.TbxPassword.Text);

            WCFServicio.Service1Client serv = new WCFServicio.Service1Client();

            SP_INICIO_SESION_Result sesion = serv.InicioSesion(obj);

            if (sesion == null)
            {
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Error al iniciar sesion')", true);
            }

            else
            {
                Session["sesion"] = sesion;

                Response.Redirect("Default.aspx");
            }
        }