using Core.Mes.Client.Comm.Control; using Core.Mes.Client.Comm.Server; using CoreFS.CA06; using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace Core.StlMes.Client.YdmPipeReport { public partial class FrmBlancePort : FrmBase { public FrmBlancePort() { InitializeComponent(); } public override void ToolBar_Click(object sender, string ToolbarKey) { switch (ToolbarKey) { case "Query": queryData(); break; case "Export": exportData(); break; case "Close": this.Close(); break; } } /// /// 查询 /// private void queryData() { string bathYear = dtBathYear.Value.ToString("yyyyMM"); DataTable ds = ServerHelper.GetData("com.steering.pss.ydm.Report.FrmBlancePort.queryData", new object[] { bathYear }, ob); GridHelper.CopyDataToDatatable(ref ds, ref dataTable1, true); this.SetStaticsInfo(); CommonMethod.SetGridSumArea(this.ultraGrid1); } private void SetStaticsInfo() { try { if (this.ultraGrid1.Rows.Count == 0) { this.ultraGrid1.DisplayLayout.Bands[0].Summaries.Clear(); } else { ArrayList alist = new ArrayList(); alist.Add("ACT_WEIGHT1"); alist.Add("ACT_WEIGHT2"); alist.Add("ACT_WEIGHT3"); alist.Add("MONEY_ORG4"); alist.Add("ACT_WEIGHT5"); alist.Add("ACT_WEIGHT6"); alist.Add("ACT_WEIGHT7"); alist.Add("MONEY_ORG8"); alist.Add("QM_TOL"); alist.Add("QM_CZ"); alist.Add("INOUTMONEY"); CommonMethod.SetStaticsInfoSumA(ref this.ultraGrid1, alist, true); } } catch { } } /// /// 导出 /// private void exportData() { GridHelper.ulGridToExcel(this.ultraGrid1, this.dtBathYear.Value.ToString("yyyyMM") + "结算综合统计报表"); } private void FrmBlancePort_Load(object sender, EventArgs e) { dtBathYear.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM")); } } }