dlgOrderAskLook .cs 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using CoreFS.CA06;
  10. using System.Collections;
  11. using Core.Mes.Client.Comm.Server;
  12. using Core.Mes.Client.Comm;
  13. namespace Core.StlMes.Client.Plan.Order
  14. {
  15. public partial class dlgOrderAskLook : Form
  16. {
  17. private OpeBase ob = new OpeBase();
  18. private ArrayList listPath = new ArrayList();
  19. public dlgOrderAskLook()
  20. {
  21. InitializeComponent();
  22. }
  23. /// <summary>
  24. /// 构造
  25. /// </summary>
  26. /// <returns></returns>
  27. public dlgOrderAskLook(OpeBase ops, ArrayList path)
  28. {
  29. this.ob = ops;
  30. listPath = path;
  31. InitializeComponent();
  32. ctrlFileDown1.Button3.Visible = false;
  33. }
  34. public List<FileBean> FlileDownd(string pathName)
  35. {
  36. if (pathName == "") return null;
  37. List<FileBean> list = Core.Mes.Client.Comm.Server.FileHelper.Download(pathName);
  38. return list;
  39. }
  40. private void dlgOrderAskLook_Load(object sender, EventArgs e)
  41. {
  42. try
  43. {
  44. List<FileBean> list = new List<FileBean>();
  45. for (int i = 0; i < listPath.Count; i++)
  46. {
  47. List<FileBean> param = FlileDownd(listPath[i].ToString());
  48. if (param != null && param.Count > 0)
  49. {
  50. list.AddRange(param);
  51. }
  52. }
  53. ctrlFileDown1.ShowByListFileBean(list);
  54. }
  55. catch (Exception ex)
  56. {
  57. if (ex is MESException)
  58. {
  59. MessageBox.Show(((MESException)ex).ExceptionInfo);
  60. }
  61. else
  62. {
  63. MessageBox.Show(ex.Message);
  64. }
  65. }
  66. }
  67. }
  68. }