public static ListItem GetListItem(EUserVerifyType type, bool selected) { var item = new ListItem(GetText(type), GetValue(type)); if (selected) { item.Selected = true; } return(item); }
public static string GetText(EUserVerifyType type) { if (type == EUserVerifyType.None) { return("无验证"); } if (type == EUserVerifyType.Mobile) { return("短信验证"); } throw new Exception(); }
public static bool Equals(EUserVerifyType type, string typeStr) { if (string.IsNullOrEmpty(typeStr)) { return(false); } if (string.Equals(GetValue(type).ToLower(), typeStr.ToLower())) { return(true); } return(false); }
public static string GetValue(EUserVerifyType type) { if (type == EUserVerifyType.None) { return("None"); } if (type == EUserVerifyType.Mobile) { return("Mobile"); } throw new Exception(); }
public static bool Equals(string typeStr, EUserVerifyType type) { return(Equals(type, typeStr)); }