Пример #1
0
 public void Register(AccountRegisterInfo userInfo)
 {
     var accountId=_accountService.Register(userInfo);
     if (!string.IsNullOrEmpty(userInfo.ApplicationId))
     {
         var client = _clientManager.GetClientByApplicationId(userInfo.ApplicationId);
         if (client == null)
         {
             throw new QsTechException(string.Format("找不到id为{0}的应用!", userInfo.ApplicationId)) { NoAuthorizeLayout = true };
         }
         _accountService.NewAccountAuthorizeClient(accountId, client.Id);
     }
 }
Пример #2
0
 public int Register(AccountRegisterInfo userInfo)
 {
     var newAccount = new Account()
                          {
                              Name = userInfo.Name,
                              Gender = userInfo.Gender,
                              Mobile = userInfo.MobilePhone,
                              Remark = userInfo.Remark,
                              Email = userInfo.Email,
                              AccountName = "",
                              Password = ""
                          };
     newAccount.CreateTime = System.DateTime.Now;
     newAccount.State = 1;
     _repAccount.Create(newAccount);
     return newAccount.Id;
 }