| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- 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 Pur.Entity;using Pur.Entity;
- using Infragistics.Win.UltraWinGrid;
- using Core.Mes.Client.Comm.Control;
- using Core.Mes.Client.Comm;
- using Core.Mes.Client.Comm.Tool;
- using Pur.Entity.configureEntity;
- using Infragistics.Win;
- using com.hnshituo.com.vo;
- namespace Pur.Pop_upWindow
- {
- public partial class FrmPop_upChem : FrmPmsBase
- {
- public FrmPop_upChem()
- {
- InitializeComponent();
- }
- public FrmPop_upChem(OpeBase ob)
- {
- this.ob = ob;
- InitializeComponent();
- }
- /** 元素编码 */
- private string chemCode;
- public string ChemCode
- {
- get { return chemCode; }
- set { chemCode = value; }
- }
- /** 元素名称 */
- private string chemName;
- public string ChemName
- {
- get { return chemName; }
- set { chemName = value; }
- }
- private void FrmPop_upChem_Load(object sender, EventArgs e)
- {
- doQuery();
- }
- private void doConfirm()
- {
- UltraGridRow uge = ultraGrid1.ActiveRow;
- this.chemCode = uge.Cells["chemCode"].Value.ToString();
- this.chemName = uge.Cells["chemName"].Value.ToString();
- this.Close();
-
- }
- private void doClose()
- {
- this.Close();
- }
- private void doQuery()
- {
- try
- {
- BaseChem bc = new BaseChem();
- bc.Validflag = "1";
- bc.ChemCode = QchemCode.Text.ToString().Trim();
- bc.ChemName = QchemName.Text.ToString().Trim();
-
- DataTable dt = this.execute<DataTable>("com.hnshituo.pur.configure.service.BaseChemService", "find", new object[] { bc, 0, 0 });
- GridHelper.CopyDataToDatatable(dt, dataTable1, true);
- }
- catch (Exception ex)
- {
- MessageBox.Show("查询失败:" + ex.Message, "提示");
- return;
- }
- }
- private void barsManagerButon_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
- {
- switch (e.Tool.Key.ToString())
- {
- case "Query":
- {
- doQuery();
- }
- break;
- case "conFirmation":
- {
- doConfirm();
- }
- break;
- case "ESC":
- {
- this.Close();
- }
- break;
- }
- }
- private void ultraGrid1_DoubleClickRow(object sender, DoubleClickRowEventArgs e)
- {
- UltraGridRow uge = e.Row;
- this.chemCode = uge.Cells["chemCode"].Value.ToString();
- this.chemName = uge.Cells["chemName"].Value.ToString();
- this.Close();
- }
- }
- }
|