예제 #1
0
        public ActionResult Prescription_(int id)
        {
            TempData["ID"] = id;
            ViewBag.id     = id;
            PatientModel m = new PatientModel();

            ViewBag.first     = m.GetPatients().Where(x => x.Id == id).FirstOrDefault().FirstName;
            TempData["first"] = ViewBag.first;
            ViewBag.last      = m.GetPatients().Where(x => x.Id == id).FirstOrDefault().LastName;
            TempData["last"]  = ViewBag.first;
            MedicineModel model = new MedicineModel();

            return(View(model.GetMedicines()));
        }
예제 #2
0
        public ActionResult Patients()
        {
            PatientModel model    = new PatientModel();
            var          Patients = model.GetPatients();

            return(View(Patients));
        }
예제 #3
0
        // GET: Patient/Edit/5
        public ActionResult Edit(int id)
        {
            PatientModel model   = new PatientModel();
            var          Patient = model.GetPatients().First(m => m.Id == id);

            return(View(Patient));
        }
예제 #4
0
        public ActionResult AreYouSure(FormCollection collection, string submit)
        {
            if (submit == "Add Prescription")
            {
                PatientModel model = new PatientModel();
                model.AddPrescription(collection["id"], collection["first"], collection["last"], collection["medicine"], collection["begin"], collection["finish"], collection["ndc"], collection["Frequency"], collection["Comments"]);
            }
            var Model = new PatientModel();

            return(View("Patients", Model.GetPatients()));
        }
예제 #5
0
        public ActionResult Print(int id)
        {
            PatientModel model = new PatientModel();

            var     Prescription = model.GetPrescriptions().First(m => m.Id == id);
            Patient patient      = model.GetPatients().First(p => p.Id == Prescription.PatientId);

            ViewBag.PatientName  = patient.FirstName + " " + patient.LastName;
            ViewBag.PatientEmail = patient.Email;
            ViewBag.PatientPhone = patient.Phone;

            return(View(Prescription));
        }
예제 #6
0
        // GET: Patient/Create
        public ActionResult AddPatient()
        {
            var Model = new PatientModel();

            return(View(Model.GetPatients()));
        }
예제 #7
0
 // GET: Patient
 public ActionResult Index()
 {
     return(View(patientModel.GetPatients()));
 }