<%@ Page Language="C#" MasterPageFile="~/Common.Master" AutoEventWireup="true" CodeBehind="FrmTest1.aspx.cs" Inherits="WebApp.FrmTest1" Title="无标题页" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script type="text/javascript">
var toolbarBtnList = [
{text:'查询',iconCls:'icon-add',handler:function(){}},
{text:'工具1',iconCls:'icon-remove',handler:function(){}},
{text:'工具2',iconCls:'icon-edit',handler:function(){}},
'-',
{text:'刷新',iconCls:'icon-reload',handler:reloadRecord},
];
var columnList = [[
{field:'budgetYear', title:'年份' , width:100, align:'left'},
{field:'month1Money', title:'一月金额' , width:100, align:'left'},
{field:'month2Money', title:'二月金额' , width:100, align:'left'},
{field:'month3Money', title:'三月金额' , width:100, align:'left'},
{field:'month4Money', title:'四月金额' , width:100, align:'left'},
{field:'month5Money', title:'五月金额' , width:100, align:'left'},
{field:'month6Money', title:'六月金额' , width:100, align:'left'}
]];
$(function(){
$('#dtMain').datagrid({
toolbar:toolbarBtnList,
columns:columnList,
width:700,
height:"auto",
fit:true,
singleSelect:true,
fitColumns:false,
nowrap:false,
pagination:false
});
reloadRecord();
});
//刷新
function reloadRecord()
{
//显示等待画面
showLoading();
var methodUrl = "WSBudgetTest.asmx/getSubjectBudgetList";
ajaxRequest(methodUrl , '{"budgetConfigId":1,"budgetSubjectId":2}', function(data){
//隐藏等待画面
hideLoading();
console.error($.parseJSON(data.d));
//装载数据
$("#dtMain").datagrid("loadData", $.parseJSON(data.d));
});
$("#dtMain").datagrid("clearSelections");
}
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div region="center">
<table id="dtMain"> </table>
</div>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script type="text/javascript">
var toolbarBtnList = [
{text:'查询',iconCls:'icon-add',handler:function(){}},
{text:'工具1',iconCls:'icon-remove',handler:function(){}},
{text:'工具2',iconCls:'icon-edit',handler:function(){}},
'-',
{text:'刷新',iconCls:'icon-reload',handler:reloadRecord},
];
var columnList = [[
{field:'budgetYear', title:'年份' , width:100, align:'left'},
{field:'month1Money', title:'一月金额' , width:100, align:'left'},
{field:'month2Money', title:'二月金额' , width:100, align:'left'},
{field:'month3Money', title:'三月金额' , width:100, align:'left'},
{field:'month4Money', title:'四月金额' , width:100, align:'left'},
{field:'month5Money', title:'五月金额' , width:100, align:'left'},
{field:'month6Money', title:'六月金额' , width:100, align:'left'}
]];
$(function(){
$('#dtMain').datagrid({
toolbar:toolbarBtnList,
columns:columnList,
width:700,
height:"auto",
fit:true,
singleSelect:true,
fitColumns:false,
nowrap:false,
pagination:false
});
reloadRecord();
});
//刷新
function reloadRecord()
{
//显示等待画面
showLoading();
var methodUrl = "WSBudgetTest.asmx/getSubjectBudgetList";
ajaxRequest(methodUrl , '{"budgetConfigId":1,"budgetSubjectId":2}', function(data){
//隐藏等待画面
hideLoading();
console.error($.parseJSON(data.d));
//装载数据
$("#dtMain").datagrid("loadData", $.parseJSON(data.d));
});
$("#dtMain").datagrid("clearSelections");
}
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div region="center">
<table id="dtMain"> </table>
</div>
</asp:Content>