| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Windows.Controls;
- using Comal.Classes;
- using InABox.Core;
- namespace PRSDesktop
- {
- public partial class JobAssignmentPanel : UserControl, IBasePanel, IJobControl, IDataModelSource
- {
- public JobAssignmentPanel()
- {
- InitializeComponent();
- }
- #region IJobPanel
-
- public Guid JobID
- { get => Activities.JobID;
- set
- {
- Activities.JobID = value;
- Assignments.JobID = value;
- }
- }
-
- #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()
- {
-
- }
- 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
- }
- }
|