Пример #1
0
		public ReportSettingsViewModel(TimeTrackFilter timeTrackFilter, List<TimeTrackEmployeeResult> timeTrackEmployeeResults, Guid chiefUID, Guid departmentChiefUID, Guid hrChiefUID, Guid organisationUid, Guid departmentUid)
		{
			Title = "Настройка печати отчета Т-13";
			TimeTrackFilter = timeTrackFilter;
			TimeTrackEmployeeResults = timeTrackEmployeeResults;
			DateTime = DateTime.Now;
			FillViewModel = new EmployeeSelectationViewModel(chiefUID, new EmployeeFilter { OrganisationUIDs = new List<Guid> { organisationUid } });
			LeadViewModel = new EmployeeSelectationViewModel(departmentChiefUID, new EmployeeFilter { DepartmentUIDs = new List<Guid> { departmentUid } });
			HRViewModel = new EmployeeSelectationViewModel(hrChiefUID, new EmployeeFilter { OrganisationUIDs = new List<Guid> { organisationUid } });
		}
		public OrganisationDetailsViewModel(OrganisationsViewModel organisationsViewModel, Organisation organisation = null)
		{
			OrganisationsViewModel = organisationsViewModel;
			if (organisation == null)
			{
				IsNew = true;
				Title = "Создание новой организации";
				OrganisationDetails = new OrganisationDetails()
				{
					Name = "Организация",
				};
				OrganisationDetails.UserUIDs.Add(ClientManager.CurrentUser.UID);
			}
			else
			{
				Title = string.Format("Свойства организации: {0}", organisation.Name);
				OrganisationDetails = OrganisationHelper.GetDetails(organisation.UID);

			}
			CopyProperties();
			ChiefViewModel = new EmployeeSelectationViewModel(OrganisationDetails.ChiefUID, new EmployeeFilter { OrganisationUIDs = new List<Guid> { OrganisationDetails.UID } });
			HRChiefViewModel = new EmployeeSelectationViewModel(OrganisationDetails.HRChiefUID, new EmployeeFilter { OrganisationUIDs = new List<Guid> { OrganisationDetails.UID } });
		}