private void GetShippingData(List<MESParameterInfo> lstParameters) { wsINP.IwsINPClient client = new wsINP.IwsINPClient(); try { baseForm.SetCursor(); DataSet ds = new DataSet(); DataSet mainds = client.GetShippingSumRecords(baseForm.CurrentContextInfo, lstParameters.ToArray<MESParameterInfo>()); DataSet subds = client.GetShippingSumDtlRecords(baseForm.CurrentContextInfo, lstParameters.ToArray<MESParameterInfo>()); DataTable maindt = mainds.Tables[0]; DataView dv = maindt.DefaultView; dv.RowFilter = "pairqty<>0"; maindt = dv.ToTable(); DataTable subdt = subds.Tables[0]; maindt.TableName = "Main"; subdt.TableName = "Sub"; mainds.Tables.Clear(); subds.Tables.Clear(); if (maindt != null) { ds.Tables.Add(maindt); ds.Tables.Add(subdt); ds.Relations.Add("ps", new DataColumn[] { ds.Tables["Main"].Columns["customerid"], ds.Tables["Main"].Columns["custorderno"], ds.Tables["Main"].Columns["cartonno"] }, new DataColumn[] { ds.Tables["Sub"].Columns["customerid"], ds.Tables["Sub"].Columns["custorderno"], ds.Tables["Sub"].Columns["cartonno"] }, false); this.grdShipping.SetDataBinding(ds, ""); //foreach (UltraGridBand band in this.grdShipping.DisplayLayout.Bands) //{ // if (band.Columns.Exists("pairqty")) // band.Summaries.Add(SummaryType.Sum, band.Columns["pairqty"], SummaryPosition.UseSummaryPositionColumn); //} } this.ucStatusBar1.ShowText1(UtilCulture.GetString("Msg.R00006") + ": " + maindt.Rows.Count.ToString()); } catch (Exception ex) { MESMsgBox.ShowError(ExceptionParser.Parse(ex)); } finally { baseForm.ResetCursor(); baseForm.CloseWCF(client); } }