Example #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ProductVM"/> class from the model.
 /// </summary>
 /// <param name="entity">The model.</param>
 /// <param name="access"></param>
 /// <param name="dataService"></param>
 public RootVM(Root entity, AccessType access, RootDataService dataService)
     : base(access)
 {
     InitializeData(dataService);
     _model = entity;
     if(entity.ProductDefection != null)
         CurrentProductDefection = new ProductDefectionVM(entity.ProductDefection, Access, ProductDefectionDataService, RelationDirection.Straight);
     FishbonesVM = new RootFishbonesVM(this, CurrentProductDefection, Access);
 }
Example #2
0
 public override void Save(object param)
 {
     RootDataService.AttachModel(_model);
     _model = RootDataService.GetSingle(_model.Id); OnPropertyChanged("ModifiedBy");OnPropertyChanged("ModifiedDate");Mode = ModificationStatus.Saved;
 }
Example #3
0
     private void FixupRoot(Root previousValue)
     {
         if (previousValue != null && previousValue.FishboneNodes.Contains(this))
         {
             previousValue.FishboneNodes.Remove(this);
         }
 
         if (Root != null)
         {
             if (!Root.FishboneNodes.Contains(this))
             {
                 Root.FishboneNodes.Add(this);
             }
         }
     }