SelectControl.cs 963 B

12345678910111213141516171819202122232425262728293031323334353637
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Web.UI;
  6. namespace Ant.Frame
  7. {
  8. public class SelectControl
  9. {
  10. BaseControl cs = null;
  11. Control control = new Control();
  12. //根据条件返回相应的对象
  13. public SelectControl(ControlType type, Control con)
  14. {
  15. switch (type)
  16. {
  17. //case ControlType.Ext:
  18. // cs = new ExtControl(con); break;
  19. case ControlType.Net:
  20. cs = new NetControl(con); break;
  21. default:
  22. cs = new NetControl(con); break;
  23. }
  24. control = con;
  25. }
  26. public void SetResult(List<object> enty, string lbl)
  27. {
  28. cs.SetterControl(enty, lbl);
  29. }
  30. public T GetResult<T>(T enty, string lbl)
  31. {
  32. return cs.GetterControl<T>(enty, lbl);
  33. }
  34. }
  35. }