Exemplo n.º 1
0
        public LoginReposne Login(string userName) // string userName)
        {
            LoginReposne ans = new LoginReposne();

            ans.success = false;
            ans.userId  = -1;
            ans.error   = string.Empty;

            string errstring = string.Empty;
            int    id;

            if (GetUserID(userName, out id, out errstring))
            {
                ans.userId  = id;
                ans.success = true;
            }
            else
            {
                ans.error = errstring;
            }

            return(ans);
        }
Exemplo n.º 2
0
        public LoginReposne Login(string userName) // string userName)
        {
            LoginReposne ans = new LoginReposne();
            ans.success = false;
            ans.userId = -1;
            ans.error = string.Empty;

            string errstring = string.Empty;
            int id;
            if (GetUserID(userName, out id, out errstring))
            {
                ans.userId = id;
                ans.success = true;
            }
            else
            {
                ans.error = errstring;
            }
            
            return ans;
        }