Пример #1
0
        public ActionResult Create(Models.PoDetail PoDetail)
        {
            ServiceRepository   serviceObj = new ServiceRepository();
            HttpResponseMessage response   = serviceObj.PostResponse("api/PoDetail/InsertPoDetail", PoDetail);

            response.EnsureSuccessStatusCode();
            return(RedirectToAction("GetAllPoDetails"));
        }
Пример #2
0
        public ActionResult Details(int id)
        {
            ServiceRepository   serviceObj = new ServiceRepository();
            HttpResponseMessage response   = serviceObj.GetResponse("api/PoDetail/GetPoDetail?id=" + id.ToString());

            response.EnsureSuccessStatusCode();
            Models.PoDetail PoDetails = response.Content.ReadAsAsync <Models.PoDetail>().Result;
            ViewBag.Title = "All PoDetails";
            return(View(PoDetails));
        }