I am doing a c# project and I have the following scenario:
I am working with visual studio and I have a winform which contains two combobox as shown in the screenshot.
The first is of months, the second is of years and a button by the side. I also have a table which contains two columns named date d(atatype small datetime) and price (varchar).
When the button is clicked I want that according to the month and year it checks the table and display the total sum of the column of price in a label.
Is that possible to do? I am not using any datagrid or anything dataview such type. I am using a label to display can I calculate and show the sum?
If you’re using an ADO.NET Entity Data Model then you could use this approach. Just tie the GetValues() method to either your button click event or a combo-box selection changed event.