Esempio n. 1
0
        static public string AddComment(int userId, int songId, string username, string freeText) /// מחזיר לי את התגובה
        {
            DataTable commentTable = Dal.AddComment(userId, songId, username, freeText);

            Comment comm = new Comment((int)commentTable.Rows[0]["SongId"], (int)commentTable.Rows[0]["UserId"],
                                       (string)commentTable.Rows[0]["Comment"], (string)commentTable.Rows[0]["Username"]); // הסדר חשוב (?)

            //com.SongID = (int)commentTable.Rows[0]["SongId"];
            //com.UserId = (int)commentTable.Rows[0]["UserId"];
            //com.CommentText = (string)commentTable.Rows[0]["Comment"];

            return(new JavaScriptSerializer().Serialize(comm));
        }