Add object for results details
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using AutoMapper;
|
||||
using LeafWeb.Core.Entities;
|
||||
using LeafWeb.Core.Utility;
|
||||
|
||||
namespace LeafWeb.WebCms.Models
|
||||
{
|
||||
@@ -14,24 +12,24 @@ namespace LeafWeb.WebCms.Models
|
||||
[HiddenInput(DisplayValue = false)]
|
||||
public int LeafInputId { get; set; }
|
||||
|
||||
[Display(Name = "Identifier")]
|
||||
[Display(Name = "Identifier", Order = 0)]
|
||||
[Required(ErrorMessage = "A unique identifier is required")]
|
||||
public string Identifier { get; set; }
|
||||
|
||||
[Display(Name = "Site Id")]
|
||||
[Display(Name = "Site Id", Order = 0)]
|
||||
[Required(ErrorMessage = "The site's name is required")]
|
||||
public string SiteId { get; set; }
|
||||
|
||||
[Display(Name = "Photosyn. Pathway")]
|
||||
[Display(Name = "Photosyn. Pathway", Order = 0)]
|
||||
[Required(ErrorMessage = "A Photosynthetic pathway must be chosen")]
|
||||
public string PhotosynthesisType { get; set; }
|
||||
|
||||
[Display(Name = "Name")]
|
||||
[Display(Name = "Name", Order = 0)]
|
||||
[Required(ErrorMessage = "Name required")]
|
||||
[RegularExpression(@"[A-Za-z().]+(\s+[A-Za-z().]+)+", ErrorMessage = "Please provide full name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Display(Name = "Email address")]
|
||||
[Display(Name = "Email address", Order = 0)]
|
||||
[Required(ErrorMessage = "An email address is required")]
|
||||
[DataType(DataType.EmailAddress)]
|
||||
[RegularExpression(@"[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}", ErrorMessage = "Must be an email address")]
|
||||
@@ -39,19 +37,17 @@ namespace LeafWeb.WebCms.Models
|
||||
|
||||
[DataType(DataType.Date)]
|
||||
[Required]
|
||||
[Display(Order = 0)]
|
||||
public DateTime Added { get; set; }
|
||||
|
||||
[Display(Name = "Piscal Error")]
|
||||
[Display(Name = "Piscal Error", Order = 0)]
|
||||
[UIHint("PreReadMore")]
|
||||
public string OutputErrorMessage { get; set; }
|
||||
|
||||
[Display(Name = "Piscal Warning")]
|
||||
[Display(Name = "Piscal Warning", Order = 0)]
|
||||
[UIHint("PreReadMore")]
|
||||
public string OutputWarningMessage { get; set; }
|
||||
|
||||
[Display(Name = "Time In Progress")]
|
||||
public TimeSpan TimeInProgress { get; set; }
|
||||
|
||||
[HiddenInput(DisplayValue = false)]
|
||||
public bool HasLeafChart { get; set; }
|
||||
|
||||
@@ -71,12 +67,12 @@ namespace LeafWeb.WebCms.Models
|
||||
public bool IsCancellable { get; set; }
|
||||
|
||||
[UIHint("LeafInputDataViewModels")]
|
||||
[Display(Order = 0)]
|
||||
public List<LeafInputDataViewModel> LeafInputData { get; set; }
|
||||
|
||||
[UIHint("LeafInputStatusViewModels")]
|
||||
public List<LeafInputStatusViewModel> StatusHistory { get; set; }
|
||||
public LeafInputDetails(){}
|
||||
|
||||
public LeafInputDetails(LeafInput leafInput)
|
||||
public LeafInputDetails(LeafInput leafInput)
|
||||
{
|
||||
Mapper.Map(leafInput, this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user