• 0

[C#, ASP.net] Help Designing Something


Question

Alright, let me start with the fact that I do not consider myself a true .net coder by any stretch of the imagination, but it's gotten into My boss's head that since I can code some basic database interface tools I should be more then capable to coding something significantly more complex then this.

I've got a weird issue, where I don't even know where to begin to deal with:

Database design:

Categories:

ID, Name

Data:

ID, Name

AdjCategories:

ID, CatID, DataID

ValuePairs -

ID, CatID, DataID, Property, Value

so....

basically

we have a category: Colors

we have a Data: Blue

we have an adjustment: Blue in Colors

we have a value pair: (Blue in Colors) Has a a Property: HexCode and a Value: #0000FF

The data structure's pretty set in stone, I've stripped out a lot of extra data to keep this simple as possible... because it's already one of the longest posts i've ever made on this forum ;) and I haven't gotten to the issue.

the way we want to display the info :

Colors:
	Blue
		Key	|	Value
		Hex	|	#0000FF
		Plant	|	BlueBerries

		form for new entry to datapairs

	Red
		Key	|	Value
		Hex	|	#FF0000
		Plant	|	Apple

		form for new entry to datapairs

Where the form is allows the user to enter data into the Key/Value data.

Now I've nested a DataGrid inside a ListView to get the first two bits of the data displaying...more or less right... but how would I even handle the form? I am having a hard time figuring this out... and could use some help.

 <asp:ListView ID="ListView1" runat="server">
<LayoutTemplate>
                <span id="itemPlaceholder" runat="server"></span>
            </LayoutTemplate>
            <ItemTemplate>
                <span runat="server">
                    <asp:Label ID="Data" runat="server" Text='<%# Eval("strWord") %>' /><br />
                    <asp:DataGrid runat="server" AutoGenerateColumns="false" DataSource='<%# ValuePairDataProvider_DataSource() %>'>
                        <Columns>
                            <asp:BoundColumn DataField="id" Visible='false'></asp:BoundColumn>
                            <asp:BoundColumn HeaderText="Property" DataField="property"></asp:BoundColumn>
                            <asp:BoundColumn HeaderText="Value" DataField="value"></asp:BoundColumn>
                        </Columns>
                        <AlternatingItemStyle  BackColor="#eeeeee" />
                    </asp:DataGrid>

                    FORM GOES HERE
                </span>
            </ItemTemplate>

</listview>

Link to comment
https://www.neowin.net/forum/topic/882866-c-aspnet-help-designing-something/
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.