Example #1
0
        private void BookReport_Load(object sender, EventArgs e)
        {
            using (BookService service = new BookService())
            {
                lstBooks.DataSource    = service.List();
                lstBooks.DisplayMember = "BookName";
                lstBooks.ValueMember   = "BookId";
            }

            using (BorrowService service = new BorrowService())
            {
                lstPenalties.DataSource    = service.GetPEnaltyStudents();
                lstPenalties.DisplayMember = "FullName";
                lstPenalties.ValueMember   = "StudentId";
            }
        }