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

Wersja 845, 1.1 KB (wprowadzona przez alina, 17 years temu)

re #205

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        [DataType(DataType.Date)]
23        public DateTime Date { get; set; }
24
25        [Required(ErrorMessage = "Proszę podać tytuł wierszówki")]
26        [StringLength(255)]
27        public string Caption { get; set; }
28
29        [Required(ErrorMessage = "Proszę podać wycenę")]
30        public decimal Price { get; set; }
31
32        [Required(ErrorMessage = "Proszę podać bonus")]
33        public decimal Bonus { get; set; }
34    }
35}
Notatka: Zobacz TracBrowser aby uzyskać więcej informacji.