123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.ComponentModel;
- using System.ComponentModel.DataAnnotations;
- namespace EMIS.ViewModel.SchedulingManage.SchedulingSettings
- {
- public class CourseTimeHoursView
- {
- /// <summary>
- /// 主键ID
- /// </summary>
- [DisplayName("主键ID")]
- public Guid? CourseTimeHoursID { get; set; }
- /// <summary>
- /// 课程类别
- /// </summary>
- [Required]
- [DisplayName("课程类别")]
- public Guid? CoursesTimeID { get; set; }
- [Required]
- [DisplayName("年级")]
- public int? Year { get; set; }
- [Required]
- [DisplayName("学时数")]
- public int? Hours { get; set; }
- /// <summary>
- /// 节次
- /// </summary>
- [Required]
- [DisplayName("节次")]
- public int? StartTimes { get; set; }
- /// <summary>
- /// 节次
- /// </summary>
- [Required]
- [DisplayName("节次")]
- public int? EndTimes { get; set; }
- /// <summary>
- /// 时间节段
- /// </summary>
- [Required]
- [DisplayName("时间节段")]
- public int? TimesSegment { get; set; }
- /// <summary>
- /// 时间节段
- /// </summary>
- [DisplayName("时间节段")]
- public string TimesSegmentName { get; set; }
- /// <summary>
- /// 开始时间
- /// </summary>
- [DisplayName("开始时间")]
- public string StartDate
- {
- get
- {
- return (StartHour ?? 0).ToString().PadLeft(2, '0')
- + ":"
- + (StartMinutes ?? 0).ToString().PadLeft(2, '0');
- }
- }
- /// <summary>
- /// 开始时间
- /// </summary>
- [Required]
- [DisplayName("开始时间")]
- [Range(0, 23, ErrorMessage = "小时数必须是0到23之间")]
- public int? StartHour { get; set; }
- /// <summary>
- /// 开始时间
- /// </summary>
- [Required]
- [DisplayName("开始时间")]
- [Range(0, 59, ErrorMessage = "分钟数必须是0到59之间")]
- public int? StartMinutes { get; set; }
- /// <summary>
- /// 结束时间
- /// </summary>
- [DisplayName("结束时间")]
- public string EndDate
- {
- get
- {
- return (EndHour ?? 0).ToString().PadLeft(2, '0')
- + ":"
- + (EndMinutes ?? 0).ToString().PadLeft(2, '0');
- }
- }
- /// <summary>
- /// 结束时间
- /// </summary>
- [Required]
- [DisplayName("结束时间")]
- [Range(0, 23, ErrorMessage = "小时数必须是0到23之间")]
- public int? EndHour { get; set; }
- /// <summary>
- /// 结束时间
- /// </summary>
- [Required]
- [DisplayName("结束时间")]
- [Range(0, 59, ErrorMessage = "分钟数必须是0到59之间")]
- public int? EndMinutes { get; set; }
- public string time_starTime_endTime
- {
- get
- {
- return TimesSegmentName + "(" + StartDate + "-" + EndDate + ")";
- }
- }
- }
- }
|