using DevExpress.Spreadsheet; using DeviceRepair.Models; using System; using System.Collections.Generic; using System.Linq; namespace DeviceRepairAndOptimization.Common { public static class PublicExtended { public static void WriteValue(this List lst, Cell cell) { try { SheetDataItem item = lst.First(x => x.ColumnIndex == cell.ColumnIndex && x.RowIndex == cell.RowIndex); if (item != null) item.Value = cell.Value.TextValue; } catch (Exception ex) { XtraMessageBoxHelper.Error(ex.Message); } } } }