Start by converting yoru three textbox values to numbers: Decimal.TryParse Method (System) | Microsoft Docs
] will do it, and report errors to the user instead of continuing.
Then create and open your DB connection:
using (SqlConnection con = new SqlConnection(strConnect))
Inside the open connection, set up a loop:
will do, stopping when the
is greater than the
Inside the loop, create an an
object (with a
block as above) and pass the two times to the DB as a parameterized query. If necessary, pass the
value each time (though I'd make it an IDENTITY field in the DB, so SQL handles all that) Increment the
Easy to do - just give it a try manually and you will see what I mean.