コード例 #1
0
        public ActionResult Index()
        {
            var system_overview_model         = new SystemSummaryViewModel();
            ScheduleDBManager scheduleManager = new ScheduleDBManager();

            var usertable    = new UserTable <AppMember>(Context);
            var num_patients = usertable.GetUserByRole("Patient").Count();


            system_overview_model.Due_Refills         = new RefillLinesViewModel();
            system_overview_model.Due_Refills.Refills = new List <RefillLineViewModel>();

            system_overview_model.Pending_Refills         = new RefillLinesViewModel();
            system_overview_model.Pending_Refills.Refills = new List <RefillLineViewModel>();

            var retrievedduerefills = scheduleManager.getDueRefillsInfo();

            foreach (var refill in retrievedduerefills)
            {
                var refillline = new RefillLineViewModel()
                {
                    PatientName  = toUpperCase(refill.PatientName.ToString()),
                    MedicineName = refill.MedicationName.ToString(),
                    pId          = refill.Patient_Id,
                    IsSelected   = true
                };
                system_overview_model.Due_Refills.Refills.Add(refillline);
            }

            system_overview_model.number_patients = num_patients;
            return(View(system_overview_model));
        }
コード例 #2
0
        public ActionResult GetPendingPickups()
        {
            var pendingPickUps   = new PickUpsDBManager();
            var retrievedPickUps = pendingPickUps.getDuePickUps();
            var DueRefills       = new List <RefillLineViewModel>();

            foreach (var item in retrievedPickUps)
            {
                var refillline = new RefillLineViewModel()
                {
                    PatientName  = item.PatientName,
                    MedicineName = item.MedicineName,
                    pId          = item.PickupId,
                    IsSelected   = true
                };
                DueRefills.Add(refillline);
            }

            return(PartialView("_PendingPickUpMessagesPartialView", DueRefills));
        }
コード例 #3
0
        public ActionResult GetDueRefills()
        {
            ScheduleDBManager scheduleManager = new ScheduleDBManager();
            var retrievedDueRefills           = scheduleManager.getDueRefillsInfo();
            var DueRefills = new List <RefillLineViewModel>();

            foreach (var refill in retrievedDueRefills)
            {
                var refillline = new RefillLineViewModel()
                {
                    PatientName  = toUpperCase(refill.PatientName.ToString()),
                    MedicineName = refill.MedicationName.ToString(),
                    pId          = refill.Patient_Id,
                    IsSelected   = true
                };
                DueRefills.Add(refillline);
            }

            return(PartialView("_DueRefillMessagesPartialView", DueRefills));
        }