Beispiel #1
0
        public void DeleteStudentBook(Book book)
        {
            BaseObject current = StudentBooks == null ? null : StudentBooks.Head;

            while (current != null)
            {
                if (((StudentBook)current).Book == book)
                {
                    StudentBooks.Delete(current.ID);
                    UpdateStudentBooks();
                }
                current = current.Next;
            }
        }
Beispiel #2
0
        public void DeleteStudentBook(StudentBook studentBook)
        {
            Console.WriteLine("ODUNC ISLEMI SIL");
            Console.WriteLine("Bu islemi silmek istediginizden emin misiniz?");
            Console.WriteLine("\t1. Evet, sil");
            Console.WriteLine("\t2. Hayir, silme");
            Console.Write("Seciminizi yapiniz (menu icin 0): ");
            int choice = Convert.ToInt32(Console.ReadLine());

            if (choice == 1)
            {
                StudentBooks.Delete(studentBook.ID);
                Console.WriteLine("Odunc islemi basariyla silindi.");
                UpdateStudentBooks();
            }
            else
            {
                Console.WriteLine("Odunc islemi silme iptal edildi.");
            }
        }