Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using meta-data in .NET
Message
From
19/10/2007 17:57:32
 
 
To
19/10/2007 16:54:46
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01262116
Message ID:
01262294
Views:
24
Thanks a lot.

Alex

>Hi Alex, my syntax was not quite correct. Should be
>
>
>oData.Item[Metadata.cCategory] = oData.Item[Metadata.cCategory] + lnAmount
>
>
>Bruce
>
>>Thank you very much, Bruce, that will do it. I'll insert your code in the appropriate method of the Strataframe business object.
>>
>>Alex
>>
>>
>>>Hi Alex,
>>>
>>>I don't know strataframe or Strataframe Business Object. That said, I think Perry was suggesting something like this:
>>>
>>>
>>>'Create a hashtable, think of it as your data object
>>>Dim oData As System.Collections.IDictionary = New Hashtable
>>>
>>>'Add a key\value pair, think of the key as a property
>>>oData.Add(Metadata.cCategory, 0)
>>>
>>>'Update it
>>>oData[Metadata.cCategory] = oData[Metadata.cCategory] + lnAmount
>>>
>>>etc
>>>
>>>
>>>
>>>HTH
>>>
>>>Bruce
>>>
>>>
>>>>Can you explain a little more, please.
>>>>
>>>>Thanks for the response.
>>>>
>>>>Alex
>>>>
>>>>>Create a hashmap where the key is the value of the metadata.
>>>>>
>>>>>>Hello,
>>>>>>
>>>>>>How could I handle the following situation in .NET?
>>>>>>
>>>>>>In a time and attendance application there any many pay categories. Each pay category needs to be agregated into several total types. Information describing pay categories, total types, and the total types into which each pay category must be added is stored in meta-data tables.
>>>>>>
>>>>>>The transaction table has two child tables, one with daily data (one record for hours worked in each pay category each day) and one with summary data for the transaction which include totals by pay category as well as by total type (one record for each different total).
>>>>>>
>>>>>>In VFP, I might create an object at run time with properties named after the pay categories and total types described in the meta-data tables and use them as acumulators. That may look like this:
>>>>>>
>>>>>>
>>>>>>ADDPROPERTY(oTransaction.oData,Metadata.cCategory,0)
>>>>>>
>>>>>>
>>>>>>At the beginning of the editing process I would take previous info from the daily data table and sum it into the just created properties of the business object according to the rules of the meta-data. It may be something like this:
>>>>>>
>>>>>>
>>>>>>lnAmount = DailyData.nAmount
>>>>>>lcCategory = DailyData.cCategory
>>>>>>lcTotalType = Metadata.cTotalType
>>>>>>oTransaction.oData..&lcCategory = oTransaction.oData..&lcCategory + lnAmount
>>>>>>oTransaction.oData..&lcTotalType = oTransaction.oData..&lcTotalType + lnAmount
>>>>>>
>>>>>>
>>>>>>As user adds/deletes/modifies records in daily data, changes are made to the accumulators in a similar manner. During SAVE, changes to the daily data table are commited and the values of the various properties replace the previous values in the summary data table.
>>>>>>
>>>>>>How can I take a similar approach with Strataframe? In other words, how can I create and refer to properties of the Business Object at runtime based on the content of meta data tables?
>>>>>>
>>>>>>TIA,
>>>>>>
>>>>>>Alex
Previous
Reply
Map
View

Click here to load this message in the networking platform