public string BindChoices() { StringBuilder ChoiceHtml = new StringBuilder(); List <Report2_Project> ProjectList = new ReportManager().GetReport2_Project(); if (ProjectList.Count == 0) { return(string.Empty); } foreach (Report2_Project item in ProjectList) { ChoiceHtml.AppendFormat("<option value=\"{0}\">{1}</option>", item.ProjectID, item.ProjectName); } return(ChoiceHtml.ToString()); }
public string BindChoicesWithNone() { StringBuilder ChoiceHtml = new StringBuilder(); List <Report3> ProjectList = new ReportManager().GetReport3_Project(); if (ProjectList.Count == 0) { return(string.Empty); } //加入空值 ProjectList.Insert(0, new Report3() { ProjectID = null, ProjectName = "" }); foreach (Report3 item in ProjectList) { ChoiceHtml.AppendFormat("<option value=\"{0}\">{1}</option>", item.ProjectID, item.ProjectName); } return(ChoiceHtml.ToString()); }
public static string GetReport7_HTML(Report7_Params param) { List <Report4> reportDataList = ReportManager.GetReport7_Data(param); if (reportDataList.Count == 0) { return(string.Empty); } //写报表头部 StringBuilder sbReportHTML = new StringBuilder(@"<table class='report_table' style='width:100%; text-align:left' >"); sbReportHTML.Append("<tr><th>项目名称</th><th>任务编号</th><th>任务名称</th><th>任务状态</th></tr>"); sbReportHTML.Append("<tbody>"); foreach (Report4 item in reportDataList) { sbReportHTML.AppendFormat("<tr><td>{0}</td><td>{1}</td><td>{2}</td><td>{3}</td>", item.ProjectName, item.BugID, item.BugTitle, item.ProgressStatusName); } sbReportHTML.AppendFormat("</tbody></table>"); return(sbReportHTML.ToString()); }
public string BindChoicesProjectSpaces() { StringBuilder ChoiceHtml = new StringBuilder(); List <Report22_ProjectSpace> ProjectList = new ReportManager().GetReport22_Project(); if (ProjectList.Count == 0) { return(string.Empty); } //加入空值 ProjectList.Insert(0, new Report22_ProjectSpace() { ProjectID = null, SubProjectID = null, Title = "" }); foreach (Report22_ProjectSpace item in ProjectList) { ChoiceHtml.AppendFormat("<option value=\"{0}\">{1}</option>", item.SubProjectID, item.Title); } return(ChoiceHtml.ToString()); }