示例#1
0
        private SBNProgramAccountDetailsBroadcastHeaderCCRAHeaderUserCredentials GetUserCredentials(MicrosoftDynamicsCRMadoxioLicences licence)
        {
            var userCredentials = new SBNProgramAccountDetailsBroadcastHeaderCCRAHeaderUserCredentials();

            //BN9 of licensee (Owner company)
            userCredentials.businessRegistrationNumber = licence.AdoxioLicencee.Accountnumber;
            //the name of the applicant (licensee)- last name, first name middle initial or company name
            userCredentials.legalName = licence.AdoxioLicencee.Name;
            //establishment (physical location of store)
            if (licence.AdoxioEstablishment != null)
            {
                userCredentials.postalCode = Utils.FormatPostalCode(licence.AdoxioEstablishment.AdoxioAddresspostalcode);
            }

            //last name of sole proprietor (if not sole prop then null)
            if (licence.AdoxioLicencee != null && licence.AdoxioLicencee.Primarycontactid != null && !string.IsNullOrEmpty(licence.AdoxioLicencee.Primarycontactid.Lastname))
            {
                userCredentials.lastName = licence.AdoxioLicencee.Primarycontactid.Lastname;
            }
            else
            {
                userCredentials.lastName = "N/A";
            }


            return(userCredentials);
        }
示例#2
0
        private SBNProgramAccountDetailsBroadcastHeaderCCRAHeaderUserCredentials GetUserCredentials()
        {
            var userCredentials = new SBNProgramAccountDetailsBroadcastHeaderCCRAHeaderUserCredentials();

            //BN9 of licensee (Owner company)
            userCredentials.businessRegistrationNumber = "ToGetFromDynamics";
            //the name of the applicant (licensee)- last name, first name middle initial or company name
            userCredentials.legalName = "ToGetFromDynamics";
            //establishment (physical location of store)
            userCredentials.postalCode = "ToGetFromDynamics";
            //last name of sole proprietor (if not sole prop then null)
            userCredentials.lastName = "ToGetFromDynamics";

            return(userCredentials);
        }