Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            egitmen egitmen = db.egitmen.Find(id);

            db.egitmen.Remove(egitmen);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 public ActionResult Edit([Bind(Include = "egitmen_no,egitmen_adi,egitmen_soyadi,egitmen_adresi,egitmen_mail,egitmen_dogumtarihi,egitmen_ülke,program_no,ücret_no,sube_no")] egitmen egitmen)
 {
     if (ModelState.IsValid)
     {
         db.Entry(egitmen).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.program_no = new SelectList(db.program, "program_no", "program_adi", egitmen.program_no);
     ViewBag.sube_no    = new SelectList(db.sube, "sube_no", "sube_adi", egitmen.sube_no);
     ViewBag.ücret_no   = new SelectList(db.ucret, "ücret_no", "ücret_tutarı", egitmen.ücret_no);
     return(View(egitmen));
 }
Example #3
0
        // GET: egitmen/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            egitmen egitmen = db.egitmen.Find(id);

            if (egitmen == null)
            {
                return(HttpNotFound());
            }
            return(View(egitmen));
        }
Example #4
0
        // GET: egitmen/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            egitmen egitmen = db.egitmen.Find(id);

            if (egitmen == null)
            {
                return(HttpNotFound());
            }
            ViewBag.program_no = new SelectList(db.program, "program_no", "program_adi", egitmen.program_no);
            ViewBag.sube_no    = new SelectList(db.sube, "sube_no", "sube_adi", egitmen.sube_no);
            ViewBag.ücret_no   = new SelectList(db.ucret, "ücret_no", "ücret_tutarı", egitmen.ücret_no);
            return(View(egitmen));
        }