Exemplo n.º 1
0
        public IActionResult Returned(int libraryId)
        {
            var model = new ReturnedViewModel()
            {
                Lendings  = lendingData.GetLendingsReturned(libraryId),
                LibraryId = libraryId
            };

            return(View(model));
        }
Exemplo n.º 2
0
        public ActionResult Index(int id)
        {
            var crHelper = new CarRentalHelper();
            var rent     = (RentDbModel)_dbRents.GetByBookingId(id);
            var receive  = (ReceiveDbModel)_dbReceives.GetByBookingId(id);

            var currentSite = CoreHelpers.CurrentSite();
            var baseRent    = currentSite.GetPropertyValue <int>("baseRent");
            var baseKmPrice = currentSite.GetPropertyValue <int>("baseKmPrice");
            var price       = crHelper.CalculatePrice(rent, receive, baseRent, baseKmPrice);

            var model = new ReturnedViewModel(CurrentPage)
            {
                CurrentPage = CurrentPage,
                Price       = Math.Round(price)
            };

            return(CurrentTemplate(model));
        }