如何根据文本框的值添加日期?
这是我的代码,它在数据库上多次插入并更改日期的日期 基于txtLedays。
For i As Integer = 1 To txtLeDays.Text
Dim currentDate As DateTime = dtpLeDate.Value
currentDate.AddDays(i)
Dim message As String = "Schedule Save Complete"
query = "Insert Into tbldtr(Empid,Empname,department,empdate)values('" & txtLeID.Text & "', '" & txtEmpName.Text & "','" & txtDept.Text & "','" & currentDate & "')"
dbEdit(query, message)
frmSchedule.dgvSched.Rows.Clear()
frmSchedule.generateSched()
Next i
例如:
如果输入2在txtLedays上输出应该是这样的
但我的问题是日期没有改变