Example #1
0
        public int Login(LoginViewModel user)
        {
            try
            {
                user.password = USER_BLL.GenerateSHA256String(user.password);
                var _user = user_bll.authenticateUser(user);

                return(_user.id);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #2
0
        public object Register(UserViewModel user)
        {
            try
            {
                user.password = USER_BLL.GenerateSHA256String(user.password);
                var _generatedID = user_bll.registerUser(user);

                return(new { id = _generatedID, password = user.password });
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #3
0
        public DataTable GetUserByEmail(string email)
        {
            DataTable dt = new USER_BLL().ObterUserByEmail(email);

            return(dt);
        }
Example #4
0
        public DataTable GetUserCD(int cdUser)
        {
            DataTable dt = new USER_BLL().ObterUser(cdUser);

            return(dt);
        }
Example #5
0
        public DataTable GetUserName(string nomeUser)
        {
            DataTable dt = new USER_BLL().ObterUser(nomeUser);

            return(dt);
        }
Example #6
0
        public DataTable GetUser()
        {
            DataTable dt = new USER_BLL().ObterUser();

            return(dt);
        }