public ActionResult Create(Models.PoMaster PoMaster) { ServiceRepository serviceObj = new ServiceRepository(); HttpResponseMessage response = serviceObj.PostResponse("api/PoMaster/InsertPoMaster", PoMaster); response.EnsureSuccessStatusCode(); return(RedirectToAction("GetAllPoMasters")); }
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)); }