Esempio n. 1
0
        public void Save()
        {
            var bookInRentalGateWay = new BookInRentalTDG();
            int tmpId = bookInRentalGateWay.Insert((int)this.Book.ID, (int)this.Rental.ID);

            ID = tmpId;
        }
Esempio n. 2
0
        public static List <BookInRentalActiveRecord> Find()
        {
            List <BookInRentalActiveRecord> booksInRentalList = new List <BookInRentalActiveRecord>();

            var       bookInRentalGateWay = new BookInRentalTDG();
            DataTable dt = bookInRentalGateWay.Find();

            foreach (DataRow dr in dt.Rows)
            {
                booksInRentalList.Add(MapResultsetToObject(dr));
            }

            return(booksInRentalList);
        }