Exemple #1
0
 public void Delete()
 {
     if (this.inDeletingEvent)
     {
         throw ExceptionBuilder.DeleteInRowDeleting();
     }
     if (this.newRecord != -1)
     {
         this._table.DeleteRow(this);
     }
 }
Exemple #2
0
        /// <include file='doc\DataRow.uex' path='docs/doc[@for="DataRow.Delete"]/*' />
        /// <devdoc>
        ///    <para>Deletes the row.</para>
        /// </devdoc>
        public void Delete()
        {
            if (inDeletingEvent)
            {
                throw ExceptionBuilder.DeleteInRowDeleting();
            }

            if (newRecord == -1)
            {
                return;
            }

            Table.DeleteRow(this);
        }