public ViewPlacements(string name)
        {
            InitializeComponent();
            txtPatient.Text = name;

            string[] ss   = name.Split(' ');
            string   jmbg = ss[ss.Length - 1];

            List <PlacemetnInARoom> placements = new List <PlacemetnInARoom>();

            placements = pc.ViewPatientPlacements(jmbg);

            List <PlacementDTO> pDTOs = new List <PlacementDTO>();

            foreach (PlacemetnInARoom p in placements)
            {
                PlacementDTO pDTO = new PlacementDTO();
                pDTO.Id              = p.Id;
                pDTO.patientCard     = p.patientCard.patient.Name;
                pDTO.room            = p.room.Number;
                pDTO.DateOfPlacement = p.DateOfPlacement.ToShortDateString();
                pDTO.DateOfDismison  = p.DateOfDismison.ToShortDateString();

                pDTOs.Add(pDTO);
            }

            DataGrid1.ItemsSource = pDTOs;
        }
Ejemplo n.º 2
0
 public PlacementDTO(PlacementDTO p)
 {
     this.patientCard     = p.patientCard;
     this.room            = p.room;
     this.Id              = p.Id;
     this.DateOfPlacement = p.DateOfPlacement;
     this.DateOfDismison  = p.DateOfDismison;
 }