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()); } }
public static string GetRedirectUrl(ESmsProviderType providerType) { return(PageUtils.GetSettingsUrl(nameof(PageSmsTemplates), new NameValueCollection { { "providerType", ESmsProviderTypeUtils.GetValue(providerType) } })); }
public static string GetUrl(ESmsProviderType type) { if (type == ESmsProviderType.Yunpian) { return("http://www.yunpian.com/"); } return(string.Empty); }
public static string GetText(ESmsProviderType type) { if (type == ESmsProviderType.Yunpian) { return("云片"); } return("无"); }
public static string GetValue(ESmsProviderType type) { if (type == ESmsProviderType.Yunpian) { return("Yunpian"); } return("None"); }
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)); }
public static ListItem GetListItem(ESmsProviderType type, bool selected) { var item = new ListItem(GetText(type), GetValue(type)); if (selected) { item.Selected = true; } return(item); }
public void Page_Load(object sender, EventArgs e) { if (IsForbidden) { return; } _providerType = ESmsProviderTypeUtils.GetEnumType(Body.GetQueryString("providerType")); _templateType = ESmsTemplateTypeUtils.GetEnumType(Body.GetQueryString("templateType")); }
public static string GetUrl(ESmsProviderType type) { if (type == ESmsProviderType.AliDaYu) { return("http://www.alidayu.com/"); } else if (type == ESmsProviderType.YunPian) { return("http://www.yunpian.com/"); } else { throw new Exception(); } }
public static string GetText(ESmsProviderType type) { if (type == ESmsProviderType.AliDaYu) { return("阿里大于"); } else if (type == ESmsProviderType.YunPian) { return("云片"); } else { throw new Exception(); } }
public static string GetValue(ESmsProviderType type) { if (type == ESmsProviderType.AliDaYu) { return("AliDaYu"); } else if (type == ESmsProviderType.YunPian) { return("YunPian"); } else { throw new Exception(); } }
public void Page_Load(object sender, EventArgs e) { if (IsForbidden) { return; } _providerType = ESmsProviderTypeUtils.GetEnumType(Body.GetQueryString("providerType")); if (!IsPostBack) { BreadCrumbSettings(AppManager.Settings.LeftMenu.Config, "短信模板管理", AppManager.Settings.Permission.SettingsConfig); RptContents.DataSource = ESmsTemplateTypeUtils.GetList(); RptContents.ItemDataBound += rptInstalled_ItemDataBound; RptContents.DataBind(); } }
public static bool Equals(string typeStr, ESmsProviderType type) { return(Equals(type, typeStr)); }
public static bool Equals(ESmsProviderType type, string typeStr) { return(!string.IsNullOrEmpty(typeStr) && string.Equals(GetValue(type).ToLower(), typeStr.ToLower())); }