frmMultipleFileImportDetail.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.IO;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Windows.Forms;
  10. namespace LYFZ.Software.MainBusiness.MultipleFileImport
  11. {
  12. public partial class frmMultipleFileImportDetail : LYFZ.ComponentLibrary.BaseContentsFormMain
  13. {
  14. public frmMultipleFileImportDetail()
  15. {
  16. InitializeComponent();
  17. }
  18. public void BindImportModel(frmFileImportModel mod)
  19. {
  20. lab_title.Text = "订单号:" + mod.erpOrder.Ord_Number + " [" + mod.cusName + "] " + mod.takenName + "[" + mod.directoryTypeDis() + "]" + "";
  21. lab_msg.Text = mod.errorMsg;
  22. foreach (var item in mod.local_Path)
  23. {
  24. listViewEx1.Items.Add(
  25. new ListViewItem(new string[] {
  26. item.local_Path,
  27. item.code == 0 ? "未上传" : item.code == 1 ? "成功" : item.code == -1 ? "失败" : "" ,
  28. item.upload_Msg
  29. })
  30. );
  31. }
  32. }
  33. private void btn_Log_Click(object sender, EventArgs e)
  34. {
  35. string[] files = Directory.GetFiles(Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "/Logs/ImportThread/");
  36. frmMultipleFileLogs frmLog = new frmMultipleFileLogs();
  37. frmLog.LoadFileList(files);
  38. frmLog.Show();
  39. }
  40. }
  41. }