public ActionResult Edit([Bind(Include = "Id,Name,Address")] StoreModel storemodel) { if (ModelState.IsValid) { var response = SuperZapatosAPI.CallAPI("services/UpdateStore/", storemodel); return(RedirectToAction("Index")); } return(View(storemodel)); }
public ActionResult Create([Bind(Include = "name, description, price, total_in_shelf, total_in_vault, store_id")] ArticleModel articlemodel) { if (ModelState.IsValid) { var response = SuperZapatosAPI.CallAPI("services/CreateArticle/", articlemodel); return(RedirectToAction("Index")); } return(View(articlemodel)); }
public ActionResult DeleteConfirmed(int?id) { var storeResponse = new SingularStoreResponse(); var idModel = new IdModel(); idModel.id = id.ToString(); var response = SuperZapatosAPI.CallAPI("services/DeleteStore/", idModel); if (response.IsSuccessStatusCode) { // Creating Json Request Object storeResponse = new JavaScriptSerializer().Deserialize <SingularStoreResponse>(response.Content.ReadAsStringAsync().Result); } return(RedirectToAction("Index")); }