示例#1
0
        public CrmResponse <String> AccountRegister(AccountRegisterModel registerModel)
        {
            string _errormsg;
            CrmResponse <String> _response = new CrmResponse <string>();

            if (registerModel.Password.Equals(registerModel.RePassword))
            {
                var data = _accountData.AccountRegisterData(registerModel.FullName, registerModel.Email, registerModel.Password, out _errormsg);
                if (!_errormsg.Equals(""))
                {
                    _response.Message = _errormsg;
                    _response.Success = false;
                    _response.Data    = null;
                }
                else
                {
                    _response.Message = "";
                    _response.Success = true;
                    _response.Data    = data;
                }
            }
            else
            {
                _response.Message = "Password did not match";
                _response.Success = false;
                _response.Data    = null;
            }

            return(_response);
        }