public ActionResult Create([Bind(Include = "ChartNo,PatientFirstName,PatientLastName,PatientEmail,PatientPhoneNo,Sex,PatientBirthDate,AppointmentDate,PatientAddress")] eChart echart)
        {
            if (ModelState.IsValid)
            {
                db.eCharts.Add(echart);
                db.SaveChanges();
                // return RedirectToAction("Details", new { id = echart.ChartNo });
                return(RedirectToAction("TabDetails", new { id = echart.ChartNo }));
                //  return RedirectToAction("Index");
                // ViewData["chartlist"] = echart;
                //return RedirectToAction("eChartHome");
                //   return View("eChartHome", echart);
            }

            return(View(echart));
        }
Beispiel #2
0
        public ActionResult CreateIndexTreatmentsItems([Bind(Include = "TreatmentItemsNo,TreatmentNo,LOC,SURF,PROC,ProcedureDescription,DOS,DDS,COMP")] TreatmentItems treatmentItems)
        {
            if (ModelState.IsValid)
            {
                db.TreatmentItems.Add(treatmentItems);
                db.SaveChanges();

                var treatmentItemsList = db.TreatmentItems.Where(t => t.TreatmentNo == treatmentItems.TreatmentNo);
                if (Request.IsAjaxRequest())
                {
                    return(PartialView("_indexTreatmentListPartial", treatmentItemsList.ToList()));
                }
                else
                {
                    return(View(treatmentItemsList.ToList()));
                }
            }

            ViewBag.TreatmentNo = new SelectList(db.Treatments, "TreatmentNo", "TreatmentStatus", treatmentItems.TreatmentNo);
            return(View(treatmentItems));
        }
Beispiel #3
0
        public ActionResult CreateIndexTreatments([Bind(Include = "TreatmentNo,TreatmentStatus,InitialVisit,LastVisit,NextVisit,ChartNo")] Treatment treatment)
        {
            if (ModelState.IsValid)
            {
                db.Treatments.Add(treatment);
                db.SaveChanges();
                var treatments = db.Treatments.Where(t => t.ChartNo == treatment.ChartNo);
                if (Request.IsAjaxRequest())
                {
                    return(PartialView("_indexTreatmentsPartial", treatments.ToList()));
                }
                else
                {
                    return(View(treatments.ToList()));
                }
            }

            ViewBag.ChartNo = new SelectList(db.eCharts, "ChartNo", "PatientFirstName", treatment.ChartNo);
            // return View(treatment);
            return(PartialView("_createTreatmentPartial", treatment));
        }