Ejemplo n.º 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 DefectionVM(Defection entity, AccessType access, DefectionDataService dataService)
     : base(access)
 {
     InitializeData(dataService);
     _model = entity;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DefectionInfoVM"/> class from the model.
 /// </summary>
 /// <param name="entity">The model.</param>
 public DefectionInfoVM(Defection entity)
 {
     _model = entity;
 }
Ejemplo n.º 3
0
 public override void Save(object param)
 {
     DefectionDataService.AttachModel(_model);
     _model = DefectionDataService.GetSingle(_model.Id); OnPropertyChanged("ModifiedBy");OnPropertyChanged("ModifiedDate");Mode = ModificationStatus.Saved;
 }
Ejemplo n.º 4
0
     private void FixupDefection(Defection previousValue)
     {
         if (previousValue != null && previousValue.ProductDefections.Contains(this))
         {
             previousValue.ProductDefections.Remove(this);
         }
 
         if (Defection != null)
         {
             if (!Defection.ProductDefections.Contains(this))
             {
                 Defection.ProductDefections.Add(this);
             }
         }
     }