Make_ProcessIn.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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.Make
  13. {
  14. public partial class Make_ProcessIn : Form
  15. {
  16. DataHelper dh;
  17. LogStringBuilder sql = new LogStringBuilder();
  18. AutoSizeFormClass asc = new AutoSizeFormClass();
  19. public Make_ProcessIn()
  20. {
  21. InitializeComponent();
  22. }
  23. private void Special_BoxSplit_Load(object sender, EventArgs e)
  24. {
  25. dh = SystemInf.dh;
  26. asc.controllInitializeSize(this);
  27. }
  28. private void Split_Click(object sender, EventArgs e)
  29. {
  30. if (Pallate.Text != "")
  31. {
  32. dh.ExecuteSql("insert into processin(pi_id,pi_sn,pi_date) values (processin_seq.nextval,'"+Pallate.Text+"',sysdate)", "insert");
  33. OperatResult.AppendText(">>PCBA:" + Pallate.Text + "程序烧录记录完成\n", Color.Green, Pallate);
  34. }
  35. else OperatResult.AppendText(">>录入" + Pallate.Text + "不可为空\n", Color.Red, Pallate);
  36. }
  37. private void Pallate_KeyDown(object sender, KeyEventArgs e)
  38. {
  39. if (e.KeyCode == Keys.Enter)
  40. {
  41. if (Pallate.Text != "")
  42. {
  43. Split_Click(sender, e);
  44. }
  45. else OperatResult.AppendText(">>录入" + Pallate.Text + "不可为空\n", Color.Red, Pallate);
  46. }
  47. }
  48. private void Make_ProcessIn_SizeChanged(object sender, EventArgs e)
  49. {
  50. asc.controlAutoSize(this);
  51. }
  52. }
  53. }