Exemplo 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 OrganizationChartVM(OrganizationChart entity, AccessType access, OrganizationChartDataService dataService)
     : base(access)
 {
     InitializeData(dataService);
     _model = entity;
     
     {
         PositionsVM = new OrganizationChartPositionsVM(this, Access);
     }
 }
Exemplo n.º 2
0
 public override void Save(object param)
 {
     OrganizationChartDataService.AttachModel(_model);
     _model = OrganizationChartDataService.GetSingle(_model.Id); OnPropertyChanged("ModifiedBy");OnPropertyChanged("ModifiedDate");Mode = ModificationStatus.Saved;
 }
     private void FixupOrganizationChart(OrganizationChart previousValue)
     {
         if (previousValue != null && previousValue.OrganizationChart_Positions.Contains(this))
         {
             previousValue.OrganizationChart_Positions.Remove(this);
         }
 
         if (OrganizationChart != null)
         {
             if (!OrganizationChart.OrganizationChart_Positions.Contains(this))
             {
                 OrganizationChart.OrganizationChart_Positions.Add(this);
             }
         }
     }