Exemplo n.º 1
0
        protected override void SetBindings(BinderWithErrorProviderFactory rules, GovernanceDocument databaseObject)
        {
            base.SetBindings(rules, databaseObject);

            Bind(tbID, "Text", "ID", g => g.ID);
            Bind(tbName, "Text", "Name", g => g.Name);
            Bind(tbDescription, "Text", "Description", g => g.Description);
            Bind(tbPath, "Text", "URL", g => g.URL);
        }
Exemplo n.º 2
0
        public override void Execute()
        {
            base.Execute();

            if (_file == null)
            {
                _file = BasicActivator.SelectFile("Document to add");
            }

            if (_file == null)
            {
                return;
            }

            var doc = new GovernanceDocument(BasicActivator.RepositoryLocator.CatalogueRepository, _period, _file);

            Publish(_period);
            Emphasise(doc);
            Activate(doc);
        }
        public override void Execute()
        {
            base.Execute();

            if (_file == null)
            {
                OpenFileDialog ofd = new OpenFileDialog();
                if (ofd.ShowDialog() == DialogResult.OK)
                {
                    _file = new FileInfo(ofd.FileName);
                }
            }

            if (_file == null)
            {
                return;
            }

            var doc = new GovernanceDocument(Activator.RepositoryLocator.CatalogueRepository, _period, _file);

            Publish(_period);
            Emphasise(doc);
            Activate(doc);
        }