You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It uses CargoTrackingViewAdapter as a wrapper around the Cargo and (associated) Handling Event aggregate to keep the domain objects isolated from the UI concerns. Some code of interest is:
public string StatusText
{
get
{
switch (_cargo.Delivery.TransportStatus)
{
case TransportStatus.InPort:
return Resources.Messages.cargo_status_IN_PORT.UIFormat(_cargo.Delivery.LastKnownLocation.Name);
case TransportStatus.OnboardCarrier:
return Resources.Messages.cargo_status_ONBOARD_CARRIER.UIFormat("XXX");
case TransportStatus.Claimed:
return Resources.Messages.cargo_status_CLAIMED.UIFormat();
case TransportStatus.NotReceived:
return Resources.Messages.cargo_status_NOT_RECEIVED.UIFormat();
case TransportStatus.Unknown:
return Resources.Messages.cargo_status_UNKNOWN.UIFormat();
}
throw new NotSupportedException();
}
}
public String NextExpectedActivity
{
get
{
HandlingActivity activity = _cargo.Delivery.NextExpectedActivity;
if (activity == null)
{
return "";
}
const string text = "Next expected activity is to ";
HandlingEventType type = activity.EventType;
if (type == HandlingEventType.Load)
{
return
text + type.ToString().ToLower() + " cargo onto voyage XXX" +
" in " + activity.Location.Name;
}
if (type == HandlingEventType.Unload)
{
return
text + type.ToString().ToLower() + " cargo off of XXX" +
" in " + activity.Location.Name;
}
return text + type.ToString().ToLower() + " cargo in " + activity.Location.Name;
}
}
public string Eta
{
get
{
DateTime? eta = _cargo.Delivery.EstimatedTimeOfArrival;
return eta.HasValue ? eta.ToString() : "?";
}
}
The text was updated successfully, but these errors were encountered:
Implement cargo tracking form. User can enter tracking id and the cargo information will be displayed:
In .NET port
Track.aspx
form has:It uses
CargoTrackingViewAdapter
as a wrapper around the Cargo and (associated) Handling Event aggregate to keep the domain objects isolated from the UI concerns. Some code of interest is:The text was updated successfully, but these errors were encountered: