示例#1
0
 public override void Save(object param)
 {
     CostCenterDataService.AttachModel(_model);
     _model = CostCenterDataService.GetSingle(_model.Id); OnPropertyChanged("ModifiedBy");OnPropertyChanged("ModifiedDate");Mode = ModificationStatus.Saved;
 }
示例#2
0
文件: Cost.cs 项目: T1Easyware/Soheil
     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);
             }
         }
     }
示例#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;
 }