Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            ThalassimiaInfo thalassimiaInfo = db.Thalassimia.Find(id);

            db.Thalassimia.Remove(thalassimiaInfo);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "ID,Name,Address,Contact,ThelesemiaStatus,RegOrIrreg")] ThalassimiaInfo thalassimiaInfo)
 {
     if (ModelState.IsValid)
     {
         db.Entry(thalassimiaInfo).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(thalassimiaInfo));
 }
Beispiel #3
0
        public ActionResult Create([Bind(Include = "ID,Name,Address,Contact,ThelesemiaStatus,RegOrIrreg")] ThalassimiaInfo thalassimiaInfo)
        {
            if (ModelState.IsValid)
            {
                db.Thalassimia.Add(thalassimiaInfo);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(thalassimiaInfo));
        }
Beispiel #4
0
        // GET: ThalassimiaInfoes/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ThalassimiaInfo thalassimiaInfo = db.Thalassimia.Find(id);

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