コード例 #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));
 }
コード例 #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));
 }
コード例 #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));
 }
コード例 #4
0
ファイル: ClothesController.cs プロジェクト: ricofa/merchants
 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));
 }