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 PracticeRateView { public Guid PracticeRateID { get; set; } [Required] [DisplayName("课程类型")] public int? CourseTypeID { get; set; } public string CourseTypeDesc { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CourseType.ToString()) .Where(x => x.Value == CourseTypeID) .Select(x => x.Name).FirstOrDefault(); } } [Required] [DisplayName("课酬系数")] [RegularExpression(@"^\d+(\.\d{1,2})?$", ErrorMessage = "请输入整数或保留2位小数")] public decimal? Rate { get; set; } } }