protected override void RenderWebPart(HtmlTextWriter output) { switch (activation) { case 1: output.Write("WebPart feature not activated."); return; case 2: output.Write("Too many users activated for this feature."); return; case -1: output.Write("Unable to retrieve activation status."); return; } ; try { EnsureChildControls(); output.Write(sError); output.Write(legendTable()); output.Write("<br>"); output.Write(buildFilterTableTop()); ddl.RenderControl(output); output.Write(" Project: "); ddlProject.RenderControl(output); output.Write(buildFilterTableBottom()); string ret = buildProjectGrid(); if (ret != "") { output.Write("Error: " + ret); } else { output.Write("<br>"); output.Write(buildHeader("Project Summary")); gvPJSummary.RenderControl(output); output.Write("<br>"); output.Write("<table border=\"0\" width=\"100%\"><tr><td width=\"50%\" valign=\"top\">"); output.Write(buildHeader("Task Summary")); output.Write(buildTaskSummary()); output.Write("</td><td width=\"50%\" valign=\"top\">"); output.Write(buildHeader("Milestone Summary")); output.Write(buildMSSummary()); output.Write("</td></tr>"); output.Write("<tr><td width=\"50%\" valign=\"top\">"); output.Write(buildHeader("Issue Summary")); output.Write(buildSummaryTable(arrIssues, totalIssues)); output.Write("</td><td width=\"50%\" valign=\"top\">"); output.Write(buildHeader("Risk Summary")); output.Write(buildSummaryTable(arrRisks, totalRisks)); output.Write("</td></tr>"); output.Write("</table>"); } } catch (Exception ex) { output.Write("RWP: " + ex.Message + ex.StackTrace); } output.Write(outputData); }