using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using EMIS.Entities;
using EMIS.ViewModel.Students;
namespace EMIS.ViewModel.DQPSystem
{
public class SOCDetailGroupView
{
///
/// 主键ID
///
[DisplayName("主键ID")]
public Guid? SOCDetailGroupID { 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; }
///
/// 课程成果ID
///
[DisplayName("课程成果ID")]
public Guid? SOCDetailID { get; set; }
///
/// 成果名称
///
[DisplayName("成果名称")]
public string Name { get; set; }
///
/// 成果学分
///
[DisplayName("成果学分")]
public decimal? Credit { get; set; }
///
/// 成果权重
///
[DisplayName("成果权重")]
public decimal? Weight { get; set; }
///
/// 课程资料
///
[DisplayName("课程资料")]
public Guid? CoursematerialID { get; set; }
///
/// 课程资料代码
///
[DisplayName("课程资料代码")]
public string CourseCode { get; set; }
///
/// 课程名称
///
[DisplayName("课程名称")]
public string CourseName { get; set; }
///
/// 分组序号
///
[DisplayName("分组序号")]
public int? No { get; set; }
///
/// 组名
///
[DisplayName("组名")]
public string GroupName
{
get
{
return "第" + No.ToString() + "组";
}
}
///
/// 分组成绩
///
[DisplayName("分组成绩")]
public decimal? Score { get; set; }
//public IEnumerable StudentList { get; set; }
public int? StudentCount { get; set; }
public IEnumerable StudentList { get; set; }
public string StudentName {
get {
string studentNames = string.Empty;
if (StudentList != null)
studentNames = string.Join(",", StudentList.Select(s => s.Name));
if (string.IsNullOrEmpty(studentNames))
{
return "";
}
else
{
return studentNames;
}
}
}
public string EducationMissionNameStr
{
get
{
if (string.IsNullOrEmpty(EducationMissionName))
{
return "";
}
else
{
return EducationMissionName.Replace(CourseName, "").Replace("-", "");
}
}
}
}
}