private void RecalcSumOutputsDocuments() { int nPartnersQnt = 0, nPointsQnt = 0; decimal nNetto = 0, nBrutto = 0, nVolume = 0, nPalletsQnt = 0; nOutputsDocumentsQnt = oTrip.TableOutputsDocumentsInTrip.Rows.Count; string sOutputsDocumentsList = ""; foreach (DataRow r in oTrip.TableOutputsDocumentsInTrip.Rows) { sOutputsDocumentsList += r["ID"].ToString() + ","; } OutputDocument oOutputDocumentCalc = new OutputDocument(); oOutputDocumentCalc.CalcSum(sOutputsDocumentsList, ref nOutputsDocumentsQnt, ref nPartnersQnt, ref nPointsQnt, ref nNetto, ref nBrutto, ref nVolume, ref nPalletsQnt); nOutputsDocumentsPartnersQnt = nPartnersQnt; nOutputsDocumentsPointsQnt = nPointsQnt; nOutputsDocumentsNetto = nNetto; nOutputsDocumentsBrutto = nBrutto; nOutputsDocumentsVolume = nVolume; nOutputsDocumentsPalletsQnt = nPalletsQnt; return; }