Seting Default Values


Author
Message
Bradley Marston
Bradley Marston
StrataFrame Novice (70 reputation)StrataFrame Novice (70 reputation)StrataFrame Novice (70 reputation)StrataFrame Novice (70 reputation)StrataFrame Novice (70 reputation)StrataFrame Novice (70 reputation)StrataFrame Novice (70 reputation)StrataFrame Novice (70 reputation)StrataFrame Novice (70 reputation)
Group: Forum Members
Posts: 24, Visits: 119
I have a BO with a lot of fields that need to set with defaults, I also have a datatable with the field name and value. Is there a way to set these defaults looping thru the data table without having to use a select case where i must type Case datatable.fieldname = me.fieldname. For example in vfp one could use macro

substitution , but not in vb.net or c sharp.net

Replies
Bradley Marston
Bradley Marston
StrataFrame Novice (70 reputation)StrataFrame Novice (70 reputation)StrataFrame Novice (70 reputation)StrataFrame Novice (70 reputation)StrataFrame Novice (70 reputation)StrataFrame Novice (70 reputation)StrataFrame Novice (70 reputation)StrataFrame Novice (70 reputation)StrataFrame Novice (70 reputation)
Group: Forum Members
Posts: 24, Visits: 119
For one last question on the subject , how do I add a broken rule to a created business object. for example

BOCustomers.BrokenRules.Add()  takes a parameter of type MicroFour.StrataFrame.Business.BrokenRule 

When I try to create an object of MicroFour.StrataFrame.Business.BrokenRule I cannot use the new keyword, and all the relevent properties seem to be Read Only.


StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Yes, the constructor for the BrokenRule class is internal (Friend in VB), to prevent broken rules from being added outside of the business objects themselves.  If you want to be able to add a broken rule from outside of a business object, then you'll need to create a public method that will turn around and call the BusinessLayer.AddBrokenRule method internally.
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