Exemple #1
0
        public OrganisationPickerDialog(VDF.Vault.Currency.Connections.Connection connection)
        {
            InitializeComponent();

            _wsm = connection.WebServiceManager;
            var custEntDefs = _wsm.CustomEntityService.GetAllCustomEntityDefinitions();
            var custEntDef  = custEntDefs.SingleOrDefault(c => c.DispName.Equals("Organisation"));

            Icon = GetCustomEntityIcon(custEntDef);
            var entities = new List <VDF.Vault.Currency.Entities.IEntity>();
            var custEnts = GetAllCustomEntities(custEntDef);

            foreach (var custEnt in custEnts)
            {
                entities.Add(new VDF.Vault.Currency.Entities.CustomObject(connection, custEnt));
            }
            var configuration = new VDF.Vault.Forms.Controls.VaultBrowserControl.Configuration(
                connection,
                "Grid.SelectOrganisationAndOrderNumber",
                null);

            configuration.AddInitialColumn("Name");
            configuration.AddInitialSortCriteria("Name", true);

            _navigationModel = new VDF.Vault.Forms.Models.ViewVaultNavigationModel();
            _navigationModel.AddContent(entities);

            vaultBrowserControl1.SetDataSource(configuration, _navigationModel);
            vaultBrowserControl1.Refresh();
        }
Exemple #2
0
        private void InitializeGrid()
        {
            VDF.Vault.Forms.Controls.VaultBrowserControl.Configuration config =
                new VDF.Vault.Forms.Controls.VaultBrowserControl.Configuration(m_conn, PERSISTANCE_KEY, null);

            config.AddInitialColumn(VDF.Vault.Currency.Properties.PropertyDefinitionIds.Server.EntityName);
            config.AddInitialSortCriteria(VDF.Vault.Currency.Properties.PropertyDefinitionIds.Server.EntityName, true);

            m_gridContent = new VDF.Vault.Forms.Models.ViewVaultNavigationModel();

            m_vaultBrowseControl.SetDataSource(config, m_gridContent);
            m_vaultBrowseControl.OptionsBehavior.MultiSelect = false;

            m_vaultBrowseControl.EntityDoubleClick += new EventHandler <VDF.Vault.Forms.Currency.EntityEventArgs>(m_vaultBrowseControl_EntityDoubleClick);
        }
        public void Reload(VDF.Vault.Currency.Connections.Connection conn,
                           IEnumerable <VDF.Vault.Currency.Entities.IEntity> entities,
                           long propDefIdOrderNumber, long propDefIdOrderFileId, PropInst[] propInsts)
        {
            var configuration = new VDF.Vault.Forms.Controls.VaultBrowserControl.Configuration(
                conn, "Grid.OrganisationOrder.LinkProperties", null);

            configuration.AddInitialColumn("Name");
            configuration.AddInitialSortCriteria("Name", true);

            var orderPropertyExtensionProvider = new OrderPropertyExtensionProvider(
                propDefIdOrderNumber,
                propDefIdOrderFileId,
                propInsts);

            configuration.AddPropertyExtensionProvider(orderPropertyExtensionProvider);

            _navigationModel = new VDF.Vault.Forms.Models.ViewVaultNavigationModel();
            _navigationModel.AddContent(entities);

            vaultBrowserControl1.SetDataSource(configuration, _navigationModel);
        }
Exemple #4
0
        public EntityPickerDialog(VDF.Vault.Currency.Connections.Connection conn,
                                  IEnumerable <VDF.Vault.Currency.Entities.IEntity> entities, string title, Icon icon,
                                  string persistenceKey)
        {
            InitializeComponent();

            Text = title;
            if (icon != null)
            {
                Icon = icon;
            }

            var configuration = new VDF.Vault.Forms.Controls.VaultBrowserControl.Configuration(
                conn, persistenceKey, null);

            configuration.AddInitialColumn("Name");
            configuration.AddInitialSortCriteria("Name", true);

            _navigationModel = new VDF.Vault.Forms.Models.ViewVaultNavigationModel();
            _navigationModel.AddContent(entities);

            vaultBrowserControl1.SetDataSource(configuration, _navigationModel);
        }