Zdravím, mam problem z parametrami procedury
PROCEDURE [dbo].[ZmazOdbPrisl]
-- Add the parameters for the stored procedure here
@PrislusnikId int,
@OdbPrislId int,
@Zmenil nvarchar(50),
@ZmenDna datetime
AS
BEGIN
DELETE FROM [OdbPrislusnika] WHERE [OdbPrislId] = @OdbPrislId
UPDATE Prislusnici SET Zmenil= @Zmenil, ZmenDna=@ZmenDna
WHERE PrislusniciId = @PrislusnikId
ked odchytim udalost GridView2_RowDeleting a chcem pridať do parametrov hodnoty tak vobec nezbehne procedura, apon si myslim.
protected void GridView2_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
MembershipUser user = Membership.GetUser();
e.Values["PrislusnikId"] = Request.QueryString["Cislo"];
e.Values["ZmenDna"] = DateTime.Now;
e.Values["Zmenil"] = user.UserName;
}
ked len dam pred evalues lomitka
protected void GridView2_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
MembershipUser user = Membership.GetUser();
//e.Values["PrislusnikId"] = Request.QueryString["Cislo"];
//e.Values["ZmenDna"] = DateTime.Now;
//e.Values["Zmenil"] = user.UserName;
}
tak mi sice zmaze podradený zaznam v tabulke OdbPrislusnika ale nezmeni hodnoty v nadradenej tabulke Prislusnici . Skusal to v inwj diskusíí ale neuspel som. Tak som skúsil funkciu nechat len som srušil predanie parametrov.
|