public DataView CreateDataView(DataTable table) { if (dataSet == null) throw ExceptionBuilder.CanNotUseDataViewManager(); DataView dataView = new DataView(table); dataView.SetDataViewManager(this); return dataView; }
public DataView CreateDataView(DataTable table) { if (this.dataSet == null) { throw ExceptionBuilder.CanNotUseDataViewManager(); } DataView view = new DataView(table); view.SetDataViewManager(this); return(view); }
PropertyDescriptorCollection System.ComponentModel.ITypedList.GetItemProperties(PropertyDescriptor[] listAccessors) { DataSet dataSet = DataSet; if (dataSet == null) throw ExceptionBuilder.CanNotUseDataViewManager(); if (listAccessors == null || listAccessors.Length == 0) { return((ICustomTypeDescriptor)(new DataViewManagerListItemTypeDescriptor(this))).GetProperties(); } else { DataTable table = dataSet.FindTable(null, listAccessors, 0); if (table != null) { return table.GetPropertyDescriptorCollection(null); } } return new PropertyDescriptorCollection(null); }
/* string IBindingList.GetListName() { return ((System.Data.ITypedList)this).GetListName(null); } string IBindingList.GetListName(PropertyDescriptor[] listAccessors) { return ((System.Data.ITypedList)this).GetListName(listAccessors); } */ // Microsoft: GetListName and GetItemProperties almost the same in DataView and DataViewManager string System.ComponentModel.ITypedList.GetListName(PropertyDescriptor[] listAccessors) { DataSet dataSet = DataSet; if (dataSet == null) throw ExceptionBuilder.CanNotUseDataViewManager(); if (listAccessors == null || listAccessors.Length == 0) { return dataSet.DataSetName; } else { DataTable table = dataSet.FindTable(null, listAccessors, 0); if (table != null) { return table.TableName; } } return String.Empty; }
string ITypedList.GetListName(PropertyDescriptor[] listAccessors) { System.Data.DataSet dataSet = this.DataSet; if (dataSet == null) { throw ExceptionBuilder.CanNotUseDataViewManager(); } if ((listAccessors == null) || (listAccessors.Length == 0)) { return(dataSet.DataSetName); } DataTable table = dataSet.FindTable(null, listAccessors, 0); if (table != null) { return(table.TableName); } return(string.Empty); }
PropertyDescriptorCollection ITypedList.GetItemProperties(PropertyDescriptor[] listAccessors) { System.Data.DataSet dataSet = this.DataSet; if (dataSet == null) { throw ExceptionBuilder.CanNotUseDataViewManager(); } if ((listAccessors == null) || (listAccessors.Length == 0)) { return(((ICustomTypeDescriptor) new DataViewManagerListItemTypeDescriptor(this)).GetProperties()); } DataTable table = dataSet.FindTable(null, listAccessors, 0); if (table != null) { return(table.GetPropertyDescriptorCollection(null)); } return(new PropertyDescriptorCollection(null)); }