using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using FlexSheetExplorer.Models;
using C1.Web.Mvc;
using C1.Web.Mvc.Serialization;
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(Resources.FlexSheet.DataBinding_Text2)</h3>
<p>@Html.Raw(Resources.FlexSheet.DataBinding_Text0)</p>
</div>
<div>
@(Html.C1().FlexSheet().CssClass("flexSheet").Id("boundSheet")
.AddBoundSheet(sheet =>
sheet.Bind(cv =>
cv.Bind(Model).DisableServerRead(true))))
</div>
</div>
@section Summary{
<p>@Html.Raw(Resources.FlexSheet.DataBinding_Text1)</p>
}