using System; using System.Collections.Generic; using System.Linq; using System.Text; using EMIS.ViewModel.CacheManage; namespace EMIS.ViewModel.ScoreManage { public class StudentScoreInputView { //序号 public int No { get; set; } /// /// 成绩录入ID /// public Guid? ScoreID { get; set; } public Guid? CoursematerialID{get;set;} /// /// 期末设定ID /// public Guid? FinalExaminationID { get; set; } /// /// 学生ID /// public Guid? UserID { get; set; } /// /// 学号 /// public string LoginID { get; set; } /// /// 姓名 /// public string UserName { get; set; } /// /// 考试性质 /// public int? ExamsCategoryID { get; set; } /// /// 考试性质 /// public string ExamsCategoryName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ExamsCategory.ToString()) .Where(x => x.Value == ExamsCategoryID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 考试状态 /// public int? ExamsStateID { get; set; } /// /// 考试性质 /// public string ExamsStateName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ExamsState.ToString()) .Where(x => x.Value == ExamsStateID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 总成绩 /// public decimal? TotalScore { get; set; } /// /// 学分 /// public decimal? Credit { get; set; } /// /// 绩点 /// public decimal? GradePoint { get; set; } /// /// 备注 /// public string Remarks { get; set; } //dictionary反序列化时,键必须为字符串或者对象…… public Dictionary ScoreDetail { get; set; } public bool IsCanEdit { get; set; } public bool IsConvert { get; set; } public int? StarttermID { get; set; } /// /// 考试状态 /// public int? RecordStatus { get; set; } } [Serializable] public class StudentScoreInputDetailView { public Guid? UserID { get; set; } public int? ScoreTypeID { get; set; } public decimal? Score { get; set; } public bool IsCanEdit { get; set; } public int? RecordStatus { get; set; } public static explicit operator StudentScoreInputDetailView(string jsonString) { return Newtonsoft.Json.JsonConvert.DeserializeObject(jsonString); } public override string ToString() { return Newtonsoft.Json.JsonConvert.SerializeObject(this); } } }