Search for both LeafInput and LeafInputData
This commit is contained in:
@@ -18,9 +18,40 @@ namespace LeafWeb.WebCms.Models
|
||||
public double? PhiPS2 { get; set; }
|
||||
public LeafInputDataCurveViewModel() {}
|
||||
|
||||
static LeafInputDataCurveViewModel()
|
||||
{
|
||||
Mapper.CreateMap<LeafInputData, LeafInputDataCurveViewModel>()
|
||||
.ForMember(m => m.CO2S,
|
||||
conf =>
|
||||
conf.MapFrom(d =>
|
||||
LeafInputData.Range(d.Data, c => c.CO2S)))
|
||||
.ForMember(m => m.PARi,
|
||||
conf =>
|
||||
conf.MapFrom(d =>
|
||||
LeafInputData.Range(d.Data, c => c.PARi)))
|
||||
.ForMember(m => m.Tleaf,
|
||||
conf =>
|
||||
conf.MapFrom(d =>
|
||||
LeafInputData.Range(d.Data, c => c.Tleaf)))
|
||||
.ForMember(m => m.PhiPS2,
|
||||
conf =>
|
||||
conf.MapFrom(d =>
|
||||
LeafInputData.Range(d.Data, c => c.PhiPS2)))
|
||||
;
|
||||
}
|
||||
|
||||
public LeafInputDataCurveViewModel(LeafInputDataCurve leafInputDataCurve)
|
||||
{
|
||||
Mapper.Map(leafInputDataCurve, this);
|
||||
}
|
||||
|
||||
public LeafInputDataCurveViewModel(LeafInputData leafInputData)
|
||||
{
|
||||
Mapper.Map(leafInputData, this);
|
||||
//CO2S = LeafInputData.Range(dataCurves, c => c.CO2S);
|
||||
//PARi = LeafInputData.Range(dataCurves, c => c.PARi);
|
||||
//Tleaf = LeafInputData.Range(dataCurves, c => c.Tleaf);
|
||||
//PhiPS2 = LeafInputData.Range(dataCurves, c => c.PhiPS2);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user