public static string GetText(EGovPublicCategoryClassType type) { if (type == EGovPublicCategoryClassType.Channel) { return("主题"); } else if (type == EGovPublicCategoryClassType.Form) { return("体裁"); } else if (type == EGovPublicCategoryClassType.Department) { return("机构"); } else if (type == EGovPublicCategoryClassType.Service) { return("服务对象"); } else if (type == EGovPublicCategoryClassType.UserDefined) { return("自定义"); } else { throw new Exception(); } }
public static string GetValue(EGovPublicCategoryClassType type) { if (type == EGovPublicCategoryClassType.Channel) { return("Channel"); } else if (type == EGovPublicCategoryClassType.Form) { return("Form"); } else if (type == EGovPublicCategoryClassType.Department) { return("Department"); } else if (type == EGovPublicCategoryClassType.Service) { return("Service"); } else if (type == EGovPublicCategoryClassType.UserDefined) { return("UserDefined"); } else { throw new Exception(); } }
private static GovPublicCategoryClassInfo GetCategoryClassInfo(EGovPublicCategoryClassType categoryType, int publishmentSystemID) { var isSystem = false; if (categoryType == EGovPublicCategoryClassType.Channel || categoryType == EGovPublicCategoryClassType.Department) { isSystem = true; } return(new GovPublicCategoryClassInfo(EGovPublicCategoryClassTypeUtils.GetValue(categoryType), publishmentSystemID, EGovPublicCategoryClassTypeUtils.GetText(categoryType), isSystem, true, string.Empty, 0, string.Empty)); }
public static bool Equals(EGovPublicCategoryClassType type, string typeStr) { if (string.IsNullOrEmpty(typeStr)) { return(false); } if (string.Equals(GetValue(type).ToLower(), typeStr.ToLower())) { return(true); } return(false); }
public static bool Equals(string typeStr, EGovPublicCategoryClassType type) { return(Equals(type, typeStr)); }