e199fa437edfdda356854e9cc073572edee8fdeb.svn-base 2.0 KB

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