示例#1
0
        public static string GetServiceArea(int intServiceArea)
        {
            StringBuilder           stringBuilder   = new StringBuilder();
            IList <EnumDescription> serviceAreaList = ServiceAreaHelper.GetServiceAreaList(typeof(ServiceArea));

            foreach (EnumDescription item in serviceAreaList)
            {
                if (item.EnumValue == (intServiceArea & item.EnumValue))
                {
                    stringBuilder.AppendFormat("{0},", ServiceAreaHelper.GetServiceAreaDes((ServiceArea)item.EnumValue));
                }
            }
            return(stringBuilder.ToString().TrimEnd(','));
        }
示例#2
0
        //道具使用范围
        protected string GetServiceArea(int intServiceArea)
        {
            StringBuilder           sb             = new StringBuilder( );
            IList <EnumDescription> arrServiceArea = ServiceAreaHelper.GetServiceAreaList(typeof(ServiceArea));

            foreach (EnumDescription v in arrServiceArea)
            {
                if (v.EnumValue == (intServiceArea & v.EnumValue))
                {
                    sb.AppendFormat("{0},", ServiceAreaHelper.GetServiceAreaDes(( ServiceArea )v.EnumValue));
                }
            }

            return(sb.ToString( ).TrimEnd(new char[] { ',' }));
        }
示例#3
0
 public static string GetServiceArea(int intServiceArea)
 {
     System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder();
     System.Collections.Generic.IList <EnumDescription> serviceAreaList = ServiceAreaHelper.GetServiceAreaList(typeof(ServiceArea));
     foreach (EnumDescription current in serviceAreaList)
     {
         if (current.EnumValue == (intServiceArea & current.EnumValue))
         {
             stringBuilder.AppendFormat("{0},", ServiceAreaHelper.GetServiceAreaDes((ServiceArea)current.EnumValue));
         }
     }
     return(stringBuilder.ToString().TrimEnd(new char[]
     {
         ','
     }));
 }