Razor Compilation Error
We tried, we really did, but we just can't compile your view.
We're sorry :-(
Graphics courtesy of the awesome Matthew Inman
We tried, we really did, but we just can't compile your view.
We're sorry :-(
Graphics courtesy of the awesome Matthew Inman
Error compiling template: Views/Export/FinalTable.cshtml
Errors:
[CS1061] Line: 13 Column: 53 - 'Helpers.Skating.SkatingViewModel' enth??lt keine Definition f??r 'Dances', und es konnte keine Erweiterungsmethode 'Dances' gefunden werden, die ein erstes Argument vom Typ 'Helpers.Skating.SkatingViewModel' akzeptiert (Fehlt eine Using-Direktive oder ein Assemblyverweis?). (show)
[CS1061] Line: 25 Column: 47 - 'Helpers.Skating.SkatingViewModel' enth??lt keine Definition f??r 'Dances', und es konnte keine Erweiterungsmethode 'Dances' gefunden werden, die ein erstes Argument vom Typ 'Helpers.Skating.SkatingViewModel' akzeptiert (Fehlt eine Using-Direktive oder ein Assemblyverweis?). (show)
Details:
@using System.Collections.Generic
@using System.Linq
@using DataModel
@using DataModel.Models
@using NancyServer.Localization
@using Scrutinus.Localization
@inherits Nancy.ViewEngines.Razor.NancyRazorViewBase<NancyServer.ViewModels.FinalTableViewModel>
@{
Layout = "Views/Shared/_layout.cshtml";
var sums = new Dictionary<int, decimal>();
foreach (var participant in Model.SkatingModel.Dances.First().Participants)
{
sums.Add(participant.StartNumber, 0);
}
}
<div class="page-header">
<h1><a href="#" onclick="window.history.back(); return false;"><i class="fa fa-arrow-circle-o-left"></i></a>@Translation.Final @Model.Competition.Title </h1>
</div>
<div class="panel panel-default" style="overflow: scroll">
@foreach (var dance in Model.SkatingModel.Dances)
{
var danceObj = Model.Competition.Dances.Single(d => d.Dance.Id == dance.DanceId);
<div class="panel-heading">@danceObj.Dance.DanceName</div>
<table class="table fa-lg" style="border-style: solid">
<tr>
<th>Nr.</th>
@foreach (var judge in Model.SkatingModel.Adjudicators)
{
<th>@judge.Char</th>
}
@for (int i = 1; i <= Model.SkatingModel.FinalistsCount; i++)
{
<th>@(i == 1 ? "1." : "1.-" + i)</th>
}
<th>Platz</th>
<th>Summe</th>
</tr>
<!-- Table Body -->
@foreach (var participant in dance.Participants.OrderBy(p => p.StartNumber))
{
sums[participant.StartNumber] += participant.Rank;
<tr>
<td>@(participant.StartNumber)) @participant.Name</td>
@for(int i=0;i<Model.SkatingModel.Adjudicators.Count;i++)
{
<td>@participant.Ranks[i].Mark</td>
}
@for (int i = 0; i < Model.SkatingModel.FinalistsCount; i++)
{
<td>@(participant.ShowRanks[i] ? participant.Calculations[i].ToString() : "")</td>
}
<td>@participant.Rank</td>
<td>@sums[participant.StartNumber]</td>
</tr>
}
</table>
}
</div>
Compilation Source://------------------------------------------------------------------------------
Line 1: // <auto-generated>
Line 2: // Dieser Code wurde von einem Tool generiert.
Line 3: // Laufzeitversion:4.0.30319.42000
Line 4: //
Line 5: // Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
Line 6: // der Code erneut generiert wird.
Line 7: // </auto-generated>
Line 8: //------------------------------------------------------------------------------
Line 9:
Line 10: namespace RazorOutput {
Line 11: using Microsoft.CSharp.RuntimeBinder;
Line 12: using System;
Line 13: using System.IO;
Line 14:
Line 15: #line 3 "roo"
Line 16: using DataModel;
Line 17:
Line 18: #line default
Line 19: #line hidden
Line 20:
Line 21: #line 4 "roo"
Line 22: using DataModel.Models;
Line 23:
Line 24: #line default
Line 25: #line hidden
Line 26:
Line 27: #line 1 "roo"
Line 28: using System.Collections.Generic;
Line 29:
Line 30: #line default
Line 31: #line hidden
Line 32:
Line 33: #line 2 "roo"
Line 34: using System.Linq;
Line 35:
Line 36: #line default
Line 37: #line hidden
Line 38:
Line 39: #line 5 "roo"
Line 40: using NancyServer.Localization;
Line 41:
Line 42: #line default
Line 43: #line hidden
Line 44:
Line 45: #line 6 "roo"
Line 46: using Scrutinus.Localization;
Line 47:
Line 48: #line default
Line 49: #line hidden
Line 50: using NancyServer.ViewModels;
Line 51:
Line 52:
Line 53: public class RazorView : Nancy.ViewEngines.Razor.NancyRazorViewBase<NancyServer.ViewModels.FinalTableViewModel> {
Line 54:
Line 55: #line hidden
Line 56:
Line 57: public RazorView() {
Line 58: }
Line 59:
Line 60: public override void Execute() {
Line 61: WriteLiteral("\r\n");
Line 62:
Line 63:
Line 64: #line 9 "roo"
Line 65:
Line 66:
Line 67: #line default
Line 68: #line hidden
Line 69:
Line 70: #line 9 "roo"
Line 71:
Line 72: Layout = "Views/Shared/_layout.cshtml";
Line 73:
Line 74: var sums = new Dictionary<int, decimal>();
Line 75: foreach (var participant in Model.SkatingModel.Dances.First().Participants)
Line 76: {
Line 77: sums.Add(participant.StartNumber, 0);
Line 78: }
Line 79:
Line 80:
Line 81: #line default
Line 82: #line hidden
Line 83: WriteLiteral(" \r\n\r\n<div");
Line 84:
Line 85: WriteLiteral(" class=\"page-header\"");
Line 86:
Line 87: WriteLiteral(">\r\n <h1><a");
Line 88:
Line 89: WriteLiteral(" href=\"#\"");
Line 90:
Line 91: WriteLiteral(" onclick=\"window.history.back(); return false;\"");
Line 92:
Line 93: WriteLiteral("><i");
Line 94:
Line 95: WriteLiteral(" class=\"fa fa-arrow-circle-o-left\"");
Line 96:
Line 97: WriteLiteral("></i></a>");
Line 98:
Line 99:
Line 100: #line 20 "roo"
Line 101: Write(Translation.Final);
Line 102:
Line 103:
Line 104: #line default
Line 105: #line hidden
Line 106: WriteLiteral(" ");
Line 107:
Line 108:
Line 109: #line 20 "roo"
Line 110: Write(Model.Competition.Title);
Line 111:
Line 112:
Line 113: #line default
Line 114: #line hidden
Line 115: WriteLiteral(" </h1>\r\n</div>\r\n\r\n<div");
Line 116:
Line 117: WriteLiteral(" class=\"panel panel-default\"");
Line 118:
Line 119: WriteLiteral(" style=\"overflow: scroll\"");
Line 120:
Line 121: WriteLiteral(">\r\n \r\n");
Line 122:
Line 123:
Line 124: #line 25 "roo"
Line 125:
Line 126:
Line 127: #line default
Line 128: #line hidden
Line 129:
Line 130: #line 25 "roo"
Line 131: foreach (var dance in Model.SkatingModel.Dances)
Line 132: {
Line 133: var danceObj = Model.Competition.Dances.Single(d => d.Dance.Id == dance.DanceId);
Line 134:
Line 135:
Line 136: #line default
Line 137: #line hidden
Line 138: WriteLiteral(" <div");
Line 139:
Line 140: WriteLiteral(" class=\"panel-heading\"");
Line 141:
Line 142: WriteLiteral(">");
Line 143:
Line 144:
Line 145: #line 28 "roo"
Line 146: Write(danceObj.Dance.DanceName);
Line 147:
Line 148:
Line 149: #line default
Line 150: #line hidden
Line 151: WriteLiteral("</div>\r\n");
Line 152:
Line 153: WriteLiteral(" <table");
Line 154:
Line 155: WriteLiteral(" class=\"table fa-lg\"");
Line 156:
Line 157: WriteLiteral(" style=\"border-style: solid\"");
Line 158:
Line 159: WriteLiteral(">\r\n <tr>\r\n <th>Nr.</th>\r\n");
Line 160:
Line 161:
Line 162: #line 32 "roo"
Line 163:
Line 164:
Line 165: #line default
Line 166: #line hidden
Line 167:
Line 168: #line 32 "roo"
Line 169: foreach (var judge in Model.SkatingModel.Adjudicators)
Line 170: {
Line 171:
Line 172:
Line 173: #line default
Line 174: #line hidden
Line 175: WriteLiteral(" <th>");
Line 176:
Line 177:
Line 178: #line 34 "roo"
Line 179: Write(judge.Char);
Line 180:
Line 181:
Line 182: #line default
Line 183: #line hidden
Line 184: WriteLiteral("</th>\r\n");
Line 185:
Line 186:
Line 187: #line 35 "roo"
Line 188: }
Line 189:
Line 190:
Line 191: #line default
Line 192: #line hidden
Line 193: WriteLiteral(" \r\n");
Line 194:
Line 195:
Line 196: #line 37 "roo"
Line 197:
Line 198:
Line 199: #line default
Line 200: #line hidden
Line 201:
Line 202: #line 37 "roo"
Line 203: for (int i = 1; i <= Model.SkatingModel.FinalistsCount; i++)
Line 204: {
Line 205:
Line 206:
Line 207: #line default
Line 208: #line hidden
Line 209: WriteLiteral(" <th>");
Line 210:
Line 211:
Line 212: #line 39 "roo"
Line 213: Write(i == 1 ? "1." : "1.-" + i);
Line 214:
Line 215:
Line 216: #line default
Line 217: #line hidden
Line 218: WriteLiteral("</th>\r\n");
Line 219:
Line 220:
Line 221: #line 40 "roo"
Line 222: }
Line 223:
Line 224:
Line 225: #line default
Line 226: #line hidden
Line 227: WriteLiteral(" \r\n <th>Platz</th>\r\n <th>Summe</th>\r\n " +
Line 228: " </tr>\r\n <!-- Table Body -->\r\n");
Line 229:
Line 230:
Line 231: #line 46 "roo"
Line 232:
Line 233:
Line 234: #line default
Line 235: #line hidden
Line 236:
Line 237: #line 46 "roo"
Line 238: foreach (var participant in dance.Participants.OrderBy(p => p.StartNumber))
Line 239: {
Line 240: sums[participant.StartNumber] += participant.Rank;
Line 241:
Line 242:
Line 243: #line default
Line 244: #line hidden
Line 245: WriteLiteral(" <tr>\r\n <td>");
Line 246:
Line 247:
Line 248: #line 50 "roo"
Line 249: Write(participant.StartNumber);
Line 250:
Line 251:
Line 252: #line default
Line 253: #line hidden
Line 254: WriteLiteral(") ");
Line 255:
Line 256:
Line 257: #line 50 "roo"
Line 258: Write(participant.Name);
Line 259:
Line 260:
Line 261: #line default
Line 262: #line hidden
Line 263: WriteLiteral("</td>\r\n");
Line 264:
Line 265:
Line 266: #line 51 "roo"
Line 267:
Line 268:
Line 269: #line default
Line 270: #line hidden
Line 271:
Line 272: #line 51 "roo"
Line 273: for(int i=0;i<Model.SkatingModel.Adjudicators.Count;i++)
Line 274: {
Line 275:
Line 276:
Line 277: #line default
Line 278: #line hidden
Line 279: WriteLiteral(" <td>");
Line 280:
Line 281:
Line 282: #line 53 "roo"
Line 283: Write(participant.Ranks[i].Mark);
Line 284:
Line 285:
Line 286: #line default
Line 287: #line hidden
Line 288: WriteLiteral("</td>\r\n");
Line 289:
Line 290:
Line 291: #line 54 "roo"
Line 292: }
Line 293:
Line 294:
Line 295: #line default
Line 296: #line hidden
Line 297: WriteLiteral(" ");
Line 298:
Line 299:
Line 300: #line 55 "roo"
Line 301: for (int i = 0; i < Model.SkatingModel.FinalistsCount; i++)
Line 302: {
Line 303:
Line 304:
Line 305: #line default
Line 306: #line hidden
Line 307: WriteLiteral(" <td>");
Line 308:
Line 309:
Line 310: #line 57 "roo"
Line 311: Write(participant.ShowRanks[i] ? participant.Calculations[i].ToString() : "");
Line 312:
Line 313:
Line 314: #line default
Line 315: #line hidden
Line 316: WriteLiteral("</td>\r\n");
Line 317:
Line 318:
Line 319: #line 58 "roo"
Line 320: }
Line 321:
Line 322:
Line 323: #line default
Line 324: #line hidden
Line 325: WriteLiteral(" <td>");
Line 326:
Line 327:
Line 328: #line 59 "roo"
Line 329: Write(participant.Rank);
Line 330:
Line 331:
Line 332: #line default
Line 333: #line hidden
Line 334: WriteLiteral("</td>\r\n <td>");
Line 335:
Line 336:
Line 337: #line 60 "roo"
Line 338: Write(sums[participant.StartNumber]);
Line 339:
Line 340:
Line 341: #line default
Line 342: #line hidden
Line 343: WriteLiteral("</td>\r\n </tr>\r\n");
Line 344:
Line 345:
Line 346: #line 62 "roo"
Line 347: }
Line 348:
Line 349:
Line 350: #line default
Line 351: #line hidden
Line 352: WriteLiteral(" </table>\r\n");
Line 353:
Line 354:
Line 355: #line 64 "roo"
Line 356: }
Line 357:
Line 358:
Line 359: #line default
Line 360: #line hidden
Line 361: WriteLiteral("</div>");
Line 362:
Line 363: }
Line 364: }
Line 365: }
Line 366: