public int GetSIPProviderBindingsCount(string whereExpression) { Customer customer = AuthoriseRequest(); string authoriseExpression = GetAuthorisedWhereExpression(customer, whereExpression); if (authoriseExpression.IsNullOrBlank()) { return(SIPProviderBindingsPersistor.Count(null)); } else { return(SIPProviderBindingsPersistor.Count(DynamicExpression.ParseLambda <SIPProviderBinding, bool>(authoriseExpression))); } }
public int GetDialPlansCount(string whereExpression) { Customer customer = AuthoriseRequest(); string authoriseExpression = GetAuthorisedWhereExpression(customer, whereExpression); //logger.Debug("SIPProvisioningWebService GetDialPlansCount for " + customerSession.Customer.CustomerUsername + " and where: " + authoriseExpression + "."); if (authoriseExpression.IsNullOrBlank()) { return(DialPlanPersistor.Count(null)); } else { return(DialPlanPersistor.Count(DynamicExpression.ParseLambda <SIPDialPlan, bool>(authoriseExpression))); } }
public int GetCallsCount(string whereExpression) { try { Customer customer = AuthoriseRequest(); string authoriseExpression = GetAuthorisedWhereExpression(customer, whereExpression); //logger.Debug("SIPProvisioningWebService GetCallsCount for " + customerSession.Customer.CustomerUsername + " and where: " + authoriseExpression + "."); if (authoriseExpression.IsNullOrBlank()) { return(SIPDialoguePersistor.Count(null)); } else { return(SIPDialoguePersistor.Count(DynamicExpression.ParseLambda <SIPDialogueAsset, bool>(authoriseExpression))); } } catch (Exception excp) { logger.Error("Exception GetCallsCount. " + excp.Message); throw; } }
public bool AreNewAccountsEnabled() { logger.Debug("AreNewAccountsEnabled called from " + OperationContext.Current.Channel.RemoteAddress + "."); return(m_newCustomersAllowedLimit == 0 || CRMCustomerPersistor.Count(null) < m_newCustomersAllowedLimit); }