예제 #1
0
        /// <summary>
        /// 将EditModel转为数据库实体
        /// </summary>
        /// <returns></returns>
        public Identification AsIdentification()
        {
            Identification identification = null;

            if (IdentificationId == 0)
            {
                identification = Identification.New();
            }
            else
            {
                identification = new IdentificationRepository().Get(this.IdentificationId);
            }
            identification.IdNumber             = this.IdNumber;
            identification.TrueName             = this.TrueName;
            identification.IdentificationTypeId = this.IdentificationTypeId;
            identification.Description          = this.Description;
            identification.Email  = this.Email;
            identification.Mobile = this.Mobile;
            identification.UserId = UserContext.CurrentUser.UserId;
            identification.Status = IdentificationStatus.pending;

            return(identification);
        }
예제 #2
0
 /// <summary>
 /// IdentificationService的构造函数
 /// </summary>
 /// <param name="identificationRepository"></param>
 /// <param name="identificationTypeRepository"></param>
 public IdentificationService(IdentificationRepository identificationRepository, IdentificationTypeRepository identificationTypeRepository)
 {
     this.iIdentificationRepository    = identificationRepository;
     this.identificationTypeRepository = identificationTypeRepository;
 }