dlgOrderAskDown.cs 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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 Core.StlMes.Client.SaleComm;
  11. using Core.Mes.Client.Comm.Server;
  12. namespace Core.StlMes.Client.SaleOrder
  13. {
  14. public partial class dlgOrderAskDown : Form
  15. {
  16. OpeBase ob = new OpeBase();
  17. /// <summary>
  18. /// 客户编号
  19. /// </summary>
  20. private string pic = "";
  21. public string Pic
  22. {
  23. get { return pic; }
  24. set { pic = value; }
  25. }
  26. private List<string> pathList = new List<string>();
  27. public List<string> PathList
  28. {
  29. get { return pathList; }
  30. set { pathList = value; }
  31. }
  32. public Button DeleteButton
  33. {
  34. get { return ctrlFileDown1.Button3; }
  35. }
  36. private string flag = "0";
  37. public dlgOrderAskDown()
  38. {
  39. InitializeComponent();
  40. }
  41. public dlgOrderAskDown(OpeBase ops, string pic)
  42. {
  43. this.ob = ops;
  44. this.pic = pic;
  45. InitializeComponent();
  46. this.ctrlFileDown1.FileChangeEvent += ctrlFileDown1_FileChangeEvent;
  47. }
  48. /// <summary>
  49. /// 批量下载
  50. /// </summary>
  51. /// <param name="ops"></param>
  52. /// <param name="list"></param>
  53. public dlgOrderAskDown(OpeBase ops, List<string> list)
  54. {
  55. this.ob = ops;
  56. this.pathList = list;
  57. InitializeComponent();
  58. flag = "1";
  59. this.ctrlFileDown1.FileChangeEvent += ctrlFileDown1_FileChangeEvent;
  60. this.ctrlFileDown1.FileCloseEvent += ctrlFileDown1_FileCloseEvent;
  61. }
  62. void ctrlFileDown1_FileCloseEvent(string path)
  63. {
  64. this.pic = path;
  65. this.Close();
  66. }
  67. void ctrlFileDown1_FileChangeEvent(string fileName)
  68. {
  69. this.Text = "文件浏览:" + fileName;
  70. }
  71. private void dlgOrderAskDown_Load(object sender, EventArgs e)
  72. {
  73. this.Cursor = Cursors.WaitCursor;
  74. if (flag == "0")
  75. {
  76. ctrlFileDown1.FilePath = pic;
  77. }
  78. else if (flag == "1")
  79. {
  80. ctrlFileDown1.SetPathList(pathList);
  81. this.ctrlFileDown1.BatchFlag = "1";
  82. }
  83. this.Cursor = Cursors.Default;
  84. }
  85. }
  86. }