69 lines
2.0 KiB
Plaintext
69 lines
2.0 KiB
Plaintext
|
|
@{
|
|
ViewBag.Title = "SzCounty";
|
|
}
|
|
@model dccdc.Models.Sz_county
|
|
<div class="l-clear"></div>
|
|
<div id="maingrid"></div>
|
|
<div style="display:none;">
|
|
</div>
|
|
@section scripts{
|
|
<script type="text/javascript">
|
|
var openf;
|
|
function edit(item) {
|
|
var id;
|
|
if (item.text === "增加") {
|
|
id = "";
|
|
}
|
|
else if (item.text === "修改") {
|
|
var r = liger.get("maingrid").getSelectedRow();
|
|
if (!r) {
|
|
$.ligerDialog.alert("请选择要修改的数据!");
|
|
return;
|
|
}
|
|
id = r.countyCode;
|
|
}
|
|
openf= $.ligerDialog.open({
|
|
url: "@Url.Action("EditSzCounty")?id=" + id,
|
|
title: item.text,
|
|
width: 380,
|
|
height: 200
|
|
});
|
|
}
|
|
function init() {
|
|
liger.get("maingrid").reload();
|
|
openf.close();
|
|
}
|
|
$(function() {
|
|
|
|
$("#maingrid").ligerGrid({
|
|
height: '100%',
|
|
columns: [
|
|
{ display: '参数', name: 'countyCode', align: 'left', width: 100, minWidth: 60 }
|
|
,{ display: '参数', name: 'countyName', align: 'left', width: 100, minWidth: 60 }
|
|
,{ display: '参数', name: 'cityCode', align: 'left', width: 100, minWidth: 60 }
|
|
//,{ display: '参数', name: 'newCode', align: 'left', width: 100, minWidth: 60 }
|
|
//,{ display: '参数', name: 'newName', align: 'left', width: 100, minWidth: 60 }
|
|
],
|
|
url: "@Url.Action("GetSzCounty")",
|
|
pageSize: 30,
|
|
rownumbers: true,
|
|
toolbar: {
|
|
items: [
|
|
{ text: '增加', click: edit, icon: 'add' },
|
|
{ line: true },
|
|
{ text: '修改', click: edit, icon: 'modify' }
|
|
]
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|