If the agency provided a time, display it in the BSMD column. Also corrected ETD/ETA Label right there
This commit is contained in:
parent
b070979723
commit
effbf42303
@ -267,23 +267,10 @@ namespace BreCalClient
|
|||||||
this.imageEvaluation.ToolTip = this.ShipcallControlModel?.Shipcall?.EvaluationMessage;
|
this.imageEvaluation.ToolTip = this.ShipcallControlModel?.Shipcall?.EvaluationMessage;
|
||||||
else
|
else
|
||||||
this.imageEvaluation.ToolTip = null;
|
this.imageEvaluation.ToolTip = null;
|
||||||
|
|
||||||
//Times? bsmdTimes = this.ShipcallControlModel?.GetTimesForParticipantType(Extensions.ParticipantType.BSMD);
|
this.textBlockBerth.Text = this.ShipcallControlModel?.GetBerthText(null);
|
||||||
//if (bsmdTimes != null)
|
|
||||||
this.textBlockBerth.Text = this.ShipcallControlModel?.GetBerthText(null);
|
|
||||||
//else
|
|
||||||
// this.textBlockBerth.Text = this.ShipcallControlModel?.Berth;
|
|
||||||
|
|
||||||
this.textBlockCallsign.Text = this.ShipcallControlModel?.Ship?.Callsign;
|
this.textBlockCallsign.Text = this.ShipcallControlModel?.Ship?.Callsign;
|
||||||
if (this.ShipcallControlModel?.Shipcall?.Type == ShipcallType.Arrival)
|
this.textBlockETA.Text = this.ShipcallControlModel?.GetETAETD(true);
|
||||||
{
|
|
||||||
this.textBlockETA.Text = this.ShipcallControlModel?.Shipcall?.Eta?.ToString("dd.MM. HH:mm");
|
|
||||||
}
|
|
||||||
if ((this.ShipcallControlModel?.Shipcall?.Type == ShipcallType.Departure) || (this.ShipcallControlModel?.Shipcall?.Type == ShipcallType.Shifting))
|
|
||||||
{
|
|
||||||
this.labelETA.Text = "ETD";
|
|
||||||
this.textBlockETA.Text = this.ShipcallControlModel?.Shipcall?.Etd?.ToString("dd.MM. HH:mm");
|
|
||||||
}
|
|
||||||
|
|
||||||
this.textBlockIMO.Text = this.ShipcallControlModel?.Ship?.Imo.ToString();
|
this.textBlockIMO.Text = this.ShipcallControlModel?.Ship?.Imo.ToString();
|
||||||
this.textBlockLengthWidth.Text = $"{this.ShipcallControlModel?.Ship?.Length} / {this.ShipcallControlModel?.Ship?.Width}";
|
this.textBlockLengthWidth.Text = $"{this.ShipcallControlModel?.Ship?.Length} / {this.ShipcallControlModel?.Ship?.Width}";
|
||||||
@ -293,6 +280,7 @@ namespace BreCalClient
|
|||||||
|
|
||||||
if (this.ShipcallControlModel?.Shipcall?.Type != ShipcallType.Arrival)
|
if (this.ShipcallControlModel?.Shipcall?.Type != ShipcallType.Arrival)
|
||||||
{
|
{
|
||||||
|
this.labelETA.Text = "ETD";
|
||||||
this.labelETAETDAgent.Content = "ETD";
|
this.labelETAETDAgent.Content = "ETD";
|
||||||
this.labelETAETDMooring.Content = "ETD";
|
this.labelETAETDMooring.Content = "ETD";
|
||||||
this.labelETAETDPilot.Content = "ETD";
|
this.labelETAETDPilot.Content = "ETD";
|
||||||
|
|||||||
@ -219,7 +219,7 @@ namespace BreCalClient
|
|||||||
return berthText;
|
return berthText;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetETAETD()
|
public string GetETAETD(bool useShortVersion = false)
|
||||||
{
|
{
|
||||||
DateTime theDate = DateTime.Now;
|
DateTime theDate = DateTime.Now;
|
||||||
if(this.Shipcall != null)
|
if(this.Shipcall != null)
|
||||||
@ -243,6 +243,8 @@ namespace BreCalClient
|
|||||||
theDate = agentTimes.EtdBerth.Value;
|
theDate = agentTimes.EtdBerth.Value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(useShortVersion)
|
||||||
|
return theDate.ToString("dd.MM. HH:mm");
|
||||||
return theDate.ToString();
|
return theDate.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user