System.Data.Common.DataTableMapping.GetDataColumn(string, System.Type, System.Data.DataTable, System.Data.MissingMappingAction, System.Data.MissingSchemaAction)

Here are the examples of the csharp api class System.Data.Common.DataTableMapping.GetDataColumn(string, System.Type, System.Data.DataTable, System.Data.MissingMappingAction, System.Data.MissingSchemaAction) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

5 Examples 7

1. Example

Project: referencesource
Source File: DBCommandBuilder.cs
View license
private DataColumn GetDataColumn(string columnName, DataTableMapping tablemapping, DataRow row) {
            DataColumn column = null;
            if (!ADP.IsEmpty(columnName)) {
                column = tablemapping.GetDataColumn(columnName, null, row.Table, _missingMappingAction, MissingSchemaAction.Error);
            }
            return column;
        }

2. Example

Project: referencesource
Source File: DbDataAdapter.cs
View license
private void ParameterOutput(IDataParameter parameter, DataRow row, DataTableMapping mappings, MissingMappingAction missingMapping, MissingSchemaAction missingSchema) {
            if (0 != (ParameterDirection.Output & parameter.Direction)) {

                object value = parameter.Value;
                if (null != value) {
                    // null means default, meaning we leave the current DataRow value alone
                    string columnName = parameter.SourceColumn;
                    if (!ADP.IsEmpty(columnName)) {

                        DataColumn dataColumn = mappings.GetDataColumn(columnName, null, row.Table, missingMapping, missingSchema);
                        if (null != dataColumn) {
                            if (dataColumn.ReadOnly) {
                                try {
                                    dataColumn.ReadOnly = false;
                                    row[dataColumn] = value;
                                }
                                finally {
                                    dataColumn.ReadOnly = true;
                                }
                            }
                            else {
                                row[dataColumn] = value;
                            }
                        }
                    }
                }
            }
        }

3. Example

Project: referencesource
Source File: DbDataAdapter.cs
View license
private void ParameterInput(IDataParameterCollection parameters, StatementType typeIndex, DataRow ro/n ..... /n //View Source file for more details /n }

4. Example

Project: referencesource
Source File: SchemaMapping.cs
View license
private object[] SetupSchemaWithoutKeyInfo(MissingMappingAction mappingAction, MissingSchemaAction s/n ..... /n //View Source file for more details /n }

5. Example

Project: referencesource
Source File: SchemaMapping.cs
View license
private object[] SetupSchemaWithKeyInfo(MissingMappingAction mappingAction, MissingSchemaAction sche/n ..... /n //View Source file for more details /n }