Click here to Skip to main content
15,354,542 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a data entry web application that acts as a control manager deciding which other webforms to invoke. Typically, these are different data entry webforms for some other applications.

I would like to shift the existing business logic from backend C# code to stored procedures in database (Oracle). Additionally, I would also like to store the controls'(ie textbox, label) properties (ie x-coordinate, y-coordinate, width, height) in the database such that they are painted on run-time on to the webform based on users selection . For example, if a user selects "Product" then the set of controls relating to Product information is printed. If user selects "Employee" then set of controls relating to Employee is painted.

I forsee some problems such as re-painting of controls on each postback, incurring addtional database calls to retrieve the controls' properties, caching of controls' state in web server would potentially be huge if there are multiple controls and users.

Is there a better design to such an approach? Appreciate some opinions. Thank you.
Posted
Updated 22-Aug-10 20:59pm
v2

1 solution

The only reason to store the position of controls in the DB, is to make a system where people can design their own forms. The other issue is, such a system would probably result in forms with absolute positioning, losing HTML's ability to flow for different size screens. Perhaps you could tell us what the benefit is that you expect to get from this ? Either way, you could store the positions on first load and not read them again on postback.
   
Comments
ronbutan 23-Aug-10 5:37am
   
The aim of such a design was actually to eradicate the need for designing and storing muliple data insertion forms for different entities (ie Employee data entry form, Product data entry form). In this case, we will need just one form with controls painted dynamically and upon data insertion, make use of the ID property of each control to determine which database to insert into (ie txtName_Product == Product database, txtName_Employee == Employee)

The information for the controls properties will be pre-loaded by another application or by a DBA.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900