| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- 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;
- }
- /// <summary>
- /// 查询标准编号
- /// </summary>
- /// <param name="PurPlanMEntity"></param>
- public void get_PurStandards()
- {
- PurStandardsEntity StandardsEntity = new PurStandardsEntity();
- StandardsEntity.Validflag = "1";
- DataTable dt = this.execute<DataTable>("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);//绑定物料分类表
- }
- /// <summary>
- /// 筛选单位代码
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- 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();
- }
- /// <summary>
- /// 按钮控件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- 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;
- }
- }
- }
- }
|