1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.ComponentModel;
- using System.ComponentModel.DataAnnotations;
- namespace EMIS.ViewModel.ExaminationManage
- {
- public class TimeSegmentView
- {
- public Guid? TimeSegmentID { get; set; }
- [DisplayName("是否补考时间")]
- public bool IsForResit { get; set; }
- public string IsForResitDesc { get { return IsForResit ? "是" : "否"; } }
- [DisplayName("考试日期")]
- public DateTime ExaminationDate { get; set; }
- public string ExaminationDateString
- {
- get
- {
- return ExaminationDate.ToString("yyyy-MM-dd");
- }
- }
- [DisplayName("开始时间")]
- public TimeSpan StartTime { get; set; }
- public string StartTimeString
- {
- get
- {
- return StartTime.ToString(@"hh\:mm");
- }
- }
- [DisplayName("结束时间")]
- public TimeSpan EndTime { get; set; }
- public string EndTimeString
- {
- get
- {
- return EndTime.ToString(@"hh\:mm");
- }
- }
- public string TimeSegmentName
- {
- get
- {
- return ExaminationDate.ToString("yyyy-MM-dd")
- + " " + StartTime.ToString(@"hh\:mm")
- + "-" + EndTime.ToString(@"hh\:mm");
- }
- }
- }
- }
|