using System; using System.Collections.Generic; using System.Linq; using System.Text; using EMIS.ViewModel.Cache; namespace EMIS.ViewModel.CalendarManage { public class BaseWorkTimeView { /// /// 节次 /// public int StartTimes { get; set; } public int EndTimes { get; set; } public string Times { get { return StartTimes.ToString() + "-" + EndTimes.ToString(); } } /// /// 时间节段 /// public int TimesSegment { get; set; } /// /// TimesSegment /// public string TimesSegmentName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_TimesSegment.ToString()) .Where(x => x.Value == TimesSegment) .Select(x => x.Name).FirstOrDefault(); } } /// /// 开始时间(小时) /// public int StartHour { get; set; } /// /// 开始时间(分钟) /// public int StartMinutes { get; set; } /// /// 结束时间(小时) /// public int EndHour { get; set; } /// /// 结束时间(分钟) /// public int EndMinutes { get; set; } public int Workhours { get { return EndTimes - StartTimes + 1; } } } }