using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using EMIS.ViewModel.CacheManage;
namespace EMIS.ViewModel.DQPSystem
{
public class SOCView
{
///
/// 主键ID
///
[DisplayName("主键ID")]
public Guid SOCID { get; set; }
public Guid? EducationMissionID { get; set; }
public string EducationMissionName { get; set; }
///
/// 学年学期ID
///
[DisplayName("学年学期ID")]
public Guid? SchoolyearID { get; set; }
///
/// 学年学期
///
[DisplayName("学年学期")]
public string SchoolyearCode { get; set; }
///
/// 课程资料
///
[Required]
[DisplayName("课程资料")]
public Guid? CoursematerialID { get; set; }
///
/// 课程资料代码
///
[DisplayName("课程资料代码")]
public string CourseCode { get; set; }
///
/// 课程名称
///
[DisplayName("课程名称")]
public string CourseName { get; set; }
///
/// 教研室
///
[Required]
[DisplayName("教研室")]
public Guid? DepartmentID { get; set; }
///
/// 教研室代码
///
[DisplayName("教研室代码")]
public string DepartmentCode { get; set; }
///
/// 教研室
///
[DisplayName("教研室")]
public string DepartmentName { get; set; }
///
/// 学分
///
[Required]
[DisplayName("学分")]
//[DisplayFormat(DataFormatString = "{0:#.0}")]
//[RegularExpression(@"^\d+(\.\d{1,1})?$", ErrorMessage = "请输整数或保留1位小数")]
public decimal? Credit { get; set; }
///
/// 课程学分
///
[DisplayName("学分")]
public string CreditStr { get; set; }
///
/// 学生人数
///
[DisplayName("学生人数")]
public int? StudentCount { get; set; }
///
/// SOC设置
///
[DisplayName("SOC设置")]
public string SOCSetting
{
get
{
return "查看";
}
}
///
/// 处理方式
///
[DisplayName("处理方式")]
public int? HandleModeID { get; set; }
///
/// 处理方式
///
[DisplayName("处理方式")]
public string HandleModeName
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.CF_HandleMode.ToString())
.Where(x => x.Value == HandleModeID)
.Select(x => x.Name).FirstOrDefault();
}
}
///
/// 选修类型
///
public int? OptionalCourseTypeID { get; set; }
public string EducationMissionNameStr
{
get
{
return (EducationMissionName == null || EducationMissionName == "") ? "" : EducationMissionName.Replace(CourseName, "").Replace("-", "");
}
}
}
}