public void EntryBook()
        {
            Book book = new Book();

            Console.WriteLine("Entry Book Section: ");
            Console.WriteLine("===============================");

            Console.Write("Please Enter Book Id: ");
            book.BookId = Convert.ToInt32(Console.ReadLine());

            Console.Write("Please enter Book Title: ");
            book.Title = Console.ReadLine();

            Console.Write("Please enter Book Author: ");
            book.Aurthor = Console.ReadLine();

            Console.Write("Please enter Book Edition: ");
            book.Edition = Console.ReadLine();

            Console.Write("Please enter Barcode of the book: ");
            book.Barcode = Console.ReadLine();

            Console.Write("Please enter Copy Count of the book: ");
            book.CopyCount = int.Parse(Console.ReadLine());
            Console.WriteLine("===============================");

            PostRequest postRequest = new PostRequest();

            postRequest.Insert(book, "Book");
        }
Beispiel #2
0
        public void IssueBookToStudent()
        {
            IssueBook issueBook = new IssueBook();

            Console.WriteLine("Issue a book to student");
            Console.WriteLine("===============================");
            Console.Write("Please Enter Student Id : ");
            issueBook.StudentId = Convert.ToInt32((Console.ReadLine()));

            Console.Write("Please Enter Book Barcode : ");
            issueBook.BookBarCode = Console.ReadLine();
            Console.WriteLine("===============================");

            PostRequest postRequest = new PostRequest();

            postRequest.Insert(issueBook, "ManagingLibrary/IssueBook");
        }
        public void ReturnBookInfo()
        {
            ReturnBook returnBook = new ReturnBook();

            Console.WriteLine("Return a book ");
            Console.WriteLine("===============================");
            Console.Write("Please Enter Student Id : ");
            returnBook.StudentId = int.Parse(Console.ReadLine());

            Console.Write("Please Enter Book Barcode : ");
            returnBook.BookBarCode = Console.ReadLine();


            PostRequest postRequest = new PostRequest();

            postRequest.Insert(returnBook, "ManagingLibrary");
        }
        public void FineReceive()
        {
            Student student = new Student();

            Console.WriteLine("Receive the Fine");
            Console.WriteLine("===============================");

            Console.Write("Please Enter Student Id : ");
            student.StudentId = int.Parse(Console.ReadLine());


            Console.Write("Please Enter Fine amount You want to pay : ");
            student.Fine = double.Parse(Console.ReadLine());

            PostRequest postRequest = new PostRequest();

            postRequest.Insert(student, "Reporting");
        }
        public void studentEntry()
        {
            Student student = new Student();

            Console.WriteLine("Entry Student Information center");
            Console.WriteLine("===============================");
            Console.Write("Please enter student Id: ");
            student.StudentId = Convert.ToInt32((Console.ReadLine()));

            Console.Write("Please enter student Name: ");
            student.Name = Console.ReadLine();

            Console.WriteLine("===============================");

            PostRequest postRequest = new PostRequest();

            postRequest.Insert(student, "Student");
        }