2012-07-11 80 views
0

我有一个存储过程usp_getCashCommissionCustomer这样的:MVC2复杂类型的Visual Studio 2010的.NET Framework 4

Select 
    cw.Customercode, name, state as Province, City, Suburb, 
    Balance As HMCommission, MBalance as MTNCommission 
from 
    customerwallet cw 
inner join 
    customer cu on cw.customercode = cu.customercode 
where 
    iscash = 1 
    and (balance + mbalance) > 0 
order by 
    customercode 

在点击customercode我应该打开创建视图follwing表

CREATE TABLE [dbo].[CustomerLedger] 
(
    [ID] [bigint] IDENTITY(1,1) NOT NULL, 
    [CustomerCode] [varchar](25) NULL, 
    [TransactionType] [varchar](1) NULL, 
    [Description] [varchar](30) NULL, 
    [TransactionDate] [datetime] NULL, 
    [Amount] [float] NULL, 
    [IsProcessed] [bit] NULL 
) ON [PRIMARY] 

的请帮忙我。

我新的ASP.NET MVC 2

回答

0

我不知道您是否使用ORM与否。如果您不是任何ORM,那么您可能会看到使用存储过程填充视图的方法,其中提到了here。如果您正在使用ORM(如L @ S或实体框架),则可能从here开始。 如果您想弹出视图,请参阅教程here

+0

我正在使用实体框架。我在grid上展示了商店过程的放置。我为网格的输出创建了复杂类型。当我点击客户代码时,它应该打开创建customerledger模型的视图。 – 2012-07-11 12:34:22

+0

然后按照jquey popup的教程 – Tassadaque 2012-07-11 14:57:59

相关问题