public HttpResponseMessage DeleteItems(string[] ItemList) { ShoppingcartModel Shoppingmodel = new ShoppingcartModel(); string json = JsonConvert.SerializeObject(Shoppingmodel.GetItemDelete(ItemList)); return(Request.CreateResponse(HttpStatusCode.OK, json)); }
public HttpResponseMessage GetItem(string val1) { ShoppingcartModel Shoppingmodel = new ShoppingcartModel(); string json = JsonConvert.SerializeObject(Shoppingmodel.GetItemForAddtocart(val1)); return(Request.CreateResponse(HttpStatusCode.OK, json)); }
public HttpResponseMessage GetOrderDetails(string val1) { ShoppingcartModel Shoppingmodel = new ShoppingcartModel(); string json = JsonConvert.SerializeObject(Shoppingmodel.GetOrdersList()); return(Request.CreateResponse(HttpStatusCode.OK, json)); }
public HttpResponseMessage Post(itemDetailsDataContract ItemDetails) { ShoppingcartModel Shoppingmodel = new ShoppingcartModel(); string json = JsonConvert.SerializeObject(Shoppingmodel.addItemMaster(ItemDetails)); return(Request.CreateResponse(HttpStatusCode.OK, json)); }
public ActionResult Detail(int?id) { ShoppingcartModel model = new ShoppingcartModel(); return(View(model.GetItemDetail(id))); //return View(); }
public ActionResult Edit(int?id) { ShoppingcartModel model = new ShoppingcartModel(); List <SelectListItem> items = new List <SelectListItem>(); items.Add(new SelectListItem { Text = "In stock", Value = "0" }); items.Add(new SelectListItem { Text = "Out of stock", Value = "1" }); ViewBag.ListItemStatus = new SelectList(items.Select(x => new SelectListItem() { Text = x.Text.ToString(), Value = x.Value }), "Value", "Text"); return(View(model.GetItemDetail(id))); //return View(); }
public ActionResult Detail(string id) { ShoppingcartModel model = new ShoppingcartModel(); return(View(model.GetOrderDetails(id))); }