Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have to write a rather small project quickly, and I am trying to keep every clean and OO. I am fairly new to .NET. I'd like your comments on my proposed solution.

 

Request:

Display a list of summary information (hospitals) with some columns of information next to each one. The columns represent how many database records are present, and some other math is done is show statistics of parts based on whole. No record detail is needed, just summary information about the records.

 

Example:

Hospital | totals records | type A records | type B records | % of records that are type A | % of records that are type B

Walter Reed Hospital | 100 | 10 | 90 | 10% | 90%

 

I then need to click on the hospital and get the department detail with the same columns, but (obviously) just for that department.

 

The data that is being given to me (from an outside product - I have no choice in the design) has 20 tables. 1 table each for the hospital and record type (A or B). 10 hospitals, 2 record types = 20 tables. I am creating my own tables with the hospital and department names.

 

I have the detailed numbers but I need to calculate the percentages.

 

Proposed Solution:

Write 2 methods to return the summary information and detail information. The Summary method will return all of the records from the hospital table joined with its data and the calculated percentages. The detail method will take in the hospital number and return all of the records - again with all of the appropriate columns.

 

As I typed this out I realized that I am not sure if I should return a dataset from each method or an array/array list. Even though my database has 4 columns of data, my presentation layer has to display more than 4 columns. It also has to display my calculated percentages.

 

Thanks,

Patrick

Posted

 

I then need to click on the hospital and get the department detail with the same columns, but (obviously) just for that department.

 

A datagrid will do this.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...