Ejemplo n.º 1
0
        private void EditRelation_Click(object sender, System.EventArgs e)
        {
            if (listView2.SelectedItems.Count != 0)
            {
                ActiveRecordPropertyRelationDescriptor prop = listView2.SelectedItems[0].Tag as ActiveRecordPropertyRelationDescriptor;

                using (EditRelationDialog editDlg = new EditRelationDialog(_descriptor, _project, prop))
                {
                    if (editDlg.ShowDialog(this) == DialogResult.OK)
                    {
                        _descriptor.PropertiesRelations.Remove(prop);

                        FillClassRelationships(_descriptor);
                    }
                }
            }
            else
            {
                MessageBox.Show(this.Owner, "Select an existing relationship first.");
            }
        }
		private void EditRelation_Click(object sender, System.EventArgs e)
		{
			if (listView2.SelectedItems.Count != 0)
			{
				ActiveRecordPropertyRelationDescriptor prop = listView2.SelectedItems[0].Tag as ActiveRecordPropertyRelationDescriptor;

				using(EditRelationDialog editDlg = new EditRelationDialog(_descriptor, _project, prop))
				{
					if (editDlg.ShowDialog( this ) == DialogResult.OK)
					{
						_descriptor.PropertiesRelations.Remove(prop);

						FillClassRelationships( _descriptor );
					}
				}
			}
			else
			{
				MessageBox.Show(this.Owner, "Select an existing relationship first.");
			}
		}