Ver Mensaje Individual
  #3 (permalink)  
Antiguo 24/02/2011, 09:42
diego_manya_87
 
Fecha de Ingreso: febrero-2011
Mensajes: 6
Antigüedad: 13 años, 2 meses
Puntos: 0
Respuesta: Ayuda iniciar y cerrar sesion!!!

Código C:
Ver original
  1. protected void Page_Load(object sender, EventArgs e)
  2.     {
  3.         if (Session[SesionEmpleado.UsuarioEmpleado] == null)
  4.         {
  5.             Session[SesionEmpleado.UsuarioEmpleado] = new Empleados();
  6.         }
  7.     }
  8.  
  9.     protected void btnInicioSesion_Click(object sender, EventArgs e)
  10.     {
  11.         string oUsuario = txtUsuario.Text;
  12.         string oContrasenia = txtContraseña.Text;
  13.         string oError = "";
  14.  
  15.         if (LogicaEmpleados.IniciarSesion(oUsuario, oContrasenia) == null)
  16.         {
  17.             oError += "Zona restringida, solo para empleados<br/>";
  18.         }
  19.         if (oError != "")
  20.         {
  21.             lblMensaje.Text = oError;
  22.         }
  23.         else
  24.         {
  25.             Response.Redirect("~/PrincipalEmpleado.aspx");
  26.            
  27.         }
  28.     }

Última edición por diego_manya_87; 24/02/2011 a las 09:47