public static ListItem GetListItem(EGovPublicIdentifierType type, bool selected) { var item = new ListItem(GetText(type), GetValue(type)); if (selected) { item.Selected = true; } return(item); }
public static bool Equals(EGovPublicIdentifierType type, string typeStr) { if (string.IsNullOrEmpty(typeStr)) { return(false); } if (string.Equals(GetValue(type).ToLower(), typeStr.ToLower())) { return(true); } return(false); }
public GovPublicIdentifierRuleInfo(int ruleID, string ruleName, int publishmentSystemID, EGovPublicIdentifierType identifierType, int minLength, string suffix, string formatString, string attributeName, int sequence, int taxis, string settingsXML) { this.ruleID = ruleID; this.ruleName = ruleName; this.publishmentSystemID = publishmentSystemID; this.identifierType = identifierType; this.minLength = minLength; this.suffix = suffix; this.formatString = formatString; this.attributeName = attributeName; this.sequence = sequence; this.taxis = taxis; this.settingsXML = settingsXML; }
public GovPublicIdentifierRuleInfo() { ruleID = 0; ruleName = string.Empty; publishmentSystemID = 0; identifierType = EGovPublicIdentifierType.Department; minLength = 5; suffix = string.Empty; formatString = string.Empty; attributeName = string.Empty; sequence = 0; taxis = 0; settingsXML = string.Empty; }
public static string GetText(EGovPublicIdentifierType type) { if (type == EGovPublicIdentifierType.Department) { return("机构分类代码"); } else if (type == EGovPublicIdentifierType.Channel) { return("主题分类代码"); } else if (type == EGovPublicIdentifierType.Attribute) { return("字段值"); } else if (type == EGovPublicIdentifierType.Sequence) { return("顺序号"); } else { throw new Exception(); } }
public static string GetValue(EGovPublicIdentifierType type) { if (type == EGovPublicIdentifierType.Department) { return("Department"); } else if (type == EGovPublicIdentifierType.Channel) { return("Channel"); } else if (type == EGovPublicIdentifierType.Attribute) { return("Attribute"); } else if (type == EGovPublicIdentifierType.Sequence) { return("Sequence"); } else { throw new Exception(); } }
public static bool Equals(string typeStr, EGovPublicIdentifierType type) { return(Equals(type, typeStr)); }