Пример #1
0
        private void InitializeCampaigns(ININ.IceLib.Connection.Session session)
        {
            try
            {
                var configurations = new CampaignConfigurationList(new DialerConfigurationManager(session).ConfigurationManager);
                var query_settings = configurations.CreateQuerySettings();

                query_settings.SetPropertiesToRetrieve(new[] {
                    CampaignConfiguration.Property.Id,
                    CampaignConfiguration.Property.DisplayName,
                    CampaignConfiguration.Property.RevisionLevel,
                    CampaignConfiguration.Property.AcdWorkgroup,
                    CampaignConfiguration.Property.ContactList,
                    CampaignConfiguration.Property.PolicySets,
                    CampaignConfiguration.Property.SkillSets
                });
                configurations.ConfigurationObjectsAdded   += configurations_ConfigurationObjectsAdded;
                configurations.ConfigurationObjectsRemoved += configurations_ConfigurationObjectsRemoved;
                configurations.StartCaching(query_settings);
                lock (updating)
                {
                    CampaignConfigurations = configurations.GetConfigurationList();
                }
            }
            catch (Exception e)
            {
                HttpContext.Current.Trace.Warn("Dialer", "Unable to retrieve campaigns", e);
            }
        }
Пример #2
0
 public void ConnectAsync()
 {
     Session = new ININ.IceLib.Connection.Session();
     Session.ConnectionStateChanged += delegate { ConnectionStateChangedHandler(); };
     Session.ConnectAsync(SessionSettings, HostSettings, AuthSettings,
                          StationSettings, ConnectCompleted, null);
 }
Пример #3
0
        private void InitializeWorkgroups(ININ.IceLib.Connection.Session session)
        {
            try
            {
                var configurations = new WorkgroupConfigurationList(new DialerConfigurationManager(session).ConfigurationManager);
                var query_settings = configurations.CreateQuerySettings();

                query_settings.SetPropertiesToRetrieve(new[] {
                    WorkgroupConfiguration.Property.Id,
                    WorkgroupConfiguration.Property.DisplayName,
                    WorkgroupConfiguration.Property.Members
                });
                configurations.StartCaching(query_settings);
                WorkgroupConfigurations = configurations.GetConfigurationList();
            }
            catch (Exception e)
            {
                HttpContext.Current.Trace.Warn("Dialer", "Unable to retrieve campaigns", e);
            }
        }
Пример #4
0
        private void InitializePolicySets(ININ.IceLib.Connection.Session session)
        {
            try
            {
                var configurations = new PolicySetConfigurationList(new DialerConfigurationManager(session).ConfigurationManager);
                var query_settings = configurations.CreateQuerySettings();

                query_settings.SetPropertiesToRetrieve(new[] {
                    PolicySetConfiguration.Property.Id,
                    PolicySetConfiguration.Property.DisplayName,
                    PolicySetConfiguration.Property.RevisionLevel
                });
                configurations.StartCaching(query_settings);
                //configurations.StartCachingAsync(query_settings, OnCampaignCached, this);
                PolicySetConfigurations = configurations.GetConfigurationList();
            }
            catch (Exception e)
            {
                HttpContext.Current.Trace.Warn("Dialer", "Unable to retrieve campaigns", e);
            }
        }