12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Windows.Controls;
- using Comal.Classes;
- using System.ComponentModel;
- using System.ComponentModel;
- using InABox.Core;
- namespace PRSDesktop
- {
- public partial class JobAssignmentPanel : UserControl, IBasePanel, IJobControl, IDataModelSource
- {
- public JobAssignmentPanel()
- {
- InitializeComponent();
- }
- #region IJobPanel
-
- public Job Job
- {
- get => Activities.Job;
- set
- {
- Activities.Job = value;
- Assignments.Job = value;
- }
- }
-
- public JobPanelSettings Settings { get; set; }
-
- #endregion
-
- #region IDataModelSource
-
- public event DataModelUpdateEvent OnUpdateDataModel;
- public string SectionName => "Job Assignments";
- public DataModel DataModel(Selection selection)
- {
- var ids = Assignments.ExtractValues(x => x.ID, selection).ToArray();
- return new AssignmentDataModel(new Filter<Assignment>(x => x.ID).InList(ids));
- }
-
- #endregion
- #region IBasePanel
-
- public void Setup()
- {
- Activities.Refresh(true, false);
- Assignments.Refresh(true, false);
- }
- public void Shutdown(CancelEventArgs? cancel)
- {
-
- }
- public void Refresh()
- {
- Activities.Refresh(false, true);
- Assignments.Refresh(false, true);
- }
- public bool IsReady { get; set; }
-
- public void CreateToolbarButtons(IPanelHost host)
- {
- }
- public Dictionary<string, object[]> Selected()
- {
- return new Dictionary<string, object[]>();
- }
- public void Heartbeat(TimeSpan time)
- {
- }
-
- #endregion
- }
- }
|