Ejemplo n.º 1
0
 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));
 }
Ejemplo n.º 2
0
 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));
 }
Ejemplo n.º 3
0
 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));
 }
Ejemplo n.º 4
0
 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));
 }