public async Task CreateOpenAttemp(CreateOpenAttempInput input)
        {
            var homeOwer = await _homeOwerManager.HomeOwerRepository.FirstOrDefaultAsync(input.HomeOwerId);

            var entity = new OpenAttemp(CurrentUnitOfWork.GetTenantId(), homeOwer.CommunityId);

            entity.HomeOwerId = input.HomeOwerId;
            entity.UserName   = input.UserName;
            entity.IsSuccess  = input.IsSuccess;

            await _manager.CreateAsync(entity);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 创建
        /// </summary>
        /// <param name="OpenAttemp"></param>
        /// <returns></returns>
        public virtual async Task CreateAsync(OpenAttemp entity)
        {
            entity.TenantId = CurrentUnitOfWork.GetTenantId();

            var homeOwer = await _homeOwerManager.HomeOwerRepository.FirstOrDefaultAsync(entity.HomeOwerId);

            if (homeOwer != null)
            {
                entity.HomeOwerName = homeOwer.Name;
            }

            if (AuditInfoProvider != null)
            {
                var auditInfo = new AuditInfo();
                AuditInfoProvider.Fill(auditInfo);
                entity.BrowserInfo     = auditInfo.BrowserInfo;
                entity.ClientIpAddress = auditInfo.ClientIpAddress;
                entity.ClientName      = auditInfo.ClientName;
            }

            await OpenAttempRepository.InsertAsync(entity);
        }
Exemplo n.º 3
0
 /// <summary>
 /// 修改
 /// </summary>
 /// <param name="OpenAttemp"></param>
 /// <returns></returns>
 public virtual async Task UpdateAsync(OpenAttemp entity)
 {
     await OpenAttempRepository.UpdateAsync(entity);
 }