/*protected void RunPersonInfoChanged(IPersonInfo pInfo)
        {
            if (OnPersonInfoChanged != null)
                PropertyChanged(this, new PersonInfoEventArgs(new PersonInfoView()));
        }*/

        public void Row_DoubleClick(object sender, MouseButtonEventArgs e)
        {
            PropertyInfo[] propInfos;

            DataGridRow row = sender as DataGridRow;
            PersonInfoModel outputPersonInfo = (row.Item as PersonInfoModel);
            List<PersonPaymentsModel> outputPP;
            using (DataBaseConnector dbService = new DataBaseConnector())
            {
                List<IPersonPayments> inputPP = dbService.GetPersonPaymentRecords(t => t.PersonUUID == outputPersonInfo.UUID);
                if (inputPP.Count > 0)
                {
                    outputPP = new List<PersonPaymentsModel>();
                    foreach (var item in inputPP)
                    {
                        PersonPaymentsModel newpp = new PersonPaymentsModel();
                        propInfos = typeof(IPersonPayments).GetProperties();
                        foreach (var curPropt in propInfos)
                        {
                            curPropt.SetValue(newpp, curPropt.GetValue(item));
                        }
                        outputPP.Add(newpp);
                    }
                    outputPersonInfo.Payments = new ObservableCollection<PersonPaymentsModel>(outputPP);
                }
            }
            PersonInfoView hbDetailed = new PersonInfoView(outputPersonInfo);
            hbDetailed.ParentListView = this;
            //hbDetailed.Owner = this;
            hbDetailed.Show();
        }
 public void NewButton_Click(object sender, RoutedEventArgs e)
 {
     PersonInfoModel outputPersonInfo = new PersonInfoModel();
     outputPersonInfo.UUID = Guid.NewGuid().ToString();
     outputPersonInfo.ViewModelStatus = RecordActions.Inserted;
     PersonInfoView hbDetailed = new PersonInfoView(outputPersonInfo);
     hbDetailed.ParentListView = this;
     hbDetailed.Show();
 }