Esempio n. 1
0
        public ActionResult Create(Models.PoMaster PoMaster)
        {
            ServiceRepository   serviceObj = new ServiceRepository();
            HttpResponseMessage response   = serviceObj.PostResponse("api/PoMaster/InsertPoMaster", PoMaster);

            response.EnsureSuccessStatusCode();
            return(RedirectToAction("GetAllPoMasters"));
        }
Esempio n. 2
0
        public ActionResult Details(int id)
        {
            ServiceRepository   serviceObj = new ServiceRepository();
            HttpResponseMessage response   = serviceObj.GetResponse("api/PoMaster/GetPoMaster?id=" + id.ToString());

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