public static void Execute(Person member = null, Person relative = null) { using (var dialog = new RelationCreator()) { dialog.memberSelector.SelectedPerson = member; dialog.relativeSelector.SelectedPerson = relative; if (dialog.ShowDialog() == DialogResult.Cancel) return; Program.Table<RelativeLink>().Rows.Add(new RelativeLink { Member = dialog.memberSelector.SelectedPerson, Relative = dialog.relativeSelector.SelectedPerson, RelationType = dialog.relationType.Text }); } }
public static void Execute(Person member = null, Person relative = null) { using (var dialog = new RelationCreator()) { dialog.memberSelector.SelectedPerson = member; dialog.relativeSelector.SelectedPerson = relative; if (dialog.ShowDialog() == DialogResult.Cancel) { return; } Program.Table <RelativeLink>().Rows.Add(new RelativeLink { Member = dialog.memberSelector.SelectedPerson, Relative = dialog.relativeSelector.SelectedPerson, RelationType = dialog.relationType.Text }); } }
private void addRLAsRelative_ItemClick(object sender, ItemClickEventArgs e) { RelationCreator.Execute(relative: person); relativesView.BestFitColumns(); }
private void addRelativeLink_ItemClick(object sender, ItemClickEventArgs e) { RelationCreator.Execute(); }