Esempio n. 1
0
        public ErrorCodes Insert(Entities.Account user)
        {
            ErrorCodes errorCodes = ErrorCodes.Success;

            try
            {
                //if (!UserService.IsLogin())
                //{
                //    return ErrorCodes.NotLogin;
                //}

                if (user == null || string.IsNullOrEmpty(user.UserName) || string.IsNullOrEmpty(user.Password))
                {
                    return(ErrorCodes.BusinessError);
                }

                _accountDal.Insert(user);
            }
            catch (Exception ex)
            {
                Logger.WriteLog(Logger.LogType.Error, ex.ToString());
                errorCodes = ErrorCodes.Exception;
            }
            return(errorCodes);
        }