NewGaoKaoApi/New_College.Common/Helper/NatureHelper.cs

46 lines
1.2 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace New_College.Common
{
public static class NatureHelper
{
/// <summary>
/// 0、公办1、民办2中外合作,3 港澳台
/// </summary>
/// <param name="Nature"></param>
/// <returns></returns>
public static List<string> NatureNames(string Nature)
{
var str = new List<string>();
if (Nature == null)
return str;
var Naturesp = Nature.Split(',').ToList();
Naturesp.ForEach(a =>
{
switch (a)
{
case "0":
str.Add("公办");
break;
case "1":
str.Add("民办");
break;
case "2":
str.Add("中外合作");
break;
case "3":
str.Add("港澳台");
break;
}
});
return str;
}
}
}