public void addRCPurchased(RCItem obj) { Dictionary<string, object> parameters = new Dictionary<string, object>(); parameters.Add("@UserID", obj.UserID); parameters.Add("@ItemID", obj.ItemID); parameters.Add("@Rate", obj.Rate); executeNonQuery("INSERT INTO [RS].[TEMP_RC_PURCHASED_TBL] ([UserID] ,[ItemID] ,[Rate]) VALUES (@UserID ,@ItemID ,@Rate)", parameters); }
public void addRCBestSelling(RCItem obj) { Dictionary<string, object> parameters = new Dictionary<string, object>(); parameters.Add("@UserID", obj.UserID); parameters.Add("@ItemID", obj.ItemID); parameters.Add("@Rate", obj.Rate); executeNonQuery("INSERT INTO [RS].[TEMP_RC_BESTSELLING_TBL] ([UserID] ,[ItemID] ,[Rate]) VALUES (@UserID ,@ItemID ,@Rate)", parameters); }
public List<RCItem> getRCPurchasedItems(string UserID) { Dictionary<string, object> parameters = new Dictionary<string, object>(); parameters.Add("@UserID", UserID); string strSelect = "SELECT [UserID] ,[ItemID] ,[Rate] FROM [RS].[TEMP_RC_PURCHASED_TBL] WHERE [UserID] = @UserID"; SqlDataReader dr = executeReader(strSelect, parameters); List<RCItem> list = new List<RCItem>(); while (dr.Read()) { RCItem obj = new RCItem(); obj.ItemID = dr.GetString(dr.GetOrdinal("ItemID")); obj.UserID = dr.GetString(dr.GetOrdinal("UserID")); obj.Rate = dr.GetDouble(dr.GetOrdinal("Rate")); list.Add(obj); } dr.Close(); return list; }