now here is a problem with me that how can I enter the current date in gridview. And when i sell the stock I can add it in TOTAL but when the next day will come the records will insert in next row then i want to add the sell record of the day agian in total for that day only in other words day by day record of sell stock will add in "total"(only for sell stock of the day).
One option is to set the default value in the database column to be todays date for all new records.
Another possibility is to set a default value on the DataTable
with something like: <<DataTable>>.Columns["Date"].DefaultValue = System.DateTime.Today
. The disadvantage of the default value on the DataTable
is you need to be careful to update the default value if the application runs over midnight
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With