public imbAttribute(templateFieldDataTable _reportingField, Object value) { name = imbAttributeName.DataTableExport.ToString(); nameEnum = imbAttributeName.DataTableExport; objMsg = _reportingField; // = imbAttributeName.DataTableExport; objExtra = value; }
/// <summary> /// Initializes a new instance of the <see cref="imbAttribute"/> class. /// </summary> /// <param name="column_option">The column option.</param> /// <param name="setting_value">The setting value.</param> public imbAttribute(imbAttributeName _name, templateFieldDataTable column_option, String setting_value) { nameEnum = imbAttributeName.DataTableExport; name = nameEnum.ToString(); objExtra = setting_value; objMsg = column_option; }
public DataRowMetaDefinition Add(DataRowInReportTypeEnum type, templateFieldDataTable cellSource) { var output = new DataRowMetaDefinition(type, cellSource); Add(type, output); return(output); }
public static DataColumn SetField <T>(this DataColumn dc, templateFieldDataTable field, T data) { if (dc.ExtendedProperties.ContainsKey(field)) { dc.ExtendedProperties[field] = data; } else { dc.ExtendedProperties.add(field, data); } return(dc); }
public static T GetField <T>(this DataColumn dc, templateFieldDataTable field, T defaultData = null) where T : class { if (!dc.ExtendedProperties.ContainsKey(field)) { return(defaultData); } else if (dc.ExtendedProperties[field] is T properType) { return(properType); } else { return(defaultData); } }
/// <summary> /// Deploys values according to values found in attributes /// </summary> /// <param name="propAttributes">The property attributes.</param> public void deployAttributes(Object[] propAttributes) { foreach (Object propAtt in propAttributes) { descAttribute = propAtt as DescriptionAttribute; if (descAttribute != null) { description = descAttribute.Description; } displayNameAttribute = propAtt as DisplayNameAttribute; if (displayNameAttribute != null) { displayName = displayNameAttribute.DisplayName; } catAttribute = propAtt as CategoryAttribute; if (catAttribute != null) { categoryName = catAttribute.Category.ToUpper(); if (categoryName.Contains(",")) { groups.AddRange(categoryName.getStringTokens()); } else { groups.Add(categoryName); } } if (propAtt is DisplayAttribute) { DisplayAttribute displayAttribute_DisplayAttribute = (DisplayAttribute)propAtt; description += displayAttribute_DisplayAttribute.Description.toStringSafe(""); displayName = displayAttribute_DisplayAttribute.Name.toStringSafe(displayName); letter = displayAttribute_DisplayAttribute.ShortName.toStringSafe(letter); // priority = (int)displayAttribute_DisplayAttribute.Order; categoryName = displayAttribute_DisplayAttribute.GroupName.toStringSafe(categoryName); } if (propAtt is RangeAttribute) { RangeAttribute rng = (RangeAttribute)propAtt; range_defined = true; range_min = Convert.ToDouble((object)rng.Minimum); range_max = Convert.ToDouble((object)rng.Maximum); } if (propAtt is DisplayFormatAttribute) { DisplayFormatAttribute dFormat = (DisplayFormatAttribute)propAtt; escapeValueString = dFormat.HtmlEncode; format = dFormat.DataFormatString; } if (propAtt is DisplayColumnAttribute) { DisplayColumnAttribute dColumn = (DisplayColumnAttribute)propAtt; displayName = dColumn.DisplayColumn; } if (propAtt is XmlIgnoreAttribute) { IsXmlIgnore = true; } if (propAtt is imbAttribute imbAt) { switch (imbAt.nameEnum) { case imbAttributeName.DataTableExport: templateFieldDataTable dtc = (templateFieldDataTable)imbAt.objMsg; Object dtc_val = imbAt.objExtra; deploy(dtc, dtc_val); //propAtt_imbAttribute.objExtra break; case imbAttributeName.reporting_aggregation: aggregation[(dataPointAggregationAspect)imbAt.objExtra] = (dataPointAggregationType)imbAt.objMsg; break; } deploy(imbAt.nameEnum, imbAt.getMessage().toStringSafe()); if (!attributes.ContainsKey(imbAt.nameEnum)) { attributes.Add(imbAt.nameEnum, imbAt); } else { } } } }
/// <summary> /// Deploys the specified <c>dtc_val</c> value, according to <c>dtc</c> property /// </summary> /// <param name="dtc">The DTC.</param> /// <param name="dtc_val">The DTC value.</param> public void deploy(templateFieldDataTable dtc, Object dtc_val) { switch (dtc) { case templateFieldDataTable.categoryPriority: break; case templateFieldDataTable.col_alignment: Alignment = (textCursorZoneCorner)dtc_val; break; case templateFieldDataTable.col_attributes: break; case templateFieldDataTable.col_caption: displayName = dtc_val.toStringSafe(displayName); break; case templateFieldDataTable.col_color: color = dtc_val.toStringSafe(color); break; case templateFieldDataTable.col_textColor: textColor = dtc_val.toStringSafe(textColor); break; case templateFieldDataTable.col_desc: description = dtc_val.toStringSafe(description); break; case templateFieldDataTable.col_directAppend: escapeValueString = false; break; case templateFieldDataTable.col_even: break; case templateFieldDataTable.col_expression: expression = dtc_val.toStringSafe(expression); break; case templateFieldDataTable.col_format: format = dtc_val.toStringSafe(format); break; case templateFieldDataTable.col_group: categoryName = dtc_val.toStringSafe(categoryName); break; case templateFieldDataTable.col_hasLinks: escapeValueString = false; break; case templateFieldDataTable.col_hasTemplate: break; case templateFieldDataTable.col_id: name = dtc_val.toStringSafe(name); break; case templateFieldDataTable.col_imbattributes: break; case templateFieldDataTable.col_importance: importance = (dataPointImportance)dtc_val; break; case templateFieldDataTable.col_letter: letter = dtc_val.toStringSafe(letter); break; case templateFieldDataTable.col_name: name = dtc_val.toStringSafe(name); break; case templateFieldDataTable.col_nameClean: break; case templateFieldDataTable.col_namePrefix: break; case templateFieldDataTable.col_pe: break; case templateFieldDataTable.col_priority: priority = dtc_val.imbToNumber <Int32>(); break; case templateFieldDataTable.col_propertyInfo: break; case templateFieldDataTable.col_rel: break; case templateFieldDataTable.col_spe: break; case templateFieldDataTable.col_type: break; case templateFieldDataTable.col_unit: unit = dtc_val.toStringSafe(unit); break; case templateFieldDataTable.col_width: width = dtc_val.imbToNumber <Int32>(); break; case templateFieldDataTable.columnEncodeMode: break; case templateFieldDataTable.columns: break; case templateFieldDataTable.columnWidth: width = dtc_val.imbToNumber <Int32>(); break; case templateFieldDataTable.columnWrapTag: break; case templateFieldDataTable.count_format: break; case templateFieldDataTable.data_accesslist: break; case templateFieldDataTable.data_additional: break; case templateFieldDataTable.data_aggregation_type: break; case templateFieldDataTable.data_columncount: break; case templateFieldDataTable.data_dbengine: break; case templateFieldDataTable.data_dbhost: break; case templateFieldDataTable.data_dbname: break; case templateFieldDataTable.data_dbuser: break; case templateFieldDataTable.data_origin_count: break; case templateFieldDataTable.data_origin_type: break; case templateFieldDataTable.data_query: if (dtc_val is Func <Object, String> func) { FuncRenderQuery = func; } break; case templateFieldDataTable.data_rowcountselected: break; case templateFieldDataTable.data_rowcounttotal: break; case templateFieldDataTable.data_table: break; case templateFieldDataTable.data_tabledesc: break; case templateFieldDataTable.data_tablename: break; case templateFieldDataTable.data_tablenamedb: break; case templateFieldDataTable.data_tablescount: break; case templateFieldDataTable.description: description = dtc_val.toStringSafe(description); break; case templateFieldDataTable.renderEmptySpace: break; case templateFieldDataTable.row_data: break; case templateFieldDataTable.row_even: break; case templateFieldDataTable.row_id: break; case templateFieldDataTable.shema_classname: break; case templateFieldDataTable.shema_dbcount: break; case templateFieldDataTable.shema_dictionary: break; case templateFieldDataTable.shema_sourceinstance: break; case templateFieldDataTable.shema_sourcename: break; case templateFieldDataTable.table_extraDesc: break; case templateFieldDataTable.table_metacolumns: break; case templateFieldDataTable.table_metarows: break; case templateFieldDataTable.title: displayName = dtc_val.toStringSafe(displayName); break; default: throw new NotImplementedException("This templateField [" + dtc + "] is not yet supported"); break; } }
/// <summary> /// Setting dsa_dataField argument /// </summary> /// <param name="dataField">Value for dsa_dataField</param> /// <returns>Instruction</returns> public docScriptInstruction arg(templateFieldDataTable dataField) { this.add(docScriptArguments.dsa_dataField, dataField); return(this); }
public DataRowMetaDefinition(DataRowInReportTypeEnum __rowType, templateFieldDataTable __cellDataSource) { rowType = __rowType; cellDataSource = __cellDataSource; }
/// <summary> /// Adds row with extra information /// </summary> /// <param name="dt">The dt.</param> /// <param name="columnInfo">The column information.</param> /// <param name="widthLimit">The width limit.</param> /// <returns></returns> public static DataRow AddExtraRowInfo(this DataTable dt, templateFieldDataTable columnInfo, int widthLimit = 25) { return(dt.AddExtraRow(columnInfo, widthLimit)); }
/// <summary> /// Adds row with extra information /// </summary> /// <param name="dt">The dt.</param> /// <param name="columnInfo">The column information.</param> /// <param name="widthLimit">The width limit.</param> /// <returns></returns> public static DataRow AddExtraRow(this DataTable dt, templateFieldDataTable extra, int widthLimit = 25) => AddExtraRow(dt, (Enum)extra, widthLimit);