using FlexSheetExplorer.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace FlexSheetExplorer.Controllers
{
public partial class FlexSheetController : Controller
{
public ActionResult ExcelIO()
{
return View(SALES);
}
}
}
@model IEnumerable<Sale>
@section Scripts{
<script type="text/javascript" src="~/Scripts/FlexSheet/excelIO.js"></script>
}
@section Styles{
<style>
.btn {
margin-bottom: 0;
}
</style>
}
<div>
<div class="copy">
<h3>@Html.Raw(Resources.FlexSheet.ExcelIO_Text2)</h3>
<p>@Html.Raw(Resources.FlexSheet.ExcelIO_Text0)</p>
</div>
<div class="row">
<div class="col-md-6 col-xs-12">
<div class="form-inline well well-lg">
<input type="file" class="form-control" id="importFile" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" />
<button class="btn btn-default" onclick="load()">@Html.Raw(Resources.FlexSheet.ExcelIO_Text3)</button>
</div>
</div>
<div class="col-md-6 col-xs-12">
<div class="form-inline well well-lg">
@Html.Raw(Resources.FlexSheet.ExcelIO_Text5)
<input type="text" class="form-control" id="fileName" onchange="fileNameChanged()" />
<button class="btn btn-default" onclick="save()">@Html.Raw(Resources.FlexSheet.ExcelIO_Text4)</button>
</div>
</div>
</div>
<div>
@(Html.C1().FlexSheet().CssClass("flexSheet").Id("excelIOSheet")
.SelectedSheetIndex(0).AddBoundSheet(sheet =>
sheet.Bind(cv =>
cv.Bind(Model).DisableServerRead(true)))
.AddUnboundSheet("Unbound", 10, 10))
</div>
</div>
@section Summary{
<p>@Html.Raw(Resources.FlexSheet.ExcelIO_Text1)</p>
}