private void Foreign_Keys_Call() { List <Tuple <string, string, string, string> > fkRelations = ForeignKeyMappingAlgo.CalculateForeignKeys(_masterListRelations); // Remove Duplicates List <Tuple <string, string> > foreign_Keys = new List <Tuple <string, string> >(); foreach (Tuple <string, string, string, string> tup in fkRelations) { bool found = false; foreach (Tuple <string, string> innerTup in foreign_Keys) { if ((innerTup.Item1 == tup.Item1 && innerTup.Item2 == tup.Item2) || (innerTup.Item2 == tup.Item1 && innerTup.Item1 == tup.Item2)) { found = true; } } if (!found) { Tuple <string, string> newTup = new Tuple <string, string>(tup.Item1, tup.Item2); foreign_Keys.Add(newTup); } } ForeignKeyUserResolutionForm newForm = new ForeignKeyUserResolutionForm(foreign_Keys); newForm.ShowDialog(); foreignKeyRelations = newForm.foreignKeyRel; }
private void Foreign_Keys_Call() { List<Tuple<string, string, string, string>> fkRelations = ForeignKeyMappingAlgo.CalculateForeignKeys(_masterListRelations); // Remove Duplicates List<Tuple<string, string>> foreign_Keys = new List<Tuple<string, string>>(); foreach(Tuple<string, string, string, string> tup in fkRelations) { bool found = false; foreach(Tuple<string, string> innerTup in foreign_Keys) { if((innerTup.Item1 == tup.Item1 && innerTup.Item2 == tup.Item2)|| (innerTup.Item2 == tup.Item1 && innerTup.Item1 == tup.Item2)) { found = true; } } if(!found) { Tuple<string, string> newTup = new Tuple<string, string>(tup.Item1, tup.Item2); foreign_Keys.Add(newTup); } } ForeignKeyUserResolutionForm newForm = new ForeignKeyUserResolutionForm(foreign_Keys); newForm.ShowDialog(); foreignKeyRelations = newForm.foreignKeyRel; }