68 lines
1.3 KiB
C#
68 lines
1.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.Linq;
|
|
using System.Web;
|
|
|
|
namespace Fab2ApprovalSystem.Models
|
|
{
|
|
public class ProductViewModel
|
|
{
|
|
[ScaffoldColumn(false)]
|
|
public int ProductID
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
|
|
[Required]
|
|
[DisplayName("Product name")]
|
|
public string ProductName
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
|
|
[Required]
|
|
[DisplayName("Unit price")]
|
|
[DataType(DataType.Currency)]
|
|
[Range(0, int.MaxValue)]
|
|
public decimal UnitPrice
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
|
|
[Required]
|
|
[DisplayName("Units in stock")]
|
|
[DataType("Integer")]
|
|
[Range(0, int.MaxValue)]
|
|
public int UnitsInStock
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
|
|
public bool Discontinued
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
|
|
[DisplayName("Last supply")]
|
|
[DataType(DataType.Date)]
|
|
public DateTime LastSupply
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
|
|
[DataType("Integer")]
|
|
public int UnitsOnOrder
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
}
|
|
} |