i want to increase the score count of the original poster , when a user use his referal ID , each new user have score 1 by default but when any user register with is ID it should update his Score by additional 1 which make it 2 , i place my code under Row_updated event
cant i use store procedure , if user has was invited through a referal code he should input the referal code and the orginal user score should be increase by 1 but if user was not invited by referal code he should just do nothing. i am not sure if i put the code properly.
// Row Updated event
public void Row_Updated(Dictionary<string, object> rsold, Dictionary<string, object> rsnew) {
var row = ExecuteRow(" UPDATE Users
SET Score = Score + 1
WHERE rsold[“ID”] = @AssignedBy ");
}
i try this code below inside my SQL SERVER AND IT WORKS THE WAY IT SHOULD
CREATE Procedure [dbo].[IncreaseCount]
@AssignedBy int
AS
UPDATE Users
SET Score = Score + 1
WHERE ID = @AssignedBy
Did you try in Row_Updating server event? What error did you get? Make sure that you have enabled debug mode (Tools → Advanced Settings → Debug) first.
yes u try row updating server event , it doesnt bring out any error it just dont update the original poster score.
can you please show steps on how you we do this in a ASP.NET Maker
if any user register
ID(PRIMARY KEY AUTO INCREMENT) which is the referal code i sent to users email as their referal code ,
NAME : abc
PHONE NUMBER: 0583833333
SCORE : by default set it to 1
ASSIGNEDBY: if you are refer by a register user use his referal code but if you are not leave it blank zero(0) will be assign automatically
if another user register using the above user referal code , we should update the above user score +1
i have done all where i am having issue is to locate the user and update his score base on his referal code. Thank you