Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
User Defined Settings for the Business Objects
Message
From
03/02/2011 09:50:27
 
 
To
03/02/2011 09:20:47
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01498282
Message ID:
01498541
Views:
41
>>>>Thank Tim,
>>>>
>>>>I'll let this sink in for a while (while I research what ""serialized" means) :)
>>>
>>>lol, it took me awhile to figure that out too. It basically means create an XML file from a class. If a class is marked as [Serializable] then it can be 'serialized' into an xml file.
>>>If you have a class with some public properties for settings and you serialize the class it will store it as an xml file on disk. Then when you need it again you can deserialize it back into a class again and reference those properties for your settings.
>>>
>>>mm.net entities are serializable and I have created entities by one process and serialized them into a folder to be later picked up by another process that deserializes them and saves them to a database.
>>>Tim
>>
>>Thanks.
>>
>>Here's what I am thinking of doing, let me know if this makes sense or not:
>>
>>In my VFP applications I have a system table that has four fields, an Item, and Item type, an item value and an optional field for a description of the item. When my application starts up, I create a global application object which goes through each record in this table and adds a property to itself and stores the item value in the property. I can then refer to oAppInfo.MyItem throughout my application. Does it make sense to do something like this? Does MM.Net have something like this built in already?
>
>Sure it makes sense. It sounds like with that solution you don't have strong types, is that correct? MM has a built in capability for application settings and they are typed but available at the application level and not the same as what you describe. In the past, I have created a database settings where I only have a single row. Each setting is a column in the table so it can be set to the appropriate type. Not really efficent use of database, but with settings not a big deal. You just get that row and you have all the settings available in a single entity. Plus they are typed based on your need for each one.
>Tim

If you mean by strong types that the properties are of a particular type, yes, they are. All Item Values are stored as strings, but when read from the Item Value field, it is then converted to the appropriate type based on the item type column.

OK, I'll try to implement this. I've created a BO and appropriate Stored Procedures but how do I dynamically create properties on an object in C#? In VFP I would use AddProperty(), is there something equivalent in C#?
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Previous
Reply
Map
View

Click here to load this message in the networking platform