public void Delete(PvPdmline record) { var row = this.GetRowByRowId(record.rowID, string.Empty); if (row == null) { row = this.dataSet.ttblpv_pdmline.Newttblpv_pdmlineRow(); PvPdmline.BuildMinimalRow(ref row, record); this.dataSet.ttblpv_pdmline.Addttblpv_pdmlineRow((pdspv_pdmlineDataSet.ttblpv_pdmlineRow)row); } row.Delete(); this.SaveChanges(); }