CSLA .NET

From Rockford Lhotka's Expert C# 2008 and VB 2008 Business Objects books

How to cancel a new child added inside a BO

rated by 0 users
Not Answered This post has 0 verified answers | 0 Replies | 1 Follower

Not Ranked
1 Posts
programmingperu posted on Tue, Feb 9 2010 9:34 AM

Hi

I have the following BO:

public class FixedAssetChild : Csla.BusinessBase<FixedAssetChild>

This class has the following properties:

private static PropertyInfo<FixedAssetSupplyChildList> SupplyListProperty = RegisterProperty<FixedAssetSupplyChildList>(typeof(FixedAssetChild), new PropertyInfo<FixedAssetSupplyChildList>("SupplyList"));

private static PropertyInfo<FixedAssetDepreciationChildList> DepreciationListProperty = RegisterProperty<FixedAssetDepreciationChildList>(typeof(FixedAssetChild), new PropertyInfo<FixedAssetDepreciationChildList>("DepreciationList"));

I have a GridView with a datasource filled by SupplyList, I need to validate that the user can't add new Supplies to the SupplyList if DepreciationList = 0 or if some elements of DepreciationList has certain values. Where is the best place to add this validation and how can I return the error message to the UI?

How can I cancel a new item added inside a BO?

I think I have to validate it in SupplyChild but I'm not sure how to implement it. 

Thanks in advance!

 

Page 1 of 1 (1 items) | RSS

Please contact Magenic for your .NET consulting
and CSLA .NET mentoring needs.
Please consider making a donation to help support the ongoing development of CSLA .NET.

Make donation through PayPal - it's fast, free and secure!
Why donate?
Copyright (c) 2006-2010 Marimer LLC. All rights reserved.
Email admin@lhotka.net for support.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems