using EMIS.ViewModel.CacheManage; using System; using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Text; namespace EMIS.ViewModel.TeachingMaterial { public class StudentDistributeView { /// /// 学生发放ID /// [DisplayName("学生发放ID")] public Guid StudentDistributeID { get; set; } /// /// 学年学期 /// [DisplayName("学年学期")] public Guid? SchoolyearID { get; set; } /// /// 学年学期 /// [DisplayName("学年学期")] public string SchoolyearCode { get; set; } /// /// 校区ID /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusID")] public Guid? CampusID { get; set; } /// /// 院系所ID /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeID")] public Guid CollegeID { get; set; } /// /// 院系所 /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")] public string CollegeName { get; set; } /// /// 院系所代码 /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeCode")] public string CollegeNo { get; set; } /// /// 年级专业ID /// [DisplayName("年级专业ID")] public Guid? GrademajorID { get; set; } /// /// 年级专业编号 /// [DisplayName("年级专业编号")] public string GrademajorCode { get; set; } /// /// 年级专业编号 /// [DisplayName("年级专业编号")] public string GradeSpecialtyCode { get; set; } /// /// 年级专业名称 /// [DisplayName("年级专业名称")] public string GrademajorName { get; set; } /// /// 年级专业名称 /// [DisplayName("年级专业名称")] public string GradeSpecialtyName { get; set; } /// /// 年级 /// [DisplayName("年级")] public int? Years { get; set; } /// /// 年级 /// [DisplayName("年级")] public int? GradeID { get; set; } [DisplayName("年级")] public string Grade { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Grade.ToString()).Where(x => x.Value == GradeID).Select(x => x.Name).FirstOrDefault(); } } /// /// 专业代码 /// [DisplayName("专业代码")] public int? StandardID { get; set; } /// /// 专业名称对应数据字典Value /// [DisplayName("专业名称对应数据字典Value")] public int? SpecialtyValue { get; set; } /// /// 专业代码 /// [DisplayName("专业代码")] public string SpecialtyCode { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString()) .Where(x => x.Value == SpecialtyValue) .Select(x => x.Code).FirstOrDefault(); } } /// /// 学号 /// [DisplayName("学号")] public string StudentNo { get; set; } /// /// 学生姓名 /// [DisplayName("学生姓名")] public string StudentName { get; set; } /// /// 专业名称 /// [DisplayName("专业名称")] public string StandardName { get; set; } /// /// 专业名称 /// [DisplayName("专业名称")] public string SpecialtyName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString()) .Where(x => x.Value == SpecialtyValue) .Select(x => x.Name).FirstOrDefault(); } } /// /// 人数 /// [DisplayName("人数")] public int? StudentQty { get; set; } /// /// 征订数量 /// [DisplayName("征订数量")] public int? OrderQty { get; set; } /// /// 课程信息ID /// [DisplayName("课程信息ID")] public Guid CoursematerialID { get; set; } /// /// 课程代码 /// [DisplayName("课程代码")] public string CourseCode { get; set; } /// /// 课程名称 /// [DisplayName("课程名称")] public string CourseName { get; set; } /// /// 课程类型 /// [DisplayName("课程类型")] public int? CourseTypeID { get; set; } /// /// 课程类型 /// [DisplayName("课程类型")] public string CourseTypeName { get; set; } /// /// 课程属性 /// [DisplayName("课程属性")] public int? CourseCategoryID { get; set; } /// /// 课程属性 /// [DisplayName("课程属性")] public string CourseCategoryName { get; set; } /// /// 课程性质 /// [DisplayName("课程性质")] public int? CourseQualityID { get; set; } /// /// 课程性质 /// [DisplayName("课程性质")] public string CourseQualityName { get; set; } /// /// 教材信息ID /// [DisplayName("教材信息ID")] public Guid? TeachingMaterialPoolID { get; set; } /// /// 教材编号 /// [DisplayName("教材编号")] public string TeachingMaterialCode { get; set; } /// /// 教材名称 /// [DisplayName("教材名称")] public string TeachingMaterialName { get; set; } /// /// 教材类型 /// [DisplayName("教材类型")] public int? TeachingMaterialTypeID { get; set; } /// /// ISBN /// [DisplayName("ISBN")] public string ISBN { get; set; } /// /// 版本时间 /// [DisplayName("版本时间")] public string PublishTime { get; set; } /// /// 出版单位 /// [DisplayName("出版单位")] public string PublishName { get; set; } /// /// 作者 /// [DisplayName("作者")] public string Author { get; set; } /// /// 单价 /// public decimal? Price { get; set; } /// /// 是否发放 /// [DisplayName("是否发放")] public int IsDistribute { get; set; } /// /// 是否发放 /// [DisplayName("是否发放")] public string IsDistributeName { get; set; } /// /// 创建人 /// [DisplayName("创建人")] public string CreateUserName { get; set; } /// /// 创建时间 /// [DisplayName("创建时间")] public DateTime ?CreateTime { get; set; } /// /// 创建时间 /// [DisplayName("签收时间")] public DateTime? ModifyTime { get; set; } /// /// 当前库存数量 /// public int? PresentInventory { get; set; } /// /// 折扣率 /// public decimal? Discount { get; set; } /// /// 折扣率(四舍五入) /// public decimal? DiscountStr { get { if (this.Discount == null) return 0; return Math.Round((decimal)Discount, 2); } } /// /// 折合价 /// public decimal? DiscountPrice { get; set; } /// /// 折合价(四舍五入) /// public decimal? DiscountPriceStr { get { if (this.DiscountPrice == null) return 0; return Math.Round((decimal)DiscountPrice, 2); } } /// /// 实洋 /// public decimal? TotalDollarStr { get { if (this.TotalDollar == null) return 0; return Math.Round((decimal)TotalDollar, 2); } } /// /// 码洋 /// public decimal? TotalPriceStr { get { if (this.TotalPrice == null) return 0; return Math.Round((decimal)TotalPrice, 2); } } /// /// 发放人数 /// public int? DistributeQty { get; set; } /// /// 未发人数 /// public int? RemainingQty { get; set; } /// /// 签收人ID /// [DisplayName("签收人ID")] public Guid RecipientUserID { get; set; } /// /// 签收人 /// [DisplayName("签收人")] [Required] public string RecipientUser { get; set; } /// /// 备注 /// [DisplayName("备注")] public string Remark { get; set; } /// /// 出库单据号 /// [DisplayName("出库单据号")] [Required] public string StudentDistributeNo { get; set; } /// /// 总价(实洋) /// [DisplayName("总价(实洋)")] public decimal? TotalDollar { get; set; } /// /// 码洋 /// [DisplayName("码洋")] public decimal? TotalPrice { get; set; } /// /// 出库人 /// [DisplayName("出库人")] public string StockOutUserName { get; set; } /// /// 专业计划ID /// public Guid SpecialtyPlanID { get; set; } } public class StudentDistributePrePlanView { /// /// 专业计划ID /// public Guid SpecialtyPlanID { get; set; } public Guid? CollegeID { get; set; } /// /// 征订数量 /// public int? OrderQty { get; set; } /// /// 教材ID /// public Guid? TeachingMaterialPoolID { get; set; } } }