using System; using System.Collections.Generic; using System.Windows.Forms; using Core.Mes.Client.Comm.Control; using Core.Mes.Client.Comm.Tool; using Core.StlMes.Client.PlnSaleOrd.PopupWindow; using CoreFS.CA06; using Infragistics.Win.UltraWinGrid; using Core.StlMes.Client.PlnSaleOrd.Entity; namespace Core.StlMes.Client.PlnSaleOrd { public partial class FrmYieldInOutputQuery : FrmBase { public FrmYieldInOutputQuery() { InitializeComponent(); this.IsLoadUserView = true; } public override void ToolBar_Click(object sender, string ToolbarKey) { switch (ToolbarKey) { case "Query": Query(); break; case "Export": GridHelper.ulGridToExcel(ugData, "产量投入产出价格信息", true); break; case "Close": Close(); break; } } protected override void OnLoad(EventArgs e) { base.OnLoad(e); EntityHelper.ShowGridCaption(ugData.DisplayLayout.Bands[0]); GridHelper.SetAllColumnsActive(ugData); } private void Query() { var Message = ""; var wf = new WaitingForm2("正在查询,请稍候...."); try { Cursor = Cursors.WaitCursor; var dic = new Dictionary(); if (chkTim.Checked) { dic.Add("time", DateTime.Parse(txtMonth.Value.ToString()).ToString("yyyyMM")); } if (chkCarNo.Checked) dic.Add("judgeStoveNo", txtNo.Text); //dic.Add("validflag", new List() { "1" }); QueryBS.DataSource = EntityHelper.GetData( "com.steering.pss.plnsaleord.report.FrmYieldInOutputQuery.doQuery", new object[] { dic }, ob); GridHelper.RefreshAndAutoSizeExceptColumns(ugData, ""); } catch (Exception ex) { if (ex.Message.ToString2() != "") Message = ex.Message; } finally { wf.Close(); Cursor = Cursors.Default; } if (!string.IsNullOrWhiteSpace(Message)) MessageBox.Show(Message); } } }