CPE_learningsite
This repository has no backups
This repository's network speed is throttled to 100KB/sec
Upgrade your account to fix these warnings, or use backups.vc for automated backups
23ae6c144ad389aa329c3673416bbb0cedc81922
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
using System; using System.Collections.Generic; using System.Configuration; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Web.UI.WebControls.WebParts; using Microsoft.SqlServer.Server; namespace CPE.Utilities { public static class Result { public static string PassResultText { get { string path = "~/static/doc/PassResultText.html"; string filePath = System.Web.HttpContext.Current.Server.MapPath(path); return System.IO.File.ReadAllText(filePath); } } public static string FailResultText { get { string path = "~/static/doc/FailResultText.html"; string filePath = System.Web.HttpContext.Current.Server.MapPath(path); return System.IO.File.ReadAllText(filePath); } } public static string IneligibleResultText { get { string path = "~/static/doc/IneligibleResultText.html"; string filePath = System.Web.HttpContext.Current.Server.MapPath(path); return System.IO.File.ReadAllText(filePath); } } public static string WonkyResultText { get { string path = "~/static/doc/WonkyResultText.html"; string filePath = System.Web.HttpContext.Current.Server.MapPath(path); return System.IO.File.ReadAllText(filePath); } } //public static string RenderPassResult(int principalid, string certURl) //{ // string html = PassResultText; // html = html.Replace("[principalid]", principalid.ToString()); // html = html.Replace("certUrl", certURl); // return html; //} public static string RenderPassResult(int principalid) { string html = PassResultText; html = html.Replace("[principalid]", principalid.ToString()); return html; } public static string RenderCertLink(int meetingSco, DateTime purchaseDate, string ticket) { string meetingUrl = meetingSco.ToString(); var certLink = ConfigurationManager.AppSettings["CertLink"]; var certURl = string.Format(certLink, meetingUrl, purchaseDate.ToString("yyyyMMdd"), ticket); return certURl; } public static string RenderFailResult(int principalid) { string html = FailResultText; html = html.Replace("[principalid]", principalid.ToString()); return html; } public static string RenderIneligibleResult(int principalid) { string html = IneligibleResultText; html = html.Replace("[principalid]", principalid.ToString()); return html; } public static string RenderWonkyResult() { string html = WonkyResultText; return html; } } } |
Commits for CPE_learningsite/CPE/CPE.Utilities/Result.cs
Revision | Author | Commited | Message |
---|---|---|---|
4cd176 ... | v.shishlov | Fri 27 Aug, 2021 14:33:17 +0000 | initial commit |