| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- 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 QCM030716 : FrmBase
- {
- public QCM030716()
- {
- 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";
- if (lock_id.Contains("Y"))
- {
- ccp.MethodName = "getToleranceInfoNewY";
- }
- else
- {
- 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 = "getQcmJudgeMeasureJ";
- 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();
- }
- }
- }
|