bugfix for portarea blocking the app during startup
This commit is contained in:
parent
90a4915683
commit
8a44a664dd
@ -123,7 +123,7 @@ namespace ENI2.DetailViewControls
|
||||
_infoMessage.Elements.Add(info);
|
||||
}
|
||||
|
||||
portAreas = PortArea.getPortAreasForLocode(this.Core.PoC);
|
||||
portAreas = await PortArea.getPortAreasForLocode(this.Core.PoC);
|
||||
this.comboBoxPortArea.ItemsSource = portAreas;
|
||||
|
||||
this.comboBoxShippingArea.ItemsSource = shippingAreas;
|
||||
|
||||
@ -108,7 +108,7 @@ namespace ENI2.SheetDisplayControls
|
||||
this.dataGridCallPurposes.CreateRequested += DataGridCallPurposes_CreateRequested;
|
||||
this.dataGridCallPurposes.DeleteRequested += DataGridCallPurposes_DeleteRequested;
|
||||
|
||||
portAreas = PortArea.getPortAreasForLocode(this.Core.PoC);
|
||||
portAreas = await PortArea.getPortAreasForLocode(this.Core.PoC);
|
||||
this.comboBoxPortArea.ItemsSource = portAreas;
|
||||
this.comboBoxPortArea.DataContext = this._info;
|
||||
this.textRequestedPostionInPortOfCall.DataContext = this._info;
|
||||
|
||||
@ -5,6 +5,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace bsmd.database
|
||||
{
|
||||
@ -67,11 +68,11 @@ namespace bsmd.database
|
||||
return result;
|
||||
}
|
||||
|
||||
public static Dictionary<string, string> getPortAreasForLocode(string locode)
|
||||
public static async Task<Dictionary<string, string>> getPortAreasForLocode(string locode)
|
||||
{
|
||||
Dictionary<string, string> result = new Dictionary<string, string>();
|
||||
|
||||
List<PortArea> portAreas = DBManagerAsync.LoadPortAreasAsync().Result;
|
||||
List<PortArea> portAreas = await DBManagerAsync.LoadPortAreasAsync();
|
||||
|
||||
foreach (PortArea portArea in portAreas)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user