How to set BO undirty ?


Author
Message
Philipp Guntermann
Philipp Guntermann
StrataFrame User (249 reputation)StrataFrame User (249 reputation)StrataFrame User (249 reputation)StrataFrame User (249 reputation)StrataFrame User (249 reputation)StrataFrame User (249 reputation)StrataFrame User (249 reputation)StrataFrame User (249 reputation)StrataFrame User (249 reputation)
Group: Forum Members
Posts: 141, Visits: 263
Hi,

i have an issue with my maintanance forms allways starting with the maintanance toolstrip showing the save and undo buttons enabled and the navigate buttons disabled.

i guess this is because automations on the form cause the bo to become dirty. ?

so within the bo, i tried this, to set it "undirty":

        protected override void OnIsDirtyChanged(bool DirtyShouldBe)
        {
            if (this.isDirty && this.EditingState ==  BusinessEditingState.Idle)
                this.Save();
            base.OnIsDirtyChanged(DirtyShouldBe);
        }

however, this throws a stackoverflow exception.

So, what is the appropriate way to handle this ?

thanks.


Reply
Philipp Guntermann
Philipp Guntermann
StrataFrame User (249 reputation)StrataFrame User (249 reputation)StrataFrame User (249 reputation)StrataFrame User (249 reputation)StrataFrame User (249 reputation)StrataFrame User (249 reputation)StrataFrame User (249 reputation)StrataFrame User (249 reputation)StrataFrame User (249 reputation)
Group: Forum Members
Posts: 141, Visits: 263
hi,

the line below is:

MyNamespace.Business_Objekte.Basis.MyBO.MyDateTimefield.set(System.DateTime value = {18.03.2009 11:39:59}) Zeile 410 + 0x40

the value is the value of that field in the first datarow from the database.

further below:

MyProject.Business_Objekte.Basis.MyBO.FieldDescriptor.SetValue(object component = { [MyProject.Business_Objekte.Basis.MyBO]}, object value = {18.03.2009 11:39:59}) Zeile 682 + 0x50 Bytes C#
  System.Windows.Forms.dll!System.Windows.Forms.BindToObject.SetValue(object value) + 0x58 Bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Binding.PullData(bool reformat, bool force) + 0x14f Bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Binding.Target_PropertyChanged(object sender, System.EventArgs e) + 0x28 Bytes 
  System.Windows.Forms.dll!System.Windows.Forms.DateTimePicker.OnValueChanged(System.EventArgs eventargs) + 0x17 Bytes 
  MicroFour StrataFrame UI.dll!MicroFour.StrataFrame.UI.Windows.Forms.DateTimePicker.OnValueChanged(System.EventArgs eventargs) + 0x36 Bytes 
  System.Windows.Forms.dll!System.Windows.Forms.DateTimePicker.Value.set(System.DateTime value) + 0x14d Bytes 
  [Übergang von Systemeigen zu Verwaltet] 
  [Übergang von Verwaltet zu Systemeigen] 
  System.dll!System.ComponentModel.ReflectPropertyDescriptor.SetValue(object component = {MicroFour.StrataFrame.UI.Windows.Forms.DateTimePicker, Value: 18.03.2009 11:39:59}, object value = {18.03.2009 11:39:59}) + 0xe3 Bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Binding.SetPropValue(object value) + 0xc9 Bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Binding.PushData(bool force) + 0x71 Bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Binding.UpdateIsBinding() + 0x60 Bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Binding.CheckBinding() + 0x235 Bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Binding.SetListManager(System.Windows.Forms.BindingManagerBase bindingManagerBase) + 0xe7 Bytes 
  System.Windows.Forms.dll!System.Windows.Forms.ListManagerBindingsCollection.AddCore(System.Windows.Forms.Binding dataBinding = {System.Windows.Forms.Binding}) + 0x2f Bytes 
  System.Windows.Forms.dll!System.Windows.Forms.BindingsCollection.Add(System.Windows.Forms.Binding binding) + 0x32 Bytes 
  System.Windows.Forms.dll!System.Windows.Forms.BindingContext.UpdateBinding(System.Windows.Forms.BindingContext newBindingContext, System.Windows.Forms.Binding binding) + 0x8d Bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Control.UpdateBindings() + 0x49 Bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Control.OnBindingContextChanged(System.EventArgs e = {System.EventArgs}) + 0xef Bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Control.OnParentBindingContextChanged(System.EventArgs e) + 0x39 Bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Control.OnBindingContextChanged(System.EventArgs e = {System.EventArgs}) + 0xd2 Bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Control.OnParentBindingContextChanged(System.EventArgs e) + 0x39 Bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Control.OnBindingContextChanged(System.EventArgs e = {System.EventArgs}) + 0xd2 Bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Control.OnParentBindingContextChanged(System.EventArgs e) + 0x39 Bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Control.OnBindingContextChanged(System.EventArgs e = {System.EventArgs}) + 0xd2 Bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Control.OnParentBindingContextChanged(System.EventArgs e) + 0x39 Bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Control.OnBindingContextChanged(System.EventArgs e = {System.EventArgs}) + 0xd2 Bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Control.BindingContextInternal.set(System.Windows.Forms.BindingContext value) + 0x8a Bytes 
  System.Windows.Forms.dll!System.Windows.Forms.ContainerControl.BindingContext.set(System.Windows.Forms.BindingContext value) + 0x5 Bytes 
  System.Windows.Forms.dll!System.Windows.Forms.ContainerControl.BindingContext.get() + 0x4e Bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Control.BindingContextInternal.get() + 0x75 Bytes 
  System.Windows.Forms.dll!System.Windows.Forms.SplitContainer.BindingContext.get() + 0x5 Bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Control.BindingContextInternal.get() + 0x75 Bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Control.BindingContext.get() + 0x5 Bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Control.BindingContextInternal.get() + 0x75 Bytes 
  System.Windows.Forms.dll!System.Windows.Forms.ContainerControl.BindingContext.get() + 0xc Bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Control.BindingContextInternal.get() + 0x75 Bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Control.BindingContext.get() + 0x5 Bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Control.UpdateBindings() + 0x28 Bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Control.OnBindingContextChanged(System.EventArgs e = {System.EventArgs}) + 0xef Bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Control.OnParentBindingContextChanged(System.EventArgs e) + 0x39 Bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Control.OnBindingContextChanged(System.EventArgs e = {System.EventArgs}) + 0xd2 Bytes 
  System.Windows.Forms.dll!System.Windows.Forms.ContainerControl.OnCreateControl() + 0x48 Bytes 
  System.Windows.Forms.dll!System.Windows.Forms.UserControl.OnCreateControl() + 0xa Bytes 
  MicroFour StrataFrame UI.dll!MicroFour.StrataFrame.UI.Windows.Forms.ThemedContainer.OnCreateControl() + 0xa Bytes 


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search