Example #1
0
        private static bool MngLibrary(string userID)
        {
            string json_Songs = BattleSupportClient.MakeHttpWebRequest("Song/GetUserLibrary", JSonUtil_Client.GetAsJson_Simple("userID", userID));

            if (json_Songs != string.Empty)
            {
                DataTable dtMyGallary = JSonUtil_Client.jsonStringToTable(json_Songs);

                ConsolePrint.PrintMyLibrary(dtMyGallary);
            }

            ConsolePrint.PrintEditSongMenu();

            string actionNo = Console.ReadLine();

            if (actionNo == "1") //Add Song

            {
                DataTable SongsDataTable = BuildSongDT(long.Parse(userID));

                string retValue = BattleSupportClient.MakeHttpWebRequest("Song/AddSong", JSonUtil_Client.CnvDataTableToJsonString(SongsDataTable));

                return(true);
            }

            else if (actionNo == "2") //Delete Song
            {
                Console.Write("Enter SongID : ");

                string songID = Console.ReadLine();

                string retValue = BattleSupportClient.MakeHttpWebRequest("Song/DeleteSong", JSonUtil_Client.GetAsJson_Simple("songID", songID));

                return(true);
            }

            else
            {
                return(false);
            }
        }