/// <summary> /// Get path (list of table in path) go to the table /// </summary> /// <param name="tableName">Name of table</param> /// <returns>Ex: [Employee][History]</returns> public List <string> GetPath(string tableName) { List <string> path = new List <string>(); tableName = string.Format(BaseConstants.ProntoDocMarkup.FieldFormat, tableName).Trim(); if (Matrix.ContainsKey(tableName)) { List <long> row = Matrix[tableName]; int i = 0; for (int index = 0; index < row.Count; index++) { long relation = row[index]; while (relation != 0) { i += 1; if (relation % 2 == 1) { path.Add(BaseMarkupUtilities.XmlEncode(TableNames[i - 1])); } relation = BitHelper.ShiftRight(relation, 1); } } } return(path); }
public List <string> GetSelectedTabledOfPath(string tableName) { if (SelectedTables != null) { foreach (List <string> path in SelectedTables) { if (path != null && BaseMarkupUtilities.IsExistOnList(path, tableName)) { return(path); } } } return(GetAllSelectedTables()); }
public List <string> GetAllSelectedTables() { List <string> selectedTables = new List <string>(); if (SelectedTables != null) { foreach (List <string> path in SelectedTables) { if (path != null) { foreach (string table in path) { if (!BaseMarkupUtilities.IsExistOnList(selectedTables, table)) { selectedTables.Add(table); } } } } } return(selectedTables); }