public void Delete(PvPdmhdr record) { var row = this.GetRowByRowId(record.rowID, string.Empty); if (row == null) { row = this.dataSet.ttblpv_pdmhdr.Newttblpv_pdmhdrRow(); PvPdmhdr.BuildMinimalRow(ref row, record); this.dataSet.ttblpv_pdmhdr.Addttblpv_pdmhdrRow((pdspv_pdmhdrDataSet.ttblpv_pdmhdrRow)row); } row.Delete(); this.SaveChanges(); }