12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Windows.Controls;
- using Comal.Classes;
- using InABox.Core;
- namespace PRSDesktop
- {
- /// <summary>
- /// Interaction logic for JobEmployeePanel.xaml
- /// </summary>
- public partial class JobEmployeePanel : UserControl, IPanel<JobEmployee>, IJobControl
- {
- public JobEmployeePanel()
- {
- InitializeComponent();
- Employees.OnChanged += grid => Qualifications.Refresh(false, true);
- }
- public Guid ParentID
- {
- get => Employees.ParentID;
- set
- {
- Employees.ParentID = value;
- Qualifications.ParentID = value;
- }
- }
-
- public JobPanelSettings Settings { get; set; }
- public bool IsReady { get; set; }
- public event DataModelUpdateEvent OnUpdateDataModel;
- public void CreateToolbarButtons(IPanelHost host)
- {
- }
- public string SectionName => "Job Employees";
- public DataModel DataModel(Selection selection)
- {
- var ids = Employees.ExtractValues(x => x.ID, selection).ToArray();
- return new JobEmployeeDataModel(new Filter<JobEmployee>(x => x.ID).InList(ids));
- }
- public void Heartbeat(TimeSpan time)
- {
- }
- public void Refresh()
- {
- Qualifications.Refresh(false, true);
- Employees.Refresh(false, true);
- }
- public Dictionary<string, object[]> Selected()
- {
- return new Dictionary<string, object[]>();
- }
- public void Setup()
- {
- Employees.Refresh(true, false);
- Qualifications.Refresh(true, false);
- }
- public void Shutdown()
- {
- }
- public Dictionary<Type, CoreTable> DataEnvironment()
- {
- return new Dictionary<Type, CoreTable>();
- }
- }
- }
|