cf8f622b0720907ad066e11db88b6700f63922f4.svn-base 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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 Infragistics.Win.UltraWinGrid;
  11. namespace Core.LZMes.Client.QCM.QCM03
  12. {
  13. public partial class QCM030703 : FrmBase
  14. {
  15. public QCM030703()
  16. {
  17. InitializeComponent();
  18. }
  19. public string lock_id = "";
  20. private void QCM030703_Load(object sender, EventArgs e)
  21. {
  22. try
  23. {
  24. this.dataSet6.Clear();
  25. string sic = lock_id;
  26. CoreClientParam ccp = new CoreClientParam();
  27. ccp.ServerName = "QCM.QCM03.QCM0303.QcmJudgeMeasureServiceImpl";
  28. ccp.MethodName = "getToleranceInfo";
  29. ccp.ServerParams = new object[] { sic };
  30. ccp.SourceDataTable = this.dataSet6.Tables[0];
  31. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  32. this.dataSet7.Clear();
  33. ccp = new CoreClientParam();
  34. ccp.ServerName = "QCM.QCM03.QCM0303.QcmJudgeMeasureServiceImpl";
  35. ccp.MethodName = "getQcmJudgeMeasure";
  36. ccp.ServerParams = new object[] { sic };
  37. ccp.SourceDataTable = this.dataSet7.Tables[0];
  38. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  39. RefreshAndAutoSize(ultraGrid6);
  40. RefreshAndAutoSize(ultraGrid7);
  41. }
  42. catch (Exception ex)
  43. {
  44. System.Diagnostics.Debug.WriteLine(ex.ToString());
  45. MessageBox.Show("系统出错,请联系管理人员", "警告");
  46. }
  47. }
  48. public static void RefreshAndAutoSize(UltraGrid ultraGrid)
  49. {
  50. try
  51. {
  52. ultraGrid.BeginUpdate();
  53. foreach (UltraGridBand band in ultraGrid.DisplayLayout.Bands)
  54. {
  55. foreach (UltraGridColumn column in band.Columns)
  56. {
  57. column.PerformAutoResize(PerformAutoSizeType.AllRowsInBand, band.ColHeadersVisible ? true : false);
  58. }
  59. }
  60. }
  61. catch { }
  62. ultraGrid.EndUpdate();
  63. }
  64. }
  65. }