public RegisterMedicViewModel()
        {
            MedicViewModel        = new MedicViewModel();
            InstitutiiAsociate    = new ObservableCollection <InstitutieAsociata>();
            HandleRegisterCommand = new BasicCommandWithParameter(Register);
            var institutii = AppService.Instance.InstitutieAsociataService.GetAll();

            institutii.ToList().ForEach(x =>
            {
                InstitutiiAsociate.Add(x);
            });

            InstitutieSelectata = InstitutiiAsociate[0];
        }
        public ComponentaDetailViewModel(ComponentaViewModel componentaViewModel)
        {
            ComponentaViewModel = componentaViewModel;

            CloseWindowCommand = new BasicCommandWithParameter(CloseWindow);
            SaveCommand        = new BasicCommand(Save);

            Stari  = new ObservableCollection <string>();
            Tipuri = new ObservableCollection <string>();

            foreach (var stare in Enum.GetValues(typeof(StareComponenta)))
            {
                if (stare.ToString().Equals("InAsteptare"))
                {
                    Stari.Add("In Asteptare");
                }
                else
                {
                    Stari.Add(stare.ToString());
                }
            }

            foreach (var tip in Enum.GetValues(typeof(TipComponenta)))
            {
                Tipuri.Add(tip.ToString());
            }

            if (ComponentaViewModel.Pacient == null)
            {
                NumePrimitor = "";
            }
            else
            {
                NumePrimitor = ComponentaViewModel.Pacient.Nume;
            }

            if (ComponentaViewModel.Pacient == null)
            {
                PrenumePrimitor = "";
            }
            else
            {
                PrenumePrimitor = ComponentaViewModel.Pacient.Prenume;
            }
            SelectedStare = ComponentaViewModel.Stare;
            SelectedTip   = ComponentaViewModel.TipComponenta;
            DataDepunere  = ComponentaViewModel.DataDepunere;
        }
Beispiel #3
0
        public RegisterDonatorViewModel()
        {
            DonatorViewModel      = new DonatorViewModel();
            InstitutiiAsociate    = new ObservableCollection <InstitutieAsociata>();
            HandleRegisterCommand = new BasicCommandWithParameter(Register);
            var institutii = AppService.Instance.InstitutieAsociataService.GetAll();

            institutii.ToList().ForEach(x =>
            {
                InstitutiiAsociate.Add(x);
            });

            GrupeDeSange = new ObservableCollection <GrupaDeSange>();
            var grupe = AppService.Instance.GrupaDeSangeService.GetAll();

            grupe.ToList().ForEach(x =>
            {
                GrupeDeSange.Add(x);
            });

            GrupaDeSange        = GrupeDeSange[0];
            InstitutieSelectata = InstitutiiAsociate[0];
        }
Beispiel #4
0
 public LoginViewModel()
 {
     User = new UtilizatorViewModel();
     HandleLoginCommand = new BasicCommandWithParameter(Login);
     HandleRegister     = new BasicCommand(Register);
 }
Beispiel #5
0
 public ViewModelLogin(ServiceClient service)
 {
     _serviceClient     = service;
     HandleLoginCommand = new BasicCommandWithParameter(Login);
 }