protected string GetYearRate(WXProjectListInfo temp) { if (temp.TypeId == 18 || temp.TypeId == 23) { return(string.Format("{0}", temp.ProfitTypeId == 1 ? ToolStatus.DeleteZero(temp.PreProfitRate_S) + "~" + ToolStatus.DeleteZero(temp.PreProfitRate_E) : ToolStatus.DeleteZero(temp.PreProfitRate_S))); } else { return(ToolStatus.DeleteZero(temp.YearRate ?? 0)); } }
//获取最近的几个热标 protected void GetLatestProject() { ProjectListRequest projectRequest = new ProjectListRequest(); projectRequest.RequestSource = 1; projectRequest.ProjectType = 0; projectRequest.PageSize = 1; projectRequest.PageIndex = 1; int projectItemNum = 0; List <WXProjectListInfo> projectList = projectBll.WXGetProjectShowList(projectRequest, out projectItemNum); if (projectList.Any()) { FirstProjectInfo = projectList[0]; } }
public static string GetProjectShowDeadline(WXProjectListInfo project) { string strTemplate = "{0}{1}"; if (project.TypeId == 17 || (project.TypeId == 6 && project.DeadType == 2) || project.TypeId == 99) { return(string.Format(strTemplate, project.Deadline, "天")); } else { if (project.TypeId == 23) { return(string.Format(strTemplate, project.MinDeadLine + "-" + project.MaxDeadLine, "个月")); } else { return(string.Format(strTemplate, project.Deadline, project.DeadType.Value == 1?"个月":"天")); } } }
//获取利率 public static string GetProjectYearRate(WXProjectListInfo temp) { string strFormat = "{0}<span>{1}%</span>"; if (temp.TypeId == 18 || temp.TypeId == 23) { if (temp.ProfitTypeId == 1) { return(string.Format(strFormat, ToolStatus.DeleteZero(temp.PreProfitRate_S) + "~" + ToolStatus.DeleteZero(temp.PreProfitRate_E), "", "f21px")); } else { return(string.Format(strFormat, ToolStatus.DeleteZero(temp.PreProfitRate_S), "", "f27px")); } } else { return(string.Format(strFormat, CommUtils.GetFloatDivideStr(temp.YearRate ?? 0, 1), CommUtils.GetFloatDivideStr(temp.YearRate ?? 0, 2), "f27px")); } }
public static string GetDeadlineStr(WXProjectListInfo project) { string strTemplate = "<b class='{2} c-212121'>{0}</b> {1}"; if (project.TypeId == 17 || (project.TypeId == 6 && project.DeadType == 2) || project.TypeId == 99) { return(string.Format(strTemplate, project.Deadline, "天", "f20px")); } else { if (project.TypeId == 23) { return(string.Format(strTemplate, project.MinDeadLine + "-" + project.MaxDeadLine, "个月", "f18px")); } else { return(string.Format(strTemplate, project.Deadline, project.DeadType.Value == 1 ? "个月" : "天", "f20px")); } } }
protected string GetProjectShowDeadline(WXProjectListInfo project) { string strTemplate = "<span class=\"c-212121 f13px\">{0}{1}</span>"; if (project.TypeId == 17 || (project.TypeId == 6 && project.DeadType == 2) || project.TypeId == 99) { return(string.Format(strTemplate, project.Deadline, "天")); } else { if (project.TypeId == 23) { return(string.Format(strTemplate, project.MinDeadLine + "-" + project.MaxDeadLine, "个月")); } else { return(string.Format(strTemplate, project.Deadline, project.DeadType.Value == 1 ? "个月" : "天")); } } }
protected string GetProjectYearRate(WXProjectListInfo temp) { string strFormat = "<p class=\"c-ff881f {1}\">{0}<span class=\"c-ff881f f18px\">%</span></p>"; if (temp.TypeId == 18 || temp.TypeId == 23) { if (temp.ProfitTypeId == 1) { return(string.Format(strFormat, ToolStatus.DeleteZero(temp.PreProfitRate_S) + "~" + ToolStatus.DeleteZero(temp.PreProfitRate_E), "f30px")); } else { return(string.Format(strFormat, ToolStatus.DeleteZero(temp.PreProfitRate_S), HasFloatDigt(temp.PreProfitRate_S) ? "f50px" : "f60px")); } } else { return(string.Format(strFormat, ToolStatus.DeleteZero(temp.YearRate), HasFloatDigt(temp.YearRate ?? 0) ? "f50px" : "f60px")); } }
public static string GetProjectSurplusMoney(WXProjectListInfo project) { decimal num = ((project.TotalShares ?? 0) - (project.CastedShares ?? 0)) * project.LowerUnit; return(string.Format("<span>{0}</span>{1}", (num >= 10000) ? ToolStatus.ConvertWanMoney(num) : ToolStatus.ConvertLowerMoney(num), (num >= 10000) ? "万" : "元")); }
protected string GetProjectSurplusMoney(WXProjectListInfo itemInfo) { decimal amount = ((itemInfo.TotalShares ?? 0) - (itemInfo.CastedShares ?? 0)) * itemInfo.LowerUnit; return(string.Format("<span>{0}</span>{1}", (amount >= 10000) ? ToolStatus.ConvertWanMoney(amount) : ToolStatus.ConvertLowerMoney(amount), (amount >= 10000) ? "万" : "元")); }
protected string GetProjectSurplusMoney(WXProjectListInfo project) { decimal num = ((project.TotalShares ?? 0) - (project.CastedShares ?? 0)) * project.LowerUnit; return(string.Format("<span class=\"c-212121 f13px\">{0}{1}</span>", (num >= 10000) ? ToolStatus.ConvertWanMoney(num) : ToolStatus.ConvertLowerMoney(num), (num >= 10000) ? "万" : "元")); }