Ejemplo n.º 1
0
        public ActionResult Edit(Order model)
        {
            UserSession userSession = new UserSession();
            string      token       = userSession.BearerToken;

            var inputJson = new JavaScriptSerializer().Serialize(model);

            var resultContent = GenericClient.PostEvent("http://localhost:57359/api/orders", inputJson, "PUT", token);

            return(RedirectToAction("Index", "OrderList"));
        }
Ejemplo n.º 2
0
        public ActionResult DeleteConfirmed(int id)
        {
            UserSession userSession = new UserSession();
            string      token       = userSession.BearerToken;

            string url          = "http://localhost:57359/api/orders/";
            var    urlWithParam = string.Format("{0}{1}", url, id);

            var resultContent = GenericClient.PostEvent(urlWithParam, "", "DELETE", token);

            return(RedirectToAction("Index"));
        }