public ActionResult Prescription(PrescriptionMaster P) { if (ModelState.IsValid) { using (EpresDbEntities dc = new EpresDbEntities()) { dc.PrescriptionMasters.Add(P); dc.SaveChanges(); ModelState.Clear(); P = null; ViewBag.Message = "Successfully saved prescription detail"; } } return(View(P)); }
public ActionResult Pharmacy(PharmacyMaster U) { if (ModelState.IsValid) { using (EpresDbEntities dc = new EpresDbEntities()) { dc.PharmacyMasters.Add(U); dc.SaveChanges(); ModelState.Clear(); U = null; ViewBag.Message = "Successfully saved pharmacy detail"; } } return(View(U)); }