Пример #1
0
        /// <summary>
        /// Creates a producer associated with the specified member upload.
        /// The producer's business will be populated with the details of a partnership.
        /// </summary>
        /// <param name="memberUpload"></param>
        /// <returns></returns>
        public ProducerSubmission CreateProducerAsPartnership(MemberUpload memberUpload, string registrationNumber, string obligationType)
        {
            ProducerSubmission producerSubmission = CreateProducerWithEmptyBusiness(memberUpload, registrationNumber, obligationType);
            Partnership        partnership        = CreatePartnership();

            producerSubmission.Business.Partnership   = partnership;
            producerSubmission.Business.PartnershipId = partnership.Id;

            return(producerSubmission);
        }
Пример #2
0
        private Partnership CreatePartnership()
        {
            Contact1 contact = CreateContact();

            var partnershipId = GetNextId();

            Partnership partnership = new Partnership
            {
                Id       = IntegerToGuid(partnershipId),
                Name     = string.Format("Partnership {0} Name", CreatePartnershipNameFromId(partnershipId)),
                Contact1 = contact,
                PrincipalPlaceOfBusinessId = contact.Id,
            };

            model.Partnerships.Add(partnership);

            return(partnership);
        }
Пример #3
0
        private Partnership CreatePartnership()
        {
            Contact1 contact = CreateContact();

            var partnershipId = GetNextId();

            Partnership partnership = new Partnership
            {
                Id = IntegerToGuid(partnershipId),
                Name = string.Format("Partnership {0} Name", CreatePartnershipNameFromId(partnershipId)),
                Contact1 = contact,
                PrincipalPlaceOfBusinessId = contact.Id,
            };
            model.Partnerships.Add(partnership);

            return partnership;
        }