コード例 #1
0
ファイル: HomeController.cs プロジェクト: shahid11/Customers
        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);
            }
        }
コード例 #2
0
ファイル: HomeController.cs プロジェクト: shahid11/Customers
 public ActionResult Update(Location location)
 {
     return null;
 }