public bool Delete_ItemsRecords(string catID) { SqlCommand cmd_ItemsList = new SqlCommand(); cmd_ItemsList.CommandText = "[VRM].[DELETE_ItemsRecords]"; cmd_ItemsList.CommandType = CommandType.StoredProcedure; cmd_ItemsList.Parameters.Clear(); SqlParameter sqlParaCatID = new SqlParameter("@catID", SqlDbType.VarChar, 10); sqlParaCatID.Value = catID; cmd_CriticalTermsList.Parameters.Add(sqlParaCatID); return executeNotQuery(cmd_ItemsList); }
ALTER PROCEDURE [OS].[DELETE_ItemsRecords] @catID varchar(10)ASBEGIN DELETE FROM OS.Items WHERE catID = @catIDEND
protected void gvItems_RowDeleting(object sender, GridViewDeleteEventArgs e) { vrmdb.Delete_ItemsRecords(gvItems.DataKeys[e.RowIndex].Values[0].ToString()); BindGrid(true);}