Exemple #1
0
        private SBNCreateProgramAccountRequestHeaderCCRAHeaderUserCredentials GetUserCredentials(MicrosoftDynamicsCRMadoxioLicences licence)
        {
            var userCredentials = new SBNCreateProgramAccountRequestHeaderCCRAHeaderUserCredentials();

            //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);
            }
            else // attempt to get from the Account
            {
                if (licence.AdoxioLicencee != null)
                {
                    userCredentials.postalCode = Utils.FormatPostalCode(licence.AdoxioLicencee.Address1Postalcode);
                }
            }
            //last name of sole proprietor (if not sole prop then null)
            userCredentials.lastName = "N/A";

            return(userCredentials);
        }
Exemple #2
0
        private SBNCreateProgramAccountRequestHeaderCCRAHeaderUserCredentials GetUserCredentials()
        {
            var userCredentials = new SBNCreateProgramAccountRequestHeaderCCRAHeaderUserCredentials();

            //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);
        }