1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
| using Yw.Entity;
|
| namespace IStation.DAL
| {
| /// <summary>
| ///
| /// </summary>
| public partial class BaseDAL_Sorter_Flags<T> :
| BaseDAL_Sorter<T> where T :
| BaseEntity, ISorter, IFlags, new()
| {
| /// <summary>
| /// 更新 Flags
| /// </summary>
| public virtual bool UpdateFlags(long id, string flags)
| {
| if (id < 1)
| return default;
| var list = GetFileObject<List<T>>(FileName);
| if (list == null || list.Count < 1)
| return default;
| var src = list.Find(x => x.ID == id);
| if (src == null)
| return default;
| src.Flags = flags;
| SaveObjectFile(FileName, list);
| return true;
| }
|
| }
| }
|
|