Query_SOP.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. dh.ExecuteSql("update craftmaterial set cm_status=-1 where cm_barcode='" + Sn.Text + "'", "update");
  36. MessageBox.Show("解绑成功");
  37. //DataTable dt = (DataTable)dh.ExecuteSql("select ms_prodcode from makeserial where ms_sncode='" + Sn.Text + "'", "select");
  38. //if (dt.Rows.Count > 0)
  39. //{
  40. // string prodcode = dt.Rows[0]["ms_prodcode"].ToString();
  41. // string FilePath = dh.getFieldDataByCondition("SOPDETAIL left join sop on so_id=sod_soid ", "sod_path", "so_prodcode='" + prodcode + "' and sod_stepcode='" + User.CurrentStepCode + "'").ToString();
  42. // System.Diagnostics.Process.Start(FilePath);
  43. //}
  44. //else
  45. //{
  46. // MessageBox.Show("序列号" + Sn.Text + "不存在");
  47. //}
  48. }
  49. }
  50. }
  51. }