Esempio n. 1
0
 // Function for delete button. Gets tweet ID as variable via CommandArgument
 protected void deleteButton_Click(object sender, CommandEventArgs e)
 {
     try
     {
         var argument = ((Button)sender).CommandArgument;
         Tweet.DestroyTweet(long.Parse(argument));
     }
     catch (Exception ex)
     {
         lblError.Text = ex.Message;
     }
 }
Esempio n. 2
0
        public void DeleteTweet() {
            Console.ForegroundColor = ConsoleColor.Red;
            Console.Write(" id : ");
            Console.ResetColor();
            id = Convert.ToInt32(Console.ReadLine());
            idD = id.ToString();
            if(idD!="asc cancel")
                Tweet.DestroyTweet(idOnline);
            else
                Console.Write(" Action cancelled!\n");

        }