Advertisement
Guest User

Untitled

a guest
May 17th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 4.00 KB | None | 0 0
  1. @model DashboardSettings
  2.  
  3. @{
  4.     string ReportGuid = Guid.NewGuid().ToString();
  5.     WemsyStructureAccounting StructureAccounting = WemsyStructureAccountingDB.GetAll(new DBPagination(SessionHelper.CurrentUser, SearchCriterions: Model.SearchCriterions));
  6. }
  7.  
  8. @if (StructureAccounting.Bookyears.Count > 0)
  9. {  
  10.     <table id='@ReportGuid' class="table table-striped table-bordered table-hover" style="display: none;">
  11.         <thead>
  12.             <tr>
  13.                 <th>@Html.Translate("Description")</th>
  14.                 @foreach (WemsyCalendar Bookyear in StructureAccounting.Bookyears.OrderByDescending(b => b.Bookyear))
  15.                 {
  16.                     <th class="text-right">@Bookyear.BookyearName</th>
  17.                 }
  18.             </tr>
  19.         </thead>
  20.         <tbody>
  21.             @foreach (WemsyStructureAccountingLine StructureAccountingLine in StructureAccounting)
  22.             {
  23.                 <tr style="background-color:@StructureAccountingLine.StructureLine.BackColor; color:@StructureAccountingLine.StructureLine.ForeColor" data-tt-id="@StructureAccountingLine.StructureLine.ID" data-tt-parent-id="@StructureAccountingLine.StructureLine.ParentStructureLineID">
  24.                     @*<td class="text-nowrap">@dr["Description_Shiftable"]</td>*@
  25.                     <td title="@StructureAccountingLine.StructureLine.Description">@StructureAccountingLine.StructureLine.Description.Truncate(60, "...")</td>
  26.  
  27.                     @if (StructureAccountingLine.StructureLine.DisplayType.ToUpper() != "HiddenForSpecialColumns".ToUpper())
  28.                     {
  29.                         foreach (WemsyCalendar Bookyear in StructureAccountingLine.Bookyears.OrderByDescending(b => b.Bookyear))
  30.                         {
  31.                             <td class="text-right">@Html.DisplayAmount(Bookyear.Amount)</td>
  32.                         }
  33.                     }
  34.                     else
  35.                     {
  36.                         foreach (WemsyCalendar Bookyear in StructureAccountingLine.Bookyears)
  37.                         {
  38.                             <td></td>
  39.                         }
  40.                     }
  41.                 </tr>
  42.             }
  43.         </tbody>
  44.     </table>
  45. }
  46. else
  47. {
  48.     @Html.Translate("Please select criterions")
  49. }
  50.  
  51. @Html.Partial("~/Views/Report/Tools/QueryViewer.cshtml", Model)
  52.  
  53. @Html.Script(
  54.     @<script type="text/javascript">
  55.          $(function () {
  56.              SyntaxHighlighter.all();
  57.  
  58.  
  59.              $('#@ReportGuid').treetable({
  60.                 expandable: true,
  61.                 clickableNodeNames: true,
  62.                 initialState: 'expanded'
  63.             });
  64.  
  65.  
  66.             //            $("td.colorize:contains('-')").css('color', '#FF0000');
  67.             $("td.colorize:contains('-')").css('font-size', '10px');
  68.             //            $("td.colorize:contains('+')").css('color', '#00FF00');
  69.             $("td.colorize:contains('+')").css('font-size', '10px');
  70.             //            $("td.colorize").filter(function () { return $(this).text() === "0,00 €"; }).css('color', '#BDBDBD');
  71.             $("td.colorize").filter(function () { return $(this).text() === "0,00 €"; }).css('font-size', '10px');
  72.  
  73.  
  74.             $('#@ReportGuid').DataTable({
  75.                 responsive: true,
  76.                 dom: '<"html5buttons"B>lTfgtpi',
  77.                 ordering: false,
  78.                 pageLength: 1000,
  79.                 buttons: [
  80.                     { extend: 'copy' },
  81.                     { extend: 'csv' },
  82.                     { extend: 'excel', title: 'ExampleFile', exportOptions: { format: { body: function (data, row, column, node) { return column >= 1 ? node.textContent.replace(/[€.]/g, '').replace(/[,]/g, '.') : node.textContent; } } } },
  83.                     { extend: 'pdf', title: 'ExampleFile' },
  84.                     { extend: 'print', customize: function (win) { $(win.document.body).addClass('white-bg'); $(win.document.body).css('font-size', '10px'); $(win.document.body).find('table').addClass('compact').css('font-size', 'inherit'); } }
  85.                 ]
  86.             });
  87.             $('#@ReportGuid').show();
  88.  
  89.         });
  90.     </script>
  91. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement