Files
LeafWeb/Web/ViewModels/LeafInput/ConfirmViewModel.cs
T
2016-02-09 15:27:15 -05:00

38 lines
950 B
C#

using System.ComponentModel.DataAnnotations;
using AutoMapper;
namespace LeafWeb.Web.ViewModels.LeafInput
{
public class ConfirmViewModel
{
private static readonly IMapper Mapper;
[Display(Name = "Your name")]
public string Name { get; set; }
[Display(Name = "Your email")]
public string Email { get; set; }
[Display(Name = "Data identifier")]
public string Identifier { get; set; }
[Display(Name = "Site Id")]
public string SiteId { get; set; }
[Display(Name = "Photosynthetic Pathway")]
public SelectListViewModel PhotosynthesisType { get; set; }
public string[] Files { get; set; }
static ConfirmViewModel()
{
var config =
new MapperConfiguration(cfg =>
{
cfg.CreateMap<CreateViewModel, ConfirmViewModel>();
});
Mapper = config.CreateMapper();
}
public ConfirmViewModel(CreateViewModel createViewModel, string[] files)
{
Mapper.Map(createViewModel, this);
Files = files;
}
}
}