Usually, when I encode a property of classes that can be edited by the user with some kind of binding ... To prevent the execution of GUI logic, I do not allow to assign the same value to the property:
public PMSAccountingYear AccountingYear{ get { return _accountingYear; } set{ if(_accountingYear == value) return; _accountingYear = value; NotifyOtherProperties(); LogChanges(); EmallToTheBoss(); Errr(); BlowBombInTheGarden(); Etc(); } }
The status check does not look elegant and cannot be detected by any automatic code analysis. Can you offer a better example? Perhaps with one of the attributes?
source share