Exemplo n.º 1
0
        protected void LoginUser_Authenticate(object sender, AuthenticateEventArgs e)
        {
            UsuarioDTO objUsuarioDTO;
            UsuarioDAO objUsuarioDAO = new UsuarioDAO();

            objUsuarioDTO = objUsuarioDAO.VerificaAcceso(this.LoginUser.UserName, this.LoginUser.Password);
            if (objUsuarioDTO != null)
            {
                FormsAuthentication.RedirectFromLoginPage(LoginUser.UserName, LoginUser.RememberMeSet);
                Response.Redirect("~/Default.aspx");

            }
            else
            {

            }
        }
Exemplo n.º 2
0
        protected void Listar()
        {
            List<UsuarioDTO> obj;
            UsuarioDAO objDAO = new UsuarioDAO();

            try
            {
                obj = objDAO.Listar();
                this.gvLista.DataSource = obj;
                this.gvLista.DataBind();

            }
            catch (Exception err)
            {
                throw (err);
            }
        }
Exemplo n.º 3
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     UsuarioDAO dao = new UsuarioDAO();
     //UsuarioDTO item = dao.ListarPorClave(1);
 }