using FlexSheetExplorer.Models;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
using System.Linq;
namespace FlexSheetExplorer.Controllers
{
public partial class FlexSheetController : Controller
{
public static List<Sale> SALES = CustomerSale.GetData(50).ToList();
public ActionResult DataBinding()
{
return View(SALES);
}
}
}
@model IEnumerable<Sale>
@section Scripts{<script type="text/javascript" src="~/Scripts/flexSheet/dataBinding.js"></script>}
<div>
<div class="copy">
<h3>
@Html.Raw(FlexSheetRes.DataBinding_Text2)
</h3>
<p>@Html.Raw(FlexSheetRes.DataBinding_Text0)</p>
</div>
<div>
<c1-flex-sheet class="flexSheet" id="boundSheet">
<c1-bound-sheet>
<c1-items-source source-collection="@Model"></c1-items-source>
</c1-bound-sheet>
</c1-flex-sheet>
</div>
</div>
@section Summary{
<p>@Html.Raw(FlexSheetRes.DataBinding_Text1)</p>
}