123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.ComponentModel.DataAnnotations;
- using System.ComponentModel;
- using EMIS.ViewModel.CacheManage;
- using Bowin.Common.Utility;
- using EMIS.Entities;
- namespace EMIS.ViewModel.SupervisionManage
- {
- public class ProjectRecordView
- {
- /// <summary>
- /// ProjectRecordID
- /// </summary>
- public System.Guid ProjectRecordID { get; set; }
- /// <summary>
- /// 学年学期
- /// </summary>
- [Required]
- [DisplayName("学年学期")]
- public Guid? SchoolyearID { get; set; }
- /// <summary>
- /// 学年学期
- /// </summary>
- [DisplayName("学年学期")]
- public string SchoolyearCode { get; set; }
- [Required]
- [DisplayName("督导时间")]
- public Nullable<System.DateTime> ProjectDate { get; set; }
- public string ProjectDateDesc {
- get {
- return ProjectDate == null ? "" : ProjectDate.Value.ToShortDateString();
- }
- }
- [Required]
- [DisplayName("督导地点")]
- public string Location { get; set; }
- [DisplayName("院系所")]
- public Guid? CollegeID { get; set; }
- public string CollegeName { get; set; }
- [Required]
- [DisplayName("督导院系")]
- public Nullable<System.Guid> SupervisionCollegeID { get; set; }
- public string SupervisionCollegeName { get; set; }
- [Required]
- [DisplayName("督导类型")]
- public Nullable<int> SupervisionTypeID { get; set; }
- public string SupervisionTypeDesc
- {
- get
- {
- return IdNameExt.GetDictionaryItem(DictionaryItem.SUP_SupervisionType.ToString())
- .Where(x => x.Value == SupervisionTypeID)
- .Select(x => x.Name).FirstOrDefault();
- }
- }
- [DisplayName("督导对象")]
- public Guid? UserID { get; set; }
- public string UserName { get;set; }
- [DisplayName("课程")]
- public Guid? CoursematerialID { get; set; }
- public string CoursematerialName { get; set; }
- [DisplayName("其他督导对象")]
- public string OtherTarget { get; set; }
- public string SupervisionTarget
- {
- get {
- if (UserID.HasValue)
- {
- return UserName;
- }
- if (OtherTarget != null)
- {
- return OtherTarget;
- }
- return "";
- }
- }
- [DisplayName("督导组成员")]
- public IEnumerable<CF_Staff> staffList { get; set; }
- public IEnumerable<Sys_User> userList { get; set; }
- public List<Guid?> UserIDList {
- get {
- if (userList != null)
- {
- string ids = string.Join(",", userList.Select(s => s.UserID));
- List<Guid?> UserIDList = ids.Split(',').Where(x => !string.IsNullOrEmpty(x)).Select(x => (Guid?)new Guid(x)).ToList();
- return UserIDList;
- }
- else
- {
- return null;
- }
- }
- }
- public string staffListDesc {
- get {
- string name = string.Empty;
- if (userList != null)
- name = string.Join(",", userList.Select(s => s.Name));
- if (string.IsNullOrEmpty(name))
- {
- return "";
- }
- else
- {
- return name;
- }
- }
- }
- [Required]
- [DisplayName("星期")]
- public Nullable<int> Weekday { get; set; }
- public string WeekdayDesc
- {
- get
- {
- if (Weekday.HasValue)
- {
- return WeekHelper.WeekDictionary[Weekday.Value];
- }
- else
- {
- return "";
- }
- }
- }
- [Required]
- [DisplayName("节次")]
- public Nullable<System.Guid> CoursesTimeID { get; set; }
- public Nullable<int> StartTimes { get; set; }
- public Nullable<int> EndTimes { get; set; }
- public string CoursesTimeDesc
- {
- get
- {
- return string.Format("第{0}-{1}节", StartTimes.HasValue ? StartTimes.Value.ToString() : "", EndTimes.HasValue ? EndTimes.Value.ToString() : "");
- }
- }
- public string DateWeekTimeDesc {
- get {
- return ProjectDateDesc + " " + WeekdayDesc + " " + CoursesTimeDesc;
- }
- }
- [DisplayName("综合评分")]
- public decimal? TotalScore { get; set; }
- [DisplayName("说明")]
- public string Description { get; set; }
- [Required]
- [DisplayName("督导情况记录")]
- public string Content { get; set; }
- [Required]
- [DisplayName("督导评价建议")]
- public string Advise { get; set; }
- [Required]
- [DisplayName("创建人(督导)")]
- public Nullable<System.Guid> CreateUserID { get; set; }
- public string CreateUserName { get; set; }
- [DisplayName("创建时间(督导)")]
- public DateTime? CreateTime { get; set; }
- public string CreateTimeDesc
- {
- get
- {
- return CreateTime == null ? "" : CreateTime.Value.ToShortDateString();
- }
- }
- public IEnumerable<SUP_ProjectRecordAttachment> ProjectRecordAttachmentList { get; set; }
- public string ProjectRecordAttachmentIDString
- {
- get
- {
- if (ProjectRecordAttachmentList.Count() > 0)
- {
- return string.Join(",", ProjectRecordAttachmentList.Select(x => x.ProjectRecordAttachmentID));
- }
- else
- {
- return "";
- }
- }
- }
- /// <summary>
- /// 附件名称
- /// </summary>
- [DisplayName("附件名称")]
- public string AttachmentName
- {
- get
- {
- if (ProjectRecordAttachmentList != null)
- {
- if (ProjectRecordAttachmentList.Count() > 0)
- {
- return string.Join(",", ProjectRecordAttachmentList.Select(x => x.Name));
- }
- else
- {
- return "";
- }
- }
- else
- {
- return "";
- }
- }
- }
- /// <summary>
- /// 附件状态
- /// </summary>
- public int? IsChangeAttachment { get; set; }
- }
- }
|