Exemplo n.º 1
0
 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));
 }
Exemplo n.º 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));
 }
Exemplo n.º 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));
 }
Exemplo n.º 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));
 }