Exemplo n.º 1
0
        //
        // GET: /Report/
        public ActionResult Index()
        {
			using(var client = new ApiRef.StoreClient())
			{
				return View(client.GetReport());
			}
        }
Exemplo n.º 2
0
		public ActionResult Details(int id)
        {
			using (var client = new ApiRef.StoreClient())
			{
				var model = client.GetBook(id);

				return View(model);
			}
        }
Exemplo n.º 3
0
		public ActionResult Create(Book book)
        {
            try
            {
				using (var client = new ApiRef.StoreClient())
				{
					client.PostBook(book);
				}

                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }
Exemplo n.º 4
0
		public ActionResult Delete(int id, FormCollection c)
        {
            try
            {
				using (var client = new ApiRef.StoreClient())
				{
					client.DeleteBook(id);
				}

                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }