Example #1
0
        private void GetSIPCDRs(int offset, int count)
        {
            if (!m_sipCDRsPanelRefreshInProgress)
            {
                m_sipCDRsPanelRefreshInProgress = true;

                m_riaContext.CDRs.Clear();
                var query = m_riaContext.GetCDRsQuery().Where(x => x.AnsweredStatus != 401 && x.AnsweredStatus != 407).OrderByDescending(x => x.Created).Skip(offset).Take(count);
                query.IncludeTotalCount = true;
                m_riaContext.Load <CDR>(query, LoadBehavior.RefreshCurrent, GetCDRsComplete, null);
            }
            else
            {
                LogActivityMessage_External(MessageLevelsEnum.Warn, "A SIP CDRs refresh is already in progress.");
            }
        }