我已经向DevExpress询问了这个问题,他们告诉我,我的代码存在问题,涉及从DevExpress Gridview中删除一行。基本上,我有一个VB代码隐藏例程:
n
其中 UnscheduledReviewDelete(StatusID)从数据层Reviews.vb类调用公共共享子,后者又执行SQL存储过程以删除所选记录。
评论中的子程序是:
Protected Sub ASPxGridViewUnscheduledReviews_RowDeleting(ByVal sender As Object, ByVal e As DevExpress.Web.Data.ASPxDataDeletingEventArgs) Handles ASPxGridViewUnscheduledReviews.RowDeleting
'Dim aspxGridView As ASPxGridView = sender
Dim StatusID As Integer = CType(e.Keys("AcrStatusID"), Integer)
'delete row from ACRStatus table where AcrStatusID = StatusID
Try
lblMessage.Text = String.Empty
'Dim bl As New CYCIS_BL.Reviews
CYCIS_DL.Reviews.**UnscheduledReviewDelete(StatusID)**
Response.Redirect("ACR_RemoveUnSchReview.aspx")
Catch ex As Exception
lblMessage.Text = ex.Message
End Try
End Sub
我已经多次保存,构建和重建了类文件和解决方案。然而,每次构建解决方案时,编译器都会抛出同样的错误,而Review类的动态元数据会显示除上述例程之外的所有例程和函数。为什么它没有将子例程识别为Reviews类的一部分?