private void Delete_Click(object sender, RoutedEventArgs e) { string id = IDDelete.Text; List <string> dt = DB.GetDataOneAttribute($"select id_book from OrdersBooks where number={id}", "id_book"); List <string> book = DB.GetDataOneAttribute($"select price from Books where id = {dt[0]}", "price"); if (DB.Command($"delete from OrdersBooks where number = {id}")) { SetAllInOrder(); DB.Command($"update Orders set result-={ChangeComa(book[0])} where id = {id_order}"); } }