Esempio n. 1
0
        public void Page_Load(object sender, EventArgs e)
        {
            if (IsForbidden)
            {
                return;
            }

            _providerType = ESmsProviderTypeUtils.GetEnumType(Body.GetQueryString("providerType"));
            _templateType = ESmsTemplateTypeUtils.GetEnumType(Body.GetQueryString("templateType"));

            if (!IsPostBack)
            {
                var tplId = string.Empty;

                if (_templateType == ESmsTemplateType.Code)
                {
                    if (_providerType == ESmsProviderType.AliDaYu)
                    {
                        tplId = ConfigManager.SystemConfigInfo.SmsAliDaYuCodeTplId;
                    }
                    else if (_providerType == ESmsProviderType.YunPian)
                    {
                        tplId = ConfigManager.SystemConfigInfo.SmsYunPianCodeTplId;
                    }
                }

                TbTplId.Text = tplId;
                InfoMessage(GetSample());
            }
        }
Esempio n. 2
0
        public void Page_Load(object sender, EventArgs e)
        {
            if (IsForbidden)
            {
                return;
            }

            _providerType = ESmsProviderTypeUtils.GetEnumType(Body.GetQueryString("providerType"));
            _templateType = ESmsTemplateTypeUtils.GetEnumType(Body.GetQueryString("templateType"));
        }
Esempio n. 3
0
 public static string GetText(ESmsTemplateType type)
 {
     if (type == ESmsTemplateType.Code)
     {
         return("验证码");
     }
     else
     {
         throw new Exception();
     }
 }
Esempio n. 4
0
 public static string GetText(ESmsTemplateType type)
 {
     if (type == ESmsTemplateType.Verify)
     {
         return("验证码类");
     }
     if (type == ESmsTemplateType.Notify)
     {
         return("通知类");
     }
     throw new Exception();
 }
Esempio n. 5
0
 public static string GetValue(ESmsTemplateType type)
 {
     if (type == ESmsTemplateType.Verify)
     {
         return("Verify");
     }
     if (type == ESmsTemplateType.Notify)
     {
         return("Notify");
     }
     throw new Exception();
 }
Esempio n. 6
0
 public static bool Equals(string typeStr, ESmsTemplateType type)
 {
     return(Equals(type, typeStr));
 }
Esempio n. 7
0
 public static bool Equals(ESmsTemplateType type, string typeStr)
 {
     return(!string.IsNullOrEmpty(typeStr) && string.Equals(GetValue(type).ToLower(), typeStr.ToLower()));
 }
Esempio n. 8
0
 public static string GetOpenWindowStringToEdit(ESmsProviderType providerType, ESmsTemplateType templateType)
 {
     return(PageUtils.GetOpenWindowString("设置短信模板", PageUtils.GetSettingsUrl(nameof(ModalSmsTemplateAdd), new NameValueCollection
     {
         { "providerType", ESmsProviderTypeUtils.GetValue(providerType) },
         { "templateType", ESmsTemplateTypeUtils.GetValue(templateType) }
     }), 460, 360));
 }