Example #1
0
	    /// <summary>
		/// Initializes a new instance of the <see cref="FpcVm"/> class from the model.
	    /// </summary>
	    /// <param name="entity">The model.</param>
	    /// <param name="groupItems">The group view models.</param>
	    /// <param name="access"></param>
	    /// <param name="dataService"></param>
        public FpcVm(FPC entity, ListCollectionView groupItems, AccessType access, FPCDataService dataService)
            : base(access)
        {
            InitializeData(dataService);
            _model = entity;
            Groups = groupItems;
            foreach (ProductVM groupVm in groupItems)
            {
                if (groupVm.Id == entity.Product.Id)
                {
                    SelectedGroupVM = groupVm;
                    break;
                }
            }
        }
Example #2
0
     private void FixupFPC(FPC previousValue)
     {
         if (previousValue != null && previousValue.Jobs.Contains(this))
         {
             previousValue.Jobs.Remove(this);
         }
 
         if (FPC != null)
         {
             if (!FPC.Jobs.Contains(this))
             {
                 FPC.Jobs.Add(this);
             }
         }
     }
Example #3
0
	    /// <summary>
	    /// Initializes a new instance of the <see cref="FpcVm"/> class from the model.
	    /// </summary>
	    /// <param name="entity">The model.</param>
	    /// <param name="access"></param>
	    /// <param name="dataService"></param>
        public FpcVm(FPC entity, AccessType access, FPCDataService dataService)
            : base(access)
        {
            InitializeData(dataService);
            _model = entity;
        }