【问题标题】:MVC2 complex type visual studio 2010 .net framework 4MVC2 复杂类型visual studio 2010 .net framework 4
【发布时间】:2012-07-10 19:32:08
【问题描述】:

我有一个这样的存储过程usp_getCashCommissionCustomer

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我应该打开创建下表的视图

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 的新手

【问题讨论】:

    标签: asp.net-mvc linq-to-sql asp.net-mvc-2


    【解决方案1】:

    我不知道你是否使用 ORM。如果您不是任何 ORM,那么您可能会看到使用提到的存储过程填充视图的方法 here。如果您使用 ORM,例如 L@S 或实体框架,您可以从 here 开始。 如果你想弹出视图,你可以找到教程here

    【讨论】:

    • 我正在使用实体框架。我在网格上显示存储过程的输出。我为网格的输出创建了复杂类型。当我点击客户代码时,它应该打开客户分类帐模型的创建视图。
    • 那就按照jquey popup的教程来
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多