如何在mvc3中使用存储过程并将数据绑定到webgrid [英] how to use stored procedure in mvc3 and bind data to webgrid

查看:63
本文介绍了如何在mvc3中使用存储过程并将数据绑定到webgrid的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是mvc3中的新手我希望使用storedprocedure在webgrid中显示数据

I am new in mvc3 i want to display data in webgrid by using storedprocedure

CREATE Procedure Usp_Charity_Get_ByFedID  
(  
  @FederationID  int  
)  
As  
Begin  
 SELECT C.CharityNumber, ISNULL(C.OldCharityNumber,0), S.[State], C.Name, dbo.Fun_Charity_Activity(CF.CharityID)  
 FROM   PledgeNet.Charity AS C INNER JOIN  
     PledgeNet.[State] AS S ON C.StateID = S.StateID INNER JOIN  
     PledgeNet.CharityFederation AS CF ON C.CharityID = CF.CharityID                        
 Where CF.FederationID=@FederationID  
  
END



如何在mvc3中使用此绑定数据到webgrid


how to use this in mvc3 for bind data to webgrid

推荐答案

请参阅: http://stackoverflow.com/questions/12429212/how-do-you-call- a-stored-procedure-in-mvc3-c-sharp [ ^ ]



类似的问题:如何在asp.net mvc3中调用存储过程? [ ^ ]
See this: http://stackoverflow.com/questions/12429212/how-do-you-call-a-stored-procedure-in-mvc3-c-sharp[^]

Similar question: How to call a stored procedure in asp.net mvc3?[^]


这篇关于如何在mvc3中使用存储过程并将数据绑定到webgrid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆