|
@ -1,6 +1,7 @@ |
|
|
using Microsoft.eShopOnContainers.WebMVC.Models.Annotations; |
|
|
using Microsoft.eShopOnContainers.WebMVC.Models.Annotations; |
|
|
using System; |
|
|
using System; |
|
|
using System.Collections.Generic; |
|
|
using System.Collections.Generic; |
|
|
|
|
|
using System.ComponentModel; |
|
|
using System.ComponentModel.DataAnnotations; |
|
|
using System.ComponentModel.DataAnnotations; |
|
|
using System.Linq; |
|
|
using System.Linq; |
|
|
using System.Threading.Tasks; |
|
|
using System.Threading.Tasks; |
|
@ -20,6 +21,7 @@ namespace Microsoft.eShopOnContainers.WebMVC.Models |
|
|
public string Status { get; set; } |
|
|
public string Status { get; set; } |
|
|
|
|
|
|
|
|
public decimal Total {get;set;} |
|
|
public decimal Total {get;set;} |
|
|
|
|
|
|
|
|
[Required] |
|
|
[Required] |
|
|
public string City { get; set; } |
|
|
public string City { get; set; } |
|
|
[Required] |
|
|
[Required] |
|
@ -31,15 +33,19 @@ namespace Microsoft.eShopOnContainers.WebMVC.Models |
|
|
|
|
|
|
|
|
public string ZipCode { get; set; } |
|
|
public string ZipCode { get; set; } |
|
|
[Required] |
|
|
[Required] |
|
|
|
|
|
[DisplayName("Card number")] |
|
|
public string CardNumber { get; set; } |
|
|
public string CardNumber { get; set; } |
|
|
[Required] |
|
|
[Required] |
|
|
|
|
|
[DisplayName("Cardholder name")] |
|
|
public string CardHolderName { get; set; } |
|
|
public string CardHolderName { get; set; } |
|
|
|
|
|
|
|
|
public DateTime CardExpiration { get; set; } |
|
|
public DateTime CardExpiration { get; set; } |
|
|
[RegularExpression(@"(0[1-9]|1[0-2])\/[0-9]{2}", ErrorMessage = "Expiration should match a valid MM/YY value")]
|
|
|
[RegularExpression(@"(0[1-9]|1[0-2])\/[0-9]{2}", ErrorMessage = "Expiration should match a valid MM/YY value")]
|
|
|
[CardExpiration(ErrorMessage = "The card is expired"), Required] |
|
|
[CardExpiration(ErrorMessage = "The card is expired"), Required] |
|
|
|
|
|
[DisplayName("Card expiration")] |
|
|
public string CardExpirationShort { get; set; } |
|
|
public string CardExpirationShort { get; set; } |
|
|
[Required] |
|
|
[Required] |
|
|
|
|
|
[DisplayName("Card security number")] |
|
|
public string CardSecurityNumber { get; set; } |
|
|
public string CardSecurityNumber { get; set; } |
|
|
|
|
|
|
|
|
public int CardTypeId { get; set; } |
|
|
public int CardTypeId { get; set; } |
|
|