Open Question to the Community About Dependency

I am going to show by green skin here, but that is what this blog is all about…

I am working on a project management application where all task would be stored in one table. These tasks have a status field. The status field had a pick list (waiting, in progress, complete). Some tasks depend on the completion of other tasks (zero or one to many relationship in a single table). If a an item has a child item, I want the status to automatically be “waiting” and I want it to be read-only unless the status in the child item is set to “complete.”

I hope that makes sense. For clarity’s sake:

  • If the child item’s status is “waiting” or “in progress”, the parent item’s status is automatically set to “waiting” and it cannot be changed.
  • If the child item’s status is “complete”, the parent item’s status is editable.

I am not looking for complete instructions, but pointers to resources would be appreciated.

Tagged , , ,

3 thoughts on “Open Question to the Community About Dependency

  1. Take a look at:
    Using WCF RIA Services In LightSwitch To Simplify Your Application UI
    ( ). Basically a WCF RIA Service allows you to create entity collections that are based on complex logic. In your example a dropdown is bound to an collection that is coming from a WCF RIA Service that accepts a parameter (in this case the Task) and then queries the data and determines what choices to offer in the collection.

  2. If you could wait this long, my July MSDN article will cover exactly this kind of situation in great detail. The idea is pretty much the same as Michael suggests: if your screen has that complex logic, you do not want to base the screen on the entities (Task) that you created with the LightSwitch entity designer, but on entities that are designed for this screen in particular… A WCF RIA service could help you do this, and is probably the easiest way as well.

  3. danbeall says:

    Thanks. I will learn more about WCF RIA from the article on the LightSwitch Help site and I look forward to the MSDN article.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: