Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            DiagnosticCenter diagnosticCenter = db.DiagnosticCenters.Find(id);

            db.DiagnosticCenters.Remove(diagnosticCenter);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "ID,Name,Type,District,Address,EmailID,Contact,ReproInfection,MDRPathogen,PatientInfection,AntibioticResistence")] DiagnosticCenter diagnosticCenter)
 {
     if (ModelState.IsValid)
     {
         db.Entry(diagnosticCenter).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(diagnosticCenter));
 }
Beispiel #3
0
        // GET: DiagnosticCenters/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            DiagnosticCenter diagnosticCenter = db.DiagnosticCenters.Find(id);

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