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(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 Selected() { return new Dictionary(); } public void Heartbeat(TimeSpan time) { } #endregion } }