天津投入产出系统后端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

55 lines
1.8 KiB

<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<QMAPP.FJC.Entity.Operation.MainOperation>" %>
<table id="<%=Model.MACHINECODDE + "_Table"%>" style="display:none" class="PartList">
<%
int columns = 5;
for (int r = 0; r < (Model.ParamColumns.Count / columns) + 1; r++)
{%>
<tr>
<%for (int c = 0; c < columns; c++)
{
if (r * columns + c < Model.ParamColumns.Count)
{%>
<th>
<%=Model.ParamColumns[r * columns + c].PARADESCRIBE%>
</th>
<td id="<%=Model.MACHINECODDE + "_" + Model.ParamColumns[r * columns + c].PARANAME%>">
</td>
<%}
else
{%>
<th>
</th>
<td>
</td>
<%}%>
<%}%>
</tr>
<%}%>
</table>
<span id="<%=Model.MACHINECODDE + "_Holder"%>" style=" display: block">
正在加载...
</span>
<script type="text/javascript" language="javascript">
$.ajax({
type: "POST",
url: "/ProductArchives/LoadParameter",
dataType: "json",
data: {
tables: '<%=Model.PARATABLENAME %>',
fileds: '<%=Model.SelectCollumns %>',
productcode: '<%=Model.PRODUCTCODE %>',
machinecode: '<%=Model.MACHINECODDE %>'
},
success: function (data) {
<%foreach (var p in Model.ParamColumns)
{ %>
$('#<%=Model.MACHINECODDE + "_" + p.PARANAME%>').html(data[0].<%=p.PARANAME%>);
<%} %>
$('#<%=Model.MACHINECODDE + "_Table"%>').css('display','table');
$('#<%=Model.MACHINECODDE + "_Holder"%>').css('display','none');
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
$('#<%=Model.MACHINECODDE + "_Holder"%>').text('加载失败!');
}
});
</script>