DeviceManager/DeviceRepairAndOptimization/Common/PublicExtended.cs
2024-05-28 22:36:38 +08:00

26 lines
696 B
C#

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<SheetDataItem> 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);
}
}
}
}