public ApprenticeshipTrailblazerFinancialDetails CreateApprenticeshipTrailblazerFinancialDetails()
        {
            XmlNode newNode = Node.OwnerDocument.CreateElement("ApprenticeshipTrailblazerFinancialDetails", NSMgr.LookupNamespace("ia"));
            ApprenticeshipTrailblazerFinancialDetails newInstance = new ApprenticeshipTrailblazerFinancialDetails(newNode, NSMgr);

            ApprenticeshipTrailblazerFinancialDetailsList.Add(newInstance);
            AppendToLastOfNodeNamed(newNode, newNode.Name);
            return(newInstance);
        }
Exemple #2
0
        private void Remove_Click(object sender, RoutedEventArgs e)
        {
            if (TrailblazerItemsCV.CurrentItem != null)
            {
                ILR.ApprenticeshipTrailblazerFinancialDetails les2Remove = TrailblazerItemsCV.CurrentItem as ILR.ApprenticeshipTrailblazerFinancialDetails;

                if (les2Remove != null)
                {
                    _learningDelivery.Delete(les2Remove);
                    _TrailBlazerList.Remove(les2Remove);


                    if (!TrailblazerItemsCV.MoveCurrentToPrevious())
                    {
                        TrailblazerItemsCV.MoveCurrentToFirst();
                        TrailblazerItemsCV.Refresh();
                        OnPropertyChanged("TrailblazerItemsCV");
                    }
                    if ((TrailblazerItemsCV.CurrentItem != null) && (TrailblazerItemsCV.CurrentItem != les2Remove))
                    {
                        ILR.ApprenticeshipTrailblazerFinancialDetails f = TrailblazerItemsCV.CurrentItem as ILR.ApprenticeshipTrailblazerFinancialDetails;
                        f.IsSelected = true;
                    }
                    else
                    {
                        TrailblazerItemsCV.MoveCurrentToNext();
                        if (TrailblazerItemsCV.CurrentItem != null)
                        {
                            ILR.ApprenticeshipTrailblazerFinancialDetails f = TrailblazerItemsCV.CurrentItem as ILR.ApprenticeshipTrailblazerFinancialDetails;
                            f.IsSelected = true;
                        }
                    }
                }
                TrailblazerItemsCV.Refresh();
            }
            OnPropertyChanged("TrailblazerItemsCV");
            ShouldShowListView();
        }