public void Delete(PvSapbq record) { var row = this.GetRowByRowId(record.rowID, string.Empty); if (row == null) { row = this.dataSet.ttblpv_sapbq.Newttblpv_sapbqRow(); PvSapbq.BuildMinimalRow(ref row, record); this.dataSet.ttblpv_sapbq.Addttblpv_sapbqRow((pdspv_sapbqDataSet.ttblpv_sapbqRow)row); } row.Delete(); this.SaveChanges(); }