コード例 #1
0
        /// <summary>
        /// 获取标详情页显示的利率
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public string GetProjectDetailShowRate(WeProductDetailInfo model)
        {
            //<span class='f36px c-fa7d00'>7</span>.5%+5.5%
            decimal rate      = model.YearRate ?? 0;
            string  strResult = "";

            strResult = string.Format("<span class='f36px c-fa7d00'>{0}</span>{1}%", CommUtils.GetFloatDivideStr(rate, 1), CommUtils.GetFloatDivideStr(rate, 2));
            if (model.IsNewHand && (model.TuandaiRedRate ?? 0) > 0)
            {
                decimal NewHandRate = StrObj.StrToDecimalDef((model.TuandaiRedRate ?? 0).ToString(), 0);
                strResult += string.Format("+{0}{1}%", CommUtils.GetFloatDivideStr(NewHandRate, 1), CommUtils.GetFloatDivideStr(NewHandRate, 2));
            }
            else
            {
                strResult += "";
            }
            return(strResult);
        }
コード例 #2
0
 //过滤掉标题中特殊字符
 public static string FilterProjectName(int pTypeId, string title)
 {
     if (title.IndexOf("【") != -1)
     {
         if (pTypeId == 17)
         {
             //股票配资【GPPZ-201505311454441363】
             title = title.Replace("股票配资【", "").Replace("】", "");
         }
         //else
         //{
         //    List<string> macroList = Tool.StrObj.GetMacroList(title, "【", "】");
         //    foreach (string macro in macroList)
         //    {
         //        title = title.Replace(macro, "");
         //    }
         //}
     }
     return(StrObj.CutString(title, 20));
 }