派纳发送邮件功能
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
3.9 KiB

5 months ago
  1. namespace UFIDA.U9.Cust.WC.POSendMail.PlugUI
  2. {
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Text;
  6. using System.Collections.Specialized;
  7. using UFSoft.UBF.UI.ControlModel;
  8. using UFSoft.UBF.UI.WebControlAdapter;
  9. using System.Web.UI.WebControls.WebParts;
  10. using UFSoft.UBF.UI.IView;
  11. using System.Web.UI;
  12. using System.Web.UI.WebControls;
  13. using UFSoft.UBF.UI.Controls;
  14. using UFSoft.UBF.UI.WebControls;
  15. public class CommonFunction
  16. {
  17. public static void Layout(IContainer container, IUFControl ctrl, uint x, uint y)
  18. {
  19. Layout(container, ctrl, x, y, 1, 1, Unit.Pixel(0), Unit.Pixel(0), true);
  20. }
  21. public static void Layout(IContainer container, IUFControl ctrl, uint x, uint y, int width, int height)
  22. {
  23. Layout(container, ctrl, x, y, 1, 1, Unit.Pixel(width), Unit.Pixel(height), false);
  24. }
  25. public static void Layout(IContainer container, IUFControl ctrl, uint x, uint y, int xspan, int yspan,
  26. Unit width, Unit height, bool isAutoSize)
  27. {
  28. IGridLayout gl = container.Layout as IGridLayout;
  29. if (gl == null) return;
  30. GridLayoutInfo glInfo = new GridLayoutInfo((uint)x, (uint)y, (uint)xspan, (uint)yspan, width, height);
  31. glInfo.AutoSize = isAutoSize;
  32. gl.Controls.Add((Control)ctrl, glInfo);
  33. }
  34. public static IUFControl FindControl(IPart part, string parentControl, string control)
  35. {
  36. IUFCard card = (IUFCard)part.GetUFControlByName(part.TopLevelContainer, parentControl);
  37. if (card == null)
  38. return null;
  39. foreach (IUFControl ctrl in card.Controls)
  40. {
  41. if (ctrl.ID.Equals(control, StringComparison.OrdinalIgnoreCase))
  42. {
  43. return ctrl;
  44. }
  45. }
  46. return null;
  47. }
  48. }
  49. }