修改已知问题

This commit is contained in:
2025-05-27 08:56:01 +08:00
parent b6c10f5b6b
commit a5f6a79a34
6 changed files with 174 additions and 4 deletions

View File

@@ -16,7 +16,7 @@ namespace CapMachine.Wpf.ViewModels
/// </summary>
public class DialogExpInfoViewModel : DialogViewModel
{
public DialogExpInfoViewModel(ConfigService configService, IFreeSql freeSql,PPCService pPCService, IMapper mapper, MachineRtDataService machineRtDataService)
public DialogExpInfoViewModel(ConfigService configService, IFreeSql freeSql, PPCService pPCService, IMapper mapper, MachineRtDataService machineRtDataService)
{
this.Title = "试验信息拓展设置";
ConfigService = configService;
@@ -25,6 +25,20 @@ namespace CapMachine.Wpf.ViewModels
this.Mapper = mapper;
MachineRtDataService = machineRtDataService;
// 获取ProgramSeg的数据
var workCondList = FreeSql.Select<ProgramSeg>()
.ToList()
.Select(g => g.Name)
.ToList();
// 转换为CbxItems集合都是文本内容
WorkCondCbxItems = new ObservableCollection<CbxItems>(
workCondList.Select(workCond => new CbxItems
{
Key = workCond,
Text = workCond
}));
}
public ConfigService ConfigService { get; }
@@ -40,6 +54,16 @@ namespace CapMachine.Wpf.ViewModels
public IFreeSql FreeSql { get; }
public PPCService PPCService { get; }
private ObservableCollection<CbxItems> _WorkCondCbxItems;
/// <summary>
/// 供选择的工况集合信息
/// </summary>
public ObservableCollection<CbxItems> WorkCondCbxItems
{
get { return _WorkCondCbxItems; }
set { _WorkCondCbxItems = value; RaisePropertyChanged(); }
}
/// <summary>
/// AutoMap映射
/// </summary>