コード例 #1
0
 public ProjectDto(Project project)
 {
     Id = project.Id;
     Name = project.Name;
     Price = project.Price.ToString("C0");
     Stage = project.Stage.ToString();
 }
コード例 #2
0
 public ProjectInvolement(Project project, Employee employee, Role role, bool isMainForEmployee)
     : this()
 {
     Project = project;
     Employee = employee;
     Role = role;
     IsMainForEmployee = isMainForEmployee;
 }
コード例 #3
0
        public NewProjectViewModel()
        {
            _repository = new ProjectRepository();
            Project = new Project();
            MainProperties = new ProjectMainPropertiesViewModel(Project);

            OkCommand = new Command(() => MainProperties.IsValid(), Save);
            CancelCommand = new Command(() => DialogResult = false);
        }
コード例 #4
0
        public ExistingProjectViewModel(Project project)
        {
            _repository = new ProjectRepository();
            Project = project;

            var mainProperties = new ProjectMainPropertiesViewModel(project);
            Tabs = new List<ViewModel>
            {
                mainProperties,
                new ProjectEmployeeListViewModel(project)
            };

            OkCommand = new Command(() => mainProperties.IsValid(), Save);
            CancelCommand = new Command(() => DialogResult = false);
        }
コード例 #5
0
 public ProjectEmployeeListViewModel(Project project)
 {
     _project = project;
 }
コード例 #6
0
 public ProjectMainPropertiesViewModel(Project project)
 {
     Project = project;
     WasPromoted = project.Stage == ProjectStage.Closed;
     PromoteProjectCommand = new Command(() => !WasPromoted, PromoteProject);
 }