Query_OperationInstruction.cs 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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 UAS_MES.DataOperate;
  10. using UAS_MES.Entity;
  11. using UAS_MES.PublicMethod;
  12. namespace UAS_MES.Query
  13. {
  14. public partial class Query_OperationInstruction : Form
  15. {
  16. DataHelper dh;
  17. public Query_OperationInstruction()
  18. {
  19. InitializeComponent();
  20. }
  21. private void Query_OperationInstruction_Load(object sender, EventArgs e)
  22. {
  23. dh = SystemInf.dh;
  24. }
  25. private void Query_OperationInstruction_SizeChanged(object sender, EventArgs e)
  26. {
  27. sn_label.Location = new Point(20, 20);
  28. SnCode.Location = new Point(sn_label.Location.X + sn_label.Width + 20, 20);
  29. FileList_label.Location = new Point(SnCode.Location.X + SnCode.Width + 20, 20);
  30. FileList.Location = new Point(FileList_label.Location.X + FileList_label.Width + 20, 20);
  31. }
  32. private void SnCode_KeyDown(object sender, KeyEventArgs e)
  33. {
  34. if (e.KeyCode == Keys.Enter)
  35. {
  36. string MachineType = dh.getFieldDataByCondition("makeserial left join product on pr_code=ms_prodcode", "pr_machinetype", "ms_id=(select max(ms_id) from makeserial where ms_sncode='" + SnCode.Text + "')").ToString();
  37. //string FilePath = dh.getFieldDataByCondition("", "", "").ToString();
  38. }
  39. }
  40. private void OpenFile_Click(object sender, EventArgs e)
  41. {
  42. switch (BaseUtil.GetFileSuffix(FileList.Text))
  43. {
  44. case "MP4":
  45. //Query.Query_ShowVideo ShowVideo = new Query_ShowVideo(FileList.Text);
  46. //ShowVideo.Show();
  47. break;
  48. case "PDF":
  49. Query.Query_ShowPDF ShowPdf = new Query_ShowPDF(FileList.Text);
  50. ShowPdf.Show();
  51. break;
  52. case "JPEG":
  53. Query.Query_ShowPicture ShowPic = new Query_ShowPicture(FileList.Text);
  54. ShowPic.Show();
  55. break;
  56. case "JPG":
  57. Query.Query_ShowPicture ShowPic1 = new Query_ShowPicture(FileList.Text);
  58. ShowPic1.Show();
  59. break;
  60. default:
  61. break;
  62. }
  63. }
  64. }
  65. }