Exemplo n.º 1
0
 /// <summary>
 /// Invokes the relation editor.
 /// </summary>
 /// <returns><b>true</b> if relation was modified.</returns>
 public bool InvokeEditor()
 {
     using (RelationEditorForm form = new RelationEditorForm(this))
     {
         return(form.ShowDialog() == DialogResult.OK);
     }
 }
Exemplo n.º 2
0
        private void miNewRelation_Click(object sender, EventArgs e)
        {
            Relation relation = new Relation();

            FReport.Dictionary.Relations.Add(relation);
            using (RelationEditorForm form = new RelationEditorForm(relation))
            {
                if (form.ShowDialog() == DialogResult.OK)
                {
                    relation.Name = FReport.Dictionary.CreateUniqueName(relation.ParentDataSource.Name + "_" +
                                                                        relation.ChildDataSource.Name);
                    UpdateTree();
                    Change();
                }
                else
                {
                    relation.Dispose();
                }
            }
        }