FrmModifyNY.cs 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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 CoreFS.CA06;
  10. using System.Collections;
  11. using Infragistics.Win.UltraWinGrid;
  12. using Core.Mes.Client.Comm.Server;
  13. using Core.Mes.Client.Comm.Control;
  14. using Core.Mes.Client.Comm.Tool;
  15. using Infragistics.Win.UltraWinEditors;
  16. using System.Text.RegularExpressions;
  17. using com.steering.mes.fprecall;
  18. namespace Core.StlMes.Client.MilCount
  19. {
  20. public partial class FrmModifyNY : FrmBase
  21. {
  22. public FrmModifyNY()
  23. {
  24. InitializeComponent();
  25. }
  26. public override void ToolBar_Click(object sender, string ToolbarKey)
  27. {
  28. switch (ToolbarKey)
  29. {
  30. case "doQuery":
  31. doQuery();
  32. break;
  33. case "doModify":
  34. Update();
  35. break;
  36. //case "doDelete":
  37. // this.doDeleteOrResume(true);
  38. // break;
  39. //case "doResume":
  40. // this.doDeleteOrResume(false);
  41. // break;
  42. //case "Close":
  43. // this.Close();
  44. //break;
  45. }
  46. }
  47. private void doQuery()
  48. {
  49. string titleName = "";
  50. if (ultraCheckEditor1.Checked)
  51. {
  52. titleName = txt_jzny.Text.Trim();
  53. DataTable dt = ServerHelper.GetData("com.steering.mes.fprecall.coreModifyNY.getLineList", new Object[] { titleName }, this.ob);
  54. GridHelper.CopyDataToDatatable(ref dt, ref this.dataTable1, true);
  55. }
  56. else
  57. {
  58. DataTable dt = ServerHelper.GetData("com.steering.mes.fprecall.coreModifyNY.getLineList_all", null, this.ob);
  59. GridHelper.CopyDataToDatatable(ref dt, ref this.dataTable1, true);
  60. }
  61. GridHelper.RefreshAndAutoSize(this.ultraGrid1);
  62. }
  63. private void Update()
  64. {
  65. ultraGrid1.UpdateData();
  66. ArrayList list = new ArrayList();
  67. ArrayList list1 = new ArrayList();
  68. foreach (Infragistics.Win.UltraWinGrid.UltraGridRow row in ultraGrid1.Rows)
  69. {
  70. if (Convert.ToBoolean(row.Cells["CHK"].Value))
  71. {
  72. String Jzny = txt_UpdateJzjy.Text;
  73. list.Add(Jzny);
  74. String ZGLode = row.Cells["ZGLode"].Value.ToString();
  75. list1.Add(ZGLode);
  76. }
  77. }
  78. ServerHelper.SetData("com.steering.mes.fprecall.coreModifyNY.setUpdateList", new Object[] { list, list1 }, this.ob);
  79. MessageUtil.ShowTips("提交成功!");
  80. doQuery();
  81. }
  82. private void ultraGrid1_ClickCell(object sender, ClickCellEventArgs e)
  83. {
  84. Infragistics.Win.UltraWinGrid.UltraGridRow row = ultraGrid1.ActiveRow;
  85. txt_UpdateJzjy.Text = row.Cells["JZNY"].Value.ToString();
  86. }
  87. }
  88. }