Add WebCms

This commit is contained in:
2016-11-07 12:56:17 -05:00
parent dfe92218f4
commit 15911f33c0
2750 changed files with 365672 additions and 133 deletions
+1 -8
View File
@@ -5,8 +5,6 @@ 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")]
@@ -21,12 +19,7 @@ namespace LeafWeb.Web.ViewModels.LeafInput
static ConfirmViewModel()
{
var config =
new MapperConfiguration(cfg =>
{
cfg.CreateMap<CreateViewModel, ConfirmViewModel>();
});
Mapper = config.CreateMapper();
Mapper.CreateMap<CreateViewModel, ConfirmViewModel>();
}
public ConfirmViewModel(CreateViewModel createViewModel, string[] files)
+2 -9
View File
@@ -6,8 +6,6 @@ namespace LeafWeb.Web.ViewModels.LeafInput
{
public class CreateViewModel
{
private static readonly IMapper Mapper;
[Display(Name = "Your name")]
[Required(ErrorMessage = "Name required")]
[RegularExpression(@"[A-Za-z().]+(\s+[A-Za-z().]+)+", ErrorMessage = "Please provide your full name")]
@@ -38,13 +36,8 @@ namespace LeafWeb.Web.ViewModels.LeafInput
static CreateViewModel()
{
var config =
new MapperConfiguration(cfg =>
{
cfg.CreateMap<CreateViewModel, Core.Entities.LeafInput>()
.ForMember(dest => dest.PhotosynthesisType, opt => opt.Ignore());
});
Mapper = config.CreateMapper();
Mapper.CreateMap<CreateViewModel, Core.Entities.LeafInput>()
.ForMember(dest => dest.PhotosynthesisType, opt => opt.Ignore());
}
public Core.Entities.LeafInput GetFileInput(DataService db)