示例#1
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);
        }
示例#2
0
        private Company CreateCompany()
        {
            Contact1 contact = CreateContact();

            int     companyId = GetNextId();
            Company company   = new Company
            {
                Id                        = IntegerToGuid(companyId),
                Name                      = string.Format("Company {0} Name", companyId),
                CompanyNumber             = string.Format("No. {0}", companyId),
                Contact1                  = contact,
                RegisteredOfficeContactId = contact.Id,
            };

            model.Companies.Add(company);

            return(company);
        }
示例#3
0
        private Contact1 CreateContact()
        {
            Country england = model.Countries.Single(c => c.Name == "UK - England");

            int      addressId = GetNextId();
            Address1 address   = new Address1
            {
                Id                 = IntegerToGuid(addressId),
                PrimaryName        = string.Format("Address {0} Primary Name", addressId),
                SecondaryName      = string.Format("Address {0} Secondary Name", addressId),
                Street             = string.Format("Address {0} Street", addressId),
                Town               = string.Format("Address {0} Town", addressId),
                Locality           = string.Format("Address {0} Locality", addressId),
                AdministrativeArea = string.Format("Address {0} Admin Area", addressId),
                PostCode           = string.Format("Address {0} Post Code", addressId),
                Country            = england,
                CountryId          = england.Id,
            };

            model.Address1.Add(address);

            int      contactId = GetNextId();
            Contact1 contact   = new Contact1
            {
                Id        = IntegerToGuid(contactId),
                Title     = string.Format("Contact {0} Title", contactId),
                Forename  = string.Format("Contact {0} Forename", contactId),
                Surname   = string.Format("Contact {0} Surname", contactId),
                Telephone = string.Format("Contact {0} Telephone", contactId),
                Mobile    = string.Format("Contact {0} Mobile", contactId),
                Fax       = string.Format("Contact {0} Fax", contactId),
                Email     = string.Format("Contact {0} Email", contactId),
                Address1  = address,
                AddressId = address.Id,
            };

            model.Contact1.Add(contact);

            return(contact);
        }
        private Contact1 CreateContact()
        {
            Country england = model.Countries.Single(c => c.Name == "UK - England");

            int addressId = GetNextId();
            Address1 address = new Address1
            {
                Id = IntegerToGuid(addressId),
                PrimaryName = string.Format("Address {0} Primary Name", addressId),
                SecondaryName = string.Format("Address {0} Secondary Name", addressId),
                Street = string.Format("Address {0} Street", addressId),
                Town = string.Format("Address {0} Town", addressId),
                Locality = string.Format("Address {0} Locality", addressId),
                AdministrativeArea = string.Format("Address {0} Admin Area", addressId),
                PostCode = string.Format("Address {0} Post Code", addressId),
                Country = england,
                CountryId = england.Id,
            };
            model.Address1.Add(address);

            int contactId = GetNextId();
            Contact1 contact = new Contact1
            {
                Id = IntegerToGuid(contactId),
                Title = string.Format("Contact {0} Title", contactId),
                Forename = string.Format("Contact {0} Forename", contactId),
                Surname = string.Format("Contact {0} Surname", contactId),
                Telephone = string.Format("Contact {0} Telephone", contactId),
                Mobile = string.Format("Contact {0} Mobile", contactId),
                Fax = string.Format("Contact {0} Fax", contactId),
                Email = string.Format("Contact {0} Email", contactId),
                Address1 = address,
                AddressId = address.Id,
            };
            model.Contact1.Add(contact);

            return contact;
        }