Click here to Skip to main content
15,889,742 members
Home / Discussions / C#
   

C#

 
QuestionNot getting Output parameter value Pin
Hum Dum20-Sep-11 23:51
Hum Dum20-Sep-11 23:51 
AnswerRe: Not getting Output parameter value Pin
RichardGrimmer21-Sep-11 6:16
RichardGrimmer21-Sep-11 6:16 
QuestionDynamically changing array Pin
jenya720-Sep-11 21:16
jenya720-Sep-11 21:16 
AnswerRe: Dynamically changing array Pin
Blue_Boy20-Sep-11 21:24
Blue_Boy20-Sep-11 21:24 
GeneralRe: Dynamically changing array Pin
jenya720-Sep-11 21:38
jenya720-Sep-11 21:38 
GeneralRe: Dynamically changing array Pin
Blue_Boy20-Sep-11 21:49
Blue_Boy20-Sep-11 21:49 
Questioncontent is outdated Pin
Hum Dum20-Sep-11 21:06
Hum Dum20-Sep-11 21:06 
QuestionClass design related clarification c# Pin
ragasai20-Sep-11 12:18
ragasai20-Sep-11 12:18 
I have a design related question. So please guide me on how to do this?

Right now, I have a xml structure which will be in this format.

XML
<Sheet id="abc"/>
     <Elements>
        <Element id="xyz">
           <value>23</value>
        </Element>
        <Element id="sdz">
           <value>46</value>
        </Element>
        ...
    </Elements>
</Sheet>


So, we have a class like this to store each & every element of the sheet.

Sheet
{
Public string SheetId
{
get; set;
}

//all Elements will be stored in the below collection
Public IList<IDictionary<string, string>> Elements
{
get; set;
}
}

But now for few sheets the format has been changed to the below structure.

XML
<abc> //SheetId
    <Elements>
       <Record>
            <Element1/>
            <Element2/>
            <Element3/>
            <Element4/>
       </Record>
       <Record>
            <Element1/>
            <Element2/>
            <Element3/>
            <Element4/>
       </Record>
       ...
</abc>


So, we need to create a Generic class to hold the above xml formats and we don't want to have different object to store these.

I mean in future if we have some other xml format also we need to accommodate the same without any change in the Sheet class.

Ok. let me explain how my app works.

Actually we have around 200 sheets(in other words measures).

1) User will upload the sheet data in xml format (all sheets in xml file) & edit the same if they want Or Enter the data in the screen (dynamic screen generated using the xml template) if they dont want to upload.

2) Then the data will be stored in the Sheet object and it will go through lot of Validation process and finally the data will be converted to xml again and stored in the db.

You can ask why you want to store this as XML? The reason is we dont want to create 200 aspx pages for this same kind of data and thats why we are generating the sheet pages dynamically using the xml templates. Also, we will be adding, updating or deleting sheets frequently.

Ok. I think now you will have some idea about this issue.

To be more clear, all the elements in my XML file will be displayed as a field in the aspx page. It maybe a Textbox, dropdown & etc....

So, can anyone please advise me on how to design the Sheet Class.?
AnswerRe: Class design related clarification c# Pin
#realJSOP21-Sep-11 2:00
mve#realJSOP21-Sep-11 2:00 
AnswerRe: Class design related clarification c# Pin
jschell21-Sep-11 14:38
jschell21-Sep-11 14:38 
Questionwhat is the best method of drawing for my situation Pin
Hamed Metalgear20-Sep-11 11:12
Hamed Metalgear20-Sep-11 11:12 
AnswerRe: what is the best method of drawing for my situation Pin
Luc Pattyn20-Sep-11 11:16
sitebuilderLuc Pattyn20-Sep-11 11:16 
AnswerRe: what is the best method of drawing for my situation Pin
SledgeHammer0120-Sep-11 12:18
SledgeHammer0120-Sep-11 12:18 
GeneralRe: what is the best method of drawing for my situation Pin
Hamed Metalgear20-Sep-11 22:41
Hamed Metalgear20-Sep-11 22:41 
GeneralRe: what is the best method of drawing for my situation Pin
#realJSOP21-Sep-11 2:04
mve#realJSOP21-Sep-11 2:04 
GeneralRe: what is the best method of drawing for my situation Pin
SledgeHammer0121-Sep-11 6:31
SledgeHammer0121-Sep-11 6:31 
AnswerRe: what is the best method of drawing for my situation Pin
Hamed Metalgear21-Sep-11 9:04
Hamed Metalgear21-Sep-11 9:04 
GeneralRe: what is the best method of drawing for my situation Pin
SledgeHammer0121-Sep-11 9:50
SledgeHammer0121-Sep-11 9:50 
GeneralRe: what is the best method of drawing for my situation Pin
Hamed Metalgear21-Sep-11 10:08
Hamed Metalgear21-Sep-11 10:08 
GeneralRe: what is the best method of drawing for my situation Pin
SledgeHammer0121-Sep-11 11:45
SledgeHammer0121-Sep-11 11:45 
GeneralRe: what is the best method of drawing for my situation Pin
Hamed Metalgear21-Sep-11 20:44
Hamed Metalgear21-Sep-11 20:44 
QuestionForm Application run into troubles on Vista. DEP Disabled [modified] Pin
shabi.b20-Sep-11 7:18
shabi.b20-Sep-11 7:18 
AnswerRe: Form Application run into troubles on Vista. DEP Disabled Pin
#realJSOP21-Sep-11 2:06
mve#realJSOP21-Sep-11 2:06 
GeneralRe: Form Application run into troubles on Vista. DEP Disabled Pin
shabi.b21-Sep-11 2:25
shabi.b21-Sep-11 2:25 
AnswerRe: Form Application run into troubles on Vista. DEP Disabled Pin
Bernhard Hiller21-Sep-11 3:53
Bernhard Hiller21-Sep-11 3:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.