コード例 #1
0
        public override void Execute()
        {
            base.Execute();

            if (_catalogueIfKnown == null)
            {
                PickCatalogueAndLaunchForTableInfo(_lookupTableInfoIfKnown);
            }
            else
            {
                Activator.ActivateLookupConfiguration(this, _catalogueIfKnown, _lookupTableInfoIfKnown);
            }
        }
コード例 #2
0
        private void PickCatalogueAndLaunchForTableInfo(TableInfo tbl)
        {
            try
            {
                var dr = MessageBox.Show(
                    @"You have chosen to make '" + tbl + @"' a Lookup Table (e.g T = Tayside, F=Fife etc).  In order to do this you will need to pick which Catalogue the column
provides a description for (a given TableInfo can be a Lookup for many columns in many datasets)."
                    , "Create Lookup", MessageBoxButtons.OKCancel);

                if (dr == DialogResult.OK)
                {
                    Catalogue cata;
                    if (SelectOne(tbl.Repository, out cata))
                    {
                        Activator.ActivateLookupConfiguration(this, cata, tbl);
                    }
                }
            }
            catch (Exception exception)
            {
                ExceptionViewer.Show("Error creating Lookup", exception);
            }
        }