當前位置: 首頁>>代碼示例>>C#>>正文


C# DataTable.SetDataSet方法代碼示例

本文整理匯總了C#中System.Data.DataTable.SetDataSet方法的典型用法代碼示例。如果您正苦於以下問題:C# DataTable.SetDataSet方法的具體用法?C# DataTable.SetDataSet怎麽用?C# DataTable.SetDataSet使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.Data.DataTable的用法示例。


在下文中一共展示了DataTable.SetDataSet方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: BaseRemove

        /// <devdoc>
        /// Does verification on the table and it's name, and clears the table's dataSet pointer.
        /// An ArgumentNullException is thrown if this table is null.  An ArgumentException is thrown
        /// if this table doesn't belong to this collection or if this table is part of a relationship.
        /// </devdoc>
        private void BaseRemove(DataTable table) {
            if (CanRemove(table, true)) {
                UnregisterName(table.TableName);
                table.SetDataSet(null);

            }
            _list.Remove(table);
            dataSet.OnRemovedTable(table);
        }
開發者ID:iskiselev,項目名稱:JSIL.NetFramework,代碼行數:14,代碼來源:DataTableCollection.cs

示例2: BaseRemove

 private void BaseRemove(DataTable table)
 {
     if (this.CanRemove(table, true))
     {
         this.UnregisterName(table.TableName);
         table.SetDataSet(null);
     }
     this._list.Remove(table);
     this.dataSet.OnRemovedTable(table);
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:10,代碼來源:DataTableCollection.cs

示例3: BaseAdd

        /// <devdoc>
        /// Does verification on the table and it's name, and points the table at the dataSet that owns this collection.
        /// An ArgumentNullException is thrown if this table is null.  An ArgumentException is thrown if this table
        /// already belongs to this collection, belongs to another collection.
        /// A DuplicateNameException is thrown if this collection already has a table with the same
        /// name (case insensitive).
        /// </devdoc>
        private void BaseAdd(DataTable table) {
            if (table == null)
                throw ExceptionBuilder.ArgumentNull("table");
            if (table.DataSet == dataSet)
                throw ExceptionBuilder.TableAlreadyInTheDataSet();
            if (table.DataSet != null)
                throw ExceptionBuilder.TableAlreadyInOtherDataSet();

            if (table.TableName.Length == 0)
                table.TableName = AssignName();
            else {
                if (NamesEqual(table.TableName, dataSet.DataSetName, false, dataSet.Locale) != 0 && !table.fNestedInDataset)
                   throw ExceptionBuilder.DatasetConflictingName(dataSet.DataSetName);
                RegisterName(table.TableName, table.Namespace);
            }

            table.SetDataSet(dataSet);

            //must run thru the document incorporating the addition of this data table
            //must make sure there is no other schema component which have the same
            // identity as this table (for example, there must not be a table with the
            // same identity as a column in this schema.
        }
開發者ID:iskiselev,項目名稱:JSIL.NetFramework,代碼行數:30,代碼來源:DataTableCollection.cs

示例4: BaseAdd

 private void BaseAdd(DataTable table)
 {
     if (table == null)
     {
         throw ExceptionBuilder.ArgumentNull("table");
     }
     if (table.DataSet == this.dataSet)
     {
         throw ExceptionBuilder.TableAlreadyInTheDataSet();
     }
     if (table.DataSet != null)
     {
         throw ExceptionBuilder.TableAlreadyInOtherDataSet();
     }
     if (table.TableName.Length == 0)
     {
         table.TableName = this.AssignName();
     }
     else
     {
         if ((base.NamesEqual(table.TableName, this.dataSet.DataSetName, false, this.dataSet.Locale) != 0) && !table.fNestedInDataset)
         {
             throw ExceptionBuilder.DatasetConflictingName(this.dataSet.DataSetName);
         }
         this.RegisterName(table.TableName, table.Namespace);
     }
     table.SetDataSet(this.dataSet);
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:28,代碼來源:DataTableCollection.cs


注:本文中的System.Data.DataTable.SetDataSet方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。