コード例 #1
0
ファイル: ilsController.cs プロジェクト: inancakcan/moto
 public ActionResult Edit([Bind(Include = "ilID,ad")] il il)
 {
     if (ModelState.IsValid)
     {
         db.Entry(il).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(il));
 }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "semtID,ilceID,ad")] semt semt)
 {
     if (ModelState.IsValid)
     {
         db.Entry(semt).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ilceID = new SelectList(db.ilce, "ilceID", "ad", semt.ilceID);
     return(View(semt));
 }
コード例 #3
0
 public ActionResult Edit([Bind(Include = "mahalleID,semtID,ad")] mahalle mahalle)
 {
     if (ModelState.IsValid)
     {
         db.Entry(mahalle).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.semtID = new SelectList(db.semt, "semtID", "ad", mahalle.semtID);
     return(View(mahalle));
 }
コード例 #4
0
 public ActionResult Edit([Bind(Include = "IlanId,IlanBasligi,ShortDescription,FullDescription,AnasayfadaGoster,Published,Active,Deleted,CreatedOn,UpdatedOn,IlanSahibi,Fiyati,Lat,Lon,IlanResimleri,Video,PostaKodu,IlanTarihi,GoruntulenmeSayisi,AltKategoriId")] Ilan ilan, string PostaKoduId)
 {
     if (ModelState.IsValid)
     {
         ilan.PostaKodu        = PostaKoduId;
         ilan.AnasayfadaGoster = false;
         ilan.Published        = false;
         ilan.Active           = false;
         ilan.Deleted          = false;
         ilan.CreatedOn        = DateTime.Now;
         ilan.UpdatedOn        = DateTime.Now;
         ilan.IlanSahibi       = Guid.Parse("05d9de39-b810-49ee-a245-befa07f4c4de");
         ilan.IlanTarihi       = DateTime.Today;
         db.Entry(ilan).State  = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(ilan));
 }