Exemple #1
0
        /// <summary>
        /// Get the address for the currently selected store
        /// </summary>
        /// <returns></returns>
        public Address GetStoreAddress(DataEntity.Store store)
        {
            Address storeAddress = null;

            if (store != null && store.Party != null)
            {
                // Get the primary address (and ONLY the primary address)
                DataEntity.PostalAddress address = customerDataManager.GetPrimaryPostalAddress(store.Party.Id);

                if (address != null)
                {
                    storeAddress = customerDataManager.GetAddress(address.Id);
                }
            }

            return(storeAddress);
        }
        /// <summary>
        /// Get the address for the currently selected store
        /// </summary>
        /// <returns></returns>
        private Address GetStoreAddress()
        {
            Address storeAddress = null;

            if (this.SelectedStore != null && this.SelectedStore.Party != null)
            {
                // Get the primary address (and ONLY the primary address)
                DataEntity.PostalAddress address = customerDataManager.GetPrimaryPostalAddress(this.SelectedStore.Party.Id);

                if (address != null)
                {
                    storeAddress = customerDataManager.GetAddress(address.Id);
                }
            }

            return(storeAddress);
        }