Example #1
0
        private void AddMedication()
        {
            prescription = new Model.Doctor.DoctorPrescription()
            {
                PrescriptionDosage       = DosagePrescriptionAmount,
                PrescriptionInstructions = PrescriptionInstructions,
                PrescriptionMedication   = PrescriptionMedication,
                AddedPrescriptionNotes   = AddedPrescriptionNotes,
                TypeOfMedication         = MedicationType.pills,
                MedCashPrice             = 30.45
            };

            try
            {
                if (CheckEntryFields() == true)
                {
                    RaiseButtonEvent();
                    PrescriptionLocalDb.InsertPrescription(prescription);
                    MedsInBusket = PrescriptionLocalDb.GetAllDoctorPrescriptionsAsync().Result.Count;
                }
                else
                {
                    App.Current.MainPage.DisplayAlert("Empty field detected", "There seems to be an error", "Try again");
                }
            }
            catch
            {
            }
            finally
            {
                ClearFields();
            }
        }
 public static void RemoveMeds(Model.Doctor.DoctorPrescription med)
 {
     prescription.Remove(med);
 }
 public static void AddMedicationToBusket(Model.Doctor.DoctorPrescription meds)
 {
     prescription.Add(meds);
 }