FrmTqnqc13t.cs 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Collections;
  5. using System.Data;
  6. using System.Drawing;
  7. using System.IO;
  8. using System.Linq;
  9. using System.Reflection;
  10. using System.Text;
  11. using System.Windows.Forms;
  12. using Core.Mes.Client.Comm.Control;
  13. using Core.Mes.Client.Comm.Format;
  14. using Core.Mes.Client.Comm.Tool;
  15. using CoreFS.CA06;
  16. using Infragistics.Win;
  17. using Infragistics.Win.UltraWinGrid;
  18. using NPOI.SS.UserModel;
  19. using Core.StlMes.Client.PnCost.Models;
  20. using Core.Mes.Client.Comm.Server;
  21. namespace Core.StlMes.Client.PnCost
  22. {
  23. public partial class FrmTqnqc13T : FrmBase
  24. {
  25. #region 定义变量
  26. public FrmTqnqc13T(OpeBase ob)
  27. {
  28. InitializeComponent();
  29. this.ob = ob;
  30. }
  31. public string cx_ = "", rpcede_ = "";
  32. private DataTable dtgang;
  33. #endregion
  34. private void 查询_Click(object sender, EventArgs e)
  35. {
  36. string cx = "";
  37. string rpcede = "";
  38. if (this.checkCxName.Checked)
  39. {
  40. cx = this.CxText.Text;
  41. }
  42. if (this.checkRpCode.Checked)
  43. {
  44. rpcede_ = this.RpCodeText.Text;
  45. }
  46. DataTable dtPsc = ServerHelper.GetData("com.steering.mes.cost.FrmProductManage.queryBaseN13", new Object[] { cx, rpcede }, this.ob);
  47. if (dtPsc != null && dtPsc.Rows.Count > 0)
  48. {
  49. GridHelper.CopyDataToDatatable(ref dtPsc, ref dataTable1, true);
  50. GridHelper.RefreshAndAutoSizeExceptColumns(ultraGrid1);
  51. }
  52. else
  53. {
  54. dataTable1.Rows.Clear();
  55. }
  56. }
  57. private void ultraGrid1_DoubleClick(object sender, EventArgs e)
  58. {
  59. ultraGrid1.UpdateData();
  60. UltraGridRow ugr = ultraGrid1.ActiveRow;
  61. if (ugr == null) return;
  62. cx_ = ugr.Cells["WHOLE_BACKLOG_NAME"].Text.Trim();
  63. rpcede_ = ugr.Cells["RP_CODE"].Text.Trim();
  64. this.DialogResult = DialogResult.OK;
  65. this.Close();
  66. }
  67. }
  68. }