Ejemplo n.º 1
0
        public ActionResult deleteProfile(int id)
        {
            patientsProfile patients = db.profile.Find(id);

            db.profile.Remove(patients);
            db.SaveChanges();
            return(RedirectToAction("profileSettings"));
        }
Ejemplo n.º 2
0
 public ActionResult editProfile([Bind(Include = "id,name,paitientNo,symptoms,phNo")] patientsProfile patients)
 {
     if (ModelState.IsValid)
     {
         db.Entry(patients).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(patients));
 }
Ejemplo n.º 3
0
        public ActionResult patientProfile([Bind(Include = "id,name,symptoms,phNo")] patientsProfile dataSet)
        {
            if (ModelState.IsValid)
            {
                db.profile.Add(dataSet);
                db.SaveChanges();
                return(RedirectToAction("profileSettings"));
            }

            return(View(dataSet));
        }
Ejemplo n.º 4
0
        // GET: Patients/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            patientsProfile patients = db.profile.Find(id);

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