Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @model IEnumerable<PortfolioLib.Models.F_BondsPerfsSummary_Result>
- @{
- Layout = null;
- double totalPnlItdRefCurrency = ViewBag.TotalPnlItdRefCurrency;
- double totalItd = ViewBag.TotalITD;
- double totalMtd = ViewBag.TotalMTD;
- double totalDay = ViewBag.TotalDAY;
- int i = 0;
- }
- @*<div class="table-hover table-condensed table-striped table-responsive">
- <table class="table">*@
- <table class="table table-bordered table-striped table-hover">
- <tr class="background_title_tab">
- <th colspan="12" class="titlet_tab">POSITIONS SOLD</th>
- @{
- string fields = (string)System.Web.HttpContext.Current.Session["SortField"];
- }
- @*<tr>
- <th colspan="13">POSITIONS SOLD</th>
- </tr>*@
- <tr>
- <th>
- @Html.DisplayNameFor(model => model.isincode)
- </th>
- <th class="thSize thCenter">
- Name
- <a href="javascript:reload('Name+','BondsPositionsSoldSummary')"><i class="fas fa-arrow-up" style="@(fields == "Name+" ? "color:green" : "color:black")"></i></a>
- <a href="javascript:reload('Name-','BondsPositionsSoldSummary')"><i class="fas fa-arrow-down" style="@(fields == "Name-" ? "color:green" : "color:black")"></i></a>
- </th>
- <th class="thSize thCenter">
- CPN
- <a href="javascript:reload('Cpn+','BondsPositionsSoldSummary')"><i class="fas fa-arrow-up" style="@(fields == "Cpn+" ? "color:green" : "color:black")"></i></a>
- <a href="javascript:reload('Cpn-','BondsPositionsSoldSummary')"><i class="fas fa-arrow-down" style="@(fields == "Cpn-" ? "color:green" : "color:black")"></i></a>
- </th>
- @*<th>
- @Html.DisplayNameFor(model => model.next_cpn)
- </th>*@
- <th class=" thCenter thSize">
- Rating
- <a href="javascript:reload('Rating+','BondsPositionsSoldSummary')"><i class="fas fa-arrow-up" style="@(fields == "Rating+" ? "color:green" : "color:black")"></i></a>
- <a href="javascript:reload('Rating-','BondsPositionsSoldSummary')"><i class="fas fa-arrow-down" style="@(fields == "Rating-" ? "color:green" : "color:black")"></i></a>
- </th>
- <th class=" thCenter thSize">
- Currency
- <a href="javascript:reload('Currency+','BondsPositionsSoldSummary')"><i class="fas fa-arrow-up" style="@(fields == "Currency+" ? "color:green" : "color:black")"></i></a>
- <a href="javascript:reload('Currency-','BondsPositionsSoldSummary')"><i class="fas fa-arrow-down" style="@(fields == "Currency-" ? "color:green" : "color:black")"></i></a>
- </th>
- <th class=" thCenter thSize">
- Coupon PnL
- <a href="javascript:reload('Coupon+','BondsPositionsSoldSummary')"><i class="fas fa-arrow-up" style="@(fields == "Coupon+" ? "color:green" : "color:black")"></i></a>
- <a href="javascript:reload('Coupon-','BondsPositionsSoldSummary')"><i class="fas fa-arrow-down" style="@(fields == "Coupon-" ? "color:green" : "color:black")"></i></a>
- </th>
- <th class=" thCenter thSize">
- MMKT Pnl
- <a href="javascript:reload('Mkt+','BondsPositionsSoldSummary')"><i class="fas fa-arrow-up" style="@(fields == "Mkt+" ? "color:green" : "color:black")"></i></a>
- <a href="javascript:reload('Mkt-','BondsPositionsSoldSummary')"><i class="fas fa-arrow-down" style="@(fields == "Mkt-" ? "color:green" : "color:black")"></i></a>
- </th>
- <th class=" thCenter thSize">
- PnL ITD Loc
- <a href="javascript:reload('PnlItdLoc+','BondsPositionsSoldSummary')"><i class="fas fa-arrow-up" style="@(fields == "PnlItdLoc+" ? "color:green" : "color:black")"></i></a>
- <a href="javascript:reload('PnlItdLoc-','BondsPositionsSoldSummary')"><i class="fas fa-arrow-down" style="@(fields == "PnlItdLoc-" ? "color:green" : "color:black")"></i></a>
- </th>
- <th class=" thCenter thSize">
- PnL ITD EUR
- <a href="javascript:reload('PnlItdRef+','BondsPositionsSoldSummary')"><i class="fas fa-arrow-up" style="@(fields == "PnlItdRef+" ? "color:green" : "color:black")"></i></a>
- <a href="javascript:reload('PnlItdRef-','BondsPositionsSoldSummary')"><i class="fas fa-arrow-down" style="@(fields == "PnlItdRef-" ? "color:green" : "color:black")"></i></a>
- </th>
- <th class=" thCenter thSize">
- ITD
- <a href="javascript:reload('Itd+','BondsPositionsSoldSummary')"><i class="fas fa-arrow-up" style="@(fields == "Itd+" ? "color:green" : "color:black")"></i></a>
- <a href="javascript:reload('Itd-','BondsPositionsSoldSummary')"><i class="fas fa-arrow-down" style="@(fields == "Itd-" ? "color:green" : "color:black")"></i></a>
- </th>
- <th class=" thCenter thSize">
- MTD
- <a href="javascript:reload('Mtd+','BondsPositionsSoldSummary')"><i class="fas fa-arrow-up" style="@(fields == "Mtd+" ? "color:green" : "color:black")"></i></a>
- <a href="javascript:reload('Mtd-','BondsPositionsSoldSummary')"><i class="fas fa-arrow-down" style="@(fields == "Mtd-" ? "color:green" : "color:black")"></i></a>
- </th>
- <th class=" thCenter thSize">
- DAY
- <a href="javascript:reload('Day+','BondsPositionsSoldSummary')"><i class="fas fa-arrow-up" style="@(fields == "Day+" ? "color:green" : "color:black")"></i></a>
- <a href="javascript:reload('Day-','BondsPositionsSoldSummary')"><i class="fas fa-arrow-down" style="@(fields == "Day-" ? "color:green" : "color:black")"></i></a>
- </th>
- </tr>
- @foreach (var item in Model)
- {
- double? day = item.total_fund_contrib_day;
- double? mtd = item.total_fund_contrib_mtd;
- double? itd = item.total_fund_contrib_itd;
- int? coco = item.is_coco;
- <tr>
- <td>
- @Html.DisplayFor(modelItem => item.isincode)
- </td>
- <td style="@(coco == 1 ? "color:blue; font-weight:bold;":"color:black");">
- @Html.DisplayFor(modelItem => item.name)
- </td>
- <td class="tdTableAssets tdCenter">
- @{
- item.cpn = item.cpn / 100;
- }
- @Html.DisplayFor(modelItem => item.cpn)
- </td>
- @*<td>
- @Html.DisplayFor(modelItem => item.next_cpn)
- </td>*@
- <td class="tdTableAssets tdCenter">
- @Html.DisplayFor(modelItem => item.rating)
- </td>
- <td class="tdTableAssets tdCenter">
- @Html.DisplayFor(modelItem => item.currency)
- </td>
- <td class="tdTableAssets tdCenter">
- @Html.DisplayFor(modelItem => item.couponcummul)
- </td>
- <td class="tdTableAssets tdCenter">
- @Html.DisplayFor(modelItem => item.mmktcummul)
- </td>
- <td class="tdTableAssets tdCenter">
- @Html.DisplayFor(modelItem => item.pnl_itd_total_amt_loc)
- </td>
- <td class="tdTableAssets tdCenter">
- @Html.DisplayFor(modelItem => item.pnl_itd_total_amt_dev_ref)
- </td>
- <td style="@(itd < 0 ? "color:red" : "color:green");"class="tdCenter tdBold tdTableAssets">
- @Html.DisplayFor(modelItem => item.total_fund_contrib_itd)
- </td>
- <td style="@(mtd < 0 ? "color:red" : "color:green");"class="tdCenter tdBold tdTableAssets">
- @Html.DisplayFor(modelItem => item.total_fund_contrib_mtd)
- </td>
- <td style="@(day < 0 ? "color:red" : "color:green");"class="tdCenter tdBold tdTableAssets">
- @Html.DisplayFor(modelItem => item.total_fund_contrib_day)
- </td>
- </tr>
- i++;
- }
- @*{
- if (i % 2 == 0)
- {
- <tr></tr>
- }
- }*@
- <tr class="Footer">
- <td colspan="8" class="tdBold">TOTAL</td>
- <td class="tdCenter tdBold ">@String.Format("{0:#\u00A0###\u00A0##0}", totalPnlItdRefCurrency)</td>
- <td class="tdCenter tdBold" style="@(totalItd < 0 ? "color:red" : "color:green");">@String.Format("{0:0.000%}", totalItd)</td>
- <td class="tdCenter tdBold" style="@(totalMtd < 0 ? "color:red" : "color:green");">@String.Format("{0:0.000%}", totalMtd)</td>
- <td class="tdCenter tdBold" style="@(totalDay < 0 ? "color:red" : "color:green");">@String.Format("{0:0.000%}", totalDay)</td>
- </tr>
- </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement