SalesGlCodeLookupGeneratorGenerator.cs 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. using System.Linq;
  2. using InABox.Core;
  3. namespace Comal.Classes
  4. {
  5. public class SalesGlCodeLookupGeneratorGenerator : BaseGLCodeLookupGenerator
  6. {
  7. public SalesGlCodeLookupGeneratorGenerator(object[] items) : base(items)
  8. {
  9. }
  10. protected override Filter<GLCode> CreateFilter()
  11. {
  12. return new Filter<GLCode>(x => x.Income).IsEqualTo(true);
  13. }
  14. }
  15. // public class GLCodeLookups : EntityLookup<GLCode>, ILookupDefinition<GLCode, BillLine>, ILookupDefinition<GLCode, InvoiceLine>
  16. // {
  17. // public Filter<GLCode> DefineFilter(BillLine[] items)
  18. // {
  19. // if (items.Any())
  20. // return new Filter<GLCode>(x => x.Hidden).IsEqualTo(false).And(x => x.Expense).IsEqualTo(true);
  21. // return null;
  22. // }
  23. //
  24. // Columns<BillLine> ILookupDefinition<GLCode, BillLine>.DefineFilterColumns()
  25. // => new Columns<BillLine>();
  26. //
  27. // public Filter<GLCode> DefineFilter(InvoiceLine[] items)
  28. // {
  29. // if (items.Any())
  30. // return new Filter<GLCode>(x => x.Hidden).IsEqualTo(false).And(x => x.Income).IsEqualTo(true);
  31. // return null;
  32. // }
  33. //
  34. // Columns<InvoiceLine> ILookupDefinition<GLCode, InvoiceLine>.DefineFilterColumns()
  35. // => new Columns<InvoiceLine>();
  36. //
  37. // public override Columns<GLCode> DefineColumns()
  38. // {
  39. // return new Columns<GLCode>(
  40. // x => x.ID,
  41. // x => x.Code,
  42. // x => x.Description
  43. // );
  44. // }
  45. //
  46. // public override Filter<GLCode> DefineFilter()
  47. // {
  48. // return new Filter<GLCode>(x => x.Hidden).IsEqualTo(false);
  49. // }
  50. //
  51. // public override SortOrder<GLCode> DefineSortOrder()
  52. // {
  53. // return new SortOrder<GLCode>(x => x.Code);
  54. // }
  55. // }
  56. }