Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="EducationViewModel"/> class.
        /// </summary>
        /// <param name="unitOfWork">Unit of work.</param>
        /// <param name="viewModelBuilder">View model builder.</param>
        /// <param name="viewBuilder">View builder.</param>
        /// <param name="messageBoxProvider">Message box provider.</param>
        /// <param name="educationCache">Education cache.</param>
        public EducationViewModel(
            IUnitOfWork unitOfWork,
            IViewModelBuilder viewModelBuilder,
            IViewBuilder viewBuilder,
            IMessageBoxProvider messageBoxProvider,
            IEducationCache educationCache)
        {
            this.unitOfWork         = unitOfWork;
            this.viewModelBuilder   = viewModelBuilder;
            this.viewBuilder        = viewBuilder;
            this.messageBoxProvider = messageBoxProvider;
            this.educationCache     = educationCache;

            Task.Factory.StartNewWithDefaultCulture(this.UpdateData);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="StaffDialogViewModel"/> class.
        /// </summary>
        /// <param name="unitOfWork">Unit of work.</param>
        /// <param name="messageBoxProvider">Message box provider.</param>
        /// <param name="genderCache">Gender cache.</param>
        /// <param name="positionCache">Position cache.</param>
        /// <param name="educationCache">Education cache.</param>
        /// <param name="mode">Mode (Add/Edit).</param>
        /// <param name="model">Staff model.</param>
        public StaffDialogViewModel(
            IUnitOfWork unitOfWork,
            IMessageBoxProvider messageBoxProvider,
            IGenderCache genderCache,
            IPositionCache positionCache,
            IEducationCache educationCache,
            WorkModeType mode,
            StaffModel model = null)
            : base(mode)
        {
            this.unitOfWork         = unitOfWork;
            this.messageBoxProvider = messageBoxProvider;
            this.genderCache        = genderCache;
            this.positionCache      = positionCache;
            this.educationCache     = educationCache;

            Task.Factory.StartNewWithDefaultCulture(() => this.Load(model));
        }