165 lines
8.4 KiB
Plaintext
165 lines
8.4 KiB
Plaintext
@using PagedList.Mvc
|
|
@using PagedList
|
|
@using Resources
|
|
|
|
@model Weee.Areas.Admin.ViewModels.SimaproIndexViewModel
|
|
|
|
@section PageScripts {
|
|
@Scripts.Render("~/parameterDatabase")
|
|
}
|
|
|
|
@{
|
|
ViewBag.Title = Resource.StaticLabelSimaproParameter;
|
|
Layout = "~/Areas/Admin/Views/Shared/_AdminLayout.cshtml";
|
|
}
|
|
|
|
<div class="col-md-12">
|
|
<div class="row docs-row">
|
|
<div class="col-xs-5">
|
|
<h2 class="docs-h2">@Resource.StaticLabelSimaproParameter</h2>
|
|
</div>
|
|
<div class="col-xs-7">
|
|
@* @using (Html.BeginForm("Index", "ParameterDatabase", FormMethod.Get, new { @class = "form-horizontal" }))
|
|
{
|
|
<div class="form-group">
|
|
<div class="col-sm-8">
|
|
<input name="companyName" type="text" class="form-control" />
|
|
</div>
|
|
<div class="col-sm-4">
|
|
<input type="submit" value="@Resource.StaticLabelGlobal_Search" class="btn btn-default" />
|
|
@Html.ActionLink(Resource.StaticLabelGlobal_Cancel, "index", new { }, new { @class = "btn btn-default" })
|
|
</div>
|
|
</div>
|
|
}*@
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
<div>
|
|
@if (ViewBag.errorMsg != null)
|
|
{
|
|
<p>@ViewBag.errorMsg</p>
|
|
}
|
|
else
|
|
{
|
|
<div class="row">
|
|
<div class="row docs-row">
|
|
<div class="col-xs-2">
|
|
@*DL-39*@
|
|
@if (Model.SimaproParameterType != null)
|
|
{
|
|
@Html.Label(Model.SimaproParameterType.DisplayName)
|
|
}
|
|
@*@Html.Label(Model.SimaproParameterType.DisplayName)*@
|
|
</div>
|
|
<div class="col-xs-10 text-right">
|
|
@using (Html.BeginForm("Index", "ParameterDatabase", FormMethod.Get, new { id = "simapro-form" }))
|
|
{
|
|
<label>@Resource.StaticLabelGlobal_Search</label>
|
|
<input type="text" id="searchString" name="searchString" value="@ViewBag.searchString" />
|
|
|
|
<label>@Resource.StaticLabelVersion</label>
|
|
<select name="simaproVersionID" id="simapro-version-id">
|
|
<option value=""></option>
|
|
@foreach (var simaproVersion in Model.SimaproVersions)
|
|
{
|
|
if (Model.SimaproVersion.ID == simaproVersion.ID)
|
|
{
|
|
<option value="@simaproVersion.ID" selected="selected">@simaproVersion.Version</option>
|
|
}
|
|
else
|
|
{
|
|
<option value="@simaproVersion.ID">@simaproVersion.Version</option>
|
|
}
|
|
}
|
|
</select>
|
|
|
|
<label>@Resource.SimaproParametersCategory</label>
|
|
<select name="simaproCategoryID" id="simapro-category-id">
|
|
@foreach (var simaproParameterCategory in Model.SimaproParameterCategories)
|
|
{
|
|
if (Model.SimaproParameterCategory.ID == simaproParameterCategory.ID)
|
|
{
|
|
<option value="@simaproParameterCategory.ID" selected="selected">@simaproParameterCategory.DisplayName</option>
|
|
}
|
|
else
|
|
{
|
|
<option value="@simaproParameterCategory.ID">@simaproParameterCategory.DisplayName</option>
|
|
}
|
|
}
|
|
</select>
|
|
|
|
<label>@Resource.SimaproParametersType</label>
|
|
<select name="simaproTypeID" id="simapro-type-id">
|
|
@*DL-77*@
|
|
@if (Model.SimaproParameterTypes != null)
|
|
{
|
|
foreach (var simaproParameterType in Model.SimaproParameterTypes)
|
|
{
|
|
if (Model.SimaproParameterType.ID == simaproParameterType.ID)
|
|
{
|
|
<option value="@simaproParameterType.ID" selected="selected">@Html.ActionLink(simaproParameterType.DisplayName, "Index", new { simaproCategoryID = Model.SimaproParameterCategory.ID, simaproTypeID = simaproParameterType.ID })</option>
|
|
|
|
}
|
|
else
|
|
{
|
|
<option value="@simaproParameterType.ID">@Html.ActionLink(simaproParameterType.DisplayName, "Index", new { simaproCategoryID = Model.SimaproParameterCategory.ID, simaproTypeID = simaproParameterType.ID })</option>
|
|
}
|
|
}
|
|
}
|
|
</select>
|
|
}
|
|
</div>
|
|
</div>
|
|
|
|
<div>
|
|
<table class="table table-bordered">
|
|
<tr class="text-center">
|
|
<td>@Resource.SimaproParametersEncoding</td>
|
|
<td>@Resource.SimaproParametersName</td>
|
|
<td>@Resource.SimaproParametersChineseName</td>
|
|
<td>@Resource.SimaproParametersValue</td>
|
|
<td>@Resource.SimaproParametersUnit</td>
|
|
<td>Tool</td>
|
|
<td>Project</td>
|
|
<td>@Resource.SimaproParametersRemark</td>
|
|
<td>@Resource.SimaproParametersDatabase</td>
|
|
<td class="docs-button-td-sm"></td>
|
|
</tr>
|
|
@*DL-39*@
|
|
@if (Model.parameters != null)
|
|
{
|
|
foreach (var simaproParameter in Model.parameters)
|
|
{
|
|
<tr>
|
|
<td>@simaproParameter.Encoding</td>
|
|
<td>@simaproParameter.DisplayNameEN</td>
|
|
<td>@simaproParameter.DisplayNameTW</td>
|
|
<td>@simaproParameter.Value</td>
|
|
<td>@simaproParameter.Unit</td>
|
|
<td>@simaproParameter.Description</td>
|
|
<td>@simaproParameter.Project</td>
|
|
<td>@simaproParameter.Remark</td>
|
|
<td>@simaproParameter.Database</td>
|
|
<td>
|
|
@Html.ActionLink(Resource.StaticLabelGlobal_Detail, "Detail", new { simaproParameterID = simaproParameter.ID }, new { @class = "btn btn-xs btn-default" })
|
|
@Html.ActionLink(Resource.StaticLabelGlobal_Edit, "Edit", new { simaproParameterID = simaproParameter.ID }, new { @class = "btn btn-xs btn-default" })
|
|
</td>
|
|
</tr>
|
|
}
|
|
}
|
|
</table>
|
|
</div>
|
|
<div class="text-center">
|
|
|
|
@*DL-39*@
|
|
@if (Model.parameters != null)
|
|
{
|
|
@Html.PagedListPager((IPagedList)Model.parameters, page => Url.Action("Index", new { page, simaproVersionID = Model.SimaproVersion.ID, searchString = ViewBag.SearchString, simaproCategoryID = ViewBag.simaproCategoryID, simaproTypeID= ViewBag.simaproTypeID }))
|
|
}
|
|
@*@Html.PagedListPager((IPagedList)Model.parameters, page => Url.Action("Index", new { page, simaproVersionID = Model.SimaproVersion.ID, searchString = ViewBag.SearchString }))*@
|
|
</div>
|
|
</div>
|
|
}
|
|
</div>
|
|
|
|
</div> |