public ActionResult ChinhSua(PRODUCT model, HttpPostedFileBase ShowImage) { if (ModelState.IsValid) { db.Entry(model).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(model)); }
public ActionResult Edit([Bind(Include = "PersonID,Personusername,PersonPassword,PersonEmail,PersonName,PersonPhone,PersonAdress,CreatedDate")] PERSON pERSON) { if (ModelState.IsValid) { db.Entry(pERSON).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(pERSON)); }
public ActionResult Edit([Bind(Include = "MaNV,HoTen,NgaySinh,SDT,ViTri,LuongCoBan")] NhanVien nhanVien) { if (ModelState.IsValid) { db.Entry(nhanVien).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(nhanVien)); }
public ActionResult Edit([Bind(Include = "ResourcesID,Resourcesname,Quantity,Total")] RESOURCE rESOURCE) { if (ModelState.IsValid) { db.Entry(rESOURCE).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(rESOURCE)); }
public ActionResult Edit([Bind(Include = "CustomerID,CustomerUsername,CustomerPassword,CustomerEmail,CustomerName,CustomerPhone,CustomerAdress,CreatedDate")] CUSTOMER cUSTOMER) { if (ModelState.IsValid) { db.Entry(cUSTOMER).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(cUSTOMER)); }
public async Task <IHttpActionResult> PutNGUOIDUNG(NGUOIDUNG nGUOIDUNG) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } db.Entry(nGUOIDUNG).State = EntityState.Modified; try { await db.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { } return(StatusCode(HttpStatusCode.NoContent)); }