Error compiling template "Neros/InvoiceList.cshtml"
Line 580: The name 'childTableHeaders' does not exist in the current context

1 //------------------------------------------------------------------------------ 2 // <auto-generated> 3 // This code was generated by a tool. 4 // Runtime Version:4.0.30319.42000 5 // 6 // Changes to this file may cause incorrect behavior and will be lost if 7 // the code is regenerated. 8 // </auto-generated> 9 //------------------------------------------------------------------------------ 10 11 namespace CompiledRazorTemplates.Dynamic { 12 using System; 13 using System.Collections.Generic; 14 using System.Linq; 15 16 #line 219 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 17 using Neros.Controllers; 18 19 #line default 20 #line hidden 21 22 #line 220 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 23 using Neros.Common.Interfaces; 24 25 #line default 26 #line hidden 27 28 #line 221 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 29 using Neros.Common.ListElements; 30 31 #line default 32 #line hidden 33 34 #line 5 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 35 using Dynamicweb; 36 37 #line default 38 #line hidden 39 40 #line 6 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 41 using System.Globalization; 42 43 #line default 44 #line hidden 45 46 #line 222 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 47 using Dynamicweb.Rapido.Blocks.Extensibility; 48 49 #line default 50 #line hidden 51 52 #line 223 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 53 using System.Web; 54 55 #line default 56 #line hidden 57 58 59 public class RazorEngine_8fd0edd407a5448da22afb73336dd933 : Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> { 60 61 #line hidden 62 63 #line 10 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 64 65 IListController controller = null; 66 ListHeaders tableHeaders = null; 67 ListRows tableRows = null; 68 69 #line default 70 #line hidden 71 72 73 #line 36 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 74 75 76 77 #line default 78 #line hidden 79 80 81 #line 102 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 82 83 84 85 #line default 86 #line hidden 87 88 89 #line 224 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 90 91 92 93 #line default 94 #line hidden 95 96 97 public RazorEngine_8fd0edd407a5448da22afb73336dd933() { 98 } 99 100 public override void Execute() { 101 WriteLiteral("\r\n"); 102 103 WriteLiteral(" \r\n\r\n"); 104 105 WriteLiteral("\r\n"); 106 107 108 #line 16 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 109 110 controller = (IListController)(Neros.Controllers.ControllerFactory.CreateController("InvoiceController")); 111 tableHeaders = controller.GetHeaders(); 112 var gSearch = String.IsNullOrEmpty(Context.Current.Request["gsearch"])?"":Context.Current.Request["gsearch"]; 113 DateTime dateFrom = String.IsNullOrEmpty(Context.Current.Request["startDate"])?DateTime.Now.AddYears(-10): DateTime.ParseExact(Context.Current.Request["startDate"], "yyyy-MM-dd", CultureInfo.InvariantCulture); 114 DateTime dateTo = String.IsNullOrEmpty(Context.Current.Request["endDate"])?DateTime.Now: DateTime.ParseExact(Context.Current.Request["endDate"], "yyyy-MM-dd", CultureInfo.InvariantCulture); 115 var currentpage = Int32.Parse(String.IsNullOrEmpty(Context.Current.Request["currentpage"])?"1":Context.Current.Request["currentpage"]); 116 var PageSize = Int32.Parse(String.IsNullOrEmpty(Context.Current.Request["pagesize"])?"10":Context.Current.Request["pagesize"]); 117 tableRows = controller.GetRows((int)currentpage, PageSize, null, true, gSearch,dateFrom,dateTo); 118 DateTime dateFromPicker = String.IsNullOrEmpty(Context.Current.Request["startDate"])?DateTime.Now.AddYears(-1): DateTime.ParseExact(Context.Current.Request["startDate"], "yyyy-MM-dd", CultureInfo.InvariantCulture); 119 120 121 #line default 122 #line hidden 123 WriteLiteral("\t\r\n\r\n"); 124 125 WriteLiteral(" \r\n\r\n"); 126 127 WriteLiteral(" \r\n"); 128 129 WriteLiteral("\r\n\r\n"); 130 131 132 #line 41 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 133 134 135 136 #line default 137 #line hidden 138 WriteLiteral("<form"); 139 140 WriteLiteral(" action=\"/alvoen/invoice-list\""); 141 142 WriteLiteral(">\r\n<div>\r\n <input"); 143 144 WriteLiteral(" type=\"hidden\""); 145 146 WriteLiteral(" id=\"searchForm\""); 147 148 WriteLiteral(" name=\"ncmd2\""); 149 150 WriteLiteral(" value=\"search\""); 151 152 WriteLiteral(">\r\n <div"); 153 154 WriteLiteral(" style=\"display:inline-block\""); 155 156 WriteLiteral(" class=\"grid__col-xs-5\""); 157 158 WriteLiteral(">\r\n\t\t <h2>Invoice List</h2>\r\n </div>\r\n\r\n <div"); 159 160 WriteLiteral(" style=\"display:inline-block;float: right; text-align: \""); 161 162 WriteLiteral(" class=\"grid__col-xs-7\""); 163 164 WriteLiteral(">\r\n <div"); 165 166 WriteLiteral(" style=\"display:inline-block; margin-right: 24px;\""); 167 168 WriteLiteral(">\r\n \r\n </div>\r\n\r\n <div"); 169 170 WriteLiteral(" style=\"display:inline-block;\""); 171 172 WriteLiteral(">\r\n <label"); 173 174 WriteLiteral(" style=\"display:block\""); 175 176 WriteLiteral(" for=\"start\""); 177 178 WriteLiteral(">"); 179 180 181 #line 55 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 182 Write(Translate("Start date:")); 183 184 185 #line default 186 #line hidden 187 WriteLiteral("</label>\r\n <input"); 188 189 WriteLiteral(" style=\"height: 36px; border: 1px solid #c6c6c6;\""); 190 191 WriteLiteral(" type=\"date\""); 192 193 WriteLiteral(" id=\"start\""); 194 195 WriteLiteral(" name=\"trip-start\""); 196 197 WriteLiteral("\r\n value=\"dd-mm-yyyy\""); 198 199 WriteLiteral("\r\n min=\"2018-01-01\""); 200 201 WriteLiteral(" max=\"2025-12-31\""); 202 203 WriteLiteral(">\r\n </div>\r\n \r\n <div"); 204 205 WriteLiteral(" style=\"display:inline-block; margin-right: 24px;\""); 206 207 WriteLiteral(">\r\n <label"); 208 209 WriteLiteral(" style=\"display:block\""); 210 211 WriteLiteral(" for=\"end\""); 212 213 WriteLiteral(">"); 214 215 216 #line 62 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 217 Write(Translate("End date:")); 218 219 220 #line default 221 #line hidden 222 WriteLiteral("</label>\r\n <input"); 223 224 WriteLiteral(" style=\"height: 36px; border: 1px solid #c6c6c6;\""); 225 226 WriteLiteral(" type=\"date\""); 227 228 WriteLiteral(" id=\"start\""); 229 230 WriteLiteral(" name=\"trip-start\""); 231 232 WriteLiteral("\r\n value=\"dd-mm-yyyy\""); 233 234 WriteLiteral("\r\n min=\"2018-01-01\""); 235 236 WriteLiteral(" max=\"2025-12-31\""); 237 238 WriteLiteral(">\r\n </div>\r\n\r\n <div"); 239 240 WriteLiteral(" style=\"display:inline-block\""); 241 242 WriteLiteral(">\r\n <input"); 243 244 WriteLiteral(" style=\"height: 36px; border: 1px solid #c6c6c6;\""); 245 246 WriteLiteral(" placeholder=\"search\""); 247 248 WriteLiteral(" type=\"search\""); 249 250 WriteLiteral(" id=\"gsearch\""); 251 252 WriteLiteral(" name=\"gsearch\""); 253 254 WriteLiteral(">\r\n <input"); 255 256 WriteLiteral(" style=\"height: 36px; border: 1px solid #c6c6c6; padding: 6px 24px\""); 257 258 WriteAttribute("value", Tuple.Create(" value=\"", 3610), Tuple.Create("\"", 3638) 259 260 #line 70 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 261 , Tuple.Create(Tuple.Create("", 3618), Tuple.Create<System.Object, System.Int32>(Translate("Search") 262 263 #line default 264 #line hidden 265 , 3618), false) 266 ); 267 268 WriteLiteral(" type=\"submit\""); 269 270 WriteLiteral(">\r\n\r\n </div>\r\n </div>\r\n\t</div>\r\n</form> \r\n"); 271 272 273 #line 76 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 274 275 276 #line default 277 #line hidden 278 WriteLiteral(@" 279 280 <script> 281 282 function formatDate(date) { 283 var d = new Date(date), 284 month = '' + (d.getMonth() + 1), 285 day = '' + d.getDate(), 286 year = d.getFullYear(); 287 288 if (month.length < 2) 289 month = '0' + month; 290 if (day.length < 2) 291 day = '0' + day; 292 293 return [year, month, day].join('-'); 294 } 295 </script> 296 297 "); 298 299 WriteLiteral("\r\n"); 300 301 WriteLiteral("\r\n\r\n"); 302 303 WriteLiteral("\r\n<style>\r\n .hideModal {\r\n display: none;\r\n}\r\n .close {\r\n color: #333;\r\n " + 304 " float: right;\r\n font-size: 28px;\r\n font-weight: bold;\r\n}\r\n .closeMo" + 305 "dalOrderLine{\r\n float:right;\r\n margin:0;\r\n }\r\n</style>\r\n\r\n"); 306 307 308 #line 122 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 309 310 var indexRow=0; 311 312 313 #line default 314 #line hidden 315 WriteLiteral("<table"); 316 317 WriteLiteral(" class=\"n-table\""); 318 319 WriteLiteral(">\r\n <tr>\r\n"); 320 321 322 #line 126 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 323 324 325 #line default 326 #line hidden 327 328 #line 126 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 329 foreach (var tableHeader in tableHeaders) 330 { 331 332 333 #line default 334 #line hidden 335 WriteLiteral(" <th"); 336 337 WriteLiteral(" class=\"n-tableheader\""); 338 339 WriteLiteral(">\r\n <span>"); 340 341 342 #line 129 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 343 Write(Translate(@tableHeader.Caption)); 344 345 346 #line default 347 #line hidden 348 WriteLiteral("</span>\r\n <span"); 349 350 WriteLiteral(" class=\"n-tableheadersort\""); 351 352 WriteLiteral("><i"); 353 354 WriteLiteral(" class=\"\""); 355 356 WriteLiteral("></i></span>\r\n </th>\r\n"); 357 358 359 #line 132 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 360 } 361 362 363 #line default 364 #line hidden 365 WriteLiteral(" </tr>\r\n\r\n"); 366 367 368 #line 135 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 369 370 371 #line default 372 #line hidden 373 374 #line 135 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 375 foreach (var tableRow in tableRows) 376 { 377 indexRow+=1; 378 379 380 #line default 381 #line hidden 382 WriteLiteral(" <tr"); 383 384 WriteAttribute("class", Tuple.Create(" class=\"", 4966), Tuple.Create("\"", 5008) 385 , Tuple.Create(Tuple.Create("", 4974), Tuple.Create("n-tablerow", 4974), true) 386 , Tuple.Create(Tuple.Create(" ", 4984), Tuple.Create("table_parent_", 4986), true) 387 388 #line 138 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 389 , Tuple.Create(Tuple.Create("", 4999), Tuple.Create<System.Object, System.Int32>(indexRow 390 391 #line default 392 #line hidden 393 , 4999), false) 394 ); 395 396 WriteLiteral(" data-rowId=\""); 397 398 399 #line 138 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 400 Write(indexRow); 401 402 403 #line default 404 #line hidden 405 WriteLiteral("\""); 406 407 WriteLiteral(">\r\n"); 408 409 410 #line 139 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 411 412 413 #line default 414 #line hidden 415 416 #line 139 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 417 foreach (var tableField in tableRow) 418 { 419 420 421 422 #line default 423 #line hidden 424 WriteLiteral(" <td"); 425 426 WriteAttribute("onclick", Tuple.Create(" onclick=", 5109), Tuple.Create("", 5144) 427 428 #line 142 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 429 , Tuple.Create(Tuple.Create("", 5118), Tuple.Create<System.Object, System.Int32>(tableField.OnSelectScript 430 431 #line default 432 #line hidden 433 , 5118), false) 434 ); 435 436 WriteLiteral(" class=\"n-tablefield\""); 437 438 WriteLiteral(">\r\n"); 439 440 441 #line 143 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 442 443 444 #line default 445 #line hidden 446 447 #line 143 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 448 if (tableField.Value == "Order Not Invoiced" || tableField.Value == "Order Invoiced" || tableField.Value == "Order Entered" || tableField.Value == "Order Shipped") 449 { 450 451 452 #line default 453 #line hidden 454 WriteLiteral(" <span>"); 455 456 457 #line 145 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 458 Write(Translate(tableField.Value)); 459 460 461 #line default 462 #line hidden 463 WriteLiteral("</span>\r\n"); 464 465 466 #line 146 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 467 } 468 else 469 { 470 471 472 #line default 473 #line hidden 474 WriteLiteral(" <span>"); 475 476 477 #line 149 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 478 Write(tableField.Value); 479 480 481 #line default 482 #line hidden 483 WriteLiteral("</span>\r\n"); 484 485 486 #line 150 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 487 } 488 489 490 #line default 491 #line hidden 492 WriteLiteral("\r\n </td>\r\n"); 493 494 495 #line 153 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 496 } 497 498 499 #line default 500 #line hidden 501 WriteLiteral(" </tr>\r\n"); 502 503 504 #line 155 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 505 506 if (tableRow.ChildList != null) 507 { 508 509 510 #line default 511 #line hidden 512 WriteLiteral(" <tr"); 513 514 WriteAttribute("class", Tuple.Create(" class=\"", 5597), Tuple.Create("\"", 5639) 515 , Tuple.Create(Tuple.Create("", 5605), Tuple.Create("table_child_", 5605), true) 516 517 #line 158 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 518 , Tuple.Create(Tuple.Create("", 5617), Tuple.Create<System.Object, System.Int32>(indexRow 519 520 #line default 521 #line hidden 522 , 5617), false) 523 , Tuple.Create(Tuple.Create(" ", 5626), Tuple.Create("modalrowdata", 5627), true) 524 ); 525 526 WriteLiteral(" data-rowId=\""); 527 528 529 #line 158 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 530 Write(indexRow); 531 532 533 #line default 534 #line hidden 535 WriteLiteral(" \""); 536 537 WriteLiteral(">\r\n <td"); 538 539 WriteLiteral(" class=\"modal orderModal\""); 540 541 WriteLiteral(" colspan=\"10\""); 542 543 WriteLiteral(">\r\n <table>\r\n <div>\r\n <div"); 544 545 WriteLiteral(" style=\"display:inline-block; width: 80%;margin-bottom: 12px;\""); 546 547 WriteLiteral(" class=\"\""); 548 549 WriteLiteral(">\r\n\t\t\t\t<h2>"); 550 551 552 #line 163 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 553 Write(Translate("Order details")); 554 555 556 #line default 557 #line hidden 558 WriteLiteral("<span"); 559 560 WriteLiteral(" class=\"NerosorderId\""); 561 562 WriteLiteral("></span> </h2>\r\n\r\n </div>\r\n <div"); 563 564 WriteLiteral(" class=\"btn closeModalOrderLine\""); 565 566 WriteLiteral("><b>X</b></div>\r\n </div>\r\n \t<tr"); 567 568 WriteLiteral(" style=\"background-color: lightgrey;\""); 569 570 WriteLiteral(">\r\n"); 571 572 573 #line 169 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 574 575 576 #line default 577 #line hidden 578 579 #line 169 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 580 foreach (var tableHeader in childTableHeaders) 581 { 582 583 584 #line default 585 #line hidden 586 WriteLiteral(" <th"); 587 588 WriteLiteral(" class=\"n-tableheader\""); 589 590 WriteLiteral(">\r\n <span>"); 591 592 593 #line 172 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 594 Write(Translate(@tableHeader.Caption)); 595 596 597 #line default 598 #line hidden 599 WriteLiteral("</span>\r\n </th>\r\n"); 600 601 602 #line 174 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 603 } 604 605 606 #line default 607 #line hidden 608 WriteLiteral(" </tr>\r\n\r\n"); 609 610 611 #line 177 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 612 613 614 #line default 615 #line hidden 616 617 #line 177 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 618 foreach (var childRows in tableRow.ChildList) 619 { 620 621 622 #line default 623 #line hidden 624 WriteLiteral(" <tr"); 625 626 WriteLiteral(" style=\"padding: 0 24px;\""); 627 628 WriteLiteral(" class=\"child-row\""); 629 630 WriteLiteral(">\r\n"); 631 632 633 #line 180 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 634 635 636 #line default 637 #line hidden 638 639 #line 180 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 640 foreach (var childField in childRows) 641 { 642 643 644 #line default 645 #line hidden 646 WriteLiteral(" <td"); 647 648 WriteLiteral(" class=\"n-tablefield\""); 649 650 WriteLiteral(">\r\n <span>"); 651 652 653 #line 183 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 654 Write(childField.Value); 655 656 657 #line default 658 #line hidden 659 WriteLiteral("</span>\r\n </td>\r\n"); 660 661 662 #line 185 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 663 } 664 665 666 #line default 667 #line hidden 668 WriteLiteral(" </tr>\r\n"); 669 670 671 #line 187 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 672 } 673 674 675 #line default 676 #line hidden 677 WriteLiteral(" </table>\r\n </td>\r\n </tr>\r\n"); 678 679 680 #line 191 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 681 } 682 } 683 684 685 #line default 686 #line hidden 687 WriteLiteral("</table>\r\n"); 688 689 690 #line 194 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 691 692 693 #line default 694 #line hidden 695 WriteLiteral(@" 696 697 <script> 698 //var modal = document.getElementById(""myModal""); 699 //span.onclick = modal.style.display = ""none""; 700 var closeModalOrderLineBtn = document.getElementsByClassName(""closeModalOrderLine""); 701 for (var i = 0; i < closeModalOrderLineBtn.length; i++) { 702 closeModalOrderLineBtn[i].addEventListener( ""click"",function(){ 703 console.log(this); 704 myCloseFunction(); 705 } 706 707 ) 708 } 709 710 711 function myCloseFunction() { 712 var allElements = document.querySelectorAll('[class*=""table_child_""]'); 713 for (var i = 0; i < allElements.length; i++) { 714 allElements[i].classList.remove(""showModal""); 715 allElements[i].classList.add(""hideModal""); 716 } 717 } 718 </script> 719 "); 720 721 WriteLiteral("<style>\r\n .active a{\r\n background: #4d4d4d;\r\n color: #fff\r\n }\r\n</style>\r\n\r\n"); 722 723 724 #line 234 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 725 726 727 var currentPage = (int)tableRows.CurrentPage; 728 var pageCount = (int)tableRows.TotalPages; 729 // How many pages views right or left of currentPage 730 const int PageLeft = 2; 731 const int PagesRight = 2; 732 // get first page befor ... 733 var fromPage = Math.Max(1, currentPage - PageLeft); 734 // get last page after ... 735 var toPage = Math.Min(pageCount, currentPage + PagesRight); 736 var currentPageId = @GetGlobalValue("Global:Page.ID"); 737 //Checking current URL partials from DW 738 var pageTopName = @GetGlobalValue("Global:Pageview.Url"); 739 var pageTopName1 = @GetGlobalValue("Global:Pageview.Url.Raw"); 740 var pageTopName2 = @GetGlobalValue("Global:Request.AbsoluteUri"); 741 var pageTopName3 = @GetGlobalValue("Global:Request.Host"); 742 743 string urlLink; 744 urlLink = HttpContext.Current.Request.Url.LocalPath.ToString()+"?ID="+currentPageId; 745 746 747 748 #line default 749 #line hidden 750 WriteLiteral("\r\n\r\n<ul"); 751 752 WriteLiteral(" style=\"display:inline-block;\""); 753 754 WriteLiteral(">\r\n <li"); 755 756 WriteLiteral(" class=\"page-item\""); 757 758 WriteLiteral(" style=\"display:inline-block\""); 759 760 WriteLiteral(">\r\n"); 761 762 763 #line 259 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 764 765 766 #line default 767 #line hidden 768 769 #line 259 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 770 if (tableRows.CurrentPage > 1) 771 { 772 773 774 #line default 775 #line hidden 776 WriteLiteral(" <a"); 777 778 WriteLiteral(" class=\"page-link btn\""); 779 780 WriteAttribute("href", Tuple.Create(" href=\"", 8847), Tuple.Create("\"", 8909) 781 782 #line 261 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 783 , Tuple.Create(Tuple.Create("", 8854), Tuple.Create<System.Object, System.Int32>(urlLink 784 785 #line default 786 #line hidden 787 , 8854), false) 788 , Tuple.Create(Tuple.Create("", 8862), Tuple.Create("&currentpage=", 8862), true) 789 790 #line 261 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 791 , Tuple.Create(Tuple.Create("", 8875), Tuple.Create<System.Object, System.Int32>(currentPage-1 792 793 #line default 794 #line hidden 795 , 8875), false) 796 , Tuple.Create(Tuple.Create("", 8891), Tuple.Create("+&gsearch=", 8891), true) 797 798 #line 261 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 799 , Tuple.Create(Tuple.Create("", 8901), Tuple.Create<System.Object, System.Int32>(gSearch 800 801 #line default 802 #line hidden 803 , 8901), false) 804 ); 805 806 WriteLiteral(">"); 807 808 809 #line 261 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 810 Write(Translate("Previous")); 811 812 813 #line default 814 #line hidden 815 WriteLiteral("</a>\r\n"); 816 817 818 #line 262 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 819 } 820 else 821 { 822 823 824 #line default 825 #line hidden 826 WriteLiteral(" <a"); 827 828 WriteLiteral(" class=\"page-item disabled\""); 829 830 WriteLiteral(">\r\n <span"); 831 832 WriteLiteral(" class=\"page-link btn\""); 833 834 WriteLiteral(">"); 835 836 837 #line 266 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 838 Write(Translate("Previous")); 839 840 841 #line default 842 #line hidden 843 WriteLiteral("</span>\r\n </a>\r\n"); 844 845 846 #line 268 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 847 } 848 849 850 #line default 851 #line hidden 852 WriteLiteral(" </li>\r\n"); 853 854 855 #line 270 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 856 857 858 #line default 859 #line hidden 860 861 #line 270 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 862 863 if (pageCount - toPage == 1) 864 { 865 toPage = pageCount; 866 } 867 if (fromPage > 1) 868 { 869 // view First page 870 871 872 #line default 873 #line hidden 874 WriteLiteral(" <li"); 875 876 WriteLiteral(" style=\"display:inline-block\""); 877 878 WriteLiteral(">\r\n <a"); 879 880 WriteLiteral(" class=\"page-link btn\""); 881 882 WriteAttribute("href", Tuple.Create(" href=\"", 9298), Tuple.Create("\"", 9344) 883 884 #line 279 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 885 , Tuple.Create(Tuple.Create("", 9305), Tuple.Create<System.Object, System.Int32>(urlLink 886 887 #line default 888 #line hidden 889 , 9305), false) 890 , Tuple.Create(Tuple.Create("", 9313), Tuple.Create("&currentpage=1&gsearch=", 9313), true) 891 892 #line 279 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 893 , Tuple.Create(Tuple.Create("", 9336), Tuple.Create<System.Object, System.Int32>(gSearch 894 895 #line default 896 #line hidden 897 , 9336), false) 898 ); 899 900 WriteLiteral(">1</a>\r\n </li>\r\n"); 901 902 903 #line 281 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 904 if (fromPage > 2) 905 { 906 // view first ... 907 // calculate number page for link ..., it's middle between first page and fromPage 908 var middleNumber = (int)Math.Ceiling((double)(fromPage - 2) / 2) + 1; 909 910 911 #line default 912 #line hidden 913 WriteLiteral(" <li"); 914 915 WriteLiteral(" style=\"display:inline-block\""); 916 917 WriteLiteral(">\r\n <a"); 918 919 WriteLiteral(" class=\"page-link btn\""); 920 921 WriteAttribute("href", Tuple.Create(" href=\"", 9642), Tuple.Create("\"", 9700) 922 923 #line 287 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 924 , Tuple.Create(Tuple.Create("", 9649), Tuple.Create<System.Object, System.Int32>(urlLink 925 926 #line default 927 #line hidden 928 , 9649), false) 929 , Tuple.Create(Tuple.Create("", 9657), Tuple.Create("&currentpage=", 9657), true) 930 931 #line 287 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 932 , Tuple.Create(Tuple.Create("", 9670), Tuple.Create<System.Object, System.Int32>(middleNumber 933 934 #line default 935 #line hidden 936 , 9670), false) 937 , Tuple.Create(Tuple.Create("", 9683), Tuple.Create("&gsearch=", 9683), true) 938 939 #line 287 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 940 , Tuple.Create(Tuple.Create("", 9692), Tuple.Create<System.Object, System.Int32>(gSearch 941 942 #line default 943 #line hidden 944 , 9692), false) 945 ); 946 947 WriteLiteral(">...</a>\r\n </li>\r\n"); 948 949 950 #line 289 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 951 } 952 } 953 // view paginator between currentPage 954 for (int i = fromPage; i <= toPage; i++) 955 { 956 957 958 #line default 959 #line hidden 960 WriteLiteral(" <li"); 961 962 WriteLiteral(" style=\"display:inline-block\""); 963 964 WriteLiteral(" "); 965 966 967 #line 294 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 968 Write(currentPage == i ? "class=\"page-item active\"" : ""); 969 970 971 #line default 972 #line hidden 973 WriteLiteral(" >\r\n <a"); 974 975 WriteLiteral(" class=\"page-link btn\""); 976 977 WriteAttribute("href", Tuple.Create(" href=\"", 9948), Tuple.Create("\"", 9995) 978 979 #line 295 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 980 , Tuple.Create(Tuple.Create("", 9955), Tuple.Create<System.Object, System.Int32>(urlLink 981 982 #line default 983 #line hidden 984 , 9955), false) 985 , Tuple.Create(Tuple.Create("", 9963), Tuple.Create("&currentpage=", 9963), true) 986 987 #line 295 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 988 , Tuple.Create(Tuple.Create("", 9976), Tuple.Create<System.Object, System.Int32>(i 989 990 #line default 991 #line hidden 992 , 9976), false) 993 , Tuple.Create(Tuple.Create("", 9978), Tuple.Create("&gsearch=", 9978), true) 994 995 #line 295 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 996 , Tuple.Create(Tuple.Create("", 9987), Tuple.Create<System.Object, System.Int32>(gSearch 997 998 #line default 999 #line hidden 1000 , 9987), false) 1001 ); 1002 1003 WriteLiteral(">"); 1004 1005 1006 #line 295 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 1007 Write(i); 1008 1009 1010 #line default 1011 #line hidden 1012 WriteLiteral("</a>\r\n </li>\r\n"); 1013 1014 1015 #line 297 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 1016 } 1017 // view second ... 1018 if (toPage < pageCount) 1019 { 1020 int middleNumber = (int)Math.Ceiling((double)(pageCount - toPage) / 2) + toPage; 1021 1022 1023 #line default 1024 #line hidden 1025 WriteLiteral(" <li"); 1026 1027 WriteLiteral(" style=\"display:inline-block\""); 1028 1029 WriteLiteral(">\r\n <a"); 1030 1031 WriteLiteral(" class=\"page-link btn\""); 1032 1033 WriteAttribute("href", Tuple.Create(" href=\"", 10231), Tuple.Create("\"", 10289) 1034 1035 #line 303 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 1036 , Tuple.Create(Tuple.Create("", 10238), Tuple.Create<System.Object, System.Int32>(urlLink 1037 1038 #line default 1039 #line hidden 1040 , 10238), false) 1041 , Tuple.Create(Tuple.Create("", 10246), Tuple.Create("&currentpage=", 10246), true) 1042 1043 #line 303 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 1044 , Tuple.Create(Tuple.Create("", 10259), Tuple.Create<System.Object, System.Int32>(middleNumber 1045 1046 #line default 1047 #line hidden 1048 , 10259), false) 1049 , Tuple.Create(Tuple.Create("", 10272), Tuple.Create("&gsearch=", 10272), true) 1050 1051 #line 303 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 1052 , Tuple.Create(Tuple.Create("", 10281), Tuple.Create<System.Object, System.Int32>(gSearch 1053 1054 #line default 1055 #line hidden 1056 , 10281), false) 1057 ); 1058 1059 WriteLiteral(">...</a>\r\n </li>\r\n"); 1060 1061 1062 #line 305 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 1063 // view last page 1064 if (toPage < pageCount - 1) 1065 { 1066 1067 1068 #line default 1069 #line hidden 1070 WriteLiteral(" <li"); 1071 1072 WriteLiteral(" style=\"display:inline-block\""); 1073 1074 WriteLiteral(">\r\n <a"); 1075 1076 WriteLiteral(" class=\"page-link btn\""); 1077 1078 WriteAttribute("href", Tuple.Create(" href=\"", 10438), Tuple.Create("\"", 10493) 1079 1080 #line 309 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 1081 , Tuple.Create(Tuple.Create("", 10445), Tuple.Create<System.Object, System.Int32>(urlLink 1082 1083 #line default 1084 #line hidden 1085 , 10445), false) 1086 , Tuple.Create(Tuple.Create("", 10453), Tuple.Create("&currentpage=", 10453), true) 1087 1088 #line 309 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 1089 , Tuple.Create(Tuple.Create("", 10466), Tuple.Create<System.Object, System.Int32>(pageCount 1090 1091 #line default 1092 #line hidden 1093 , 10466), false) 1094 , Tuple.Create(Tuple.Create("", 10476), Tuple.Create("&gsearch=", 10476), true) 1095 1096 #line 309 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 1097 , Tuple.Create(Tuple.Create("", 10485), Tuple.Create<System.Object, System.Int32>(gSearch 1098 1099 #line default 1100 #line hidden 1101 , 10485), false) 1102 ); 1103 1104 WriteLiteral(">"); 1105 1106 1107 #line 309 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 1108 Write(pageCount); 1109 1110 1111 #line default 1112 #line hidden 1113 WriteLiteral("</a>\r\n </li>\r\n"); 1114 1115 1116 #line 311 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 1117 } 1118 } 1119 1120 1121 #line default 1122 #line hidden 1123 WriteLiteral("\r\n <li"); 1124 1125 WriteLiteral(" class=\"page-item\""); 1126 1127 WriteLiteral(" style=\"display:inline-block\""); 1128 1129 WriteLiteral(">\r\n"); 1130 1131 1132 #line 315 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 1133 1134 1135 #line default 1136 #line hidden 1137 1138 #line 315 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 1139 if (tableRows.CurrentPage < tableRows.TotalPages) 1140 { 1141 1142 1143 1144 #line default 1145 #line hidden 1146 WriteLiteral(" <a"); 1147 1148 WriteLiteral(" class=\"page-link btn\""); 1149 1150 WriteAttribute("href", Tuple.Create(" href=\"", 10696), Tuple.Create("\"", 10757) 1151 1152 #line 318 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 1153 , Tuple.Create(Tuple.Create("", 10703), Tuple.Create<System.Object, System.Int32>(urlLink 1154 1155 #line default 1156 #line hidden 1157 , 10703), false) 1158 , Tuple.Create(Tuple.Create("", 10711), Tuple.Create("&currentpage=", 10711), true) 1159 1160 #line 318 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 1161 , Tuple.Create(Tuple.Create("", 10724), Tuple.Create<System.Object, System.Int32>(currentPage+1 1162 1163 #line default 1164 #line hidden 1165 , 10724), false) 1166 , Tuple.Create(Tuple.Create("", 10740), Tuple.Create("&gsearch=", 10740), true) 1167 1168 #line 318 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 1169 , Tuple.Create(Tuple.Create("", 10749), Tuple.Create<System.Object, System.Int32>(gSearch 1170 1171 #line default 1172 #line hidden 1173 , 10749), false) 1174 ); 1175 1176 WriteLiteral(">"); 1177 1178 1179 #line 318 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 1180 Write(Translate("Next")); 1181 1182 1183 #line default 1184 #line hidden 1185 WriteLiteral("</a>\r\n"); 1186 1187 1188 #line 319 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 1189 } 1190 else 1191 { 1192 1193 1194 #line default 1195 #line hidden 1196 WriteLiteral(" <a"); 1197 1198 WriteLiteral(" class=\"page-item disabled\""); 1199 1200 WriteLiteral(">\r\n <span"); 1201 1202 WriteLiteral(" class=\"page-link btn\""); 1203 1204 WriteLiteral(">"); 1205 1206 1207 #line 323 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 1208 Write(Translate("Next")); 1209 1210 1211 #line default 1212 #line hidden 1213 WriteLiteral("</span>\r\n </a>\r\n"); 1214 1215 1216 #line 325 "D:\Dynamicweb.net\Solutions\Degree\eplast.cloud.dynamicweb-cms.com\Files\Templates\Neros\InvoiceList.cshtml" 1217 } 1218 1219 1220 #line default 1221 #line hidden 1222 WriteLiteral("</ul>\r\n\r\n\r\n\r\n"); 1223 1224 } 1225 } 1226 } 1227

1 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 2 @using Neros.Controllers; 3 @using Neros.Common.Interfaces; 4 @using Neros.Common.ListElements; 5 @using Dynamicweb; 6 @using System.Globalization; 7 8 @* TEMPLATE FOR RENDERING THE Invoice List - Content -> Neros Test -> Invoice List *@ 9 10 @functions { 11 IListController controller = null; 12 ListHeaders tableHeaders = null; 13 ListRows tableRows = null; 14 } 15 16 @{ 17 controller = (IListController)(Neros.Controllers.ControllerFactory.CreateController("InvoiceController")); 18 tableHeaders = controller.GetHeaders(); 19 var gSearch = String.IsNullOrEmpty(Context.Current.Request["gsearch"])?"":Context.Current.Request["gsearch"]; 20 DateTime dateFrom = String.IsNullOrEmpty(Context.Current.Request["startDate"])?DateTime.Now.AddYears(-10): DateTime.ParseExact(Context.Current.Request["startDate"], "yyyy-MM-dd", CultureInfo.InvariantCulture); 21 DateTime dateTo = String.IsNullOrEmpty(Context.Current.Request["endDate"])?DateTime.Now: DateTime.ParseExact(Context.Current.Request["endDate"], "yyyy-MM-dd", CultureInfo.InvariantCulture); 22 var currentpage = Int32.Parse(String.IsNullOrEmpty(Context.Current.Request["currentpage"])?"1":Context.Current.Request["currentpage"]); 23 var PageSize = Int32.Parse(String.IsNullOrEmpty(Context.Current.Request["pagesize"])?"10":Context.Current.Request["pagesize"]); 24 tableRows = controller.GetRows((int)currentpage, PageSize, null, true, gSearch,dateFrom,dateTo); 25 DateTime dateFromPicker = String.IsNullOrEmpty(Context.Current.Request["startDate"])?DateTime.Now.AddYears(-1): DateTime.ParseExact(Context.Current.Request["startDate"], "yyyy-MM-dd", CultureInfo.InvariantCulture); 26 } 27 28 @* The @RenderBlockList base helper is included in Components/GridBuilder.cshtml *@ 29 30 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 31 @using Neros.Controllers; 32 @using Neros.Common.Interfaces; 33 @using Neros.Common.ListElements; 34 @using Dynamicweb.Rapido.Blocks.Extensibility 35 36 @functions { 37 38 } 39 40 41 @{ 42 <form action="/alvoen/invoice-list"> 43 <div> 44 <input type="hidden" id="searchForm" name="ncmd2" value="search"> 45 <div style="display:inline-block" class="grid__col-xs-5"> 46 <h2>Invoice List</h2> 47 </div> 48 49 <div style="display:inline-block;float: right; text-align: " class="grid__col-xs-7"> 50 <div style="display:inline-block; margin-right: 24px;"> 51 52 </div> 53 54 <div style="display:inline-block;"> 55 <label style="display:block" for="start">@Translate("Start date:")</label> 56 <input style="height: 36px; border: 1px solid #c6c6c6;" type="date" id="start" name="trip-start" 57 value="dd-mm-yyyy" 58 min="2018-01-01" max="2025-12-31"> 59 </div> 60 61 <div style="display:inline-block; margin-right: 24px;"> 62 <label style="display:block" for="end">@Translate("End date:")</label> 63 <input style="height: 36px; border: 1px solid #c6c6c6;" type="date" id="start" name="trip-start" 64 value="dd-mm-yyyy" 65 min="2018-01-01" max="2025-12-31"> 66 </div> 67 68 <div style="display:inline-block"> 69 <input style="height: 36px; border: 1px solid #c6c6c6;" placeholder="search" type="search" id="gsearch" name="gsearch"> 70 <input style="height: 36px; border: 1px solid #c6c6c6; padding: 6px 24px" value="@Translate("Search")" type="submit"> 71 72 </div> 73 </div> 74 </div> 75 </form> 76 } 77 78 <script> 79 80 function formatDate(date) { 81 var d = new Date(date), 82 month = '' + (d.getMonth() + 1), 83 day = '' + d.getDate(), 84 year = d.getFullYear(); 85 86 if (month.length < 2) 87 month = '0' + month; 88 if (day.length < 2) 89 day = '0' + day; 90 91 return [year, month, day].join('-'); 92 } 93 </script> 94 95 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 96 @using Neros.Controllers; 97 @using Neros.Common.Interfaces; 98 @using Dynamicweb.Rapido.Blocks.Extensibility 99 100 @* Main table block render for all the lists *@ 101 102 @functions { 103 104 } 105 106 <style> 107 .hideModal { 108 display: none; 109 } 110 .close { 111 color: #333; 112 float: right; 113 font-size: 28px; 114 font-weight: bold; 115 } 116 .closeModalOrderLine{ 117 float:right; 118 margin:0; 119 } 120 </style> 121 122 @{ 123 var indexRow=0; 124 <table class="n-table"> 125 <tr> 126 @foreach (var tableHeader in tableHeaders) 127 { 128 <th class="n-tableheader"> 129 <span>@Translate(@tableHeader.Caption)</span> 130 <span class="n-tableheadersort"><i class=""></i></span> 131 </th> 132 } 133 </tr> 134 135 @foreach (var tableRow in tableRows) 136 { 137 indexRow+=1; 138 <tr class="n-tablerow table_parent_@indexRow" data-rowId="@indexRow"> 139 @foreach (var tableField in tableRow) 140 { 141 142 <td onclick=@tableField.OnSelectScript class="n-tablefield"> 143 @if (tableField.Value == "Order Not Invoiced" || tableField.Value == "Order Invoiced" || tableField.Value == "Order Entered" || tableField.Value == "Order Shipped") 144 { 145 <span>@Translate(tableField.Value)</span> 146 } 147 else 148 { 149 <span>@tableField.Value</span> 150 } 151 152 </td> 153 } 154 </tr> 155 156 if (tableRow.ChildList != null) 157 { 158 <tr class="table_child_@indexRow modalrowdata" data-rowId="@indexRow "> 159 <td class="modal orderModal" colspan="10"> 160 <table> 161 <div> 162 <div style="display:inline-block; width: 80%;margin-bottom: 12px;" class=""> 163 <h2>@Translate("Order details")<span class="NerosorderId"></span> </h2> 164 165 </div> 166 <div class="btn closeModalOrderLine"><b>X</b></div> 167 </div> 168 <tr style="background-color: lightgrey;"> 169 @foreach (var tableHeader in childTableHeaders) 170 { 171 <th class="n-tableheader"> 172 <span>@Translate(@tableHeader.Caption)</span> 173 </th> 174 } 175 </tr> 176 177 @foreach (var childRows in tableRow.ChildList) 178 { 179 <tr style="padding: 0 24px;" class="child-row"> 180 @foreach (var childField in childRows) 181 { 182 <td class="n-tablefield"> 183 <span>@childField.Value</span> 184 </td> 185 } 186 </tr> 187 } 188 </table> 189 </td> 190 </tr> 191 } 192 } 193 </table> 194 } 195 196 <script> 197 //var modal = document.getElementById("myModal"); 198 //span.onclick = modal.style.display = "none"; 199 var closeModalOrderLineBtn = document.getElementsByClassName("closeModalOrderLine"); 200 for (var i = 0; i < closeModalOrderLineBtn.length; i++) { 201 closeModalOrderLineBtn[i].addEventListener( "click",function(){ 202 console.log(this); 203 myCloseFunction(); 204 } 205 206 ) 207 } 208 209 210 function myCloseFunction() { 211 var allElements = document.querySelectorAll('[class*="table_child_"]'); 212 for (var i = 0; i < allElements.length; i++) { 213 allElements[i].classList.remove("showModal"); 214 allElements[i].classList.add("hideModal"); 215 } 216 } 217 </script> 218 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 219 @using Neros.Controllers; 220 @using Neros.Common.Interfaces; 221 @using Neros.Common.ListElements; 222 @using Dynamicweb.Rapido.Blocks.Extensibility 223 @using System.Web; 224 @functions { 225 226 } 227 <style> 228 .active a{ 229 background: #4d4d4d; 230 color: #fff 231 } 232 </style> 233 234 @{ 235 236 var currentPage = (int)tableRows.CurrentPage; 237 var pageCount = (int)tableRows.TotalPages; 238 // How many pages views right or left of currentPage 239 const int PageLeft = 2; 240 const int PagesRight = 2; 241 // get first page befor ... 242 var fromPage = Math.Max(1, currentPage - PageLeft); 243 // get last page after ... 244 var toPage = Math.Min(pageCount, currentPage + PagesRight); 245 var currentPageId = @GetGlobalValue("Global:Page.ID"); 246 //Checking current URL partials from DW 247 var pageTopName = @GetGlobalValue("Global:Pageview.Url"); 248 var pageTopName1 = @GetGlobalValue("Global:Pageview.Url.Raw"); 249 var pageTopName2 = @GetGlobalValue("Global:Request.AbsoluteUri"); 250 var pageTopName3 = @GetGlobalValue("Global:Request.Host"); 251 252 string urlLink; 253 urlLink = HttpContext.Current.Request.Url.LocalPath.ToString()+"?ID="+currentPageId; 254 255 } 256 257 <ul style="display:inline-block;"> 258 <li class="page-item" style="display:inline-block"> 259 @if (tableRows.CurrentPage > 1) 260 { 261 <a class="page-link btn" href="@urlLink&currentpage=@(currentPage-1)+&gsearch=@gSearch">@Translate("Previous")</a> 262 } 263 else 264 { 265 <a class="page-item disabled"> 266 <span class="page-link btn">@Translate("Previous")</span> 267 </a> 268 } 269 </li> 270 @{ 271 if (pageCount - toPage == 1) 272 { 273 toPage = pageCount; 274 } 275 if (fromPage > 1) 276 { 277 // view First page 278 <li style="display:inline-block"> 279 <a class="page-link btn" href="@urlLink&currentpage=1&gsearch=@gSearch">1</a> 280 </li> 281 if (fromPage > 2) 282 { 283 // view first ... 284 // calculate number page for link ..., it's middle between first page and fromPage 285 var middleNumber = (int)Math.Ceiling((double)(fromPage - 2) / 2) + 1; 286 <li style="display:inline-block"> 287 <a class="page-link btn" href="@urlLink&currentpage=@middleNumber&gsearch=@gSearch">...</a> 288 </li> 289 } 290 } 291 // view paginator between currentPage 292 for (int i = fromPage; i <= toPage; i++) 293 { 294 <li style="display:inline-block" @(currentPage == i ? "class=\"page-item active\"" : "") > 295 <a class="page-link btn" href="@urlLink&currentpage=@i&gsearch=@gSearch">@i</a> 296 </li> 297 } 298 // view second ... 299 if (toPage < pageCount) 300 { 301 int middleNumber = (int)Math.Ceiling((double)(pageCount - toPage) / 2) + toPage; 302 <li style="display:inline-block"> 303 <a class="page-link btn" href="@urlLink&currentpage=@middleNumber&gsearch=@gSearch">...</a> 304 </li> 305 // view last page 306 if (toPage < pageCount - 1) 307 { 308 <li style="display:inline-block"> 309 <a class="page-link btn" href="@urlLink&currentpage=@pageCount&gsearch=@gSearch">@pageCount</a> 310 </li> 311 } 312 } 313 } 314 <li class="page-item" style="display:inline-block"> 315 @if (tableRows.CurrentPage < tableRows.TotalPages) 316 { 317 318 <a class="page-link btn" href="@urlLink&currentpage=@(currentPage+1)&gsearch=@gSearch">@Translate("Next")</a> 319 } 320 else 321 { 322 <a class="page-item disabled"> 323 <span class="page-link btn">@Translate("Next")</span> 324 </a> 325 } 326 </ul> 327 328 329 330