Exemplo n.º 1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            SelectedPatientRoom = (PatientsRoomVieW)PatientsRoomDataGrid.SelectedItem;

            FirstFloor f = new FirstFloor(SelectedPatientRoom.IdOfRoom);

            f.Show();
        }
Exemplo n.º 2
0
 public FirstFloor()
 {
     InitializeComponent();
     CreateDynamicCanvas();
     FirstFloorRepository.GetInstance();
     InformationEditRepository.GetInstance();
     DoctorsRoomRepository.GetInstance();
     StorageRepository.GetInstance();
     Room         = InformationEditRepository.GetInstance().GetById("R1");
     RoomTxt.Text = Room.NameOfRoom;
 }
Exemplo n.º 3
0
        public FirstFloor(string Id)
        {
            InitializeComponent();
            CreateDynamicCanvas();
            FirstFloorRepository.GetInstance();
            InformationEditRepository.GetInstance();
            DrawSelectedRectangle(Id);
            DoctorsRoomRepository.GetInstance();
            StorageRepository.GetInstance();
            Room         = InformationEditRepository.GetInstance().GetById("R1");
            RoomTxt.Text = Room.NameOfRoom;

            SearchedPatientsRooms = new ObservableCollection <PatientsRoomVieW>();
            SearchedDoctorsRooms  = new ObservableCollection <DoctorRoomView>();
            SearchedAnotherRooms  = new ObservableCollection <RoomWorkTime>();
        }
 public void Edit(PatientsRoomVieW room)
 {
     Rooms = GetAll();
     foreach (PatientsRoomVieW currentRoom in Rooms)
     {
         if (currentRoom.IdOfRoom.Equals(room.IdOfRoom.ToString()))
         {
             currentRoom.NameOfRoom    = room.NameOfRoom;
             currentRoom.NumberOfFloor = room.NumberOfFloor;
             currentRoom.NameOfClinic  = room.NameOfClinic;
             currentRoom.BedCapacity   = room.BedCapacity;
             currentRoom.AvailableBeds = room.AvailableBeds;
             currentRoom.OccupiedBeds  = room.OccupiedBeds;
         }
     }
     SaveAll(Rooms);
 }
Exemplo n.º 5
0
        public RoomInformation(String id)
        {
            InitializeComponent();
            this.DataContext = this;

            RoomTextBlock.Visibility = Visibility.Hidden;
            Roomtxt.Visibility       = Visibility.Hidden;

            if (Login.role != 3)
            {
                ButonSave.Visibility = Visibility.Hidden;

                Roomtxt.IsEnabled          = false;
                FloorTxt.IsEnabled         = false;
                BedCapacityTxt.IsEnabled   = false;
                OcupiedBedsTxt.IsEnabled   = false;
                AvailableBedsTxt.IsEnabled = false;
                ClinicTxt.IsEnabled        = false;
            }
            if (Login.role == 2)
            {
                BedCapacityTxt.Visibility   = Visibility.Hidden;
                OcupiedBedsTxt.Visibility   = Visibility.Hidden;
                AvailableBedsTxt.Visibility = Visibility.Hidden;
                BedCapacity.Visibility      = Visibility.Hidden;
                OccupiedBeds.Visibility     = Visibility.Hidden;
                AvailableBeds.Visibility    = Visibility.Hidden;
            }

            Room r1 = informationControler.GetRoomById(id);

            if (r1 != null)
            {
                room = PatientsRoomConverter.ConvertRoomToPatientsRoomView(informationControler.GetRoomById(id));
            }
        }