public void delete() { int contentId = SqlHelper.ExecuteScalar <int>("Select contentNodeId from cmsPropertyData where Id = " + _id); SqlHelper.ExecuteNonQuery("Delete from cmsPropertyData where PropertyTypeId =" + _pt.Id + " And contentNodeId = " + contentId); _data.Delete(); }
public void delete() { int contentId = int.Parse(Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(_connstring, CommandType.Text, "Select contentNodeId from cmsPropertyData where Id = " + _id).ToString()); Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(_connstring, CommandType.Text, "Delete from cmsPropertyData where PropertyTypeId =" + _pt.Id + " And contentNodeId = " + contentId); _data.Delete(); }
public void delete() { using (var sqlHelper = Application.SqlHelper) { int contentId = sqlHelper.ExecuteScalar <int>("Select contentNodeId from cmsPropertyData where Id = " + _id); sqlHelper.ExecuteNonQuery("Delete from cmsPropertyData where PropertyTypeId =" + _pt.Id + " And contentNodeId = " + contentId); _data.Delete(); } }