Пример #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            YabanciDil yabanciDil = db.YabanciDil.Find(id);

            db.YabanciDil.Remove(yabanciDil);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Пример #2
0
 public ActionResult Edit([Bind(Include = "ID,DilAdi,Seviyesi")] YabanciDil yabanciDil)
 {
     if (ModelState.IsValid)
     {
         db.Entry(yabanciDil).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(yabanciDil));
 }
Пример #3
0
        public ActionResult Create([Bind(Include = "ID,DilAdi,Seviyesi")] YabanciDil yabanciDil)
        {
            if (ModelState.IsValid)
            {
                db.YabanciDil.Add(yabanciDil);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(yabanciDil));
        }
        protected override void GuncelNesneOlustur()
        {
            currentEnttiy = new YabanciDil
            {
                Id       = id,
                Kod      = txtKod.Text,
                DilAdi   = txtDilAdi.Text,
                Aciklama = txtAciklama.Text,
                Durum    = tglDurum.IsOn
            };

            ButonEnabledDurumu();
        }
Пример #5
0
        // GET: YabanciDils/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            YabanciDil yabanciDil = db.YabanciDil.Find(id);

            if (yabanciDil == null)
            {
                return(HttpNotFound());
            }
            return(View(yabanciDil));
        }