Ejemplo n.º 1
0
        /// <summary>
        ///     新增到寿监控
        /// </summary>
        /// <param name="workDescription">监控工作描述</param>
        /// <param name="start">到寿日期开始</param>
        /// <param name="end">到寿日期结束</param>
        /// <returns>到寿监控</returns>
        public LifeMonitor AddNewLifeMonitor(string workDescription, DateTime start, DateTime end)
        {
            var lifeMonitor = new LifeMonitor
            {
                SnRegId = Id,
            };
            lifeMonitor.GenerateNewIdentity();
            lifeMonitor.SetWorkDescription(workDescription);
            lifeMonitor.SetMointorPeriod(start, end);
            LifeMonitors.Add(lifeMonitor);

            return lifeMonitor;
        }
Ejemplo n.º 2
0
 /// <summary>
 ///     更新到寿监控
 /// </summary>
 /// <param name="lifeMonitorDto">到寿监控DTO</param>
 /// <param name="lifeMonitor">到寿监控</param>
 private void UpdateLifeMonitor(LifeMonitorDTO lifeMonitorDto, LifeMonitor lifeMonitor)
 {
     lifeMonitor.SetWorkDescription(lifeMonitorDto.WorkDescription);
     lifeMonitor.SetMointorPeriod(lifeMonitorDto.MointorStart, lifeMonitorDto.MointorEnd);
 }