private void GetOperators()
 {
     DeserializeXml dx = new DeserializeXml();
     Trainees = dx.DeserializePersons();
     DateTreeView dv = new DateTreeView();
     if (Trainees != null)
     {
         var listOperator = dv.GetDates(Trainees);
         BindTree(listOperator);
     }
 }
        private void ShowTraineesList(object sender)
        {
            var types = ((TreeView)sender).SelectedItem;
            DeserializeXml dx = new DeserializeXml();
            PersonAndDbidsOperators allTrainees = dx.DeserializePersons();
            DateTreeView dv = new DateTreeView();

            if (types != null)
            {
                TrainingDate traningDate = types as TrainingDate;
                if (traningDate != null)
                {
                    var traineesByDate = allTrainees.Persons.Where(p => p.LastTrainedDate.Equals(traningDate.DateOfTraining)).Select(p => p).ToList();
                    GetTrainees(traineesByDate);
                    lbxTrainee.ItemsSource = TraineeByDate;
                }
            }
        }
        private void ShowTraineesList(object sender)
        {
            var dates = ((ComboBox)sender).SelectedItem;
            DeserializeXml dx = new DeserializeXml();
            PersonAndDbidsOperators allTrainees = dx.DeserializePersons();
            DateTreeView dv = new DateTreeView();

            if (dates != null)
            {
                TrainingDate traningDate = dates as TrainingDate;
                if (traningDate != null)
                {
                    var traineesByDate = allTrainees.Persons.Where(p => p.LastTrainedDate.Equals(traningDate.DateOfTraining)).Select(p => p).ToList();
                    GetTrainees(traineesByDate);
                    //lbxTraineeList.ItemsSource = TraineeBySelectedDate;
                    dgdFindPersonList.ItemsSource = TraineeBySelectedDate;
                    txbNoOfTrainees.Text = traineesByDate.Count.ToString();
                }
            }
        }
        // Get Operators
        private void GetOperators()
        {
            DeserializeXml dx = new DeserializeXml();
            Operators = dx.DeserializePersons();
            DateTreeView dv = new DateTreeView();

            if (Operators != null)
            {
                var dateList = dv.GetDates(Operators);
                BindTree(dateList);
            }
        }