@using Resources @using System.Web @model Weee.Areas.Admin.ViewModels.YearlyParameterIndexViewModel @{ ViewBag.Title = Resource.StaticLabelYearlyParameterMaintain; Layout = "~/Areas/admin/Views/Shared/_AdminLayout.cshtml"; }

@(Model.Categories.Count == 1 ? Model.Categories.First().DisplayName : Resource.StaticLabelYearlyParameterMaintain)

@using (Html.BeginForm("Index", "YearlyParameter", FormMethod.Post, new { enctype = "multipart/form-data" })) { if (!string.IsNullOrWhiteSpace(Model.errMsg)) { } else if (!string.IsNullOrWhiteSpace(Model.resultMsg)) { } @Html.AntiForgeryToken() @Html.HiddenFor(m => m.cmd, new { @id = "cmd" }) @Html.HiddenFor(m => m.category)
@Resource.UploadExcelFile: @Html.TextBoxFor(m => m.uploadExcelFile, null, new { type = "file", @class = "input-file" })      
}

@if (Model.Categories.Count > 1) { @foreach (var Category in Model.Categories) { foreach (var Type in Category.Types) { foreach (var Area in Category.Areas) { } } } } @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) { } } } } @foreach (var Category in Model.Categories) { foreach (var Type in Category.Types) { foreach (var Area in Category.Areas) { } } } @if (Model.Categories.Count == 1) { } @foreach (var Year in Model.Years.OrderBy(x => x)) { @foreach (var Category in Model.Categories) { foreach (var Type in Category.Types) { foreach (var Area in Category.Areas) { } } } } @foreach (var Category in Model.Categories) { foreach (var Type in Category.Types) { foreach (var Area in Category.Areas) { } } }
@Resource.Page@Category.DisplayName
@Resource.Category @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 @Html.ActionLink( Area.DisplayName, "EditArea", "YearlyParameterCategory", new { a = Area.ID }, new { }) @Html.ActionLink(Resource.StaticLabelGlobal_New, "CreateArea", "YearlyParameterCategory", new { c = Model.Categories.First().Category }, new { @class = "btn btn-xs btn-default" })
@Year @(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 @Html.ActionLink(Resource.StaticLabelGlobal_New, "Create", new { areaid = Area.ID, typeid = Type.ID, year = 0 })
@using (Html.BeginForm("DeleteYPCategory", "YearlyParameter", FormMethod.Post, new { id = "from_DeleteCategory" })) { }