Make_Repair.cs 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Data;
  4. using System.Drawing;
  5. using System.Text;
  6. using System.Windows.Forms;
  7. using UAS_MES.DataOperate;
  8. using UAS_MES.Entity;
  9. using UAS_MES.PublicMethod;
  10. namespace UAS_MES.Make
  11. {
  12. public partial class Make_Repair : Form
  13. {
  14. string caller = "Make!Repair";
  15. //记录维修结果的代码值
  16. string Repair_Result;
  17. //记录不良状态码
  18. string badcode;
  19. //记录不良组别
  20. string groupcode;
  21. //判断是否获取了下拉框的值
  22. string mb_id1;
  23. //记录插入操作日志表的sql
  24. string cm_makecode;
  25. //执行插入日志的SQL
  26. string insert_makeprocess = "insert into makeprocess(mp_id,mp_makecode,mp_maid, mp_mscode,mp_sncode,mp_stepcode,mp_stepname,mp_craftcode,mp_craftname,mp_kind,mp_result,mp_indate,mp_inman,mp_wccode,mp_linecode,mp_sourcecode) select MakeProcess_seq.nextval, ma_code,ma_id,ms_code,ms_sncode,mcd_stepcode,mcd_stepname,ma_craftcode,'','维修作业','#',sysdate,'" + User.UserName + "',ma_wccode,ma_linecode,'' from make left join makecraftdetail on mcd_macode=ma_code left join makeserial on ms_makecode=ma_code where ms_sncode=:ms_sncode and ma_code=:ma_code";
  27. //是否获取过下拉框数据
  28. bool GetSelectData = false;
  29. DataHelper dh = null;
  30. LogStringBuilder sql = new LogStringBuilder();
  31. List<string> sqls = new List<string>();
  32. DataTable dt = null;
  33. AutoSizeFormClass asc = new AutoSizeFormClass();
  34. public Make_Repair()
  35. {
  36. InitializeComponent();
  37. //为DBFind配置Call和Form的名称
  38. cr_code.FormName = Name;
  39. cr_code.TableName = "craft";
  40. cr_code.SelectField = "cr_name # 工艺名称 ,cr_code # 工艺编号,cr_prodcode # 物料编号";
  41. cr_code.SetValueField = new string[] { "cr_code" };
  42. cd_stepcode.FormName = Name;
  43. cd_stepcode.TableName = "craftdetail left join step on st_code=cd_stepcode left join craft on cd_crid=cr_id";
  44. cd_stepcode.SetValueField = new string[] { "cd_stepcode" };
  45. cd_stepcode.SelectField = "cd_stepname # 工序名称 ,cd_stepcode # 工序编号,cd_stepno # 执行顺序";
  46. cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "'";
  47. }
  48. private void 维修作业_Load(object sender, EventArgs e)
  49. {
  50. //添加不良信息的静态数据
  51. asc.controllInitializeSize(this);
  52. }
  53. private void GetSNCode_KeyDown(object sender, KeyEventArgs e)
  54. {
  55. if (e.KeyCode == Keys.Enter)
  56. { }
  57. }
  58. private void Make_Repair_SizeChanged(object sender, EventArgs e)
  59. {
  60. asc.controlAutoSize(this);
  61. }
  62. private void BadCodeGrid_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
  63. {
  64. }
  65. }
  66. }