Exemplo n.º 1
0
        public ActionResult Index()
        {
            var manager = new DVDManager();
            var d = manager.LoadAllDVDs().Data;

            return View(d);
        }
Exemplo n.º 2
0
        public ActionResult CheckIn(DVDInfo id)
        {
            var manager = new DVDManager();

            var response = manager.ReturnDVD(id);

            return View("CheckIn", response.Data);
        }
Exemplo n.º 3
0
        public ActionResult DisplayDVD(int id)
        {
            var manager = new DVDManager();
            //var d = db.GetAllDVDs().Find(x => x.dvdID == id);
            var response = manager.GetDVDInfo(id);
            //var dvd = response.Data.FirstOrDefault();

            return View("DisplayDVD", response.Data);
        }
Exemplo n.º 4
0
        public ActionResult CheckOut(DVDInfo id)
        {
            var manager = new DVDManager();

            var response = manager.AddBorrower(id);

            var dvd = manager.GetDVDInfo(id.dvdID);

            return View("CheckOut", response.Data);
        }
Exemplo n.º 5
0
        public ActionResult CreateDVD(DVDInfo dvd)
        {
            if (ModelState.IsValid)
            {
                var manager = new DVDManager();
                var response = manager.CreateDVD(dvd);

                return View("CreateDVD", response.Data);
            }
            return View("Create");
        }
Exemplo n.º 6
0
        public ActionResult IndexSearch(string SearchDVD)
        {
            var manager = new DVDManager();
            var d = manager.SearchDVD(SearchDVD).Data;

            return View("Index", d);
        }