Exemplo n.º 1
0
        internal Contractor(ContractorState contDbState/*, IBus bus*/)
            : base(contDbState.Id/*, bus*/)
        {
            DbState = contDbState;

            Contact = new Contact(new Name(contDbState.ContactFirstName, contDbState.ContactLastName), contDbState.ContactPhoneNumber, contDbState.ContactAlternatePhoneNumber, contDbState.ContactEmail);
            Address = new VO.Address(contDbState.AddressLine1, contDbState.AddressLine2, contDbState.City, contDbState.StateCode, contDbState.ZipCode);
            EinNumber = contDbState.EinNumber;
            ContractorName = contDbState.ContractorName;
            DoingBusinessAs =  contDbState.DoingBusinessAs; ContractorType =  contDbState.Type;
            ContractDuration = new DateTimeRange(contDbState.ContractStartDate, contDbState.ContractEndDate);
            PhoneNumber =   contDbState.PhoneNumber;
            Email = contDbState.Email;
            ContractorAlternatePhoneNumber = contDbState.AlternatePhoneNumber;
            Status = contDbState.Status;
            ContractorSuffixCode = contDbState.EinNumber.Substring(9, 2);
        }
Exemplo n.º 2
0
 private void InitializeState()
 {
     DbState = new ContractorState
     {
         Id = Id,
         EinNumber = EinNumber,
         ContractorName = ContractorName,
         DoingBusinessAs =  DoingBusinessAs,
         Status =  Status.Value,
         Type = ContractorType.Value,
         ContractStartDate =  ContractDuration.Start,
         ContractEndDate = ContractDuration.End,
         PhoneNumber = PhoneNumber,
         Email = Email,
         ContactFirstName = Contact.Name.FirstName,
         ContactLastName = Contact.Name.LastName,
         ContactPhoneNumber = Contact.PhoneNumber,
         ContactEmail = Contact.Email,
         ContactAlternatePhoneNumber = Contact.AlternatePhoneNumber,
         AlternatePhoneNumber = ContractorAlternatePhoneNumber,
         AddressLine1 = Address.AddressLine1,
         AddressLine2 = Address.AddressLine2,
         City = Address.City,
         StateCode = Address.StateCode,
         ZipCode = Address.ZipCode
         //ZipExntension = Address.
     };
 }