Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 924967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:26:48+00:00 2026-05-15T19:26:48+00:00

I am writing a problem resolver for a despatch app. The despatch app prints

  • 0

I am writing a “problem resolver” for a despatch app.

The despatch app prints labels using a piece of software supplied by the UKs Royal Mail postal service. The software ensures that the addresses on the labels are “correct” as per the Royal mail’s database of valid addresses, it renders a trackable code in alphanumeric and barcoded format and it automatically bills our company for secure mail sent via the system without having to do very much paperwork.

It’s the latter “feature” that causes a problem. If a label is printed and not required because a) the customer is in a foreign country we do not mail to or b) two orders are for the same person at the same address we want to either not print a label in the former case or print one of two in the latter.

The country thing is easy. If a customer really is in another country you just don’t include it in the list of customers sent to the Royal Mail app for processing (but some customers get handy with the mouse wheel and end up pretending to be from the United Arab Emirates when they’re really from Banbury) the “Duplicate Postcode” issue, however, is much more troublesome.

In the UK two people will have the same postcode if they live on the same street. So obviously if two people on the same street want something you must print two labels. Similarly if two brothers live at the same address we want to ensure that both brothers receive their individual mail items (in this case the postcode, house number and surname will all match). However if two orders exist at the same address for Mr AN Other then MR Other should only require one label and his despatches can be combined.

Believe it or not we do have cases where Mr AN Other orders twice and Mr Someother-Dude in the same street orders something as well. In this case the problem resolver rather than just needing to tweak a predefined field to some other known value needs to let the user decide how many labels to print out.

In order to model this scenario in a UI I have created a listbox with a dynamic datatemplate that either allows people to straight include/not include the country problem people but in the case of Postcode problems it presents a horizontally aligned listbox which should include all the orders that have the same postcode.

So simply this is as far as I have got with this:

   <DataTemplate x:Key="postcodeTemplate">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition></RowDefinition>
                    <RowDefinition></RowDefinition>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition></ColumnDefinition>
                    <ColumnDefinition></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <Label Grid.Row="0">This Order's Postcode matches the postcode of another order. Choose what to do.</Label>
                <RadioButton>Send all.</RadioButton>
                <RadioButton>Send this one only.</RadioButton>
                <ListBox Grid.Row="0" Grid.Column="1" Grid.RowSpan="2">
                    <ListBox.ItemsPanel>
                        <ItemsPanelTemplate>
                            <VirtualizingStackPanel
                                Orientation="Horizontal"
                                IsItemsHost="true" />
                        </ItemsPanelTemplate>
                    </ListBox.ItemsPanel>
                </ListBox>
            </Grid>
        </DataTemplate>

How do I pass the postcode of the current customer (contained in an Observable Collection) through to a method which will return a list of customers at the same postcode which will then display in the final listbox?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T19:26:49+00:00Added an answer on May 15, 2026 at 7:26 pm

    Looks like I will just have to completely rewrite my window using more old school methods… how irritating.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 480k
  • Answers 480k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Values are passed through jQuery.post() to Request.Parameters. May 16, 2026 at 6:00 am
  • Editorial Team
    Editorial Team added an answer $xml = simplexml_load_string($xml); $fields = array(); foreach ($xml->field as $f)… May 16, 2026 at 6:00 am
  • Editorial Team
    Editorial Team added an answer You should close the outermost output stream you have created… May 16, 2026 at 6:00 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.