public ActionResult Patient_Resident_Edit(Residential_info RI) { if(ModelState.IsValid) { HospitalAppEntities2 db = new HospitalAppEntities2(); db.Entry(RI).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("OpdView", "Opd"); } return View(); }
public ActionResult Patient_Resident_Create(Residential_info RI) { HospitalAppEntities2 db = new HospitalAppEntities2(); if (ModelState.IsValid) { //MIP.residentInfo = RI; db.Residential_info.Add(RI); db.SaveChanges(); return RedirectToAction("Patient_Rescipt_Create", "Opd"); } return View(); }