MVC - JsonResult

前端之家收集整理的这篇文章主要介绍了MVC - JsonResult前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

[

OutputCache (Location = OutputCacheLocation .None)] public JsonResult BudgetBISvr1( int id)

{

Data.Repository.

UserRepository rep = new Data.Repository. UserRepository (); var obj = rep.GetBudgetBasicInfo(id); var res = new JsonResult ();

res.Data =

new object [] { new { obj.ProjectID,obj.Budget,obj.Revenue,obj.NetRevenue,obj.SalesCost,obj.OperatingCost } };

res.JsonRequestBehavior =

JsonRequestBehavior .AllowGet; return res;

}

猜你在找的Json相关文章