M
mark stuart
Guest
Hi All,
This is my first time submitting a question, so please bear with me.
I'm a VB.NET novice, building my first multi-module WINFORM app. This first module I have to build tracks theme park pools and the daily readings of the pools element readings, such as temperature, pH, chlorine, copper, pool clarity, etc.
The user will enter these readings into a WinForm form, that would look like a spreadsheet, where the element readings are the column names and each row represents a pool and its reading. There are about 20 pools in this theme park.
Some cells would have to be editable - where they enter the reading - and some columns would be read only, such as: Pool ID, Pool Name, Pool Type.
The element readings are setup by the user, as are the pools. Each pool will have reading elements assigned to it, in a one pool to many elements relationship. Some pools readings will not have a particular element - eg: copper. In this example, this pools element reading is not required, but it maybe required in other pools.
On a WinForm, for the user to puts the elements in what ever order they would like. Same goes for the list of pools. The pools need to be in a certain order as they walk around the park taking the readings.
Each element reading is done once in the morning, and some readings (chlorine) are done every 3-4 hours in a day, 24 hours a day. So there would be 2 data entry forms. These pool readings would be navigable by the calendar day. So for the readings that have been entered prior to today, would have to be loaded into the grid for viewing. For a days reading that has not been entered yet, the app would present the user with a data entry form. I make the assumption the data entry and viewing form would be the same. This saves the developer on coding and maintenance of the app.
All data for this app are stored in SQL Server.
All table definitions for this app for the pools, reading elements, their sorted data, and transaction tables have been setup by myself.
ISSUE:
I've tried many different ways to load the DataGridView with the columns and have found one that works, but now I need to load the rows. Each rows cell data must match up with the already added columns.
This may not be the way to do it. I lack the expertise to code the loading of all this data into the DataGridView.
Hence the call for help to figure out how to load existing data entry records and also present the form ready for a new reading.
The SQL tables I have built already:
PoolElements:
1. ElementID PK
2. ElementName
3. Active
ElementReadingSeq:
1. ElementID PK
2. ReadingSeq
Pools:
1. PoolID PK
2. PoolName
3. PoolType (U, I)
PoolAssignedElements:
1. PoolID PK1
2. ElementID PK2
PoolReadingDaily:
1. ReadingDate PK1
2. PoolID PK2
3. ElementID PK3
4. PoolType
5. RangeLow
6. RangeHigh
7. ReadingValue
8. Comment
To load the grid columns, the ElementReadingSeq is read, joined to the PoolElements (by ElementID) to get the ElementName - the column name.
The Pools are read and loaded to the grid, matching the existing loaded columns.
The PoolReadingDaily table is then read to load the grid rows & cells, if there are any for the given date.
Thank you in advance,
Mark Stuart
Continue reading...
This is my first time submitting a question, so please bear with me.
I'm a VB.NET novice, building my first multi-module WINFORM app. This first module I have to build tracks theme park pools and the daily readings of the pools element readings, such as temperature, pH, chlorine, copper, pool clarity, etc.
The user will enter these readings into a WinForm form, that would look like a spreadsheet, where the element readings are the column names and each row represents a pool and its reading. There are about 20 pools in this theme park.
Some cells would have to be editable - where they enter the reading - and some columns would be read only, such as: Pool ID, Pool Name, Pool Type.
The element readings are setup by the user, as are the pools. Each pool will have reading elements assigned to it, in a one pool to many elements relationship. Some pools readings will not have a particular element - eg: copper. In this example, this pools element reading is not required, but it maybe required in other pools.
On a WinForm, for the user to puts the elements in what ever order they would like. Same goes for the list of pools. The pools need to be in a certain order as they walk around the park taking the readings.
Each element reading is done once in the morning, and some readings (chlorine) are done every 3-4 hours in a day, 24 hours a day. So there would be 2 data entry forms. These pool readings would be navigable by the calendar day. So for the readings that have been entered prior to today, would have to be loaded into the grid for viewing. For a days reading that has not been entered yet, the app would present the user with a data entry form. I make the assumption the data entry and viewing form would be the same. This saves the developer on coding and maintenance of the app.
All data for this app are stored in SQL Server.
All table definitions for this app for the pools, reading elements, their sorted data, and transaction tables have been setup by myself.
ISSUE:
I've tried many different ways to load the DataGridView with the columns and have found one that works, but now I need to load the rows. Each rows cell data must match up with the already added columns.
This may not be the way to do it. I lack the expertise to code the loading of all this data into the DataGridView.
Hence the call for help to figure out how to load existing data entry records and also present the form ready for a new reading.
The SQL tables I have built already:
PoolElements:
1. ElementID PK
2. ElementName
3. Active
ElementReadingSeq:
1. ElementID PK
2. ReadingSeq
Pools:
1. PoolID PK
2. PoolName
3. PoolType (U, I)
PoolAssignedElements:
1. PoolID PK1
2. ElementID PK2
PoolReadingDaily:
1. ReadingDate PK1
2. PoolID PK2
3. ElementID PK3
4. PoolType
5. RangeLow
6. RangeHigh
7. ReadingValue
8. Comment
To load the grid columns, the ElementReadingSeq is read, joined to the PoolElements (by ElementID) to get the ElementName - the column name.
The Pools are read and loaded to the grid, matching the existing loaded columns.
The PoolReadingDaily table is then read to load the grid rows & cells, if there are any for the given date.
Thank you in advance,
Mark Stuart
Continue reading...