| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- 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 Core.Mes.Client.Comm.Tool;
- using Infragistics.Win.UltraWinEditors;
- using Core.Mes.Client.Comm.Server;
- using System.Collections;
- using Core.Mes.Client.Comm.Control;
- using Infragistics.Win.UltraWinGrid;
- namespace Core.StlMes.Client.Lims.Port
- {
- public partial class AddPhyRItems : FrmBase
- {
- private OpeBase _ob;
- public OpeBase Ob
- {
- get { return _ob; }
- set { _ob = value; }
- }
- private string strMaxItems;//大项代码
- public string StrMaxItems
- {
- get { return strMaxItems; }
- set { strMaxItems = value; }
- }
- private string strMinItems;//检验项代码
- public string StrMinItems
- {
- get { return strMinItems; }
- set { strMinItems = value; }
- }
- private UltraGridRow ugRow;//选择的Row 返回AddPhyItems
- public UltraGridRow UgRow
- {
- get { return ugRow; }
- set { ugRow = value; }
- }
- public AddPhyRItems()
- {
- InitializeComponent();
- }
- public AddPhyRItems(OpeBase ob, string strMaxItems, string strMinItems)
- {
- InitializeComponent();
- this._ob = ob;
- this.strMaxItems = strMaxItems;
- this.strMinItems = strMinItems;
- }
- private void AddPhyRItems_Load(object sender, EventArgs e)
- {
- QueryPhyRItems();
- QueryPhyItems();//查询检验项补充项
- }
- //查询理化项目方向、温度、尺寸信息
- private void QueryPhyRItems()
- {
- try
- {
- ArrayList al = new ArrayList();
- al.Add(strMaxItems);
- al.Add(strMinItems);
- DataTable dt = PublicServer.GetData("com.steering.mes.port.mil.FrmMilConfirmItems.QueryPhyRItems",
- new Object[] { al }, this._ob);
- if (dt.Rows.Count == 0)
- {
- return;
- }
- GridHelper.CopyDataToDatatable(dt, dataTable1, true);
- //GridHelper.RefreshAndAutoSize(ultraGrid1);
- }
- catch (Exception ex)
- {
- MessageUtil.ShowError(ex.Message);
- }
- }
- //查询检验项补充项
- private void QueryPhyItems()
- {
- QueryPhyItems_sub("A", ultraF);
- QueryPhyItems_sub("B", ultraW);
- QueryPhyItems_sub("C", ultraC);
- }
- private void QueryPhyItems_sub(string itemStyle, UltraComboEditor cmb)
- {
- try
- {
- ArrayList list = new ArrayList();
- list.Add(itemStyle);
- DataTable dt = PublicServer.GetData("com.steering.mes.port.mil.FrmMilConfirmItems.QueryPhyItems",
- new object[] { list }, this._ob);
- cmb.DataSource = dt;
- cmb.DisplayMember = "ITEM_NAME";
- cmb.ValueMember = "ITEM_CODE";
- ClsBaseInfo.SetComboItemHeight(cmb);
- }
- catch (Exception ex)
- {
- MessageUtil.ShowWarning(ex.Message);
- }
- }
- private void ultraGrid1_DoubleClick(object sender, EventArgs e)
- {
- this.ugRow = ultraGrid1.ActiveRow;
- this.DialogResult = DialogResult.OK;
- }
- }
- }
|