public ActionResult Save(StorageCheck entity) { HttpClient httpClient = HttpClientHelper.Create(base.ApiUrl); var jsonValue = JsonSerializer.SerializeToString<StorageCheck>(entity); string result = httpClient.Insert(jsonValue); return RedirectToAction("Index", "StorageCheck"); }
public ActionResult Update(StorageCheck entity) { HttpClient httpClient = HttpClientHelper.Create(base.ApiUrl); IList<StorageCheck> entityList = new List<StorageCheck>(); entityList.Add(entity); var jsonValue = JsonSerializer.SerializeToString<IList<StorageCheck>>(entityList); ViewData["U_StorageCheck_Rows"] = jsonValue; string result = httpClient.Update(jsonValue); return RedirectToAction("Index", "StorageCheck"); }
public ActionResult Create() { ViewData["STORAGECHECK_ADD_OR_EDIT"] = "A"; var model = new StorageCheck(); return View("StorageCheckForm", model); }