12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Threading.Tasks;
- using Comal.Classes;
- using InABox.Core;
- using InABox.DynamicGrid;
- using InABox.Integration.Logikal;
- using PRSDesktop.Integrations.Logikal;
- namespace PRSDesktop;
- public class LogikalPhasesGrid : LogikalGrid<LogikalPhase>
- {
-
- public Guid ProjectID { get; set; }
- protected override void Init()
- {
- base.Init();
- HiddenColumns.Add(x => x.ID);
- }
-
- protected override DynamicGridColumns LoadColumns()
- {
- var result = new DynamicGridColumns();
- result.Add<LogikalPhase>(x => x.Title, 0, "Phases", "", Alignment.MiddleLeft);
- return result;
- }
- protected override void DoReconfigure(DynamicGridOptions options)
- {
- base.DoReconfigure(options);
- options.FilterRows = true;
- options.HideDatabaseFilters = true;
- }
- protected override void DoGet(LogikalClient client, IProgress<string> progress)
- {
- Items = new List<LogikalPhase>();
- if (ProjectID != Guid.Empty)
- {
- client.GetPhases(ProjectID)
- .Always(NotifyResponseReceived)
- .Success<LogikalPhasesResponse<LogikalPhase>>(p =>
- {
- Items = p.Phases.ToList();
- });
- }
- }
- }
|