Exemplo n.º 1
0
        public void Save1()
        {
            //this.FillDoctor();
            bool isValid = IsValid();

            if (isValid)
            {
                //Message message = new Message("Успешно");
                SaveModel(Doctor);
                //FillView();
                EditUser editUserForm = new EditUser(Doctor, true);
                editUserForm.Show();
            }

            else
            {
                MessageBox.Show("Проблема");
            }
        }
Exemplo n.º 2
0
        private void ListViewMenu_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            switch (((ListViewItem)((ListView)sender).SelectedItem).Name)
            {
            case "ItemDoctors":
            {
                Doctors doctors = new Doctors();
                ContentC.Content = doctors;
                break;
            }

            case "ItemPatients":
            {
                if (Membership.CurrentUser.RoleID == 3)
                {
                    EditPatient editPatient = new EditPatient(Membership.CurrentUser.Patient.Id);
                    ContentC.Content = editPatient;
                }
                else
                {
                    Patients patients = new Patients();
                    ContentC.Content = patients;
                }
                break;
            }

            case "ItemVisits":
            {
                Visits visits = new Visits();
                ContentC.Content = visits;
                break;
            }

            case "ItemAddDoctor":
            {
                EditDoctor newForm = new EditDoctor();
                newForm.ShowDialog();
                break;
            }

            case "ItemAddAdmin":
            {
                EditUser newForm = new EditUser(0);
                newForm.ShowDialog();
                break;
            }

            case "ItemAddPatient":
            {
                EditPatient editpatient = new EditPatient(/*0*/);
                MainWindow.AppWindow.ContentC.Content = editpatient;
                break;
            }

            case "Statistics":
            {
                Statistics item = new Statistics();
                MainWindow.AppWindow.ContentC.Content = item;
                break;
            }

            default:

                break;
            }
        }