public ActionResult Edit([Bind(Include = "ID,Nama,Alamat,Telepon")] Supplier supplier) { if (ModelState.IsValid) { db.Entry(supplier).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(supplier)); }
public ActionResult Edit([Bind(Include = "ID,Nama,Alamat,Kelamin,Pekerjaan")] Pelanggan pelanggan) { if (ModelState.IsValid) { db.Entry(pelanggan).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(pelanggan)); }
public ActionResult Edit([Bind(Include = "ID,Nama,Alamat,Status,Telepon,SupplierID")] Karyawan karyawan) { if (ModelState.IsValid) { db.Entry(karyawan).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.SupplierID = new SelectList(db.Suppliers, "ID", "Nama", karyawan.SupplierID); return(View(karyawan)); }
public ActionResult Edit([Bind(Include = "ID,Nama,Merk,Stok,Bahan,Harga,SupplierID")] Cloth cloth) { if (ModelState.IsValid) { db.Entry(cloth).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.SupplierID = new SelectList(db.Suppliers, "ID", "Nama", cloth.SupplierID); return(View(cloth)); }