private void Search() { try { AssignmentHandler h = new AssignmentHandler(); IList l = h.GetArrivalsAndDepartures(dateEdit1.DateTime, false); gridControl1.DataSource = l; if (l.Count == 0) { XtraMessageBox.Show("Nessuna partenza attesa", "Mesaggio", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { try { gridControl1.MainView.SaveLayoutToXml(fileLayout); } catch (Exception) { //non fa nulla } } } catch (Exception ex) { ErrorHandler.Show(ex); } }