FlileDeletecomm.cs 989 B

123456789101112131415161718192021222324252627282930313233
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Windows.Forms;
  6. using System.Collections;
  7. using Core.Mes.Client.Comm.Server;
  8. using Core.Mes.Client.Comm;
  9. namespace Core.Mes.Client.Comm.Server
  10. {
  11. public partial class FlileDeletecomm
  12. {
  13. public static bool FlileDelete(string pathName)
  14. {
  15. if (MessageBox.Show("是否确定要进行删除操作", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
  16. {
  17. bool isSuccess = Core.Mes.Client.Comm.Server.FileHelper.Delete(pathName); ;
  18. if (isSuccess)
  19. {
  20. MessageBox.Show("删除成功", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
  21. }
  22. else
  23. {
  24. throw new MESException("服务端处理失败!");
  25. }
  26. }
  27. return true;
  28. }
  29. }
  30. }