37 lines
1.0 KiB
C#
37 lines
1.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using Resources;
|
|
|
|
namespace Weee.Models.Paramemter
|
|
{
|
|
public class NonYearlyParameterType :MultiLanguage
|
|
{
|
|
public NonYearlyParameterType()
|
|
{
|
|
Parameters = new HashSet<NonYearlyParameter>();
|
|
}
|
|
public NonYearlyParameterType(string name,decimal value)
|
|
{
|
|
DisplayNameTW = name;
|
|
Parameters = new HashSet<NonYearlyParameter>()
|
|
{
|
|
new NonYearlyParameter(value)
|
|
};
|
|
}
|
|
|
|
public int ID { get; set; }
|
|
|
|
[Required]
|
|
public int CategoryID { get; set; }
|
|
[ForeignKey("CategoryID")]
|
|
[Display(Name = "Category", ResourceType = typeof(Resource))]
|
|
public virtual NonYearlyParameterCategory Category { get; set; }
|
|
|
|
[InverseProperty("Type")]
|
|
public virtual ICollection<NonYearlyParameter> Parameters { get; set; }
|
|
}
|
|
} |