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