Query_SOP.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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_NEW.DataOperate;
  10. using UAS_MES_NEW.Entity;
  11. using UAS_MES_NEW.PublicMethod;
  12. namespace UAS_MES_NEW.Query
  13. {
  14. public partial class Query_SOP : Form
  15. {
  16. DataHelper dh = SystemInf.dh;
  17. public Query_SOP()
  18. {
  19. InitializeComponent();
  20. }
  21. private void Export_Click(object sender, EventArgs e)
  22. {
  23. }
  24. //选择导出Excel时是选择导出数据的还是模板
  25. private void ExcelExport(string DataOrTemplet)
  26. {
  27. }
  28. private void Query_SpecialReport_Load(object sender, EventArgs e)
  29. {
  30. }
  31. private void Sn_KeyDown(object sender, KeyEventArgs e)
  32. {
  33. if (e.KeyData == Keys.Enter)
  34. {
  35. DataTable dt = (DataTable)dh.ExecuteSql("select ms_prodcode from makeserial where ms_sncode='" + Sn.Text + "'", "select");
  36. if (dt.Rows.Count > 0)
  37. {
  38. string prodcode = dt.Rows[0]["ms_prodcode"].ToString();
  39. string FilePath = dh.getFieldDataByCondition("SOPDETAIL left join sop on so_id=sod_soid ", "sod_path", "so_prodcode='" + prodcode + "' and sod_stepcode='" + User.CurrentStepCode + "'").ToString();
  40. System.Diagnostics.Process.Start(FilePath);
  41. }
  42. else
  43. {
  44. MessageBox.Show("序列号" + Sn.Text + "不存在");
  45. }
  46. }
  47. }
  48. }
  49. }