修改已知问题
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user