Пример #1
0
        public static Boolean ActualizarEstado(TuCuento.Entidades.Usuario oUsuario)
        {
            Boolean bResp = false;

            TuCuento.DAL.Usuario_DAL oDAL = new TuCuento.DAL.Usuario_DAL();
            bResp = oDAL.ActualizarEstadoUsuario(oUsuario);
                    
            return bResp;
        }
Пример #2
0
        public static Boolean ActualizarPSW(TuCuento.Entidades.Usuario oUsuario)
        {
            Boolean bResp = false;

            TuCuento.DAL.Usuario_DAL oDAL = new TuCuento.DAL.Usuario_DAL();

            oUsuario.sPSW = Encriptar(oUsuario.sPSW);

            bResp = oDAL.ActualizarPSWUsuario(oUsuario);

            return bResp;
        }
Пример #3
0
        public static Boolean Persistir(TuCuento.Entidades.Usuario oUsuario)
        {
            Boolean bResp = false;
            DataTable dtUsuario = new DataTable();
            TuCuento.DAL.Usuario_DAL oDAL = new TuCuento.DAL.Usuario_DAL();

            TuCuento.DAL.Usuario_DAL.TraerUsuario(oUsuario, dtUsuario);

            if (dtUsuario.Rows.Count == 0)
            {
                if (oUsuario.sPSW == "" || oUsuario.sPSW == null)
                    oUsuario.sPSW = Encriptar("INIT");
                else
                    oUsuario.sPSW = Encriptar(oUsuario.sPSW);

                if (oDAL.AgregarUsuario(oUsuario))
                    bResp = true;
            }
            else
            {
                if (oDAL.ActualizarUsuario(oUsuario))
                    bResp = true;
            }

            return bResp;
        }