using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.ComponentModel.DataAnnotations; using System.ComponentModel; using EMIS.ViewModel.CacheManage; namespace EMIS.ViewModel.PaymentManage { public class LearningformRateView { public Guid LearningformRateID { get; set; } [Required] [DisplayName("学习形式")] public int? LearningformID { get; set; } public string LearningformDesc { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Learningform.ToString()) .Where(x => x.Value == LearningformID) .Select(x => x.Name).FirstOrDefault(); } } [Required] [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationID")] public int? EducationID { get; set; } public string EducationDesc { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Education.ToString()) .Where(x => x.Value == EducationID) .Select(x => x.Name).FirstOrDefault(); } } [Required] [DisplayName("课酬系数")] [RegularExpression(@"^\d+(\.\d{1,2})?$", ErrorMessage = "请输入整数或保留2位小数")] public decimal? Rate { get; set; } } }