Пример #1
0
        //自动发送操作
        //针对设定的目标对结果进行筛选

        #endregion

        #region 获取在运行的消息规则列表

        public string GetMsgRuleList(int pageIndex, int ruleType, string sendMethod, string name, string target)
        {
            ListView viewModel = new ListView();

            if (ruleType == 1 || ruleType == -99)//触发类消息处理
            {
                if (!string.IsNullOrEmpty(sendMethod))
                {
                    string[] methodList = sendMethod.Split(',');
                    viewModel = MessageTemplateBLL.GetTemplateList(pageIndex, methodList, target, name);
                }
                else
                {
                    viewModel = MessageTemplateBLL.GetTemplateList(pageIndex, null, target, name);
                }

                if (viewModel != null)
                {
                    return(CommonLib.Helper.JsonSerializeObject(viewModel));
                }
                else
                {
                    return("");
                }
            }
            else
            {
                return("");
            }
        }