Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @model IEnumerable<PortfolioLib.Models.M_trsdeals>
- @{
- ViewBag.Title = "Trs Deals from " + ViewBag.portfolio.label;
- Html.RenderAction("PortfolioMenu", "Trading", new { ViewBag.portfolio, modelName = "FXDeals", actionName = "FromPortfolio" });
- <link href="@Url.Content("~/bootstrap/css/bootstrap.min.css")" rel="stylesheet" type="text/css">
- }
- @using (Html.BeginForm(FormMethod.Post))
- {
- <div class="form-horizontal row justify-content-center containerTab">
- <div class="form-group">
- <div class="col-lg-12 col-md-12 col-sm-12">
- <label class="control-label labelInput" for="name">Portfolio</label>
- @Html.DropDownList("portfolioid", null, htmlAttributes: new { @class = "form-control labelInput secondDetailSpace" })
- </div>
- </div>
- </div>
- }
- <p>
- @Html.ActionLink("Create New", "Create")
- </p>
- <div class="divCreateNewDeals">
- <a class="createNewDeals" href="/trsdeals/Create">Create new<i class="plusCreateNew fas fa-plus"></i></a>
- </div>
- <div class="marginBetweenLine iconBar container">
- <div class="row justify-content-center">
- <div class="col-lg-2 col-md-2 col-sm-2">
- <i class="fas fa-cloud-upload-alt"></i> : Validated
- </div>
- <div class="col-lg-2 col-md-2 col-sm-2">
- <i class="fas fa-check"></i> : Confirmed
- </div>
- <div class="col-lg-2 col-md-2 col-sm-2">
- <i class="fas fa-lock"></i> : Cancelled
- </div>
- </div>
- </div>
- @foreach (var trade_date in Model.GroupBy(i => i.trade_date.Date).OrderByDescending(g => g.Key))
- {
- <p class="dateTableTop">@trade_date.Key.ToShortDateString()</p>
- <div class="form-group">
- <div class="row justify-content-center secondDetailSpace">
- <div class="col-xl-9 col-lg-11 col-md-11 col-sm-11 table-striped table-hover">
- <table class="table">
- <tr>
- <th class="thSize thcenter background_title_tab titlet_tab table-bordered">Trade Date</th>
- <th class="thSize thcenter background_title_tab titlet_tab table-bordered">@Html.DisplayNameFor(model => model.trs_code)</th>
- <th class="thSize thcenter background_title_tab titlet_tab table-bordered">Name</th>
- <th class="thSize thcenter background_title_tab titlet_tab table-bordered">Direction</th>
- <th class="thSize thcenter background_title_tab titlet_tab table-bordered">Quantity or Notional</th>
- <th class="thSize thcenter background_title_tab titlet_tab table-bordered">Actual Notional</th>
- <th class="thSize thcenter background_title_tab titlet_tab table-bordered">Underlying Price</th>
- <th class="thSize thcenter background_title_tab titlet_tab table-bordered">Fixed Rate Price</th>
- <th class="thSize thcenter background_title_tab titlet_tab table-bordered">Invested Amount Local</th>
- <th class="thSize thcenter background_title_tab titlet_tab table-bordered">Compensation Amount</th>
- <th class="thSize thcenter background_title_tab titlet_tab table-bordered">Validated</th>
- <th class="thSize thcenter background_title_tab titlet_tab table-bordered"></th>
- </tr>
- @foreach (var item in trade_date)
- {
- <tr class="normal">
- <td class="tdCenter">@item.trade_date.ToString("yyyy-MM-dd")</td>
- <td class="tdCenter">@Html.ActionLink(item.M_trss.code, "Details", "Trss", new { item.M_trss.id }, null)</td>
- <td class="tdCenter">@item.name</td>
- <td class="tdCenter">@item.direction.label</td>
- <td class="tdCenter">@item.notional_quantity.ToString("### ### ##0")</td>
- <td class="tdCenter">@item.actual_notional.ToString("### ### ##0.00")</td>
- <td class="tdCenter">@item.underlying_initial_price.ToString("### ### ##0.00")</td>
- <td class="tdCenter">@item.fixed_rate_initial_price.ToString("### ### ##0.00")</td>
- <td class="tdCenter">@item.initial_contract_value_loc.ToString("### ### ##0.00")</td>
- <td class="tdCenter">@(item.compensation_amount == null ? "" : item.compensation_amount.Value.ToString("### ### ##0.00") )</td>
- <td class="tdCenter">
- @{
- if (item.is_settled)
- {
- <i class="fas fa-lock"></i>
- }
- else if (item.is_cancelled)
- {
- <i class="fas fa-times"></i>
- }
- else if (item.is_confirmed)
- {
- <i class="fas fa-check"></i>
- }
- }
- </td>
- <td class="tdCenter">
- @Html.ActionLink("Edit", "Edit", new { id = item.id, returnUrl = HttpContext.Current.Request.Url.PathAndQuery })|
- @Html.ActionLink("Details", "Details", new { id = item.id, returnUrl = HttpContext.Current.Request.Url.PathAndQuery })|
- @Html.ActionLink("Delete", "Delete", new { id = item.id, returnUrl = HttpContext.Current.Request.Url.PathAndQuery })
- </td>
- </tr>
- }
- </table>
- </div>
- </div>
- </div>
- }
- <div style="clear:both"></div>
- <script type="text/javascript">
- $(document).ready(function () {
- $('#portfolioid').change(function () {
- uploadPtfid();
- });
- });
- function uploadPtfid() {
- var ptfid = $('#portfolioid option:selected').val();
- var parameters = ptfid;
- $.ajax({
- url: '/FxDeals2/UpdatePtfid',
- type: "Post",
- async: false,
- data: ({ parameters: parameters }),
- success: function (response) {
- window.location.reload();
- },
- error: function (response, status, error) {
- alert("Error while checking portfolio");
- }
- });
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement