当前在我们的公司管理系统中,存在在批量生产之前为“ MarketTrial”打上时间戳的错误。
在“ MarketTrial详细信息”下,用户可以在通过“插入”链接按钮提交输入表单之前,编辑尺寸,设置,部分。我还想补充一点,当选择大小时,这也会自动编辑“结束日期”
选择“插入”链接按钮后,此日期将在“ MartketTrial详细信息”下加盖时间戳,但我的意图是,在市场试用详细信息和其他数据之后选择“批量提交”之前,不应加盖此日期。输入字段在整个表单中完成。
下面是“插入”链接按钮的代码
Protected Sub Insert_Click(ByVal sender As Object,ByVal e As System.EventArgs)
Dim strEDate As String
With odMarketTrial
.InsertParameters("Row").Defaultvalue = CType(gvmtrial.FooterRow.FindControl("lblRowInsert"),Label).Text
.InsertParameters("Size").Defaultvalue = CType(gvmtrial.FooterRow.FindControl("txtSizeEditF"),TextBox).Text
.InsertParameters("Sets").Defaultvalue = CType(gvmtrial.FooterRow.FindControl("ddSetsInsert"),DropDownList).SelectedValue
.InsertParameters("Sections").Defaultvalue = CType(gvmtrial.FooterRow.FindControl("ddSectionsInsert"),DropDownList).SelectedValue
.InsertParameters("Type").Defaultvalue = CType(gvmtrial.FooterRow.FindControl("ddType"),DropDownList).SelectedValue
.InsertParameters("EndDate").Defaultvalue = CType(gvmtrial.FooterRow.FindControl("txtEndDateInsert"),TextBox).Text
strEDate = CType(gvmtrial.FooterRow.FindControl("txtEndDateInsert"),TextBox).Text
If strEDate = "" Or Not IsDate(strEDate ) Or (DateTime.Compare(Now,strEDate ) > 0) Then
'If CType(gvmtrial.FooterRow.FindControl("txtEndDateInsert"),TextBox).Text = "" Then
lblRequestedDateError.Visible = True
lblRequestedDateError.ForeColor = Drawing.Color.Red
'ElseIf isValidDate(CType(gvmtrial.FooterRow.FindControl("txtEndDateInsert"),TextBox).Text) Then
Else
lblendDateError.Visible = False
lblendDateError.ForeColor = Drawing.Color.Red
End If
If lblDRFStatus.Text = "" Then
.InsertParameters("LBSStatus").Defaultvalue = "0 -"
Else
.InsertParameters("LBSStatus").Defaultvalue = lblLBSStatus.Text
End If
.Insert()
End With
Session.Add("Redirect","LBS")
LBS_action()
End Sub
因此,我想知道如何将“ EndDate”的数据条目从“插入”传输到“大量提交”,因为到目前为止我的主要障碍是,一旦单击“插入”,数据就不会提交为'txtEndDateInsert'中没有日期