diff --git a/ENI-2/ENI2/ENI2/DetailBaseControl.cs b/ENI-2/ENI2/ENI2/DetailBaseControl.cs index 9a00551e..1732693b 100644 --- a/ENI-2/ENI2/ENI2/DetailBaseControl.cs +++ b/ENI-2/ENI2/ENI2/DetailBaseControl.cs @@ -175,7 +175,14 @@ namespace ENI2 protected void RegisterTextboxChange(TextBox textBox, Message.NotificationClass notificationClass) { this._dpTextBox.AddValueChanged(textBox, this.controlContentChanged); - this._controlClassDict[textBox] = notificationClass; + this._controlClassDict[textBox] = notificationClass; + } + + protected void UnregisterTextboxChange(TextBox textBox) + { + this._dpTextBox.RemoveValueChanged(textBox, this.controlContentChanged); + if (this._controlClassDict.ContainsKey(textBox)) + this._controlClassDict.Remove(textBox); } protected void RegisterDateTimePickerChange(Xceed.Wpf.Toolkit.DateTimePicker dateTimePicker, Message.NotificationClass notificationClass) diff --git a/ENI-2/ENI2/ENI2/DetailViewControls/OverViewDetailControl.xaml.cs b/ENI-2/ENI2/ENI2/DetailViewControls/OverViewDetailControl.xaml.cs index 8d84a26d..005fa3a0 100644 --- a/ENI-2/ENI2/ENI2/DetailViewControls/OverViewDetailControl.xaml.cs +++ b/ENI-2/ENI2/ENI2/DetailViewControls/OverViewDetailControl.xaml.cs @@ -377,15 +377,22 @@ namespace ENI2.DetailViewControls public void UpdateCore() { + this.UnregisterTextboxChange(this.textBoxDisplayId); + this.textBoxDisplayId.DataContext = null; this.textBoxDisplayId.DataContext = this.Core; this.textBoxDisplayId.GetBindingExpression(TextBox.TextProperty)?.UpdateTarget(); + this.RegisterTextboxChange(this.textBoxDisplayId, Message.NotificationClass.ATA); + this.labelBSMDStatusInternal.DataContext = null; this.labelBSMDStatusInternal.DataContext = this.Core; - this.labelBSMDStatusInternal.GetBindingExpression(Label.ContentProperty)?.UpdateTarget(); - - MessageBox.Show(string.Format("Visit/Transit ID updated: {0}", this.Core.DisplayId)); + this.labelBSMDStatusInternal.GetBindingExpression(Label.ContentProperty)?.UpdateTarget(); + //MessageBox.Show(string.Format("Visit/Transit ID updated: {0}", this.Core.DisplayId)); + ShowIdDialog sid = new ShowIdDialog(); + sid.DisplayId = this.Core.DisplayId; + sid.Show(); + this.Core.IsDirty = false; // ist ja schon gespeichert.. } #endregion diff --git a/ENI-2/ENI2/ENI2/ENI2.csproj b/ENI-2/ENI2/ENI2/ENI2.csproj index 4e49ad29..2e1dea6f 100644 --- a/ENI-2/ENI2/ENI2/ENI2.csproj +++ b/ENI-2/ENI2/ENI2/ENI2.csproj @@ -35,8 +35,8 @@ 3.5.1.0 true publish.html - 1 - 3.9.3.%2a + 0 + 3.9.5.%2a false true true @@ -308,6 +308,9 @@ NewWithIdDialog.xaml + + ShowIdDialog.xaml + SimplePropertyViewDialog.xaml @@ -537,6 +540,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile diff --git a/ENI-2/ENI2/ENI2/EditControls/NewWithIdDialog.xaml.cs b/ENI-2/ENI2/ENI2/EditControls/NewWithIdDialog.xaml.cs index 89e51f3e..9574cf93 100644 --- a/ENI-2/ENI2/ENI2/EditControls/NewWithIdDialog.xaml.cs +++ b/ENI-2/ENI2/ENI2/EditControls/NewWithIdDialog.xaml.cs @@ -43,9 +43,9 @@ namespace ENI2.EditControls public string VisitTransitId { get { return this.textBoxVisitTransitId.Text; } } - public string IMO { get { if (this.doubleUpDownIMO.Value.HasValue) return this.doubleUpDownIMO.Value.ToString(); else return null; } } + public string IMO { get { if (this.doubleUpDownIMO.Value.HasValue) return this.doubleUpDownIMO.Value.Value.ToString("0000000"); else return null; } } - public string ENI { get { if (this.doubleUpDownENI.Value.HasValue) return this.doubleUpDownENI.Value.ToString(); else return null; } } + public string ENI { get { if (this.doubleUpDownENI.Value.HasValue) return this.doubleUpDownENI.Value.Value.ToString("00000000"); else return null; } } public DateTime? ETA { get { return this.datePickerETA.SelectedDate; } } diff --git a/ENI-2/ENI2/ENI2/EditControls/ShowIdDialog.xaml b/ENI-2/ENI2/ENI2/EditControls/ShowIdDialog.xaml new file mode 100644 index 00000000..14f84b0c --- /dev/null +++ b/ENI-2/ENI2/ENI2/EditControls/ShowIdDialog.xaml @@ -0,0 +1,22 @@ + + + + + + + + +