Esempio n. 1
0
        private SBNProgramAccountDetailsBroadcastBody GetProgramAccountDetailsBroadcastBody(MicrosoftDynamicsCRMadoxioLicences licence)
        {
            var programAccountDetailsBroadcastBody = new SBNProgramAccountDetailsBroadcastBody();

            // BN9
            programAccountDetailsBroadcastBody.businessRegistrationNumber = licence.AdoxioLicencee.Accountnumber;

            // this code identifies that the message is from LCRB.  It's the same in every message from LCRB
            programAccountDetailsBroadcastBody.businessProgramIdentifier = OneStopUtils.BUSINESS_PROGRAM_IDENTIFIER;

            // reference number received on SBNCreateProgramAccountResponseBody.businessProgramAccountReferenceNumber
            programAccountDetailsBroadcastBody.businessProgramAccountReferenceNumber = licence.AdoxioBusinessprogramaccountreferencenumber;

            // Set the SBNProgramTypeCode to the value specified in the licence -> licenceType record.

            if (licence?.AdoxioLicenceType?.AdoxioOnestopprogramaccounttype != null)
            {
                programAccountDetailsBroadcastBody.SBNProgramTypeCode = licence?.AdoxioLicenceType?.AdoxioOnestopprogramaccounttype.ToString();
            }
            else
            {
                if ("Cannabis Retail Store" == licence?.AdoxioLicenceType?.AdoxioName)
                {
                    programAccountDetailsBroadcastBody.SBNProgramTypeCode = OneStopUtils.PROGRAM_TYPE_CODE_CANNABIS_RETAIL_STORE;
                }
            }


            programAccountDetailsBroadcastBody.businessCore = GetBusinessCore(licence);

            programAccountDetailsBroadcastBody.programAccountStatus = GetProgramAccountStatus(licence);

            // the legal name of the establishment
            programAccountDetailsBroadcastBody.legalName = licence.AdoxioLicencee.Name;

            programAccountDetailsBroadcastBody.operatingName = GetOperatingName(licence);

            programAccountDetailsBroadcastBody.businessAddress = GetBusinessAddress(licence);

            programAccountDetailsBroadcastBody.mailingAddress = GetMailingAddress(licence);

            // licence number
            programAccountDetailsBroadcastBody.partnerInfo1 = licence.AdoxioLicencenumber;

            programAccountDetailsBroadcastBody.partnerInfo3 = GetPrimaryContact(licence);

            // licence subtype code – not applicable to cannabis
            //programAccountDetailsBroadcastBody.partnerInfo2 = "ToGetFromDynamics";

            // licence expiry date
            if (licence.AdoxioExpirydate != null)
            {
                programAccountDetailsBroadcastBody.expiryDate = licence.AdoxioExpirydate.Value.ToString("yyyy-MM-dd");
            }

            return(programAccountDetailsBroadcastBody);
        }
Esempio n. 2
0
        private SBNProgramAccountDetailsBroadcastBody GetProgramAccountDetailsBroadcastBody()
        {
            var programAccountDetailsBroadcastBody = new SBNProgramAccountDetailsBroadcastBody();

            // BN9
            programAccountDetailsBroadcastBody.businessRegistrationNumber = "ToGetFromDynamics";

            // this code identifies that the message is from LCRB.  It's the same in every message from LCRB
            programAccountDetailsBroadcastBody.businessProgramIdentifier = OneStopUtils.BUSINESS_PROGRAM_IDENTIFIER;

            // reference number received on SBNCreateProgramAccountResponseBody.businessProgramAccountReferenceNumber
            programAccountDetailsBroadcastBody.businessProgramAccountReferenceNumber = "ToGetFromDynamics";

            // this identifies the licence type. Fixed number assigned by the OneStopHub
            programAccountDetailsBroadcastBody.SBNProgramTypeCode = OneStopUtils.PROGRAM_TYPE_CODE_CANNABIS_RETAIL_STORE;

            programAccountDetailsBroadcastBody.businessCore = GetBusinessCore();

            programAccountDetailsBroadcastBody.programAccountStatus = GetProgramAccountStatus();

            // the name of the applicant(licensee)- lastName, firstName middleName or company name
            programAccountDetailsBroadcastBody.legalName = "ToGetFromDynamics";

            programAccountDetailsBroadcastBody.operatingName = getOperatingName();

            programAccountDetailsBroadcastBody.businessAddress = getBusinessAddress();

            programAccountDetailsBroadcastBody.mailingAddress = getMailingAddress();

            // licence number
            programAccountDetailsBroadcastBody.partnerInfo1 = "ToGetFromDynamics";

            // licence subtype code – not applicable to cannabis
            //programAccountDetailsBroadcastBody.partnerInfo2 = "ToGetFromDynamics";

            // licence expiry date
            programAccountDetailsBroadcastBody.expiryDate = "ToGetFromDynamics";

            return(programAccountDetailsBroadcastBody);
        }