CSLA .NET

Vibrant discussion about CSLA .NET and using the framework to build great business applications.

Forum has moved

New location: CSLA .NET forum


CSLA .NET Resources:
  • CSLA .NET forum
  • CSLA .NET home page
  • How can i change the controls error state while running the business rules manually

    rated by 0 users
    Answered (Verified) This post has 1 verified answer | 2 Replies | 2 Followers

    Top 500 Contributor
    33 Posts
    Tiklu Ganguly posted on Thu, Nov 11 2010 7:38 AM

    Hi All,

               I have a form with some silverlight data bound controls along with the csla propertystatus controls. Now the business object it is bound to, have some business rules in it. If I am explicitly making changes to the data in the control which in turn triggers any validation error i am getting a nice red error message, all this is getting handled by csla and working excellent.

         Again say the user has entered some value and hits the done button in the form i am running the rules by using the code

             this.BusinessRules.CheckRules(); 

      for the business object. I am also getting individual errors from brokenrulescollection. Which at present I am displaying in a messagebox.

      What I want is a way to set the controls in errorstate where ever the rule is broken instead of displaying the messagebox. Is there any easy way to do that?

    Hope I was been able to describe my problem

    Regards

    TIklu

    Answered (Verified) Verified Answer

    Top 10 Contributor
    9,475 Posts

    After calling CheckRules, make a call to OnUnknownPropertyChanged - that will raise appropriate PropertyChanged events and should get you the desired result.

    Rocky

    All Replies

    Top 10 Contributor
    9,475 Posts

    After calling CheckRules, make a call to OnUnknownPropertyChanged - that will raise appropriate PropertyChanged events and should get you the desired result.

    Rocky

    Top 500 Contributor
    33 Posts

    Thanx Rocky it worked perfectly :)

    Page 1 of 1 (3 items) | RSS

    Copyright (c) 2006-2014 Marimer LLC. All rights reserved.
    Email admin@lhotka.net for support.
    Powered by Community Server (Non-Commercial Edition), by Telligent Systems