public ActionResult AddPatient(int id) { Patient patient = applicationsPortal.select(id); patientPortal.insert(patient); applicationsPortal.delete(id); return(RedirectToAction("Index")); }
public ActionResult Create(FormCollection collection) { try { Patient patient = new Patient { name = collection["name"], gender = collection["gender"], age = Convert.ToInt32(collection["age"]), blood = collection["blood"], address = collection["address"], phone_no = collection["phone_no"] }; patientPortal.insert(patient); return(RedirectToAction("Index")); } catch { return(View()); } }