private void btnReexport_Click(object sender, EventArgs e) { Portion lightPortion = gridViewHistory.GetFocusedRow() as Portion; if (lightPortion != null) { Portion portion = exporter.GetPortionForReexport(lightPortion.Id); if (portion != null) { DoExport(portion); } } }