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.configureEntity; using Core.Mes.Client.Comm.Control; using com.hnshituo.pur.vo; using Core.Mes.Client.Comm.Tool; using Infragistics.Win.UltraWinGrid; using Pur.Entity; namespace Pur.Pop_upWindow { public partial class FrmPopStandards : FrmPmsBase { public string QstrStandardsId = "";//标准编号ID public string QstrStandardsCode = "";//标准编号编码 public FrmPopStandards(OpeBase ob) { InitializeComponent(); this.ob = ob; } /// /// 查询标准编号 /// /// public void get_PurStandards() { PurStandardsEntity StandardsEntity = new PurStandardsEntity(); StandardsEntity.Validflag = "1"; DataTable dt = this.execute("com.hnshituo.pur.configure.service.StandardsService", "find", new object[] { StandardsEntity, 0, 0 }); //按创建时间降序 if (dt.Rows.Count > 0) { dt.DefaultView.Sort = "CREATETIME DESC"; dt = dt.DefaultView.ToTable(); } GridHelper.CopyDataToDatatable(ref dt, ref dataTable1, true);//绑定物料分类表 } /// /// 筛选单位代码 /// /// /// private void txt_ITEM_UOM_CONEFFICIENT_TextChanged(object sender, EventArgs e) { foreach (UltraGridRow ugr in ultraGrid1.Rows) { if (ugr.Cells["VALIDFLAG"].Value.ToString().Equals("1")) { if (ugr.Cells["STANDARDSID"].Value.ToString().Contains(txt_STANDARDS_ID.Text) && ugr.Cells["STANDARDSCODE"].Value.ToString().Contains(txt_STANDARDS_CODE.Text)) { ugr.Hidden = false; //显示行 } else { ugr.Hidden = true; //隐藏行 } } } } private void FrmPopStandards_Load(object sender, EventArgs e) { get_PurStandards(); } /// /// 按钮控件 /// /// /// private void barsManagerButon_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e) { switch (e.Tool.Key.ToString()) { case "conFirmation": { if (ultraGrid1.ActiveRow != null) { if (ultraGrid1.ActiveRow == null || ultraGrid1.ActiveRow.Hidden == true) { MessageUtil.ShowTips("请选择一条数据"); return; } QstrStandardsId = ultraGrid1.ActiveRow.Cells["StandardsId"].Value.ToString(); QstrStandardsCode = ultraGrid1.ActiveRow.Cells["StandardsCode"].Value.ToString(); this.Close(); } } break; case "ESC": { this.Close(); } break; } } } }