コード例 #1
0
        public ActionResult Create(MUSTERI musteri)
        {
            if (ModelState.IsValid)
            {
                db.MUSTERI.Add(musteri);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            ViewBag.ILID = new SelectList(db.IL, "ID", "ILADI", musteri.ILID);
            return View(musteri);
        }
コード例 #2
0
 public ActionResult Edit(MUSTERI musteri)
 {
     if (ModelState.IsValid)
     {
         db.Entry(musteri).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     ViewBag.ILID = new SelectList(db.IL, "ID", "ILADI", musteri.ILID);
     return View(musteri);
 }