Example #1
0
 public override void Save(object param)
 {
     CostCenterDataService.AttachModel(_model);
     _model = CostCenterDataService.GetSingle(_model.Id); OnPropertyChanged("ModifiedBy");OnPropertyChanged("ModifiedDate");Mode = ModificationStatus.Saved;
 }
Example #2
0
     private void FixupCostCenter(CostCenter previousValue)
     {
         if (previousValue != null && previousValue.Costs.Contains(this))
         {
             previousValue.Costs.Remove(this);
         }
 
         if (CostCenter != null)
         {
             if (!CostCenter.Costs.Contains(this))
             {
                 CostCenter.Costs.Add(this);
             }
         }
     }
Example #3
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 CostCenterVM(CostCenter entity, AccessType access, CostCenterDataService dataService)
     : base(access)
 {
     InitializeData(dataService);
     _model = entity;
 }