Ejemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            TreatmentDetial treatmentDetial = db.TreatmentDetials.Find(id);

            db.TreatmentDetials.Remove(treatmentDetial);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "TreatmentDetailID,TreatmentID,Description,DoctorID,PatientID")] TreatmentDetial treatmentDetial)
 {
     if (ModelState.IsValid)
     {
         db.Entry(treatmentDetial).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.DoctorID    = new SelectList(db.Doctors, "DoctorID", "DoctorCardID", treatmentDetial.DoctorID);
     ViewBag.PatientID   = new SelectList(db.Patients, "PatientID", "PatCardID", treatmentDetial.PatientID);
     ViewBag.TreatmentID = new SelectList(db.Treatments, "TreatmentID", "TreatmentName", treatmentDetial.TreatmentID);
     return(View(treatmentDetial));
 }
Ejemplo n.º 3
0
        // GET: TreatmentDetial/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            TreatmentDetial treatmentDetial = db.TreatmentDetials.Find(id);

            if (treatmentDetial == null)
            {
                return(HttpNotFound());
            }
            return(View(treatmentDetial));
        }
Ejemplo n.º 4
0
        // GET: TreatmentDetial/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            TreatmentDetial treatmentDetial = db.TreatmentDetials.Find(id);

            if (treatmentDetial == null)
            {
                return(HttpNotFound());
            }
            ViewBag.DoctorID    = new SelectList(db.Doctors, "DoctorID", "DoctorCardID", treatmentDetial.DoctorID);
            ViewBag.PatientID   = new SelectList(db.Patients, "PatientID", "PatCardID", treatmentDetial.PatientID);
            ViewBag.TreatmentID = new SelectList(db.Treatments, "TreatmentID", "TreatmentName", treatmentDetial.TreatmentID);
            return(View(treatmentDetial));
        }