Esempio n. 1
0
        public SignupReposne Signup(string userName)
        {
            SignupReposne ans = new SignupReposne();

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

            string errstring = string.Empty;
            int    id;

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

            return(ans);
        }
Esempio n. 2
0
        public SignupReposne Signup(string userName)
        {
            SignupReposne ans = new SignupReposne();
            ans.success = false;
            ans.userId = -1;
            ans.error = string.Empty;

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

            return ans;
        }