public JsonResult UpdateStore(Store s) { using (ProductSoldEntities dbobj = new ProductSoldEntities()) { dbobj.Entry(s).State = EntityState.Modified; dbobj.SaveChanges(); return(Json(new { success = true, message = "saved" }, JsonRequestBehavior.AllowGet)); } }
public JsonResult Update(ProductSold psold) { using (ProductSoldEntities dbobj = new ProductSoldEntities()) { dbobj.Entry(psold).State = EntityState.Modified; dbobj.SaveChanges(); return(Json(dbobj.SaveChanges(), JsonRequestBehavior.AllowGet)); } }
public JsonResult UpdateProduct(Product product) { dbobj.Entry(product).State = EntityState.Modified; dbobj.SaveChanges(); return(Json(product, JsonRequestBehavior.AllowGet)); }
public JsonResult UpdateCustomer(Customer cus) { dbobj.Entry(cus).State = EntityState.Modified; dbobj.SaveChanges(); return(Json(cus, JsonRequestBehavior.AllowGet)); }
public JsonResult UpdateStore(Store store) { dbobj.Entry(store).State = System.Data.Entity.EntityState.Modified; dbobj.SaveChanges(); return(Json(store, JsonRequestBehavior.AllowGet)); }
public JsonResult UpdateProductSold(ProductSold psold) { dbobj.Entry(psold).State = EntityState.Added; dbobj.SaveChanges(); return(Json(psold, JsonRequestBehavior.AllowGet)); }