1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.ComponentModel;
- using System.ComponentModel.DataAnnotations;
- using EMIS.Entities;
- namespace EMIS.ViewModel.EducationSchedule
- {
- public class ClassroomExcessiveUseView
- {
- public ClassroomExcessiveUseView()
- {
- this.Scheduling = new List<ClassroomExcessiveUseSchedulingView>();
- }
- public System.Guid ClassroomExcessiveUseID { get; set; }
- [Required]
- [DisplayName("教室")]
- public Nullable<System.Guid> ClassroomID { get; set; }
- public string ClassroomName { get; set; }
- [Required]
- [DisplayName("学年学期")]
- public Nullable<System.Guid> SchoolyearID { get; set; }
- public string SchoolyearCode { get; set; }
- [Required]
- [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "UsingCollege")]
- public Nullable<System.Guid> CollegeID { get; set; }
- public string CollegeName { get; set; }
- [Required]
- [DisplayName("使用人")]
- public Nullable<System.Guid> UserID { get; set; }
- public string UserName { get; set; }
- [Required]
- [DisplayName("活动内容")]
- public string Content { get; set; }
- [DisplayName("时间安排")]
- public List<ClassroomExcessiveUseSchedulingView> Scheduling { get; set; }
- public string SchedulingString
- {
- get
- {
- var schedulingStringList = Scheduling.OrderBy(x => x.StartTimes)
- .Select(x => new
- {
- x.Weekday,
- x.WeekdayDesc,
- x.CoursesTimeID,
- x.StartTimes,
- x.EndTimes,
- x.StartHour,
- x.StartMinute,
- x.EndHour,
- x.EndMinute,
- WeekNums = x.WeekNumList.ToList().GetWeekNumString()
- })
- .Select(x => string.Format("{0}第{1}-{2}节({3})", x.WeekdayDesc, x.StartTimes, x.EndTimes, x.WeekNums));
- return string.Join(",", schedulingStringList);
- }
- }
- [DisplayName("申请人")]
- public Guid? CreateUserID { get; set; }
- public string CreateUserName { get; set; }
- public DateTime? CreateTime { get; set; }
- public string CreateTimeStr {
- get {
- return CreateTime == null ? "" : CreateTime.Value.ToString();
- }
- }
- }
- }
|