public List <SMSTemplate> LoadMsgTenantActionList(CurrentUser user)
        {
            var data = new SMSTemplateRPCService().GetSMSTemplateList(user);// MsgTenantActionProcessor.LoadMsgTenantActionList(TenantID);

            foreach (var item in data)
            {
                item.SMSTemplateName = new SMSTemplateRPCService().LoadMsgTemplate(item.SMSTemplateCode).SMSTemplateName;
            }
            return(data);
        }
        public int InsertMsgTemplate(MsgTemplate entity, CurrentUser user)
        {
            CheckMsgTemplate(entity, true);
            if (SMSBusinessServer.IsExistMsgTemplate(entity.ActionCode, (int)entity.MsgType, entity.CompanySysNo) == true)
            {
                throw new BusinessException(LangHelper.GetText("已存在当前选项的模板!"));
            }
            int sysNo = 0;

            using (ITransaction transaction = TransactionManager.Create())
            {
                var tep = new SMSTemplateRPCService().LoadMsgTemplate(entity.ActionCode);
                entity.ReceiverType = tep.MsgReceiverType;
                entity.TemplateName = tep.SMSTemplateName;
                //entity.CompanySysNo = DataContextHelper.CompanySysNo;

                sysNo = SMSBusinessServer.InsertMsgTemplate(entity);
                //记录操作日志
                //  OperationLogProcessor.WriteLog(BizObjectType.MsgTemplate, BizOperationType.Create, sysNo.ToString(), user, LangHelper.GetText("新增消息模板"), entity);
                transaction.Complete();
            }
            return(sysNo);
        }