| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- using CoreFS.CA06;
- using Infragistics.Win.UltraWinGrid;
- namespace Core.LZMes.Client.QCM.QCM03
- {
- public partial class QCM030703 : FrmBase
- {
- public QCM030703()
- {
- InitializeComponent();
- }
- public string lock_id = "";
- private void QCM030703_Load(object sender, EventArgs e)
- {
- try
- {
- this.dataSet6.Clear();
- string sic = lock_id;
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0303.QcmJudgeMeasureServiceImpl";
- ccp.MethodName = "getToleranceInfo";
- ccp.ServerParams = new object[] { sic };
- ccp.SourceDataTable = this.dataSet6.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- this.dataSet7.Clear();
- ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0303.QcmJudgeMeasureServiceImpl";
- ccp.MethodName = "getQcmJudgeMeasure";
- ccp.ServerParams = new object[] { sic };
- ccp.SourceDataTable = this.dataSet7.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- RefreshAndAutoSize(ultraGrid6);
- RefreshAndAutoSize(ultraGrid7);
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- MessageBox.Show("系统出错,请联系管理人员", "警告");
- }
- }
- public static void RefreshAndAutoSize(UltraGrid ultraGrid)
- {
- try
- {
- ultraGrid.BeginUpdate();
- foreach (UltraGridBand band in ultraGrid.DisplayLayout.Bands)
- {
- foreach (UltraGridColumn column in band.Columns)
- {
- column.PerformAutoResize(PerformAutoSizeType.AllRowsInBand, band.ColHeadersVisible ? true : false);
- }
- }
- }
- catch { }
- ultraGrid.EndUpdate();
- }
- }
- }
|