我正在尝试从SQL Server向GridView显示多个表的数据,并允许用户编辑行。目前,我可以显示数据并允许用户单击GridView中的编辑链接来修改行。
但是,当我单击“更新”时,行保持不变。我所做的更改不会更新。
这是我的存储过程:
import { Component, Type } from '@angular/core';
import { RouterEvent, NavigationStart, NavigationEnd, NavigationCancel, NavigationError } from '@angular/router';
export interface RouterConfig {
startEvents?: Type<RouterEvent>[];
completeEvents?: Type<RouterEvent>[];
}
let config: RouterConfig = {
startEvents: [NavigationStart],
completeEvents: [NavigationEnd, NavigationCancel, NavigationError]
};
我的存储过程有问题吗?
这是我的CREATE PROCEDURE updatetable2
(@Atd_ID INT,
@Atd_Date DATE,
@Atd_InTime TIME(7),
@Atd_OutTime TIME(7),
@Atd_Comment VARCHAR(50),
@Status VARCHAR(50),
@SID INT,
@S_FName VARCHAR(50),
@S_LName VARCHAR(50))
AS
BEGIN
UPDATE attendance
SET Atd_Date = @Atd_Date,
Atd_InTime = @Atd_InTime,
Atd_OutTime = @Atd_OutTime,
Atd_Comment = @Atd_Comment,
Status = @Status
WHERE Atd_ID = @Atd_ID
UPDATE student
SET S_FName = @S_FName,
S_LName = @S_LName
WHERE SID = @SID
END
RETURN
:
SqlDataSource