EasyUI two error solution

<script>
$(document).ready(function () {
$('#historyToolList').datagrid({
url: '/tool/DateListToolUpdateHistory',
method: 'get',
width: '100%',
height: '160',
rownumbers: true,
singleSelect: true,
queryParams: { toolId: '1' }


});
});
</script>

 

<table id="historyToolList" class="easyui-datagrid"
>
<thead>
<tr>
<th data-options="field:'updateDate',width:80">The modification date</th>
<th data-options="field:'updateUserId',width:80">The modifier</th>
<th data-options="field:'T_id',width:60">Die ID</th>
<th data-options="field:'supplier_C',width:80">The supplier</th>
<th data-options="field:'owner_C',width:80">The operation</th>
<th data-options="field:'fixedAssetNo_C',width:80">Fixed assets</th>
<th data-options="field:'useStatus_C',width:80">The use of state</th>
<th data-options="field:'toolingStatus_C',width:80">The mould state</th>
<th data-options="field:'usableCavity_N',width:80">Now the number of mold cavity</th>
<th data-options="field:'cycleTime_N',width:80">Every time</th>
<th data-options="field:'efficiency_D',width:80">Efficiency</th>
<th data-options="field:'usedToolingLife_N',width:80">Have used the die life</th>
<th data-options="field:'byPart_D',width:80">Spare parts prediction</th>
<th data-options="field:'machineSpeedSpm_N',width:80">Punching rate</th>
</tr>
</thead>
</table>

 

Background processing

public ActionResult DateListToolUpdateHistory(string toolId)
{
if (String.IsNullOrEmpty(toolId) || toolId.Equals("0"))
{
return Json(" ", JsonRequestBehavior.AllowGet);
}
else
{
int toolId_I = Convert.ToInt32(toolId);
var urList = from t in db.ToolUpdateHistories
where t.T_id == toolId_I
select t;
return Json(urList.ToList(), JsonRequestBehavior.AllowGet);
}
}

===========================

posted @ 2017-11-27 21:50  KJXY  阅读(82)  评论(0)    收藏  举报