Пример #1
0
        protected void WriteSettingsToDataTableProperties(DataTable dt, ResultSetComparisonSettings settings)
        {
            foreach (DataColumn column in dt.Columns)
            {
                if (column.ExtendedProperties.ContainsKey("NBi::Role"))
                {
                    column.ExtendedProperties["NBi::Role"] = settings.GetColumnRole(column.Ordinal);
                }
                else
                {
                    column.ExtendedProperties.Add("NBi::Role", settings.GetColumnRole(column.Ordinal));
                }

                if (column.ExtendedProperties.ContainsKey("NBi::Type"))
                {
                    column.ExtendedProperties["NBi::Type"] = settings.GetColumnType(column.Ordinal);
                }
                else
                {
                    column.ExtendedProperties.Add("NBi::Type", settings.GetColumnType(column.Ordinal));
                }

                if (column.ExtendedProperties.ContainsKey("NBi::Tolerance"))
                {
                    column.ExtendedProperties["NBi::Tolerance"] = settings.GetTolerance(column.Ordinal);
                }
                else
                {
                    column.ExtendedProperties.Add("NBi::Tolerance", settings.GetTolerance(column.Ordinal));
                }

                if (column.ExtendedProperties.ContainsKey("NBi::Rounding"))
                {
                    column.ExtendedProperties["NBi::Rounding"] = settings.GetRounding(column.Ordinal);
                }
                else
                {
                    column.ExtendedProperties.Add("NBi::Rounding", settings.GetRounding(column.Ordinal));
                }
            }
        }
Пример #2
0
        protected void WriteSettingsToDataTableProperties(DataTable dt, ResultSetComparisonSettings settings)
        {
            foreach (DataColumn column in dt.Columns)
            {
                if (column.ExtendedProperties.ContainsKey("NBi::Role"))
                    column.ExtendedProperties["NBi::Role"] = settings.GetColumnRole(column.Ordinal);
                else
                    column.ExtendedProperties.Add("NBi::Role", settings.GetColumnRole(column.Ordinal));

                if (column.ExtendedProperties.ContainsKey("NBi::Type"))
                    column.ExtendedProperties["NBi::Type"] = settings.GetColumnType(column.Ordinal);
                else
                    column.ExtendedProperties.Add("NBi::Type", settings.GetColumnType(column.Ordinal));

                if (column.ExtendedProperties.ContainsKey("NBi::Tolerance"))
                    column.ExtendedProperties["NBi::Tolerance"] = settings.GetTolerance(column.Ordinal);
                else
                    column.ExtendedProperties.Add("NBi::Tolerance", settings.GetTolerance(column.Ordinal));

                if (column.ExtendedProperties.ContainsKey("NBi::Rounding"))
                    column.ExtendedProperties["NBi::Rounding"] = settings.GetRounding(column.Ordinal);
                else
                    column.ExtendedProperties.Add("NBi::Rounding", settings.GetRounding(column.Ordinal));
            }
        }