using Bowin.Common.Exceptions;
using EMIS.Entities;
using EMIS.ViewModel.CacheManage;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
namespace EMIS.ViewModel.EvaluationManage
{
public class EvaluationIntTypeView
{
///
/// 评价类型
///
[DisplayName("评价类型ID")]
public Guid? EvaluationIntTypeID { get; set; }
///
/// 编号
///
[Required]
[DisplayName("编号")]
public string Code { get; set; }
///
/// 名称
///
[DisplayName("名称")]
[Required]
public string Name { get; set; }
///
/// 授课方式ID
///
[DisplayName("授课方式")]
public List TeachingModeTypeID { get; set; }
///
/// 备注
///
[DisplayName("备注")]
public string Remark { get; set; }
[DisplayName("授课方式集合")]
public IEnumerable TeachingModeTypeViewList { get; set; }
[DisplayName("授课方式集合名称")]
public string TeachingModeTypeName
{
get
{
string name = string.Empty;
if (TeachingModeTypeViewList != null && TeachingModeTypeViewList.Count() > 0)
{
name = string.Join(",", TeachingModeTypeViewList.Select(x =>
x.TeachingModeTypeName));
}
if (string.IsNullOrEmpty(name))
{
return "";
}
else
{
return name;
}
}
}
//[DisplayName("授课方式集合名称")]
//public string TeachingModeTypeName
//{
// get
// {
// string name = string.Empty;
// if (TeachingModeTypeViewList != null && TeachingModeTypeViewList.Count() > 0)
// {
// name = string.Join(",", TeachingModeTypeViewList.Select(x =>
// IdNameExt.GetDictionaryItem(DictionaryItem.CF_TeachingMode.ToString())
// .Where(w => w.Value == x.TeachingModeType)
// .Select(w => w.Name).FirstOrDefault()
// ));
// }
// if (string.IsNullOrEmpty(name))
// {
// return "";
// }
// else
// {
// return name;
// }
// }
//}
}
public class TeachingModeTypeView
{
///
/// 评价类型
///
[DisplayName("评价类型ID")]
public Guid? EvaluationIntTypeID { get; set; }
[DisplayName("授课方式")]
public int? TeachingModeType { get; set; }
[DisplayName("授课方式")]
public string TeachingModeTypeName { get; set; }
}
}