예제 #1
0
        public static ListItem GetListItem(EGovPublicIdentifierType type, bool selected)
        {
            var item = new ListItem(GetText(type), GetValue(type));

            if (selected)
            {
                item.Selected = true;
            }
            return(item);
        }
예제 #2
0
 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);
 }
예제 #3
0
 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;
 }
예제 #4
0
 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;
 }
예제 #5
0
 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();
     }
 }
예제 #6
0
 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();
     }
 }
예제 #7
0
 public static bool Equals(string typeStr, EGovPublicIdentifierType type)
 {
     return(Equals(type, typeStr));
 }