StaticDBStruct.cs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Data;
  6. namespace Core.StlMes.Client.Sale.BLL.SaleBusinessMgt.StaticData
  7. {
  8. public class StaticDBStruct
  9. {
  10. public StaticDBStruct()
  11. {
  12. _valueListDB = new Infragistics.Win.ValueList();
  13. _dataTableDB = new DataTable("dtBase");
  14. _dataTableDB.Columns.Add("ID_", typeof(string));
  15. _dataTableDB.Columns.Add("NAME_", typeof(string));
  16. _dataTableDB.Columns.Add("FILTER1_", typeof(string));
  17. _dataTableDB.Columns.Add("FILTER2_", typeof(string));
  18. _dataTableDB.Columns.Add("FILTER3_", typeof(string));
  19. }
  20. private Infragistics.Win.ValueList _valueListDB;
  21. public Infragistics.Win.ValueList ValueListDB
  22. {
  23. get
  24. {
  25. // Deal with valuelist not used in different grid's question
  26. if (_valueListDB != null && _valueListDB.Appearances != null && !_valueListDB.Appearances.Disposed)
  27. this._valueListDB.Appearances.Dispose();
  28. return _valueListDB;
  29. }
  30. }
  31. public Infragistics.Win.ValueList GetValueListDB
  32. {
  33. get
  34. {
  35. return _valueListDB;
  36. }
  37. }
  38. private DataTable _dataTableDB;
  39. public DataTable DataTableDB
  40. {
  41. get
  42. {
  43. return _dataTableDB.Copy();
  44. }
  45. }
  46. public DataTable GetDataTableDB
  47. {
  48. get
  49. {
  50. return _dataTableDB;
  51. }
  52. }
  53. public void Clear()
  54. {
  55. _valueListDB.ValueListItems.Clear();
  56. _dataTableDB.Clear();
  57. }
  58. }
  59. }