public static DataTable GetDataTable()
        {
            DataTable  commonDataTable = ConfigurableHelper.GetCommonDataTable();
            DataColumn dataColumn      = new DataColumn("ImageProperty", typeof(string));

            dataColumn.DefaultValue = "ExchangeServerPicker";
            commonDataTable.Columns.Add(dataColumn);
            commonDataTable.Columns.Add(new DataColumn("NetworkAddress", typeof(string)));
            commonDataTable.Columns.Add(new DataColumn("Fqdn", typeof(string)));
            commonDataTable.Columns.Add(new DataColumn("ServerRole", typeof(ServerRole)));
            commonDataTable.Columns.Add(new DataColumn("Site", typeof(string)));
            DataColumn dataColumn2 = new DataColumn("ADSiteShortName", typeof(string));

            dataColumn2.ExtendedProperties["LambdaExpression"] = string.Format("{0}=>iif(DBNull.Value.Equals(@0[{0}]), String.Empty, WinformsHelper.GetADShortName(String(@0[{0}])))", "Site");
            commonDataTable.Columns.Add(dataColumn2);
            commonDataTable.Columns.Add(new DataColumn("CustomerFeedbackEnabled", typeof(bool)));
            commonDataTable.Columns.Add(new DataColumn("AdminDisplayVersion", typeof(string)));
            commonDataTable.Columns.Add(new DataColumn("ExchangeLegacyDN", typeof(string)));
            DataColumn column = new DataColumn("CeipStatus", typeof(string), string.Format("IIF({0}=true, '{1}', IIF({0}=false, '{2}', '{3}'))", new object[]
            {
                "CustomerFeedbackEnabled",
                Strings.CeipStatusOptedIn,
                Strings.CeipStatusOptedOut,
                Strings.CeipStatusNotEnrolled
            }));

            commonDataTable.Columns.Add(column);
            return(commonDataTable);
        }
Esempio n. 2
0
        public static DataTable GetDataTable()
        {
            DataTable commonDataTable = ConfigurableHelper.GetCommonDataTable();

            commonDataTable.Columns.Add(new DataColumn("City", typeof(string)));
            commonDataTable.Columns.Add(new DataColumn("Company", typeof(string)));
            commonDataTable.Columns.Add(new DataColumn("DisplayName", typeof(string)));
            commonDataTable.Columns.Add(new DataColumn("Department", typeof(string)));
            commonDataTable.Columns.Add(new DataColumn("FirstName", typeof(string)));
            commonDataTable.Columns.Add(new DataColumn("LastName", typeof(string)));
            commonDataTable.Columns.Add(new DataColumn("Manager", typeof(string)));
            commonDataTable.Columns.Add(new DataColumn("Office", typeof(string)));
            commonDataTable.Columns.Add(new DataColumn("Phone", typeof(string)));
            commonDataTable.Columns.Add(new DataColumn("StateOrProvince", typeof(string)));
            commonDataTable.Columns.Add(new DataColumn("Title", typeof(string)));
            commonDataTable.Columns.Add(new DataColumn("OrganizationalUnit", typeof(string)));
            commonDataTable.Columns.Add(new DataColumn("RecipientTypeDetails", typeof(RecipientTypeDetails)));
            commonDataTable.Columns.Add(new DataColumn("RecipientType", typeof(RecipientType)));
            commonDataTable.Columns.Add(new DataColumn("GroupType", typeof(GroupTypeFlags)));
            commonDataTable.Columns.Add(new DataColumn("ManagedBy", typeof(string)));
            commonDataTable.Columns.Add(new DataColumn("DatabaseName", typeof(string)));
            commonDataTable.Columns.Add(new DataColumn("ExpansionServer", typeof(string)));
            commonDataTable.Columns.AddColumnWithExpectedType("ExternalEmailAddress", typeof(ProxyAddress));
            commonDataTable.Columns.Add(new DataColumn("HiddenFromAddressListsEnabled", typeof(bool)));
            commonDataTable.Columns.Add(new DataColumn("UMEnabled", typeof(bool)));
            commonDataTable.Columns.Add(new DataColumn("Alias", typeof(string)));
            commonDataTable.Columns.AddColumnWithExpectedType("PrimarySmtpAddress", typeof(SmtpAddress));
            commonDataTable.Columns.AddColumnWithLambdaExpression("PrimarySmtpAddressToString", typeof(string), "PrimarySmtpAddress=>@0[PrimarySmtpAddress].ToString()");
            commonDataTable.Columns.AddColumnWithLambdaExpression("NonEmptyDisplayName", typeof(string), "DisplayName,Name=>iif(DBNull.Value.Equals(@0[DisplayName]) or String(@0[DisplayName]) == String.Empty, @0[Name].ToString(),@0[DisplayName].ToString())");
            commonDataTable.Columns.AddColumnWithLambdaExpression("DisplayRecipientTypeDetails", typeof(string), "RecipientTypeDetails=>@0[\"RecipientTypeDetails\"].ToString()");
            commonDataTable.Columns.Add(new DataColumn("WholeObjectProperty", typeof(object)));
            return(commonDataTable);
        }
Esempio n. 3
0
        public ResultsLoaderProfile BuildResultsLoaderProfile()
        {
            DataTable commonDataTable = ConfigurableHelper.GetCommonDataTable();

            commonDataTable.Columns.Add(new DataColumn("TrustType", typeof(ADTrustType)));
            DataColumn dataColumn = new DataColumn("ImageProperty", typeof(string));

            dataColumn.DefaultValue = "ExchangeServerPicker";
            commonDataTable.Columns.Add(dataColumn);
            ResultsColumnProfile resultsColumnProfile  = new ResultsColumnProfile("Name", true, Strings.Name);
            ResultsColumnProfile resultsColumnProfile2 = new ResultsColumnProfile("TrustType", true, Strings.TrustType);
            ResultsLoaderProfile resultsLoaderProfile  = new ResultsLoaderProfile(Strings.ForestDomain, false, "ImageProperty", new DataTable(), commonDataTable, new ResultsColumnProfile[]
            {
                resultsColumnProfile,
                resultsColumnProfile2
            });

            resultsLoaderProfile.AddTableFiller(new MonadAdapterFiller("Get-Trust", new ExchangeCommandBuilder
            {
                SearchType         = 2,
                NamePropertyFilter = resultsLoaderProfile.NameProperty
            }));
            resultsLoaderProfile.HelpTopic = "Microsoft.Exchange.Management.SystemManager.WinForms.ForestPicker";
            return(resultsLoaderProfile);
        }
        public ResultsLoaderProfile BuildResultsLoaderProfile()
        {
            DataTable inputTable      = new DataTable();
            DataTable commonDataTable = ConfigurableHelper.GetCommonDataTable();

            commonDataTable.Columns.Add(new DataColumn("DisplayName", typeof(string)));
            ResultsColumnProfile resultsColumnProfile = new ResultsColumnProfile("DisplayName", true, Strings.DisplayNameColumnInPicker);

            return(new ResultsLoaderProfile(Strings.MessageClassification, true, null, "Get-MessageClassification", inputTable, commonDataTable, new ResultsColumnProfile[]
            {
                resultsColumnProfile
            }, new ExchangeCommandBuilder())
            {
                NameProperty = "DisplayName",
                HelpTopic = "Microsoft.Exchange.Management.SystemManager.WinForms.MessageClassificationPicker"
            });
        }
Esempio n. 5
0
        public ResultsLoaderProfile BuildResultsLoaderProfile()
        {
            DataTable  inputTable      = new DataTable();
            DataTable  commonDataTable = ConfigurableHelper.GetCommonDataTable();
            DataColumn dataColumn      = new DataColumn("ImageProperty", typeof(string));

            dataColumn.DefaultValue = "OfflineAddressBookPicker";
            commonDataTable.Columns.Add(dataColumn);
            ResultsColumnProfile resultsColumnProfile = new ResultsColumnProfile("Name", true, Strings.Name);

            return(new ResultsLoaderProfile(Strings.OfflineAddressList, "ImageProperty", "Get-OfflineAddressBook", inputTable, commonDataTable, new ResultsColumnProfile[]
            {
                resultsColumnProfile
            }, new ExchangeCommandBuilder())
            {
                HelpTopic = "Microsoft.Exchange.Management.SystemManager.WinForms.OfflineAddressListPicker"
            });
        }
Esempio n. 6
0
        public ResultsLoaderProfile BuildResultsLoaderProfile()
        {
            DataTable dataTable = new DataTable();

            dataTable.Columns.Add(new DataColumn("Forest", typeof(string)));
            dataTable.Columns.Add(new DataColumn("Credential", typeof(PSCredential)));
            dataTable.Columns.Add(new DataColumn("DomainName", typeof(string)));
            dataTable.Columns.Add(new DataColumn("IsGlobalCatalog", typeof(bool)));
            DataTable commonDataTable = ConfigurableHelper.GetCommonDataTable();

            commonDataTable.Columns.Add(new DataColumn("DnsHostName", typeof(string)));
            commonDataTable.Columns.Add(new DataColumn("ADSite", typeof(ADObjectId)));
            DataColumn dataColumn = new DataColumn("ADSiteShortName", typeof(string));

            dataColumn.ExtendedProperties["LambdaExpression"] = string.Format("{0}=>ADObjectId(@0[{0}]).Name", "ADSite");
            commonDataTable.Columns.Add(dataColumn);
            DataColumn dataColumn2 = new DataColumn("ImageProperty", typeof(string));

            dataColumn2.DefaultValue = "ExchangeServerPicker";
            commonDataTable.Columns.Add(dataColumn2);
            ResultsColumnProfile resultsColumnProfile  = new ResultsColumnProfile("DnsHostName", true, Strings.Name);
            ResultsColumnProfile resultsColumnProfile2 = new ResultsColumnProfile("ADSiteShortName", true, Strings.Site);
            ResultsLoaderProfile resultsLoaderProfile  = new ResultsLoaderProfile(Strings.DomainController, false, "ImageProperty", dataTable, commonDataTable, new ResultsColumnProfile[]
            {
                resultsColumnProfile,
                resultsColumnProfile2
            })
            {
                SerializationLevel = ExchangeRunspaceConfigurationSettings.SerializationLevel.Full
            };

            resultsLoaderProfile.NameProperty = "DnsHostName";
            resultsLoaderProfile.AddTableFiller(new ProcedureDataFiller("Get-DomainController", new DomainControllerCommandBuilder
            {
                ResolveProperty         = "Identity",
                NamePropertyFilter      = "DnsHostName",
                SearchType              = 2,
                UseFilterToResolveNonId = false
            }));
            resultsLoaderProfile.HelpTopic = "Microsoft.Exchange.Management.SystemManager.WinForms.DomainControllerPicker";
            return(resultsLoaderProfile);
        }
        public ResultsLoaderProfile BuildResultsLoaderProfile()
        {
            DataTable  inputTable      = new DataTable();
            DataTable  commonDataTable = ConfigurableHelper.GetCommonDataTable();
            DataColumn dataColumn      = new DataColumn("ImageProperty", typeof(string));

            dataColumn.DefaultValue = "OabVirtualDirectoryPicker";
            commonDataTable.Columns.Add(dataColumn);
            commonDataTable.Columns.Add(new DataColumn("Server", typeof(string)));
            ResultsColumnProfile resultsColumnProfile  = new ResultsColumnProfile("Name", true, Strings.Name);
            ResultsColumnProfile resultsColumnProfile2 = new ResultsColumnProfile("Server", true, Strings.ServerColumn);

            return(new ResultsLoaderProfile(Strings.OabVirtualDirectory, "ImageProperty", "Get-OabVirtualDirectory", inputTable, commonDataTable, new ResultsColumnProfile[]
            {
                resultsColumnProfile,
                resultsColumnProfile2
            }, new ExchangeCommandBuilder())
            {
                HelpTopic = "Microsoft.Exchange.Management.SystemManager.WinForms.OabVirtualDirectoryPicker"
            });
        }