@using Resources @using System.Web @model Weee.Areas.Admin.ViewModels.YearlyParameterIndexViewModel @{ ViewBag.Title = Resource.StaticLabelYearlyParameterMaintain; Layout = "~/Areas/admin/Views/Shared/_AdminLayout.cshtml"; }
@using (Html.BeginForm("Index", "YearlyParameter", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
if (!string.IsNullOrWhiteSpace(Model.errMsg))
{
@Model.errMsg
}
else if (!string.IsNullOrWhiteSpace(Model.resultMsg))
{
@Model.resultMsg
}
@Html.AntiForgeryToken()
@Html.HiddenFor(m => m.cmd, new { @id = "cmd" })
@Html.HiddenFor(m => m.category)
|
@Resource.Page | @foreach (var Category in Model.Categories) { foreach (var Type in Category.Types) { foreach (var Area in Category.Areas) {@Category.DisplayName | } } }|
---|---|---|
@Resource.Category | @if (Model.Categories.Count == 1 && Model.Categories.First().Types.Count >= 1) { foreach (var Category in Model.Categories) { foreach (var Type in Category.Types) { foreach (var Area in Category.Areas) {@Html.ActionLink( Type.DisplayName, "EditType", "YearlyParameterCategory", new { t = Type.ID }, new { }) | } } } }@Html.ActionLink(Resource.StaticLabelGlobal_New, "CreateType", "YearlyParameterCategory", new { c = Model.Categories.First().Category }, new { @class = "btn btn-xs btn-default" }) |
@Resource.YearAndArea | @foreach (var Category in Model.Categories) { foreach (var Type in Category.Types) { foreach (var Area in Category.Areas) {@Html.ActionLink( Area.DisplayName, "EditArea", "YearlyParameterCategory", new { a = Area.ID }, new { }) | } } } @if (Model.Categories.Count == 1) {@Html.ActionLink(Resource.StaticLabelGlobal_New, "CreateArea", "YearlyParameterCategory", new { c = Model.Categories.First().Category }, new { @class = "btn btn-xs btn-default" }) | }
@Year | @foreach (var Category in Model.Categories) { foreach (var Type in Category.Types) { foreach (var Area in Category.Areas) {@(Model.Parameters.FirstOrDefault(x => x.AreaID == Area.ID && x.TypeID == Type.ID && x.Year == Year) == null ? Html.ActionLink(Resource.StaticLabelGlobal_New, "Create", new { areaid = Area.ID, typeid = Type.ID, year = Year }) : Html.ActionLink(Model.Parameters.FirstOrDefault(x => x.AreaID == Area.ID && x.TypeID == Type.ID && x.Year == Year).Value.ToString("G29"), "Create", new { areaid = Area.ID, typeid = Type.ID, year = Year }) ) | } } }|
@Resource.StaticLabelGlobal_New | @foreach (var Category in Model.Categories) { foreach (var Type in Category.Types) { foreach (var Area in Category.Areas) {@Html.ActionLink(Resource.StaticLabelGlobal_New, "Create", new { areaid = Area.ID, typeid = Type.ID, year = 0 }) | } } }