using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using EMIS.ViewModel.CacheManage;
namespace EMIS.ViewModel.UniversityManage.ClassroomManage
{
public class ClassroomView
{
///
/// 主键ID
///
[DisplayName("主键ID")]
public Guid? ClassroomID { get; set; }
///
/// 教室编号
///
[Required]
[DisplayName("教室编号")]
public string Code { get; set; }
///
/// 教室名称
///
[Required]
[DisplayName("教室名称")]
public string Name { get; set; }
///
/// 建筑名称
///
[Required]
[DisplayName("建筑名称")]
public Guid? BuildingsInfoID { get; set; }
///
/// 建筑编号
///
[DisplayName("建筑编号")]
public string BuildingsInfoCode { get; set; }
///
/// 建筑名称
///
[DisplayName("建筑名称")]
public string BuildingsInfoName { get; set; }
///
/// 校区ID(此为教室信息中的建筑信息对应的校区ID)
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusID")]
public Guid? CampusID { get; set; }
///
/// 校区代码(此为教室信息中的建筑信息对应的校区代码)
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusCode")]
public string CampusCode { get; set; }
///
/// 校区名称(此为教室信息中的建筑信息对应的校区)
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusName")]
public string CampusName { get; set; }
///
/// 院系所ID(此为教室信息所属的院系所ID)
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
public Guid? CollegeID { get; set; }
///
/// 院系所代码(此为教室信息所属的院系所代码)
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeCode")]
public string CollegeCode { get; set; }
///
/// 院系所(此为教室信息所属的院系所)
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeName")]
public string CollegeName { get; set; }
///
/// 单位类别
///
[DisplayName("单位类别")]
public int? UnitCategoryID { get; set; }
///
/// 单位类别
///
[DisplayName("单位类别")]
public string UnitCategoryName
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.CF_UnitCategory.ToString()).Where(x => x.Value == UnitCategoryID).Select(x => x.Name).FirstOrDefault();
}
}
///
/// 校区ID(此为教室信息所属的院系所对应的校区ID)
///
[Required]
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "Campus")]
public Guid? CollegeCampusID { get; set; }
///
/// 校区代码(此为教室信息所属的院系所对应的校区代码)
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusCode")]
public string CollegeCampusCode { get; set; }
///
/// 校区(此为教室信息所属的院系所对应的校区)
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusName")]
public string CollegeCampusName { get; set; }
///
/// 教室类型CF_ClassroomType
///
[DisplayName("教室类型")]
public IEnumerable CF_ClassroomType { get; set; }
///
/// 教室类型List
///
[DisplayName("教室类型")]
public List ClassroomTypeID { get; set; }
///
/// 教室类型List
///
[DisplayName("教室类型")]
public List ClassroomTypeIDList { get; set; }
///
/// 教室类型List(Excel导入用,可存在多个教室类型--用顿号隔开)
///
[DisplayName("教室类型")]
public string ClassroomTypeIDListStr { get; set; }
///
/// 教室类型(可存在多个教室类型--用顿号隔开)
///
[DisplayName("教室类型")]
public string ClassroomTypeName
{
get
{
if (CF_ClassroomType != null && CF_ClassroomType.Count() > 0)
{
return string.Join("、", CF_ClassroomType.Select(x =>
IdNameExt.GetDictionaryItem(DictionaryItem.CF_ClassroomType.ToString()).Where(w => w.Value == x.ClassroomType).Select(w => w.Name).FirstOrDefault()));
}
else
{
return "";
}
}
}
///
/// 布局类型(暂时无效)
///
[DisplayName("布局类型")]
public Guid? LayoutTypeID { get; set; }
///
/// 房间用途
///
[DisplayName("房间用途")]
public int? RoomUseID { get; set; }
///
/// 房间用途(Excel导入用)
///
[DisplayName("房间用途")]
public string RoomUseStr { get; set; }
///
/// 房间用途
///
[DisplayName("房间用途")]
public string RoomUseName
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.CF_RoomUse.ToString()).Where(x => x.Value == RoomUseID).Select(x => x.Name).FirstOrDefault();
}
}
///
/// 所在楼层
///
[DisplayName("所在楼层")]
[RegularExpression(@"^-?\d+$", ErrorMessage = "请输入整数")]
public int? FloorLevel { get; set; }
///
/// 所在楼层(Excel导入用)
///
[DisplayName("所在楼层")]
public string FloorLevelStr { get; set; }
///
/// 面积
///
[DisplayName("面积")]
[RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")]
public decimal? Acreage { get; set; }
///
/// 面积(Excel导入用)
///
[DisplayName("面积")]
public string AcreageStr { get; set; }
///
/// 行数
///
[DisplayName("行数")]
[RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")]
public int? RowCout { get; set; }
///
/// 行数(Excel导入用)
///
[DisplayName("行数")]
public string RowCoutStr { get; set; }
///
/// 列数
///
[DisplayName("列数")]
[RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")]
public int? ColumnCount { get; set; }
///
/// 列数(Excel导入用)
///
[DisplayName("列数")]
public string ColumnCountStr { get; set; }
///
/// 总座位数
///
[DisplayName("总座位数")]
[RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")]
public int? Totalseating { get; set; }
///
/// 总座位数(Excel导入用)
///
[DisplayName("总座位数")]
public string TotalseatingStr { get; set; }
///
/// 有效座位数
///
[DisplayName("有效座位数")]
[RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")]
public int? Effectiveseating { get; set; }
///
/// 有效座位数(Excel导入用)
///
[DisplayName("有效座位数")]
public string EffectiveseatingStr { get; set; }
///
/// 考试座位数
///
[DisplayName("考试座位数")]
[RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")]
public int? Examinationseating { get; set; }
///
/// 考试座位数(Excel导入用)
///
[DisplayName("考试座位数")]
public string ExaminationseatingStr { get; set; }
///
/// 可否笔试
///
[DisplayName("可否笔试")]
public bool IsWrittenExam { get; set; }
///
/// 可否笔试(Excel导入用)
///
[DisplayName("可否笔试")]
public string IsWrittenExamStr { get; set; }
///
/// 可否笔试
///
[DisplayName("可否笔试")]
public string IsWrittenExamName
{
get { return this.IsWrittenExam == true ? "是" : "否"; }
}
///
/// 可否机试
///
[DisplayName("可否机试")]
public bool IsMachinetest { get; set; }
///
/// 可否机试(Excel导入用)
///
[DisplayName("可否机试")]
public string IsMachinetestStr { get; set; }
///
/// 可否机试
///
[DisplayName("可否机试")]
public string IsMachinetestName
{
get { return this.IsMachinetest == true ? "是" : "否"; }
}
///
/// 可否多班教学
///
[DisplayName("可否多班教学")]
public bool IsConcurrentUse { get; set; }
///
/// 可否多班教学(Excel导入用)
///
[DisplayName("可否多班教学")]
public string IsConcurrentUseStr { get; set; }
///
/// 可否多班教学
///
[DisplayName("可否多班教学")]
public string IsConcurrentUseName
{
get { return this.IsConcurrentUse == true ? "是" : "否"; }
}
///
/// 是否预留(排课用)
///
[DisplayName("是否预留")]
public bool IsReserve { get; set; }
///
/// 是否预留(排课用)
///
[DisplayName("是否预留")]
public string IsReserveName
{
get { return this.IsReserve == true ? "是" : "否"; }
}
///
/// 是否可用
///
[DisplayName("是否可用")]
public bool IsAvailable { get; set; }
///
/// 是否可用(Excel导入用)
///
[DisplayName("是否可用")]
public string IsAvailableStr { get; set; }
///
/// 是否可用
///
[DisplayName("是否可用")]
public string IsAvailableName
{
get { return this.IsAvailable == true ? "是" : "否"; }
}
///
/// 排课院系个数(统计排课分配的院系个数)
///
[DisplayName("排课院系个数")]
public int? ScheduleCollegeCount { get; set; }
///
/// 备注
///
[DisplayName("备注")]
public string Remark { get; set; }
///
/// 错误信息(Excel导入)
///
[DisplayName("未导入原因")]
public string ErrorMessage { get; set; }
///
/// 状态
///
[DisplayName("状态")]
public int? RecordStatus { get; set; }
///
/// 创建人
///
[DisplayName("创建人")]
public Guid? CreateUserID { get; set; }
///
/// 创建时间
///
[DisplayName("创建时间")]
public DateTime? CreateTime { get; set; }
///
/// 修改人
///
[DisplayName("修改人")]
public Guid? ModifyUserID { get; set; }
///
/// 修改时间
///
[DisplayName("修改时间")]
public DateTime? ModifyTime { get; set; }
}
}