erste Testversion 7.3

This commit is contained in:
Daniel Schick 2022-06-15 17:31:58 +02:00
parent ba8456b920
commit d0324d8568
2 changed files with 10 additions and 6 deletions

View File

@ -62,15 +62,17 @@ namespace ENI2.DetailViewControls
public override void Initialize() public override void Initialize()
{ {
bool iAmAdmin = DBManager.Instance.GetReportingPartyDict()[App.UserId.Value].IsAdmin;
base.Initialize(); base.Initialize();
Message.NotificationClass notificationClass = this.Core.IsTransit ? Message.NotificationClass.TRANSIT : Message.NotificationClass.VISIT; Message.NotificationClass notificationClass = this.Core.IsTransit ? Message.NotificationClass.TRANSIT : Message.NotificationClass.VISIT;
if (this.Messages == null) return; if (this.Messages == null) return;
if (this.Core == null) return; if (this.Core == null) return;
this.textBoxENI.IsReadOnly = false; this.textBoxENI.IsReadOnly = !iAmAdmin;
this.textBoxIMO.IsReadOnly = false; this.textBoxIMO.IsReadOnly = !iAmAdmin;
this.locodePoC.IsEnabled = true; this.locodePoC.IsEnabled = iAmAdmin;
this.textBoxDisplayId.IsReadOnly = false; this.textBoxDisplayId.IsReadOnly = !iAmAdmin;
this.textBoxENI.DataContext = this.Core; this.textBoxENI.DataContext = this.Core;
this.textBoxIMO.DataContext = this.Core; this.textBoxIMO.DataContext = this.Core;

View File

@ -711,7 +711,9 @@ namespace bsmd.hisnord
lu.CargoNumberOfItems = ladg.CargoNumberOfItems.Value.ToString(); lu.CargoNumberOfItems = ladg.CargoNumberOfItems.Value.ToString();
if (ladg.CargoGrossQuantity_TNE.HasValue) if (ladg.CargoGrossQuantity_TNE.HasValue)
lu.CargoGrossQuantity_TNE = Math.Round((decimal)ladg.CargoGrossQuantity_TNE.Value, 3); lu.CargoGrossQuantity_TNE = Math.Round((decimal)ladg.CargoGrossQuantity_TNE.Value, 3);
if(!ladg.PortOfLoading.IsNullOrEmpty())
lu.CargoPortOfLoading = ladg.PortOfLoading; lu.CargoPortOfLoading = ladg.PortOfLoading;
if(!ladg.PortOfDischarge.IsNullOrEmpty())
lu.CargoPortOfDischarge = ladg.PortOfDischarge; lu.CargoPortOfDischarge = ladg.PortOfDischarge;
hn_generalcargo.Cargo[i] = lu; hn_generalcargo.Cargo[i] = lu;