| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- using System;
- using System.Collections.Generic;
- using System.Drawing;
- using System.Linq;
- using System.Windows.Forms;
- using Core.Mes.Client.Comm.Control;
- using Core.Mes.Client.Comm.Tool;
- using Core.StlMes.Client.Mcp.Treatment.Entity;
- using CoreFS.CA06;
- namespace Core.StlMes.Client.Mcp.Treatment.Report
- {
- public partial class FrmRunTimeRpt : FrmBase
- {
- public FrmRunTimeRpt()
- {
- InitializeComponent();
- this.IsLoadUserView = true;
- }
- private string[] plineCodes = null;
- protected override void OnLoad(EventArgs e)
- {
- base.OnLoad(e);
- plineCodes = comm.InitDropPlinePower("F", cboPline, this.ValidDataPurviewIds, ob);
- EntityHelper.ShowGridCaption<MchRunEntity>(ultraGrid1.DisplayLayout.Bands[0]);
- comm.RefreshAndAutoSizeWithHeader(ultraGrid1);
- dtBathYear.Value = DateTime.Now;
- }
- public override void ToolBar_Click(object sender, string ToolbarKey)
- {
- switch (ToolbarKey)
- {
- case "Query":
- Query();
- break;
- case "Export":
- Export();
- break;
- case "Close":
- this.Close();
- break;
- }
- }
-
- private void Export()
- {
- string title = "";
- title += "管加工半成品收发存" + dtBathYear.Value.ToString("yyyyMM");
-
- GridHelper.ulGridToExcel(ultraGrid1, title);
-
- }
- private void Query()
- {
- WaitingForm2 wf = new WaitingForm2("正在查询,请稍候....");
- try
- {
- this.Cursor = Cursors.WaitCursor;
- var CurrentlistEntity =
- EntityHelper.GetData<MchRunEntity>( "com.steering.mes.mcp.common.FrmHttRunTimeRpt.doQuery",
- new object[]
- {
- dtBathYear.Value.ToString("yyyyMM"),
- ucePlineCode.Checked && cboPline.CheckedItems.Count > 0
- ? cboPline.CheckedItems.Select(p => p.DataValue.ToString()).ToArray()
- : plineCodes,
- uceJudgeStove.Checked?txtJudgeStove.Text:""
- }, ob);
- ydmHttInitialEntityPlusBindingSource.DataSource = CurrentlistEntity;
- comm.RefreshAndAutoSizeWithHeader(ultraGrid1, new string[] { "" });
- }
- catch (Exception)
- {
-
- }
- finally
- {
- wf.Close();
- this.Cursor = Cursors.Default;
- }
-
- }
-
- }
- }
|