QcmZgChemJudgeApplyCtrl.cs 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. using Core.Mes.Client.Comm.Control;
  2. using Core.Mes.Client.Comm.Server;
  3. using Core.StlMes.Client.Judge.Commons;
  4. using Core.StlMes.Client.Judge.Forms;
  5. using CoreFS.CA06;
  6. using System.Data;
  7. using System.Windows.Forms;
  8. namespace Core.StlMes.Client.Judge.Controls
  9. {
  10. public partial class QcmZgChemJudgeApplyCtrl : UserControl
  11. {
  12. private OpeBase _ob;
  13. private JudgeType _judgeType;
  14. private Dal _d;
  15. public QcmZgChemJudgeApplyCtrl(Control container, OpeBase ob, JudgeType judgeType)
  16. {
  17. InitializeComponent();
  18. this._ob = ob;
  19. _judgeType = judgeType;
  20. container.Controls.Add(this);
  21. this.Dock = DockStyle.Fill;
  22. this.BringToFront();
  23. _d = new Dal(ob);
  24. ClsBaseInfo.FillComBaseInfo(ultraComboEditor1, "407401", ob, false);
  25. //判定结果只显示内控合格和不合格。 40740101内控合格 40740102内控不合格
  26. DataTable dt = (DataTable)ultraComboEditor1.DataSource;
  27. for (int i = 0; i < dt.Rows.Count; i++)
  28. {
  29. if (dt.Rows[i]["BASECODE"].ToString() != "40740101"
  30. && dt.Rows[i]["BASECODE"].ToString() != "40740102")
  31. {
  32. dt.Rows[i].Delete();
  33. }
  34. }
  35. dt.AcceptChanges();
  36. ClsBaseInfo.SetComboItemHeight(ultraComboEditor1);
  37. ClsBaseInfo.FillComBaseInfo(ultraComboEditor2, "407402", ob, false);
  38. ClsBaseInfo.FillComBaseInfo(ultraComboEditor3, "407407", ob, false);
  39. ClsBaseInfo.FillComBaseInfo(ultraComboEditor4, "407404", ob, false);
  40. ClsBaseInfo.FillComBaseInfo(ultraComboEditor5, "407406", ob, false);
  41. }
  42. public void QueryBcChem(string batchNo, string judgeStoveNo, string state, string judgeTimeB,
  43. string judgeTimeE, string[] plines, string chemType, string gpSource, string processCode)
  44. {
  45. DataTable dt = _d.GetTableByXmlId("QcmZgJugdeApplyDAL.QueryBcChem", batchNo, judgeStoveNo, state,
  46. judgeTimeB, judgeTimeE, plines.Length, plines, chemType, gpSource, processCode);
  47. GridHelper.CopyDataToDatatable(dt, dataTable1, true);
  48. GridHelper.RefreshAndAutoSizeExceptColumns(ultraGrid1, "memo");
  49. }
  50. public void Clear()
  51. {
  52. dataTable1.Clear();
  53. }
  54. private void ultraTextEditor2_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
  55. {
  56. PopupTextBox popupText = new PopupTextBox(ultraGrid1.ActiveCell.Value.ToString(), 2000);
  57. if (popupText.ShowDialog() == System.Windows.Forms.DialogResult.OK)
  58. {
  59. ultraGrid1.ActiveCell.Value = popupText.TextInfo.Trim();
  60. ultraGrid1.ActiveRow.Update();
  61. }
  62. }
  63. private void ultraGrid1_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
  64. {
  65. e.Cell.Row.Update();
  66. }
  67. }
  68. }