예제 #1
0
        /// <summary>
        /// 获取Logo图片地址(汉字转化为拼音)
        /// </summary>
        /// <param name="brand">品牌名称</param>
        /// <returns>Url</returns>
        public static string GetLogoUrlByName(string brand)
        {
            if (brand == null || brand.Length < 4)
            {
                return(null);
            }

            return("/Images/Logo/" + HttpUtility.UrlEncode(Chs2py.Pinyin(brand.Substring(4).Trim()).ToLower()) + ".png");
        }
예제 #2
0
        /// <summary>
        /// 得到车辆品牌Logo图片地址
        /// </summary>
        /// <param name="Pic_Nmae">品牌名称</param>
        /// <returns>Url</returns>
        public static string GetShangBiao(string Pic_Nmae)
        {
            string a  = Pic_Nmae.Replace(" ", "").Substring(Pic_Nmae.Replace(" ", "").IndexOf("-") + 1);
            string aa = null;

            if (a != null)
            {
                aa = Chs2py.Pinyin(a).ToLower();
            }
            string s = "/Images/Logo/" + HttpUtility.UrlEncode(aa + ".png");

            return(s);
        }
예제 #3
0
        /// <summary>
        /// 获取轮胎Logo图片地址(汉字转化为拼音)
        /// </summary>
        /// <param name="Pic_Nmae">品牌名称</param>
        /// <returns>Url</returns>
        public static string GetTirsLogoUrlByName(string Pic_Nmae)
        {
            string s = "/Images/TiresLogo/" + HttpUtility.UrlEncode(Chs2py.Pinyin(Pic_Nmae).ToLower().Split('/')[0] + ".png");

            return(s);
        }