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 Sorting()
{
return View(SALES);
}
}
}
@model IEnumerable<Sale>
@{
List<NamedProduct> products = ViewBag.Products;
List<NamedCountry> countries = ViewBag.Countries;
}
@section Scripts{
<script type="text/javascript" src="~/Scripts/FlexSheet/sorting.js"></script>
}
<div>
<div class="copy">
<h3>@Html.Raw(Resources.FlexSheet.Sorting_Text2)</h3>
<p>@Html.Raw(Resources.FlexSheet.Sorting_Text0)</p>
</div>
<div>
<div class="row" id="sortTable">
<table class="table table-bordered">
<thead>
<tr>
<th class="text-center">@Html.Raw(Resources.FlexSheet.Sorting_Text3)</th>
<th class="text-center">@Html.Raw(Resources.FlexSheet.Sorting_Text4)</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<div class="row well well-lg">
<div class="btn-group">
<button type="button" class="btn btn-default" onclick="addSortLevel()">
<span class="glyphicon glyphicon-plus-sign"></span>@Html.Raw(Resources.FlexSheet.Sorting_Text5)
</button>
<button type="button" class="btn btn-default" onclick="deleteSortLevel()">
<span class="glyphicon glyphicon-remove-sign"></span>@Html.Raw(Resources.FlexSheet.Sorting_Text6)
</button>
<button type="button" class="btn btn-default" onclick="copySortLevel()">
<span class="glyphicon glyphicon-copy"></span>@Html.Raw(Resources.FlexSheet.Sorting_Text7)
</button>
</div>
<div class="btn-group">
<button id="moveup" type="button"
class="btn btn-default"
onclick="moveSortLevel(-1)">
<span class="glyphicon glyphicon-arrow-up"></span>
</button>
<button id="movedown" type="button"
class="btn btn-default"
onclick="moveSortLevel(1)">
<span class="glyphicon glyphicon-arrow-down"></span>
</button>
</div>
<div class="btn-group">
<button type="button" class="btn btn-default" onclick="commitSort()">@Html.Raw(Resources.FlexSheet.Sorting_Text8)</button>
<button type="button" class="btn btn-default" onclick="cancelSort()">@Html.Raw(Resources.FlexSheet.Sorting_Text9)</button>
</div>
</div>
@(Html.C1().FlexSheet().CssClass("flexSheet").Id("sortSheet")
.AddBoundSheet(sheet =>
sheet.Bind(cv =>
cv.Bind(Model).DisableServerRead(true))))
</div>
</div>
@section Summary{
<p>@Html.Raw(Resources.FlexSheet.Sorting_Text1)</p>
}