Make pier filter combobox dependent on selected harbour
This commit is contained in:
parent
ddd2efa86d
commit
b5c100294c
@ -374,8 +374,18 @@ namespace BreCalClient
|
||||
private void comboBoxPorts_ItemSelectionChanged(object sender, Xceed.Wpf.Toolkit.Primitives.ItemSelectionChangedEventArgs e)
|
||||
{
|
||||
this.searchFilterControl.SearchFilter.Ports.Clear();
|
||||
|
||||
List<Berth> berths = new List<Berth>();
|
||||
foreach (Port port in comboBoxPorts.SelectedItems)
|
||||
{
|
||||
this.searchFilterControl.SearchFilter.Ports.Add(port.Id);
|
||||
berths.AddRange(BreCalLists.GetBerthsByPort(port.Id));
|
||||
}
|
||||
// create list of berths from selected port(s) or return all berths
|
||||
if (berths.Count == 0)
|
||||
berths = BreCalLists.AllBerths;
|
||||
this.searchFilterControl.SetBerths(berths);
|
||||
|
||||
this.SearchFilterControl_SearchFilterChanged();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user