Exemple #1
0
 public override void ViewItemLink(object param)
 {
     var relationIndex = Convert.ToInt32(param);
     switch (relationIndex)
     {
         case 0:
             FishbonesVM = new RootFishbonesVM(this, CurrentProductDefection, Access);
             CurrentLink = FishbonesVM;
             break;
         case 1:
             if(FishbonesVM == null) break;
             ActionPlansVM = new FishboneNodeActionPlansVM((FishboneNodeVM) FishbonesVM.CurrentNode,Access);
             CurrentLink = ActionPlansVM;
             break;
     }
     base.ViewItemLink(param);
 }
Exemple #2
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);
 }