JobStagesGrid.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. using System;
  2. using Comal.Classes;
  3. using InABox.Clients;
  4. using InABox.Core;
  5. using InABox.DynamicGrid;
  6. namespace PRSDesktop
  7. {
  8. public class JobStagesGrid : DynamicGrid<JobStage>
  9. {
  10. protected override void Init()
  11. {
  12. }
  13. protected override void DoReconfigure(FluentList<DynamicGridOption> options)
  14. {
  15. }
  16. protected override void DeleteItems(params CoreRow[] rows)
  17. {
  18. foreach (var row in rows) new Client<JobStage>().Delete(row.ToObject<JobStage>(), "Deleting Job Stage");
  19. }
  20. protected override JobStage LoadItem(CoreRow row)
  21. {
  22. return row.ToObject<JobStage>();
  23. }
  24. protected override void Reload(Filters<JobStage> criteria, Columns<JobStage> columns, ref SortOrder<JobStage> sort,
  25. Action<CoreTable, Exception> action)
  26. {
  27. new Client<JobStage>().Query(criteria.Combine(), columns, sort, action);
  28. }
  29. public override void SaveItem(JobStage item)
  30. {
  31. new Client<JobStage>().Save(item, ""); //, (o, e) => { });
  32. }
  33. }
  34. }