Protected Sub btnDelete_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnDelete.Click Dim i As Integer Dim result As DataSet Dim hypID As HyperLink Dim chkRemove As New CheckBox Dim clsPath As New Path() Try For i = 0 To grdPath.Rows.Count - 1 chkRemove = DirectCast(grdPath.Rows(i).FindControl("chkRemove"), CheckBox) hypID = DirectCast(grdPath.Rows(i).FindControl("hypID"), HyperLink) If chkRemove.Checked Then result = clsPath.getComparedPathID(chkRemove.Text) End If Next i lblErrorMessage.Text = "Paths delete successfully." BindGrid("%", "%", drpArea.SelectedValue, drpType.SelectedValue) Catch ex As Exception lblErrorMessage.Text = ex.Message End Try End Sub
Public Function getComparedPathID(ByVal DeletePathID As String) As DataSet Dim DHHConn As New DRConnection("", "") Dim ds As DataSet Try ds = DHHConn.RunSPReturnDS("sp_Path_ID", New SqlParameter("@M_C", DeletePathID)) Return ds Catch ex As Exception LogManager.WriteLog(ex.Message) Throw New Exception(ex.Message) Finally DHHConn.CloseConnection() End Try End Function
Dim DHHConn As New DRConnection("", "DHHConn")
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)