Files
LeafWeb/WebCms/Models/LeafInputDataSiteViewModel.cs
T
poprhythm 2b5de1c4cd Replace WebGridBootstrapPager
Improve Leaf details page
2020-06-28 17:37:06 -04:00

103 lines
3.8 KiB
C#

using System.ComponentModel.DataAnnotations;
using AutoMapper;
using LeafWeb.Core.Entities;
namespace LeafWeb.WebCms.Models
{
public class LeafInputDataSiteViewModel
{
/// <summary>Site identifier</summary>
/// <remarks>do not leave blank between letters</remarks>
[Display(Name = "Site Id")]
public string SiteId { get; set; }
/// <summary>Site latitude, northern hemisphere positive</summary>
[Display(Name = "Latitude (&deg;)")]
[DisplayFormat(DataFormatString = "{0} &deg;")]
public double? Latitude { get; set; }
/// <summary>Site longitude, east positive</summary>
[Display(Name = "Longitude (&deg;)")]
[DisplayFormat(DataFormatString = "{0} &deg;")]
public double? Longitude { get; set; }
/// <summary>site elevation</summary>
[DisplayFormat(DataFormatString = "{0} m")]
public double? Elevation { get; set; }
/*
/// <summary>the year when the A/Ci data is taken</summary>
[DisplayFormat(DataFormatString = "{0} year")]
public string SampleYear { get; set; }
/// <summary>the day of year (since 1 Jan) when the A/Ci data is taken</summary>
[ParseInfo(6, units: "day")]
public int? SampleDayOfYear { get; set; }
/// <summary>the approximate start day (since 1 Jan) of growing season</summary>
[ParseInfo(7, units: "day")]
public int? GrowSeasonStart { get; set; }
/// <summary>the approximate end day (since 1 Jan) of growing season</summary>
[ParseInfo(8, units: "day")]
public int? GrowSeasonEnd { get; set; }
/// <summary>stand age since the last disturbance</summary>
[ParseInfo(9, units: "year")]
public double? StandAge { get; set; }
/// <summary>the height of the canopy</summary>
[ParseInfo(10, units: "m")]
public double? CanopyHeight { get; set; }
/// <summary>the leaf area index in the middle of growing season</summary>
[ParseInfo(11, units: "m2/m2")]
public double? LeafAreaIndex { get; set; }
/// <summary>the species of the leaf sample</summary>
/// <remarks>don't leave blank between letters</remarks>
[ParseInfo(12, units: "dimensionless")]
public string SpeciesSampled { get; set; }
/// <summary>the average time interval between two consecutive A/Ci data points</summary>
[ParseInfo(13, alternateTitle: "AveTimeResolution", units: "minutes")]
public double? AverageTimeResolution { get; set; }
/// <summary>the height at which the leaf is located</summary>
[ParseInfo(14, units: "m")]
public double? SampleHeight { get; set; }
/// <summary>the age of the leaf</summary>
[ParseInfo(15, units: "day")]
public int? LeafAge { get; set; }
/// <summary>specific leaf area of the sample</summary>
[ParseInfo(16, units: "cm2/g")]
public double? SpecificLeafArea { get; set; }
/// <summary>dry leaf nitrogen content of the sample</summary>
[ParseInfo(17, units: "%")]
public double? LfNitrogenContent { get; set; }
/// <summary>dry leaf carbon content of the sample</summary>
[ParseInfo(18, units: "%")]
public double? LfCarbonContent { get; set; }
/// <summary>dry leaf phosphorus content of the sample</summary>
[ParseInfo(19, units: "%")]
public double? LfPhosphContent { get; set; }
*/
static LeafInputDataSiteViewModel()
{
Mapper.CreateMap<LeafInputDataSite, LeafInputDataSiteViewModel>();
}
public LeafInputDataSiteViewModel() {}
public LeafInputDataSiteViewModel(LeafInputDataSite site)
{
Mapper.Map(site, this);
}
}
}