@using Resources @using PagedList.Mvc @using PagedList @using Weee.Models @using Weee.Areas.Admin.ViewModels @model ARnGWPvm @{ ViewBag.Title = "AR version(s) and GWP"; Layout = "~/Areas/Admin/Views/Shared/_AdminLayout.cshtml"; }

@ViewBag.Title


@using (Html.BeginForm("Index", "ARnGWP", FormMethod.Post, new { enctype = "multipart/form-data", id = "form" })) { 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.page) @Html.HiddenFor(m => m.arv)
@Resource.UploadExcelFile
@Html.TextBoxFor(m => m.uploadExcelFile, null, new { type = "file", @class = "input-file" })
}
@if(Model.arv == "AR4") { @Html.ActionLink("AR4", "AR4", new { id = 0 }, new { @class = "btn btn-default", disabled="disabled"}) @Html.ActionLink("AR5", "AR5", new { id = 0 }, new { @class = "btn btn-default"}) @Html.ActionLink("AR6", "AR6", new { id = 0 }, new { @class = "btn btn-default"}) } else if(Model.arv == "AR5") { @Html.ActionLink("AR4", "AR4", new { id = 0 }, new { @class = "btn btn-default"}) @Html.ActionLink("AR5", "AR5", new { id = 0 }, new { @class = "btn btn-default", disabled = "disabled" }) @Html.ActionLink("AR6", "AR6", new { id = 0 }, new { @class = "btn btn-default"}) } else { @Html.ActionLink("AR4", "AR4", new { id = 0 }, new { @class = "btn btn-default"}) @Html.ActionLink("AR5", "AR5", new { id = 0 }, new { @class = "btn btn-default"}) @Html.ActionLink("AR6", "AR6", new { id = 0 }, new { @class = "btn btn-default", disabled = "disabled" }) } @Html.ActionLink(Resource.StaticLabelGlobal_New, "Create", new { arv = Model.arv }, new { @class = "btn btn-default" })
@if (Model != null && Model.ARnGWPlst != null) { foreach (var item in Model.ARnGWPlst) { } }
@Html.DisplayNameFor(model => model.ARnGWPlst.First().ingredientName) @Html.DisplayNameFor(model => model.ARnGWPlst.First().chemicalFormula) @Html.DisplayNameFor(model => model.ARnGWPlst.First().GWP100) @Html.DisplayNameFor(model => model.ARnGWPlst.First().ChineseName) @Html.DisplayNameFor(model => model.ARnGWPlst.First().Alias) @Html.DisplayNameFor(model => model.ARnGWPlst.First().GHGType) @Html.DisplayNameFor(model => model.ARnGWPlst.First().GWPtype)
@item.ingredientName @item.chemicalFormula @item.GWP100 @item.ChineseName @item.Alias @item.GHGType @item.GWPtypeDisp @Html.ActionLink(Resource.StaticLabelGlobal_Edit, "Edit", new { id = item.ID, arv = Model.arv }, new { @class = "btn btn-xs btn-default" }) @Html.ActionLink(Resource.StaticLabelGlobal_Delete, "Delete", new { id = item.ID, arv = Model.arv }, new { @class = "btn btn-xs btn-default", onclick = "return confirm('請確認刪除此筆資料?');" })
@Html.PagedListPager((IPagedList)Model.ARnGWPlst, page => Url.Action("index", new { page, arv=Model.arv }))
@using (Html.BeginForm("DeleteAll", "ARnGWP", FormMethod.Post, new { id="deleteAll_form" })) { }