JobLevelGrid.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. namespace PRSDesktop
  2. {
  3. }
  4. //public class JobLevelGrid : DynamicDataGrid<JobLevel>, IJobGrid, IDataModelSource
  5. //{
  6. // public Guid JobID { get; set; }
  7. // public JobLevelGrid() : base()
  8. // {
  9. // Options = new DynamicGridOptions[] { DynamicGridOptions.RecordCount, DynamicGridOptions.SelectColumns, DynamicGridOptions.AddRows, DynamicGridOptions.ExportData, DynamicGridOptions.FilterRows, DynamicGridOptions.MultiSelect, DynamicGridOptions.EditRows, DynamicGridOptions.SortRows, DynamicGridOptions.DeleteRows };
  10. // }
  11. // public event DataModelUpdateEvent OnUpdateDataModel;
  12. // protected override void DoAdd(bool OpenEditorOnDirectEdit = false)
  13. // {
  14. // if (JobID.Equals(Guid.Empty) || JobID.Equals(CoreUtils.FullGuid))
  15. // System.Windows.MessageBox.Show("Please select a Job first!");
  16. // else
  17. // base.DoAdd();
  18. // }
  19. // protected override JobLevel CreateItem()
  20. // {
  21. // var result = base.CreateItem();
  22. // result.Job.ID = JobID;
  23. // return result;
  24. // }
  25. // protected override void Reload(Filters<JobLevel> criteria, Columns<JobLevel> columns, ref SortOrder<JobLevel> sort, Action<CoreTable,Exception> action)
  26. // {
  27. // criteria.Add(new Filter<JobLevel>(x => x.Job.ID).IsEqualTo(JobID));
  28. // base.Reload(criteria, columns, ref sort, action);
  29. // }
  30. // public DataModel DataModel(Selection selection)
  31. // {
  32. // Guid[] ids = ExtractValues<Guid>(x => x.ID, selection).ToArray();
  33. // return new JobLevelDataModel(new Filter<JobLevel>(x => x.ID).InList(ids));
  34. // }
  35. //}