public ActionResult DeleteConfirmed(int id) { QuickSoapNotes quickSoapNotes = dbQuickSoap.QuickSoapNotesDatabase.Find(id); dbQuickSoap.QuickSoapNotesDatabase.Remove(quickSoapNotes); dbQuickSoap.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID,Name,UniqueID,ReturnDateRecommended,HerbalSupplement,OtherDetails,DateSeen,DateCompleted,CPTcode,NeedleSize,ElectroStimulation,TreatmentTime,PainScale,NeedlesPerformed,SField,OField,AField,PField,ICD10CM_Entry1,ICD10CM_Entry2,ICD10CM_Entry3,ICD10CM_Entry4,ICD10CM_Entry5")] QuickSoapNotes quickSoapNotes) { if (ModelState.IsValid) { dbQuickSoap.Entry(quickSoapNotes).State = EntityState.Modified; dbQuickSoap.SaveChanges(); return(RedirectToAction("Index")); } return(View(quickSoapNotes)); }
// GET: QuickSoapNotes/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } QuickSoapNotes quickSoapNotes = dbQuickSoap.QuickSoapNotesDatabase.Find(id); if (quickSoapNotes == null) { return(HttpNotFound()); } return(View(quickSoapNotes)); }
public ActionResult Create(string TreatmentTime, string PainScale, string ICD10CM_Entry1, string ICD10CM_Entry2, string ICD10CM_Entry3, string ICD10CM_Entry4, string ICD10CM_Entry5, [Bind(Include = "ID,Name,UniqueID,ReturnDateRecommended,HerbalSupplement,OtherDetails,CPTcode,NeedleSize,ElectroStimulation,NeedlesPerformed,SField,OField,AField,PField")] QuickSoapNotes quickSoapNotes) { if (ModelState.IsValid) { quickSoapNotes.DateSeen = DateTime.Now.ToShortDateString(); quickSoapNotes.DateCompleted = DateTime.Now; dbQuickSoap.QuickSoapNotesDatabase.Add(quickSoapNotes); dbQuickSoap.SaveChanges(); // Need to change redirect return(RedirectToAction("Index")); return(RedirectToAction("Index", "QuickSoapNotes", new { id = quickSoapNotes.UniqueID })); } return(View(quickSoapNotes)); }