Exemplo n.º 1
0
        public ActionResult Create(Location location)
        {
            using (var client = new HttpClient())
            {
                var request = client.PostAsJsonAsync(url, location);
                request.Wait();
                var response = request.Result.Content;
                var read = response.ReadAsStringAsync();
                read.Wait();
                var newRow = "";

                if (read.Result == "true")
                {
                    newRow = RenderRazorViewToString("_rowTemplate", new Location());
                }

                return Json(new {isSuccess=read.Result,row=newRow}, "application/json", JsonRequestBehavior.AllowGet);
            }
        }
Exemplo n.º 2
0
 public ActionResult Update(Location location)
 {
     return null;
 }