root/trunk/Wierszowki/Wierszowki.Model/Validation/MagazineItemValidation.cs @ 752

Wersja 752, 1.1 KB (wprowadzona przez marek, 17 years temu)

wiersz

Line 
1using System;
2using System.Collections.Generic;
3using System.ComponentModel.DataAnnotations;
4using System.Linq;
5using System.Text;
6using Wierszowki.Core.Linq;
7
8namespace Wierszowki.Core.Validation
9{
10    public class MagazineItemValidation
11    {
12        [Required(ErrorMessage = "Proszę wybrać autora")]
13        public int AuthorId { get; set; }
14
15        [Required(ErrorMessage = "Proszę wybrać numer wydania")]
16        public int IssueId { get; set; }
17
18        [Required(ErrorMessage = "Proszę wybrać typ wierszówki")]
19        public int ItemTypeId { get; set; }
20
21        [Required(ErrorMessage = "Proszę wybrać datę")]
22        public DateTime Date { get; set; }
23
24        [Required(ErrorMessage = "Proszę podać tytuł wierszówki")]
25        public string Caption { get; set; }
26
27        [Required(ErrorMessage = "Proszę podać wycenę")]
28        [Range(0, 1000)]
29        public decimal Price { get; set; }
30
31        [Required(ErrorMessage = "Proszę podać bonus")]
32        [Range(0, 1000)]
33        public decimal Bonus { get; set; }
34    }
35}
Notatka: Zobacz TracBrowser aby uzyskać więcej informacji.