/// <summary> /// Returns the field of type <typeparamref name="T" /> defined in the analysis whose named can be found /// in the column <c>PivotResult.DATA_FIELD_NAME</c> from the given <paramref name="row" /> /// </summary> /// <typeparam name="T"></typeparam> /// <param name="row">Current row from which the field name should be taken</param> protected T DataField <T>(DataRow row) where T : class { var fieldName = row.StringAt(_dataColumnName); var field = _analysis.FieldByName(fieldName) as T; if (field == null) { throw new PKSimException(PKSimConstants.Error.NoDataFieldFoundFor(fieldName)); } return(field); }
public string FieldCaptionFor(string fieldName) { var numericField = _populationPivotAnalysis.FieldByName(fieldName) as INumericValueField; return(numericField == null ? fieldName : Constants.NameWithUnitFor(fieldName, numericField.DisplayUnit)); }