public void DeselectVariable(SparqlVariable v) { if (SelectBuilder != null) { if (v != null && SelectedVariables.Contains(v)) { SelectedVariables.Remove(v); } } else { string msg = "Cannot deselect variables with non-SELECT query type."; throw new Exception(msg); } }
public override string[] ExportData() { DataTable dtNew = DataTable.CopyForExport(); //Get the response, treatment and covariate columns by removing all other columns from the new datatable foreach (string columnName in dtNew.GetVariableNames()) { if (!Responses.Contains(columnName) && !SelectedVariables.Contains(columnName)) { dtNew.Columns.Remove(columnName); } } string[] csvArray = dtNew.GetCSVArray(); //fix any columns with illegal chars here (at the end) ArgumentFormatter argFormatter = new ArgumentFormatter(); csvArray[0] = argFormatter.ConvertIllegalCharacters(csvArray[0]); return(csvArray); }
public bool IsSelectedVariable(SparqlVariable v) { return(v != null && SelectBuilder != null && SelectedVariables.Contains(v)); }
public override string[] ExportData() { DataTable dtNew = DataTable.CopyForExport(); //Get the response, treatment and covariate columns by removing all other columns from the new datatable if (!IncludeAllVariables) //ONLY if "include all variables" is not selected { foreach (string columnName in dtNew.GetVariableNames()) { if (Response != columnName && SubjectFactor != columnName && TimeFactor != columnName && (Responses == null || !Responses.Contains(columnName)) && (SelectedVariables == null || !SelectedVariables.Contains(columnName))) { dtNew.Columns.Remove(columnName); } } } string[] csvArray = dtNew.GetCSVArray(); //fix any columns with illegal chars here (at the end) ArgumentFormatter argFormatter = new ArgumentFormatter(); csvArray[0] = argFormatter.ConvertIllegalCharacters(csvArray[0]); return(csvArray); }