Esempio n. 1
0
 private void FillGridFines()
 {
     dgvFineList.Rows.Clear();
     foreach (var fine in FinesHelper.GetActiveFinesList())
     {
         int row = dgvFineList.Rows.Add();
         dgvFineList.Rows[row].Cells[0].Value = fine.FineID;
         dgvFineList.Rows[row].Cells[1].Value = fine.StudentID;
         dgvFineList.Rows[row].Cells[2].Value = fine.BookID;
         dgvFineList.Rows[row].Cells[3].Value = BooksHelper.GetBookNameByID(fine.BookID);
         dgvFineList.Rows[row].Cells[4].Value = fine.Date.ToString("dd MMMM yyyy");
         dgvFineList.Rows[row].Cells[5].Value = fine.FineAmount;
         dgvFineList.Rows[row].Cells[6].Value = fine.RecivedAmount;
         row++;
     }
 }
Esempio n. 2
0
 private void FillGridBook(int studentID)
 {
     dgvIssueBookList.Rows.Clear();
     foreach (var issueBook in IssueBooksHelper.GetIssueBookListFromStudentID(studentID))
     {
         int row = dgvIssueBookList.Rows.Add();
         dgvIssueBookList.Rows[row].Cells[0].Value = issueBook.IssueID;
         dgvIssueBookList.Rows[row].Cells[1].Value = issueBook.BookID;
         dgvIssueBookList.Rows[row].Cells[2].Value = BooksHelper.GetBookNameByID(issueBook.BookID);
         dgvIssueBookList.Rows[row].Cells[3].Value = StaffsHelper.GetByNameFromID(issueBook.StaffID);
         dgvIssueBookList.Rows[row].Cells[4].Value = issueBook.NoOfCopies;
         dgvIssueBookList.Rows[row].Cells[5].Value = issueBook.DateOfIssue.ToString("dd MMMM yyyy");
         dgvIssueBookList.Rows[row].Cells[6].Value = issueBook.DateOfReturn.ToString("dd MMMM yyyy");
         row++;
     }
 }