Exemplo n.º 1
0
        private void GetDialPlans(int offset, int count)
        {
            if (!m_dialPlansPanelRefreshInProgress)
            {
                m_dialPlansPanelRefreshInProgress = true;

                m_riaContext.SIPDialPlans.Clear();
                var query = m_riaContext.GetSIPDialplansQuery().OrderBy(x => x.DialPlanName).Skip(offset).Take(count);
                query.IncludeTotalCount = true;
                m_riaContext.Load(query, LoadBehavior.RefreshCurrent, SIPDialPlansLoaded, null);
            }
            else
            {
                LogActivityMessage_External(MessageLevelsEnum.Warn, "A Dial Plans refresh is already in progress.");
            }
        }
Exemplo n.º 2
0
        private void Initialise(SIPEntitiesDomainContext riaContext)
        {
            if (riaContext.SIPDomains.Count() == 0)
            {
                var query = riaContext.GetSIPDomainsQuery().OrderBy(x => x.Domain).Skip(0).Take(MAX_RIA_LIST_SIZE);
                query.IncludeTotalCount = true;
                riaContext.Load(query, LoadBehavior.RefreshCurrent, (lo) => { LogActivityMessage(MessageLevelsEnum.Info, lo.TotalEntityCount + " domains successfully loaded."); }, null);
            }

            if (riaContext.SIPDialPlans.Count() == 0)
            {
                var query = riaContext.GetSIPDialplansQuery().OrderBy(x => x.DialPlanName).Skip(0).Take(MAX_RIA_LIST_SIZE);
                query.IncludeTotalCount = true;
                riaContext.Load(query, LoadBehavior.RefreshCurrent, (lo) => { LogActivityMessage(MessageLevelsEnum.Info, lo.TotalEntityCount + " dialplans successfully loaded."); }, null);
            }

            if (riaContext.SIPProviders.Count() == 0)
            {
                var query = riaContext.GetSIPProvidersQuery().OrderBy(x => x.ProviderName).Skip(0).Take(MAX_RIA_LIST_SIZE);
                query.IncludeTotalCount = true;
                riaContext.Load(query, LoadBehavior.RefreshCurrent, (lo) => { LogActivityMessage(MessageLevelsEnum.Info, lo.TotalEntityCount + " providers successfully loaded."); }, null);
            }
        }