public string GetTitle(string protocolversion, string draftversion) { SSPWebUI.Data.ProtocolHeader hdr = new SSPWebUI.Data.ProtocolHeaderData().Get(decimal.Parse(protocolversion), 0, decimal.Parse(draftversion)); ProtocolPostingDate = hdr.WebPostingDate.Value.ToString("MMMM", CultureInfo.InvariantCulture) + " " + hdr.WebPostingDate.Value.Year; string html = "<h1>" + hdr.Title + "</h1>"; //if(hdr.Subtitle!="") // html = html + "<h2>" + hdr.Subtitle + "</h2>"; html = html + "<table style='width:100%'><tr><td>" + "<span><b>Version</b>: " + hdr.ProtocolVersion + "</span></td>"; if (hdr.WebPostingDate.Value != null) { html = html + "<td align='right'><span><b>Protocol Posting Date</b>: " + hdr.WebPostingDate.Value.ToString("MMMM", CultureInfo.InvariantCulture) + " " + hdr.WebPostingDate.Value.Year + "</td></span></tr></table>"; } html = html + "<p><b>Base Versions:</b><p><ul>"; string[] baseversions = hdr.BaseVersions.Split(';'); List <SSPWebUI.Data.BaseVersion> baseversionslist = new SSPWebUI.Data.BaseVersion().getAllVersions(); foreach (string b in baseversions) { foreach (BaseVersion basever in baseversionslist) { if (b != "" && basever.Code == int.Parse(b)) { html = html + "<li>" + basever.Label + "</li>"; } } } html = html + "</ul>"; return(html); }
protected void LoadHtmlData(System.Web.UI.HtmlControls.HtmlGenericControl ctl, string version) { string ProtocolVersion = Request.QueryString["ProtocolVersionCKey"]; string section = ddSection.SelectedItem.Text; ctl.InnerHtml = ""; if (version != "" && section == "Notes and References") { //string html = new SSPWebUI.Data.Note().GetMergedNotes(decimal.Parse(ProtocolVersion), decimal.Parse(version)); string html = new HTMLHelper().GetNotes(ProtocolVersion, version, true, 1); ctl.InnerHtml = html; } else if (version != "" && section == "Title") { ProtocolHeader hdr = new SSPWebUI.Data.ProtocolHeaderData().Get(decimal.Parse(ProtocolVersion), 0, decimal.Parse(version)); ctl.InnerHtml = "<p><b>Title:</b>" + hdr.Title + "</p>"; ctl.InnerHtml = ctl.InnerHtml + "<p><b>Subtitle:</b>" + hdr.Subtitle + "</p>"; ctl.InnerHtml = ctl.InnerHtml + "<p><b>Base Versions:</b><p><ul>"; string[] baseversions = hdr.BaseVersions.Split(';'); List <BaseVersion> baseversionslist = new BaseVersion().getAllVersions(); foreach (string b in baseversions) { foreach (BaseVersion basever in baseversionslist) { if (basever.Code == int.Parse(b)) { ctl.InnerHtml = ctl.InnerHtml + "<li>" + basever.Label + "</li>"; } } } ctl.InnerHtml = ctl.InnerHtml + "</ul>"; } else if (version != "" && section == "Cover Page") { ctl.InnerHtml = new SSPWebUI.Data.CoverPage().GetProcedure(decimal.Parse(ProtocolVersion), 0, decimal.Parse(version)).ProcedureDetails; } else if (version != "" && section == "Authors") { string html = "<table>"; List <Author> authors = new SSPWebUI.Data.Author().getAuthors(decimal.Parse(ProtocolVersion), 0, decimal.Parse(version)); html = html + "<tr><thead><th>Author</th><th>Role</th></thead><tbody>"; foreach (Author author in authors) { html = html + "<tr>"; html = html + "<td>" + author.Name + "</td>" + "<td>" + author.Role + "</td>"; html = html + "</tr>"; } html = html + "</tbody></table>"; ctl.InnerHtml = html; } else if (version != "" && section == "Case Summary") { List <Checklist> checklists = ProtocolsData.GetChecklists(decimal.Parse(ProtocolVersion)); foreach (Checklist c in checklists) { //ctl.InnerHtml = ctl.InnerHtml + "<h2>" + c.Name + "</h2>"; HTMLHelper html = new HTMLHelper(); ctl.InnerHtml = ctl.InnerHtml + html.GetCaseSummary(c.ChecklistCKey.ToString(), version); } } }