Beispiel #1
0
        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");
        }
Beispiel #2
0
        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");
        }
Beispiel #3
0
 public ActionResult Create()
 {
     ViewData["STORAGE_ADD_OR_EDIT"] = "A";
     var model = new Storage();
     return View("StorageForm", model);
 }