public RateAppointment(MedicalAppointmentDTO appointment) { InitializeComponent(); this.DataContext = this; ReviewAppointment = appointment; app = Application.Current as App; }
public ProfileModal(MedicalAppointmentDTO dataContext) { DataContext = dataContext; InitializeComponent(); app = Application.Current as App; Profile_FirstName.Text = dataContext.Patient.FirstName; Profile_LastName.Text = dataContext.Patient.LastName; Profile_DateOfBirth.SelectedDate = dataContext.Patient.DateOfBirth; ListAppointments.ItemsSource = app.MedicalAppointments.FindAll(item => item.Patient.Id == dataContext.Patient.Id && dataContext.Beginning.CompareTo(new DateTime()) >= 0); ListHistory.ItemsSource = app.MedicalAppointments.FindAll(item => item.Patient.Id == dataContext.Patient.Id && dataContext.Beginning.CompareTo(new DateTime()) < 0); Guest = dataContext.Patient; }
private void Create_Click(object sender, RoutedEventArgs e) { MedicalAppointmentDTO appl = new MedicalAppointmentDTO(); appl.Patient = ListPatients.SelectedItem as PatientDTO; appl.Beginning = (ListTerms.SelectedItem as TimeInterval).Start; appl.End = (ListTerms.SelectedItem as TimeInterval).End; appl.End = (ListTerms.SelectedItem as TimeInterval).End; appl.Room = ListRooms.SelectedItem as RoomDTO; appl.Type = (MedicalAppointmentType)AppointmentType.SelectedItem; List <DoctorDTO> list = new List <DoctorDTO>(); list.Add(app.SelectedDoctor); appl.Doctors = list; app.MedicalAppointmentController.Save(appl); }
public AppointmentModal(MedicalAppointmentDTO dataContext) { InitializeComponent(); app = Application.Current as App; DataContext = dataContext; Date.SelectedDate = (dataContext == null) ? default : dataContext.Beginning; var BeginningTerm = (dataContext == null) ? default : dataContext.Beginning; var EndTerm = (dataContext == null) ? default : dataContext.End; StartTime.Text = BeginningTerm.Hour + ":" + BeginningTerm.Minute; EndTime.Text = EndTerm.Hour + ":" + EndTerm.Minute; DoctorList.ItemsSource = (dataContext == null) ? default : dataContext.Doctors; AllDoctorList.ItemsSource = app.doctors; Room.Text = (dataContext == null) ? default : dataContext.Room.Id.ToString(); SelectedAppointment = dataContext; }
public HomeWindow(string email) { WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen; InitializeComponent(); app = Application.Current as App; InitializeComponent(); PecepiesList.ItemsSource = app.PrescriptionController.GetAll(); this.DataContext = this; HideTextBoxes(); HidePlaceHolders(); HideResource(); saveEdit.Visibility = Visibility.Collapsed; cancleEdit.Visibility = Visibility.Collapsed; // Doctor AddressDTO tempAddress = new AddressDTO() { City = "Novi Sad", Country = "Serbia", Number = "25", PostCode = "21000", Street = "Laze Kostica" }; //LoggedInDoctor = new DoctorDTO() { FirstName = "Predrag", LastName = "Kon", DateOfBirth = new DateTime(1998, 8, 25), Email = "*****@*****.**", Gender = "Muski", Jmbg = "0234567890111", TelephoneNumber = "06551232123", Address = tempAddress, MedicalRole= "Specijalista" }; LoggedInDoctor = app.DoctorController.GetByEmail(email); AllDoctors = (List <DoctorDTO>)app.DoctorController.GetAll(); DoctorsFilter = AllDoctors; ListOfFiltratedDoctors.ItemsSource = DoctorsFilter; Email = email; LoggedInPatient = new PatientDTO() { Id = 1, FirstName = "Uros", LastName = "Milovanovic", DateOfBirth = new DateTime(1998, 8, 25), Email = "*****@*****.**", Gender = "Muski", InsurenceNumber = "1234567", Jmbg = "1234567890", TelephoneNumber = "06551232123", Address = tempAddress }; // Current Medical Appointment currentMedicalAppointment = new MedicalAppointmentDTO(DateTime.Now, DateTime.Now, new RoomDTO(RoomType.hospitalRoom, "ward", "1"), MedicalAppointmentType.examination, new GuestDTO(), new List <DoctorDTO>()); //ALl medical appoitments allMedicalAppointmentDTO = (List <MedicalAppointmentDTO>)app.MedicalAppointmentController.GetAllByDoctorID(LoggedInDoctor.Id);// GetAll(); // allMedicalAppointmentDTO = (List<MedicalAppointmentDTO>) app.MedicalAppointmentController GetAll(); Appoitments = allMedicalAppointmentDTO; // LIst of proporsitions ListOfPropositions = (List <PropositionDTO>)app.PropositionController.GetAll(); //Current Appoitments /* * RoomDTO tempRoom = new RoomDTO() { Floor = "One", Id = 4, Ward = "Check" }; * Appoitments = new ObservableCollection<Model.MedicalAppointmentDTO>(); * Appoitments.Add(new MedicalAppointmentDTO() { Room = tempRoom, Beginning = new DateTime(2020, 5, 15, 11, 0, 0), Type = MedicalAppointmentType.examination, End = new DateTime(2020, 5, 13, 15, 30, 0), IsScheduled = true }); * Appoitments.Add(new MedicalAppointmentDTO() { Room = tempRoom, Beginning = new DateTime(2020, 5, 15, 12, 0, 0), Type = MedicalAppointmentType.examination, End = new DateTime(2020, 5, 13, 18, 30, 0), IsScheduled = true }); * Appoitments.Add(new MedicalAppointmentDTO() { Room = tempRoom, Beginning = new DateTime(2020, 5, 14, 13, 0, 0), Type = MedicalAppointmentType.examination, End = new DateTime(2020, 5, 15, 15, 30, 0), IsScheduled = true }); * Appoitments.Add(new MedicalAppointmentDTO() { Room = tempRoom, Beginning = new DateTime(2020, 5, 13, 14, 0, 0), Type = MedicalAppointmentType.examination, End = new DateTime(2020, 5, 13, 15, 30, 0), IsScheduled = true }); * Appoitments.Add(new MedicalAppointmentDTO() { Room = tempRoom, Beginning = new DateTime(2020, 5, 14, 15, 0, 0), Type = MedicalAppointmentType.operation, End = new DateTime(2020, 5, 14, 1, 30, 0), IsScheduled = true }); * Appoitments.Add(new MedicalAppointmentDTO() { Room = tempRoom, Beginning = new DateTime(2020, 5, 15, 16, 0, 0), Type = MedicalAppointmentType.operation, End = new DateTime(2020, 5, 15, 5, 30, 0), IsScheduled = true }); * Appoitments.Add(new MedicalAppointmentDTO() { Room = tempRoom, Beginning = new DateTime(2020, 5, 10, 17, 0, 0), Type = MedicalAppointmentType.examination, End = new DateTime(2020, 5, 15, 5, 30, 0), IsScheduled = true }); * Appoitments.Add(new MedicalAppointmentDTO() { Room = tempRoom, Beginning = new DateTime(2020, 5, 11, 18, 0, 0), Type = MedicalAppointmentType.examination, End = new DateTime(2020, 5, 15, 18, 30, 0), IsScheduled = true }); * Appoitments.Add(new MedicalAppointmentDTO() { Room = tempRoom, Beginning = new DateTime(2020, 5, 12, 19, 0, 0), Type = MedicalAppointmentType.examination, End = new DateTime(2020, 5, 15, 15, 30, 0), IsScheduled = true }); * Appoitments.Add(new MedicalAppointmentDTO() { Room = tempRoom, Beginning = new DateTime(2020, 5, 13, 10, 0, 0), Type = MedicalAppointmentType.examination, End = new DateTime(2020, 5, 13, 15, 30, 0), IsScheduled = true }); * Appoitments.Add(new MedicalAppointmentDTO() { Room = tempRoom, Beginning = new DateTime(2020, 5, 14, 11, 0, 0), Type = MedicalAppointmentType.operation, End = new DateTime(2020, 5, 14, 15, 30, 0), IsScheduled = true }); * Appoitments.Add(new MedicalAppointmentDTO() { Room = tempRoom, Beginning = new DateTime(2020, 5, 15, 11, 0, 0), Type = MedicalAppointmentType.operation, End = new DateTime(2020, 5, 15, 14, 30, 0), IsScheduled = true }); * Appoitments.Add(new MedicalAppointmentDTO() { Room = tempRoom, Beginning = new DateTime(2020, 5, 25, 11, 0, 0), Type = MedicalAppointmentType.examination, End = new DateTime(2020, 5, 13, 15, 30, 0), IsScheduled = true }); * Appoitments.Add(new MedicalAppointmentDTO() { Room = tempRoom, Beginning = new DateTime(2020, 5, 25, 12, 0, 0), Type = MedicalAppointmentType.examination, End = new DateTime(2020, 5, 13, 18, 30, 0), IsScheduled = true }); * Appoitments.Add(new MedicalAppointmentDTO() { Room = tempRoom, Beginning = new DateTime(2020, 5, 24, 13, 0, 0), Type = MedicalAppointmentType.examination, End = new DateTime(2020, 5, 15, 15, 30, 0), IsScheduled = true }); * Appoitments.Add(new MedicalAppointmentDTO() { Room = tempRoom, Beginning = new DateTime(2020, 5, 23, 14, 0, 0), Type = MedicalAppointmentType.examination, End = new DateTime(2020, 5, 13, 15, 30, 0), IsScheduled = true }); * Appoitments.Add(new MedicalAppointmentDTO() { Room = tempRoom, Beginning = new DateTime(2020, 5, 24, 15, 0, 0), Type = MedicalAppointmentType.operation, End = new DateTime(2020, 5, 14, 1, 30, 0), IsScheduled = true }); * Appoitments.Add(new MedicalAppointmentDTO() { Room = tempRoom, Beginning = new DateTime(2020, 5, 25, 16, 0, 0), Type = MedicalAppointmentType.operation, End = new DateTime(2020, 5, 15, 5, 30, 0), IsScheduled = true }); * Appoitments.Add(new MedicalAppointmentDTO() { Room = tempRoom, Beginning = new DateTime(2020, 5, 20, 17, 0, 0), Type = MedicalAppointmentType.examination, End = new DateTime(2020, 5, 15, 5, 30, 0), IsScheduled = true }); * Appoitments.Add(new MedicalAppointmentDTO() { Room = tempRoom, Beginning = new DateTime(2020, 5, 21, 18, 0, 0), Type = MedicalAppointmentType.examination, End = new DateTime(2020, 5, 15, 18, 30, 0), IsScheduled = true }); * Appoitments.Add(new MedicalAppointmentDTO() { Room = tempRoom, Beginning = new DateTime(2020, 5, 22, 19, 0, 0), Type = MedicalAppointmentType.examination, End = new DateTime(2020, 5, 15, 15, 30, 0), IsScheduled = true }); * Appoitments.Add(new MedicalAppointmentDTO() { Room = tempRoom, Beginning = new DateTime(2020, 5, 23, 10, 0, 0), Type = MedicalAppointmentType.examination, End = new DateTime(2020, 5, 13, 15, 30, 0), IsScheduled = true }); * Appoitments.Add(new MedicalAppointmentDTO() { Room = tempRoom, Beginning = new DateTime(2020, 5, 24, 11, 0, 0), Type = MedicalAppointmentType.operation, End = new DateTime(2020, 5, 14, 15, 30, 0), IsScheduled = true }); * Appoitments.Add(new MedicalAppointmentDTO() { Room = tempRoom, Beginning = new DateTime(2020, 5, 25, 11, 0, 0), Type = MedicalAppointmentType.operation, End = new DateTime(2020, 5, 15, 14, 30, 0), IsScheduled = true }); */ CurrentAppoitments = new ObservableCollection <MedicalAppointmentDTO>(); //History DoctorDTO tempDoctor = new DoctorDTO() { FirstName = "Filip Zdelar" }; ReviewDTO tempReview = new ReviewDTO(5, "yes"); AvailableAppoitments = new ObservableCollection <Model.MedicalAppointmentDTO>(); ListOfRosourceses = new List <string>(); TartgetRosource = ""; obrisnni = 0; SelectedDate = new DateTime(); app = Application.Current as App; Recepies = new List <string>(); TypeOfTermin = ""; Title.Text += " " + LoggedInDoctor.FirstName + " " + LoggedInDoctor.LastName; Medicine_toAdd.Visibility = Visibility.Hidden; NumberTextBox.Visibility = Visibility.Hidden; NumberTextBox_Copy.Visibility = Visibility.Hidden; Kol_med.Visibility = Visibility.Hidden; Uc_med.Visibility = Visibility.Hidden; AddMediciniToList.Visibility = Visibility.Hidden; }