Ejemplo n.º 1
0
 public IDataResult <List <Book> > GetAll()
 {
     if (DateTime.Now.Hour == 22)
     {
         return(new ErrorDataResult <List <Book> >(Messages.MaintenanceTime));
     }
     return(new SuccessDataResult <List <Book> >(_bookDal.GetAll(), Messages.BooksListed));
 }
Ejemplo n.º 2
0
        public static List <object> GetAllByTypes(string filter = null)
        {
            List <object> list = new List <object>();

            foreach (var article in _articleService.GetAll(filter))
            {
                list.Add(article);
            }
            foreach (var book in _bookService.GetAll(filter))
            {
                list.Add(book);
            }
            foreach (var booklet in _bookletService.GetAll(filter))
            {
                list.Add(booklet);
            }
            foreach (var conference in _conferenceService.GetAll(filter))
            {
                list.Add(conference);
            }
            foreach (var incollection in _incollectionService.GetAll(filter))
            {
                list.Add(incollection);
            }
            foreach (var manual in _manualService.GetAll(filter))
            {
                list.Add(manual);
            }
            foreach (var inbook in _inbookService.GetAll(filter))
            {
                list.Add(inbook);
            }
            return(list);
        }
Ejemplo n.º 3
0
        private void ChangeColumnNames()
        {
            dgvUsers.DataSource            = _userDal.GetAll();
            dgvUsers.Columns[0].HeaderText = "Kullanıcı Id";
            dgvUsers.Columns[1].HeaderText = "Kullanıcı Ad Soyad";

            dgvOkunanKitaplar.DataSource            = _readerDal.GetAll();
            dgvOkunanKitaplar.Columns[0].HeaderText = "Okunan Kitap Id";
            dgvOkunanKitaplar.Columns[1].HeaderText = "Kullanıcı Id";
            dgvOkunanKitaplar.Columns[2].HeaderText = "Kullanıcı Ad Soyad";
            dgvOkunanKitaplar.Columns[3].HeaderText = "Kitap Id";
            dgvOkunanKitaplar.Columns[4].HeaderText = "Kitap Ad";
            dgvOkunanKitaplar.Columns[5].HeaderText = "Kategori Id";

            dgvKitaplar.DataSource = _bookDal.GetAll();

            dgvKitaplar.Columns[0].HeaderText = "Kitap Id";
            dgvKitaplar.Columns[1].HeaderText = "Kitap Adı";
            dgvKitaplar.Columns[2].HeaderText = "Yazar";
            dgvKitaplar.Columns[3].HeaderText = "Kategori";
            dgvKitaplar.Columns[4].HeaderText = "Sayfa Sayısı";
            dgvKitaplar.Columns[5].HeaderText = "Yayın Evi";
            dgvKitaplar.Columns[6].HeaderText = "Basım Yılı";
            dgvKitaplar.Columns[7].HeaderText = "Cilt No";
        }
Ejemplo n.º 4
0
        private void ChangeColumnNames()
        {
            dgvBooks.DataSource = _bookDal.GetAll();

            dgvBooks.Columns[0].HeaderText = "Kitap Id";
            dgvBooks.Columns[1].HeaderText = "Kitap Adı";
            dgvBooks.Columns[2].HeaderText = "Yazar";
            dgvBooks.Columns[3].HeaderText = "Kategori";
            dgvBooks.Columns[4].HeaderText = "Sayfa Sayısı";
            dgvBooks.Columns[5].HeaderText = "Yayın Evi";
            dgvBooks.Columns[6].HeaderText = "Baskı No";
            dgvBooks.Columns[7].HeaderText = "Cilt No";
        }
Ejemplo n.º 5
0
 public String BestPublishing()
 {
     return(_bookDal.GetAll().GroupBy(x => x.Publisher).OrderByDescending(z => z.Count()).Select(y => new
                                                                                                 { y.Key }).FirstOrDefault().ToString());
 }
 public List <Book> GetAll()
 {
     return(_bookDal.GetAll());
 }
 public IEnumerable <Book> GetAll()
 {
     return(_bookDal.GetAll());
 }
Ejemplo n.º 8
0
 public IDataResult <List <Book> > GetAll()
 {
     return(new SuccessDataResult <List <Book> >(_bookDal.GetAll(), BookMessages.BooksListed));
 }
Ejemplo n.º 9
0
 public Book Get(int bookId)
 {
     return(bookDal.GetAll().FirstOrDefault(i => i.Identity == bookId));
 }
Ejemplo n.º 10
0
 public IDataResult <List <Book> > GetAll()
 {
     _bookDal.GetAll();
     return(new SuccessDataResult <List <Book> >(_bookDal.GetAll()));
 }
Ejemplo n.º 11
0
 public List <Book> GetAll()
 {
     //business code
     return(_bookDal.GetAll());
 }
Ejemplo n.º 12
0
 public List <Book> GetAll(Expression <Func <Book, bool> > filter = null)
 {
     return(_bookDal.GetAll(filter));
 }