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>
        public PositionVM(Position entity, AccessType access, PositionDataService dataService)
            : base(access)
        {
            InitializeData(dataService);
            _model = entity;

        }
Exemplo n.º 2
0
     private void FixupPosition(Position previousValue)
     {
         if (previousValue != null && previousValue.User_Positions.Contains(this))
         {
             previousValue.User_Positions.Remove(this);
         }
 
         if (Position != null)
         {
             if (!Position.User_Positions.Contains(this))
             {
                 Position.User_Positions.Add(this);
             }
         }
     }
Exemplo n.º 3
0
 public override void Save(object param)
 {
     PositionDataService.AttachModel(_model);
     _model = PositionDataService.GetSingle(_model.Id); OnPropertyChanged("ModifiedBy");OnPropertyChanged("ModifiedDate");Mode = ModificationStatus.Saved;
 }