IEnumerable qry_dt_PRE = (from rows_PRE in dt_Platby.AsEnumerable() where rows_PRE.Field("typPlatby") == "E" && (string.IsNullOrWhiteSpace(rows_PRE.Field("ucetIBAN_part")) || string.IsNullOrWhiteSpace(rows_PRE.Field("kodSWIFTBIC_part"))) orderby rows_PRE.Field("cisloPrikazu") select rows_PRE).Distinct(); foreach (DataRow dr in qry_dt_PRE) { HromadnaZmenaException _hEx = new HromadnaZmenaException(dr.Field("cisloPrikazu").ToString(), new SSW.SSWFramework.Exceptions.OnlyInformationException("Soubor nemohl být vytvořen, protože u příkazu k euroúhradě není uvedeno BIC nebo číslo účtu ve formátu IBAN."), Session.Current.ID); _exCollection.Add(_hEx); } var xxx = dt_Platby.AsEnumerable().GroupBy(x=> new {id = x.Field("id"), cisloRezervace = x.Field("cisloRezervace")}) .Select(g => new {g.Key.id, g.Key.cisloRezervace, castka_rc = g.Sum(d => d.Field("castka_rc"))} ); private void g2g_SaveDataEvent(object sender, CancelEventArgs e) { Prizpusobeni.SSWAplication.CekaciOkno.CekaciOknoTryCatchFinally(akce: () => { SSWGrid2Grid _g2g = (sender as SSWGrid2Grid); DataTable inserted = null; DataTable deleted = null; DataTable modified = null; _g2g.PreSave(ref inserted, ref deleted, ref modified); if (inserted?.Rows.Count > 0 || deleted?.Rows.Count > 0 || modified?.Rows.Count > 0) { cFaPrijatyDokladSingl_Proxy.UlozG2GPrijemky(_cFaPrijatyDoklad_id: _g2g.CObject_id, _inserted: inserted, _deleted: deleted, _modified: modified, _sId: Session.Current.ID); this._gridProZobrazeniDat.RefreshRow(_g2g.CObject_id); } }, message: "Ukl d m data"); }