public ViewPatientWindow(string value)
        {
            InitializeComponent();
            double screenWidth  = System.Windows.SystemParameters.PrimaryScreenWidth;
            double screenHeight = System.Windows.SystemParameters.PrimaryScreenHeight;
            double windowWidth  = this.Width;
            double windowHeight = this.Height;

            this.Left = (screenWidth / 2) - (windowWidth / 2);
            this.Top  = (screenHeight / 2) - (windowHeight / 2);


            //PatientManagement pm = new PatientManagement();
            SecretaryController sc = new SecretaryController();

            p = sc.getPatient(value);

            TypeAcc.Content          = TypeAcc.Content + p.TypeAcc.ToString();
            FirstName.Content        = FirstName.Content + p.Name;
            LastName.Content         = LastName.Content + p.LastName;
            Jmbg.Content             = Jmbg.Content + p.Jmbg;
            Sex.Content              = Sex.Content + p.SexType.ToString();
            DateOfBirth.Content      = DateOfBirth.Content + p.DateOfBirth.ToString("dd.MM.yyyy.");
            PlaceOfResidance.Content = PlaceOfResidance.Content + p.PlaceOfResidance;
            Email.Content            = Email.Content + p.Email;
            PhoneNumber.Content      = PhoneNumber.Content + p.PhoneNumber;
            Username.Content         = Username.Content + p.Username;
            Password.Content         = Password.Content + p.Password;
        }
Example #2
0
        private void Refresh_Click_1(object sender, RoutedEventArgs e)
        {
            SecretaryController sc = new SecretaryController();

            p = sc.getPatient(idPatient);

            lvUsers.ItemsSource = p.ListAllergens;
        }
Example #3
0
        public MedicalRecordWindow(string value)
        {
            InitializeComponent();
            double screenWidth  = System.Windows.SystemParameters.PrimaryScreenWidth;
            double screenHeight = System.Windows.SystemParameters.PrimaryScreenHeight;
            double windowWidth  = this.Width;
            double windowHeight = this.Height;

            this.Left = (screenWidth / 2) - (windowWidth / 2);
            this.Top  = (screenHeight / 2) - (windowHeight / 2);


            SecretaryController sc = new SecretaryController();

            idPatient = value;


            p = sc.getPatient(value);



            lvUsers.ItemsSource = p.ListAllergens;


            ComboBox1.Text             = p.TypeAcc.ToString();
            ComboBoxMartialStatus.Text = p.medicalRecord.MartialStatus.ToString();
            textBoxFirstName.Text      = p.Name;
            textBoxNameParent.Text     = p.medicalRecord.NameParent;
            textBoxLastName.Text       = p.LastName;
            textBoxJMBG.Text           = p.Jmbg;

            if (p.SexType == SexType.male)
            {
                MSex.IsChecked = true;
            }
            else
            {
                FSex.IsChecked = true;
            }

            BoxDateTime.Text             = p.DateOfBirth.ToString();
            textBoxHealthCard.Text       = p.medicalRecord.NumberOfHealthCard;
            textBoxPlaceOfResidance.Text = p.PlaceOfResidance;
            textBoxPhoneNumber.Text      = p.PhoneNumber;
        }
Example #4
0
        public EditRegisterPatientWindow(string value)
        {
            InitializeComponent();
            double screenWidth  = System.Windows.SystemParameters.PrimaryScreenWidth;
            double screenHeight = System.Windows.SystemParameters.PrimaryScreenHeight;
            double windowWidth  = this.Width;
            double windowHeight = this.Height;

            this.Left = (screenWidth / 2) - (windowWidth / 2);
            this.Top  = (screenHeight / 2) - (windowHeight / 2);

            //FilesPatients sp = FilesPatients.GetInstance();
            // PatientManagement pm = new PatientManagement();
            SecretaryController sc = new SecretaryController();

            p = sc.getPatient(value);

            ComboBox1.Text        = p.TypeAcc.ToString();
            textBoxFirstName.Text = p.Name;
            textBoxLastName.Text  = p.LastName;
            textBoxJMBG.Text      = p.Jmbg;

            if (p.SexType == SexType.male)
            {
                MSex.IsChecked = true;
            }
            else
            {
                FSex.IsChecked = true;
            }

            BoxDateTime.Text             = p.DateOfBirth.ToString();
            textBoxPlaceOfResidance.Text = p.PlaceOfResidance;
            textBoxEmail.Text            = p.Email;
            textBoxPhoneNumber.Text      = p.PhoneNumber;
            textBoxUsername.Text         = p.Username;
            textBoxPassword.Text         = p.Password;
        }
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            SecretaryController sc = new SecretaryController();
            AllergensManagement am = new AllergensManagement();
            PatientManagement   pm = new PatientManagement();

            Patient p;
            string  cb       = ComboBox1.Text;
            string  specName = textBoxTypeAllergen.Text;

            List <Patient> patients = sc.GetAllPatients();

            p = sc.getPatient(idP);

            string   idAllergen = am.getID(cb);
            Allergen a          = new Allergen(idAllergen, cb, specName);

            p.ListAllergens.Add(a);

            pm.updateAllergen(p);


            Close();
        }