public static ListItem GetListItem(EThirdLoginType type, bool selected) { var item = new ListItem(GetText(type), GetValue(type)); if (selected) { item.Selected = true; } return(item); }
public ThirdLoginInfo(int id, EThirdLoginType thirdLoginType, string thirdLoginName, bool isEnabled, int taxis, string description, string settingsXml) { Id = id; ThirdLoginType = thirdLoginType; ThirdLoginName = thirdLoginName; IsEnabled = isEnabled; Taxis = taxis; Description = description; SettingsXml = settingsXml; }
public static bool Equals(EThirdLoginType type, string typeStr) { if (string.IsNullOrEmpty(typeStr)) { return(false); } if (string.Equals(GetValue(type).ToLower(), typeStr.ToLower())) { return(true); } return(false); }
public bool IsExists(EThirdLoginType thirdLoginType) { var exists = false; var parms = new IDataParameter[] { GetParameter(ParmType, EDataType.VarChar, 50, EThirdLoginTypeUtils.GetValue(thirdLoginType)) }; using (var rdr = ExecuteReader(SqlSelectByType, parms)) { if (rdr.Read()) { exists = true; } rdr.Close(); } return(exists); }
public static string GetDescription(EThirdLoginType type) { if (type == EThirdLoginType.Weibo) { return("新浪微博"); } else if (type == EThirdLoginType.QQ) { return("QQ账号"); } else if (type == EThirdLoginType.WeixinPC) { return("微信账号"); } else if (type == EThirdLoginType.WeixinMob) { return("微信账号"); } else { throw new Exception(); } }
public static string GetValue(EThirdLoginType type) { if (type == EThirdLoginType.Weibo) { return("Weibo"); } else if (type == EThirdLoginType.QQ) { return("QQ"); } else if (type == EThirdLoginType.WeixinPC) { return("WeixinPC"); } else if (type == EThirdLoginType.WeixinMob) { return("WeixinMob"); } else { throw new Exception(); } }
public static bool Equals(string typeStr, EThirdLoginType type) { return(Equals(type, typeStr)); }