Exemplo n.º 1
0
        /// <summary>
        /// 获取缓急程度列展示的内容
        /// </summary>
        /// <param name="emergency">缓急程度</param>
        /// <returns>展示缓急程度图片的Html代码</returns>
        internal static string GetEmergencyImageHtml(FileEmergency emergency)
        {
            string result   = string.Empty;
            int    imageNum = EnumItemDescriptionAttribute.GetAttribute(emergency).ShortName.Length;

            //根据该枚举属性的感叹号数量放等量的感叹号图
            for (int i = 0; i < imageNum - 1; i++)
            {
                result += "<img src=\"../images/import.gif\" alt=\"{0}\"/>";
            }

            if (imageNum > 0)
            {
                result = string.Format(result, EnumItemDescriptionAttribute.GetAttribute(emergency).Description);
            }

            return(result);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 获取缓急程度列展示的内容
        /// </summary>
        /// <param name="emergency">缓急程度</param>
        /// <returns>展示缓急程度图片的Html代码</returns>
        internal static string GetEmergencyImageHtml(FileEmergency emergency)
        {
            string result = string.Empty;
            int imageNum = EnumItemDescriptionAttribute.GetAttribute(emergency).ShortName.Length;

            //根据该枚举属性的感叹号数量放等量的感叹号图
            for (int i = 0; i < imageNum - 1; i++)
            {
                result += "<img src=\"../images/import.gif\" alt=\"{0}\"/>";
            }

            if (imageNum > 0)
            {
                result = string.Format(result, EnumItemDescriptionAttribute.GetAttribute(emergency).Description);
            }

            return result;
        }