Ejemplo n.º 1
0
        public AddMedicineWindow(AddMedicineViewModel viewModel)
        {
            InitializeComponent();

            this.DataContext = viewModel;
        }
Ejemplo n.º 2
0
        private void AddMedicine()
        {
            var viewModel = new AddMedicineViewModel();

            var addDosage = new AddMedicineWindow(viewModel);

            if (addDosage.ShowDialog() == true)
            {
                this.supplies.AddDosage(new Medicine(viewModel.Name), viewModel.Date, new CountPerDayDosage(viewModel.CountPerDay));

                this.OnSuppliesChanged();

                this.DumpSuppliesStatus();
            }
        }