Ejemplo n.º 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()));
        }
Ejemplo n.º 2
0
        public ActionResult Patients()
        {
            PatientModel model    = new PatientModel();
            var          Patients = model.GetPatients();

            return(View(Patients));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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()));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 6
0
        // GET: Patient/Create
        public ActionResult AddPatient()
        {
            var Model = new PatientModel();

            return(View(Model.GetPatients()));
        }
Ejemplo n.º 7
0
 // GET: Patient
 public ActionResult Index()
 {
     return(View(patientModel.GetPatients()));
 }