168 lines
9.7 KiB
Plaintext
168 lines
9.7 KiB
Plaintext
|
|
<span class="text-primary"> <i class="fas fa-dolly text-primary"></i> Financing Details for : <%= data.ProjectName %> Majority Share : <%= data.MajorityShare %> </span>
|
||
|
|
<br />
|
||
|
|
<br />
|
||
|
|
|
||
|
|
@(Html.DevExtreme().DataGrid<Onestopshop.Models.FinancingProfile>()
|
||
|
|
.ColumnAutoWidth(true)
|
||
|
|
.OnInitNewRow(string.Format("function(e) {{ onInitNewRow(e, {0}); }}", new JS("data.ProjectID")))
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
.ShowBorders(true)
|
||
|
|
.Columns(columns =>
|
||
|
|
{
|
||
|
|
|
||
|
|
|
||
|
|
columns.AddFor(m => m.FinancingID).SortOrder(SortOrder.Desc).Caption("ID");
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
columns.AddFor(m => m.ProjectID).Visible(false);
|
||
|
|
columns.AddFor(m => m.FixedAsset).Visible(false);
|
||
|
|
columns.AddFor(m => m.WorkingCapital).Visible(false);
|
||
|
|
columns.AddFor(m => m.AddedBy).Visible(false)
|
||
|
|
|
||
|
|
.Lookup(r => r
|
||
|
|
.DataSource(new string[] {
|
||
|
|
Session["Username"].ToString()
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
}
|
||
|
|
)
|
||
|
|
)
|
||
|
|
.ValidationRules(r => r
|
||
|
|
.AddRequired()
|
||
|
|
.Message("Please select type"));
|
||
|
|
|
||
|
|
columns.AddFor(m => m.SourceCountryEquity)
|
||
|
|
.Lookup(r => r.DataSource(d => d.WebApi().RouteName("DataCleaningAPI").LoadAction("GetCountryFinancing").Key("CountryID")).DisplayExpr("CountryName")
|
||
|
|
.ValueExpr("CountryName"))
|
||
|
|
;
|
||
|
|
|
||
|
|
columns.AddFor(m => m.ForeignLoan).Visible(false);
|
||
|
|
columns.AddFor(m => m.SourceCountryLoan)
|
||
|
|
.Lookup(r => r.DataSource(d => d.WebApi().RouteName("DataCleaningAPI").LoadAction("GetCountryFinancing").Key("CountryID")).DisplayExpr("CountryName")
|
||
|
|
.ValueExpr("CountryName"))
|
||
|
|
;
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
columns.AddFor(m => m.ForeignEquity).Visible(false);
|
||
|
|
columns.AddFor(m => m.CompanyTIN).Visible(false)
|
||
|
|
|
||
|
|
.Lookup(r => r
|
||
|
|
.DataSource(new string[] {
|
||
|
|
Session["CompanyTIN"].ToString()
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
}
|
||
|
|
)
|
||
|
|
)
|
||
|
|
.ValidationRules(r => r
|
||
|
|
.AddRequired()
|
||
|
|
.Message("Please select type"));
|
||
|
|
columns.AddFor(m => m.CreatedDate).Visible(false);
|
||
|
|
columns.AddFor(m => m.UpdatedDate).Visible(false);
|
||
|
|
columns.AddFor(m => m.LocalEquity).Visible(false);
|
||
|
|
columns.AddFor(m => m.LocalLoan).Visible(false);
|
||
|
|
columns.AddFor(m => m.TotalForeign).Visible(true);
|
||
|
|
columns.AddFor(m => m.TotalLocal).Visible(true);
|
||
|
|
columns.AddFor(m => m.TotalCapital).Visible(true);
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
}).Summary(s => s.TotalItems(items =>
|
||
|
|
{
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
items.AddFor(m => m.TotalCapital)
|
||
|
|
.SummaryType(DevExtreme.AspNet.Mvc.SummaryType.Sum);
|
||
|
|
|
||
|
|
}))
|
||
|
|
|
||
|
|
.SearchPanel(f => f.Visible(true))
|
||
|
|
.Paging(p => p.PageSize(10))
|
||
|
|
.HeaderFilter(f => f.Visible(true))
|
||
|
|
.Grouping(g => g.ContextMenuEnabled(true))
|
||
|
|
.Grouping(g => g.AutoExpandAll(true))
|
||
|
|
.Selection(s => s.Mode(SelectionMode.Multiple))
|
||
|
|
.Export(e => e.Enabled(true).FileName("FinancialDetails").AllowExportSelectedData(true))
|
||
|
|
.Editing(e => e
|
||
|
|
.AllowAdding(true)
|
||
|
|
.Popup(p => p
|
||
|
|
.Title("Financial Details (Enter absolute values in USD : Conversion to Million will be computed by the system)")
|
||
|
|
.ShowTitle(true)
|
||
|
|
.Width(1000)
|
||
|
|
.Height(400)
|
||
|
|
|
||
|
|
.Position(pos => pos
|
||
|
|
.My(HorizontalAlignment.Center, VerticalAlignment.Center)
|
||
|
|
.At(HorizontalAlignment.Center, VerticalAlignment.Center)
|
||
|
|
.Of(new JS("window"))
|
||
|
|
)
|
||
|
|
)
|
||
|
|
|
||
|
|
|
||
|
|
.AllowDeleting(true)
|
||
|
|
.AllowAdding(true)
|
||
|
|
.AllowUpdating(true)
|
||
|
|
.Mode(GridEditMode.Popup)
|
||
|
|
.UseIcons(true)
|
||
|
|
.Form(f => f
|
||
|
|
.ID("UserCreation")
|
||
|
|
.ColCount(2)
|
||
|
|
.Items(items =>
|
||
|
|
{
|
||
|
|
items.AddGroup()
|
||
|
|
|
||
|
|
.Items(groupItems =>
|
||
|
|
{
|
||
|
|
groupItems.AddSimpleFor(m => m.ForeignEquity).Editor(r => r.NumberBox().Format("$ #,##0.##;($ #,##0.##)"));
|
||
|
|
groupItems.AddSimpleFor(m => m.SourceCountryEquity);
|
||
|
|
groupItems.AddSimpleFor(m => m.ForeignLoan).Editor(r => r.NumberBox().Format("$ #,##0.##;($ #,##0.##)"));
|
||
|
|
groupItems.AddSimpleFor(m => m.SourceCountryLoan);
|
||
|
|
|
||
|
|
groupItems.AddSimpleFor(m => m.TotalForeign).Visible(false);
|
||
|
|
groupItems.AddSimpleFor(m => m.TotalLocal).Visible(false);
|
||
|
|
groupItems.AddSimpleFor(m => m.TotalCapital).Visible(false);
|
||
|
|
groupItems.AddSimpleFor(m => m.AddedBy);
|
||
|
|
});
|
||
|
|
items.AddGroup()
|
||
|
|
|
||
|
|
.Items(groupItems =>
|
||
|
|
{
|
||
|
|
groupItems.AddSimpleFor(m => m.ProjectID).Editor(t => t.TextBox().ReadOnly(true));
|
||
|
|
groupItems.AddSimpleFor(m => m.CompanyTIN);
|
||
|
|
groupItems.AddSimpleFor(m => m.UpdatedDate).Visible(false);
|
||
|
|
groupItems.AddSimpleFor(m => m.AddedBy).Visible(false);
|
||
|
|
groupItems.AddSimpleFor(m => m.LocalEquity).Editor(r => r.NumberBox().Format("$ #,##0.##;($ #,##0.##)"));
|
||
|
|
groupItems.AddSimpleFor(m => m.LocalLoan).Editor(r => r.NumberBox().Format("$ #,##0.##;($ #,##0.##)"));
|
||
|
|
groupItems.AddSimpleFor(m => m.CreatedDate).Visible(false);
|
||
|
|
groupItems.AddSimpleFor(m => m.FixedAsset).Editor(r => r.NumberBox().Format("$ #,##0.##;($ #,##0.##)"));
|
||
|
|
groupItems.AddSimpleFor(m => m.WorkingCapital).Editor(r => r.NumberBox().Format("$ #,##0.##;($ #,##0.##)"));
|
||
|
|
|
||
|
|
});
|
||
|
|
|
||
|
|
})
|
||
|
|
|
||
|
|
)
|
||
|
|
)
|
||
|
|
.DataSource(d => d.WebApi()
|
||
|
|
.RouteName("FinancialProfileAPI")
|
||
|
|
.InsertAction("AddFinancialProfile")
|
||
|
|
.LoadAction("GetFinancialProfile")
|
||
|
|
.UpdateAction("UpdateFinancingProfile")
|
||
|
|
.DeleteAction("DeleteFinancing")
|
||
|
|
.Key("FinancingID")
|
||
|
|
.LoadParams(new { ProjectID = new JS("data.ProjectID") })
|
||
|
|
)
|
||
|
|
)
|
||
|
|
|
||
|
|
|