| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using Comal.Classes;
- using InABox.Core;
- using InABox.DynamicGrid;
- namespace PRSDesktop
- {
- public class SupplierPayments : DynamicDataGrid<Payment>, IPanel<Payment>
- {
- public SupplierPayments()
- {
- Options.AddRange(DynamicGridOption.RecordCount, DynamicGridOption.FilterRows, DynamicGridOption.SelectColumns);
- }
- public bool IsReady { get; set; }
- public event DataModelUpdateEvent? OnUpdateDataModel;
- public Dictionary<string, object[]> Selected()
- {
- return new Dictionary<string, object[]> { { typeof(Payment).EntityName(), SelectedRows } };
- }
- public void CreateToolbarButtons(IPanelHost host)
- {
- //
- }
- public string SectionName => "Supplier Payments";
- public DataModel DataModel(Selection selection)
- {
- var ids = ExtractValues(x => x.ID, selection).ToArray();
- return new BaseDataModel<Payment>(new Filter<Payment>(x => x.ID).InList(ids));
- }
- public void Refresh()
- {
- Refresh(false, true);
- }
- public void Setup()
- {
- Refresh(true, false);
- }
- public void Shutdown()
- {
- }
- public void Heartbeat(TimeSpan time)
- {
- }
- public Dictionary<Type, CoreTable> DataEnvironment()
- {
- return new Dictionary<Type, CoreTable>
- {
- { typeof(Payment), Data }
- };
- }
- }
- }
|