using Soneta.Business; using Soneta.Core; using Soneta.Tools; using Soneta.Types; using System; using System.Collections.Generic; using System.Linq; namespace FX2_SP_WORKERS.PrzeksiegowanieKoszty { internal class PrzeksiegowanieKosztyParams : ContextBase { private List listaDefPK = new List(); public PrzeksiegowanieKosztyParams(Context context) : base(context) { //Ustawianie definicji PK listaDefPK = CoreModule.GetInstance(Context).DefDokumentow.WgTypu[TypDokumentu.PKEwidencja].ToList(); defPK = CoreModule.GetInstance(Context).DefDokumentow.WgSymbolu["PKP"]; if (defPK is null) defPK = CoreModule.GetInstance(Context).DefDokumentow.WgSymbolu["PKE"]; if (defPK is null) defPK = listaDefPK.FirstOrDefault(); } //Definicja tworzonego dokumentu PK Ewindecji private DefinicjaDokumentu defPK; [Caption("Definicja PK"), Priority(1), DefaultWidth(25)] public DefinicjaDokumentu DefPK { get => defPK; set { if (value is not null) { defPK = value; OnChanged(EventArgs.Empty); } } } public object GetListDefPK() { return listaDefPK; } } }