Ejemplo n.º 1
0
        public App()
        {
            InitializeComponent();
            var drugsViewModel  = new DrugsViewModel();
            var vitalsViewModel = new VitalsViewModel();

            m_mainViewModel = new MainViewModel(drugsViewModel, vitalsViewModel);

            MainPage = new MainPage(m_mainViewModel);
        }
Ejemplo n.º 2
0
        //TODO: custom statistics

        public IActionResult DrugList()
        {
            _user = _userRepository.GetWithDrugs(User.Identity.GetUserId());
            var viewModel = new DrugsViewModel
            {
                Drugs         = _user.Drugs.ToList(),
                User          = _user,
                DrugsReminder = DrugsService.GetDrugsForToday(_user.Drugs.ToList())
            };

            return(View(viewModel));
        }
Ejemplo n.º 3
0
 public DrugsView(DrugsViewModel drugsViewModel)
 {
     InitializeComponent();
     m_drugsViewModel = drugsViewModel;
     BindingContext   = drugsViewModel;
 }