Bugfix: avoid clearing of all assigned participants (they are *not* set in this dialog!(any more))
This commit is contained in:
parent
35f0f8b204
commit
1e9636c47c
@ -160,12 +160,7 @@ namespace BreCalClient
|
|||||||
this.ShipcallModel.Ship = (Ship)this.comboBoxShip.SelectedItem;
|
this.ShipcallModel.Ship = (Ship)this.comboBoxShip.SelectedItem;
|
||||||
this.ShipcallModel.Shipcall.ArrivalBerthId = (this.comboBoxArrivalBerth.SelectedItem != null) ? ((Berth)this.comboBoxArrivalBerth.SelectedItem).Id : null;
|
this.ShipcallModel.Shipcall.ArrivalBerthId = (this.comboBoxArrivalBerth.SelectedItem != null) ? ((Berth)this.comboBoxArrivalBerth.SelectedItem).Id : null;
|
||||||
this.ShipcallModel.Shipcall.DepartureBerthId = (this.comboBoxDepartureBerth.SelectedItem != null) ? ((Berth)this.comboBoxDepartureBerth.SelectedItem).Id : null;
|
this.ShipcallModel.Shipcall.DepartureBerthId = (this.comboBoxDepartureBerth.SelectedItem != null) ? ((Berth)this.comboBoxDepartureBerth.SelectedItem).Id : null;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// remove all and add selected participants
|
|
||||||
this.ShipcallModel.Shipcall.Participants.Clear();
|
|
||||||
this.ShipcallModel.AssignedParticipants.Clear();
|
|
||||||
|
|
||||||
Participant? participant;
|
Participant? participant;
|
||||||
participant = (Participant?)this.comboBoxAgency.SelectedItem;
|
participant = (Participant?)this.comboBoxAgency.SelectedItem;
|
||||||
@ -177,6 +172,12 @@ namespace BreCalClient
|
|||||||
Type = (int)Extensions.ParticipantType.AGENCY
|
Type = (int)Extensions.ParticipantType.AGENCY
|
||||||
};
|
};
|
||||||
this.ShipcallModel.AssignedParticipants[Extensions.ParticipantType.AGENCY] = pa;
|
this.ShipcallModel.AssignedParticipants[Extensions.ParticipantType.AGENCY] = pa;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// AGENCY was set before and now is set to nothing
|
||||||
|
if (this.ShipcallModel.AssignedParticipants.ContainsKey(ParticipantType.AGENCY))
|
||||||
|
this.ShipcallModel.AssignedParticipants.Remove(ParticipantType.AGENCY);
|
||||||
}
|
}
|
||||||
|
|
||||||
// BSMD and port authority are always added
|
// BSMD and port authority are always added
|
||||||
|
|||||||
Reference in New Issue
Block a user