using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace EMIS.ViewModel.TerminatePrinter { public class StudentPrintMessageView { public Guid UserID { get; set; } public int TotalPrintTimes { get; set; } public int PrintTimes { get; set; } public int CanPrintTimes { get { if (PrintTimes >= TotalPrintTimes) { return 0; } else { return TotalPrintTimes - PrintTimes; } } } public string Message { get { return string.Format("您的成绩单共可打印{0}次,现已打印{1}次,{2}", TotalPrintTimes, PrintTimes, (CanPrintTimes > 0) ? "是否需要现在打印?" : "您的打印次数已用完,如需打印,请联系教务处相关老师。" ); } } } }