public bool RegisterId(EIdentifierType identifierType, ushort identifier, string idname) { if (identifiers[identifier] == true) { identifiers[identifier] = false; return(true); } return(false); }
public static ListItem GetListItem(EIdentifierType type, bool selected) { var item = new ListItem(GetText(type), GetValue(type)); if (selected) { item.Selected = true; } return(item); }
public static bool Equals(EIdentifierType type, string typeStr) { if (string.IsNullOrEmpty(typeStr)) { return(false); } if (string.Equals(GetValue(type).ToLower(), typeStr.ToLower())) { return(true); } return(false); }
public static string GetText(EIdentifierType type) { if (type == EIdentifierType.Department) { return("机构分类代码"); } else if (type == EIdentifierType.Channel) { return("主题分类代码"); } else if (type == EIdentifierType.Attribute) { return("字段值"); } else if (type == EIdentifierType.Sequence) { return("顺序号"); } else { throw new Exception(); } }
public static string GetValue(EIdentifierType type) { if (type == EIdentifierType.Department) { return("Department"); } else if (type == EIdentifierType.Channel) { return("Channel"); } else if (type == EIdentifierType.Attribute) { return("Attribute"); } else if (type == EIdentifierType.Sequence) { return("Sequence"); } else { throw new Exception(); } }
public void RegisterId(EIdentifierType identifiertype, ushort identifier, string idname) { modelIdentifierManager.RegisterId(EIdentifierType.ModelId, identifier, idname); }
public static bool Equals(string typeStr, EIdentifierType type) { return(Equals(type, typeStr)); }