예제 #1
0
        public void loadData()
        {
            var r = EnterpriseBlackListDB.getAllEnterpriseBlackList();

            if (r != null)
            {
                foreach (var row in r.Value)
                {
                    AddBlackNumber(Convert.ToString(row["AccountCode"]), Convert.ToString(row["Number"]));
                }
            }
        }
예제 #2
0
        public SMS.Model.RPCResult DeleteEnterpriseBlackList(string EnterpriseCode, List <string> Numbers)
        {
            var ok = EnterpriseBlackListDB.DelEnterpriseBlackList(EnterpriseCode, Numbers);

            if (ok)
            {
                //删除缓存
                EnterpriseBlackList.Instance.DeleteBlackNumbers(EnterpriseCode, Numbers);

                return(new SMS.Model.RPCResult(ok, "删除黑名单成功!"));
            }
            else
            {
                return(new SMS.Model.RPCResult(ok, "删除黑名单失败"));
            }
        }
예제 #3
0
        public SMS.Model.RPCResult AddEnterpriseBlackList(string EnterpriseCode, List <string> Numbers)
        {
            var ok = EnterpriseBlackListDB.AddEnterpriseBlackList(EnterpriseCode, Numbers);

            if (ok)
            {
                //添加缓存
                EnterpriseBlackList.Instance.AddBlackNumbers(EnterpriseCode, Numbers);

                return(new SMS.Model.RPCResult(ok, "添加黑名单成功!"));
            }
            else
            {
                return(new SMS.Model.RPCResult(ok, "添加黑名单失败"));
            }
        }
예제 #4
0
        public SMS.Model.RPCResult <List <string> > GetEnterpriseBlackList(string EnterpriseCode)
        {
            var list = EnterpriseBlackListDB.getEnterpriseBlackList(EnterpriseCode);

            return(new SMS.Model.RPCResult <List <string> >(true, list, ""));
        }