Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Datagridview with combination of calculated fields and database fields

$
0
0
I'm in the process of creating an application for a manufacturing company. It will be run on a touchscreen at the production line. The user will scan a barcode that is an ID for the production run. At that point, a timer will start, and the screen will fill up with information (such as item number, description, cases per pallet layer, layers per pallet, etc.) I also display the time the production run started, and the estimated end time (based off of standard rate information in the database). This works great so far.

What I'd like to do is show a matrix with three columns - the layer #, the estimated end time for the pallet layer, and the actual end time for the pallet layer (which will initially be blank). A button will be pushed at the end of each layer that will record the time it was completed (this will be stored in a SQL database). The matrix on the windows form will reflect this information. I'd even like to do some sort of conditional formatting (maybe if the layer took longer than estimated it would be red, etc).

So, for a simple example, we'll say that the production run is for 100 cases. The rate is one case per minute. There are 10 cases per pallet layer. The run started at 7:04 am. The screen will show this information plus an estimated end time of 8:44 am (it will take 100 minutes to make 100 cases at a case per minute). The matrix would show that layer #1 is estimated to complete at 7:14, layer 2 at 7:24, layer 3 at 7:24, etc. When the user clicks the button, the matrix will be updated to show the time the layer completed.

The first thing that comes to mind is a datagridview. Is this the best choice, or should I look into something else? I know how to fill a datagridview with information from a database. However, I'm not sure how to go about filling the view with estimated times and layer #'s that will be calculated (these will not come from, or be stored in the database). Once I figure out how to fill that information into the datagridview (or whatever solution is recommended), I'll still have to base the last column of the datagridview off of a record in the database. Can I fill a datagridview with a combination of calculated fields and database fields?

Is there a better solution than datagridview, or does this make the most sense?

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>