Advertisement
Guest User

Untitled

a guest
May 21st, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.09 KB | None | 0 0
  1. @model IEnumerable<PortfolioLib.Models.F_BondsPerfsSummary_Result>
  2.  
  3. @{
  4. Layout = null;
  5. double totalPnlItdRefCurrency = ViewBag.TotalPnlItdRefCurrency;
  6. double totalItd = ViewBag.TotalITD;
  7. double totalMtd = ViewBag.TotalMTD;
  8. double totalDay = ViewBag.TotalDAY;
  9. int i = 0;
  10. }
  11.  
  12. @*<div class="table-hover table-condensed table-striped table-responsive">
  13. <table class="table">*@
  14. <table class="table table-bordered table-striped table-hover">
  15. <tr class="background_title_tab">
  16. <th colspan="12" class="titlet_tab">POSITIONS SOLD</th>
  17. @{
  18. string fields = (string)System.Web.HttpContext.Current.Session["SortField"];
  19. }
  20.  
  21. @*<tr>
  22. <th colspan="13">POSITIONS SOLD</th>
  23. </tr>*@
  24. <tr>
  25. <th>
  26. @Html.DisplayNameFor(model => model.isincode)
  27. </th>
  28. <th class="thSize thCenter">
  29. Name
  30. <a href="javascript:reload('Name+','BondsPositionsSoldSummary')"><i class="fas fa-arrow-up" style="@(fields == "Name+" ? "color:green" : "color:black")"></i></a>
  31. <a href="javascript:reload('Name-','BondsPositionsSoldSummary')"><i class="fas fa-arrow-down" style="@(fields == "Name-" ? "color:green" : "color:black")"></i></a>
  32. </th>
  33. <th class="thSize thCenter">
  34. CPN
  35. <a href="javascript:reload('Cpn+','BondsPositionsSoldSummary')"><i class="fas fa-arrow-up" style="@(fields == "Cpn+" ? "color:green" : "color:black")"></i></a>
  36. <a href="javascript:reload('Cpn-','BondsPositionsSoldSummary')"><i class="fas fa-arrow-down" style="@(fields == "Cpn-" ? "color:green" : "color:black")"></i></a>
  37. </th>
  38. @*<th>
  39. @Html.DisplayNameFor(model => model.next_cpn)
  40. </th>*@
  41. <th class=" thCenter thSize">
  42. Rating
  43. <a href="javascript:reload('Rating+','BondsPositionsSoldSummary')"><i class="fas fa-arrow-up" style="@(fields == "Rating+" ? "color:green" : "color:black")"></i></a>
  44. <a href="javascript:reload('Rating-','BondsPositionsSoldSummary')"><i class="fas fa-arrow-down" style="@(fields == "Rating-" ? "color:green" : "color:black")"></i></a>
  45. </th>
  46. <th class=" thCenter thSize">
  47. Currency
  48. <a href="javascript:reload('Currency+','BondsPositionsSoldSummary')"><i class="fas fa-arrow-up" style="@(fields == "Currency+" ? "color:green" : "color:black")"></i></a>
  49. <a href="javascript:reload('Currency-','BondsPositionsSoldSummary')"><i class="fas fa-arrow-down" style="@(fields == "Currency-" ? "color:green" : "color:black")"></i></a>
  50. </th>
  51. <th class=" thCenter thSize">
  52. Coupon PnL
  53. <a href="javascript:reload('Coupon+','BondsPositionsSoldSummary')"><i class="fas fa-arrow-up" style="@(fields == "Coupon+" ? "color:green" : "color:black")"></i></a>
  54. <a href="javascript:reload('Coupon-','BondsPositionsSoldSummary')"><i class="fas fa-arrow-down" style="@(fields == "Coupon-" ? "color:green" : "color:black")"></i></a>
  55. </th>
  56. <th class=" thCenter thSize">
  57. MMKT Pnl
  58. <a href="javascript:reload('Mkt+','BondsPositionsSoldSummary')"><i class="fas fa-arrow-up" style="@(fields == "Mkt+" ? "color:green" : "color:black")"></i></a>
  59. <a href="javascript:reload('Mkt-','BondsPositionsSoldSummary')"><i class="fas fa-arrow-down" style="@(fields == "Mkt-" ? "color:green" : "color:black")"></i></a>
  60. </th>
  61. <th class=" thCenter thSize">
  62. PnL ITD Loc
  63. <a href="javascript:reload('PnlItdLoc+','BondsPositionsSoldSummary')"><i class="fas fa-arrow-up" style="@(fields == "PnlItdLoc+" ? "color:green" : "color:black")"></i></a>
  64. <a href="javascript:reload('PnlItdLoc-','BondsPositionsSoldSummary')"><i class="fas fa-arrow-down" style="@(fields == "PnlItdLoc-" ? "color:green" : "color:black")"></i></a>
  65. </th>
  66. <th class=" thCenter thSize">
  67. PnL ITD EUR
  68. <a href="javascript:reload('PnlItdRef+','BondsPositionsSoldSummary')"><i class="fas fa-arrow-up" style="@(fields == "PnlItdRef+" ? "color:green" : "color:black")"></i></a>
  69. <a href="javascript:reload('PnlItdRef-','BondsPositionsSoldSummary')"><i class="fas fa-arrow-down" style="@(fields == "PnlItdRef-" ? "color:green" : "color:black")"></i></a>
  70. </th>
  71. <th class=" thCenter thSize">
  72. ITD
  73. <a href="javascript:reload('Itd+','BondsPositionsSoldSummary')"><i class="fas fa-arrow-up" style="@(fields == "Itd+" ? "color:green" : "color:black")"></i></a>
  74. <a href="javascript:reload('Itd-','BondsPositionsSoldSummary')"><i class="fas fa-arrow-down" style="@(fields == "Itd-" ? "color:green" : "color:black")"></i></a>
  75. </th>
  76. <th class=" thCenter thSize">
  77. MTD
  78. <a href="javascript:reload('Mtd+','BondsPositionsSoldSummary')"><i class="fas fa-arrow-up" style="@(fields == "Mtd+" ? "color:green" : "color:black")"></i></a>
  79. <a href="javascript:reload('Mtd-','BondsPositionsSoldSummary')"><i class="fas fa-arrow-down" style="@(fields == "Mtd-" ? "color:green" : "color:black")"></i></a>
  80. </th>
  81. <th class=" thCenter thSize">
  82. DAY
  83. <a href="javascript:reload('Day+','BondsPositionsSoldSummary')"><i class="fas fa-arrow-up" style="@(fields == "Day+" ? "color:green" : "color:black")"></i></a>
  84. <a href="javascript:reload('Day-','BondsPositionsSoldSummary')"><i class="fas fa-arrow-down" style="@(fields == "Day-" ? "color:green" : "color:black")"></i></a>
  85. </th>
  86. </tr>
  87. @foreach (var item in Model)
  88. {
  89. double? day = item.total_fund_contrib_day;
  90. double? mtd = item.total_fund_contrib_mtd;
  91. double? itd = item.total_fund_contrib_itd;
  92. int? coco = item.is_coco;
  93.  
  94. <tr>
  95. <td>
  96. @Html.DisplayFor(modelItem => item.isincode)
  97. </td>
  98. <td style="@(coco == 1 ? "color:blue; font-weight:bold;":"color:black");">
  99. @Html.DisplayFor(modelItem => item.name)
  100. </td>
  101. <td class="tdTableAssets tdCenter">
  102. @{
  103. item.cpn = item.cpn / 100;
  104. }
  105. @Html.DisplayFor(modelItem => item.cpn)
  106. </td>
  107. @*<td>
  108. @Html.DisplayFor(modelItem => item.next_cpn)
  109. </td>*@
  110. <td class="tdTableAssets tdCenter">
  111. @Html.DisplayFor(modelItem => item.rating)
  112. </td>
  113. <td class="tdTableAssets tdCenter">
  114. @Html.DisplayFor(modelItem => item.currency)
  115. </td>
  116. <td class="tdTableAssets tdCenter">
  117. @Html.DisplayFor(modelItem => item.couponcummul)
  118. </td>
  119. <td class="tdTableAssets tdCenter">
  120. @Html.DisplayFor(modelItem => item.mmktcummul)
  121. </td>
  122. <td class="tdTableAssets tdCenter">
  123. @Html.DisplayFor(modelItem => item.pnl_itd_total_amt_loc)
  124. </td>
  125. <td class="tdTableAssets tdCenter">
  126. @Html.DisplayFor(modelItem => item.pnl_itd_total_amt_dev_ref)
  127. </td>
  128. <td style="@(itd < 0 ? "color:red" : "color:green");"class="tdCenter tdBold tdTableAssets">
  129. @Html.DisplayFor(modelItem => item.total_fund_contrib_itd)
  130. </td>
  131. <td style="@(mtd < 0 ? "color:red" : "color:green");"class="tdCenter tdBold tdTableAssets">
  132. @Html.DisplayFor(modelItem => item.total_fund_contrib_mtd)
  133. </td>
  134. <td style="@(day < 0 ? "color:red" : "color:green");"class="tdCenter tdBold tdTableAssets">
  135. @Html.DisplayFor(modelItem => item.total_fund_contrib_day)
  136. </td>
  137. </tr>
  138. i++;
  139. }
  140. @*{
  141. if (i % 2 == 0)
  142. {
  143. <tr></tr>
  144. }
  145. }*@
  146. <tr class="Footer">
  147. <td colspan="8" class="tdBold">TOTAL</td>
  148. <td class="tdCenter tdBold ">@String.Format("{0:#\u00A0###\u00A0##0}", totalPnlItdRefCurrency)</td>
  149. <td class="tdCenter tdBold" style="@(totalItd < 0 ? "color:red" : "color:green");">@String.Format("{0:0.000%}", totalItd)</td>
  150. <td class="tdCenter tdBold" style="@(totalMtd < 0 ? "color:red" : "color:green");">@String.Format("{0:0.000%}", totalMtd)</td>
  151. <td class="tdCenter tdBold" style="@(totalDay < 0 ? "color:red" : "color:green");">@String.Format("{0:0.000%}", totalDay)</td>
  152. </tr>
  153. </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement