Created
April 9, 2018 19:02
-
-
Save hishaamn/1a5c8ea6ffd990c4148a90df6b880518 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| protected override void ShowRefreshStatus(StringBuilder stringBuilder) | |
| { | |
| int result; | |
| int.TryParse(this.Request.QueryString["refresh"], out result); | |
| stringBuilder.Append("Last updated: {0}. ".FormatWith(DateTime.Now.ToString(CultureInfo.InvariantCulture))); | |
| int[] numArray = { 1, 2, 5, 10, 20, 30, 60 }; | |
| stringBuilder.Append($"Refresh each <a href='jobsExtension.aspx' class='refresh-link {(result == 0 ? "refresh-selected" : string.Empty)}'>No Refresh</a>"); | |
| foreach (var num in numArray) | |
| { | |
| var refreshSelected = result == num ? "refresh-selected" : string.Empty; | |
| var refreshMessage = string.Format(", <a href='jobsExtension.aspx?refresh={0}' class='refresh-link {1}'>{0} sec</a>", num, refreshSelected); | |
| stringBuilder.Append(refreshMessage); | |
| } | |
| stringBuilder.Append("<br /><br />"); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment