예제 #1
0
        /// <summary>
        ///     创建发动机序号件
        /// </summary>
        /// <param name="installDate">初始安装日期</param>
        /// <param name="pnReg">附件</param>
        /// <param name="thrust"></param>
        /// <param name="sn">序号</param>
        /// <returns>发动机序号件</returns>
        public static EngineReg CreateEngineReg(
            DateTime installDate,
            PnReg pnReg,
            Thrust thrust,
            string sn)
        {
            var engineReg = new EngineReg
            {
                InstallDate = installDate,
                Sn = sn,
            };
            engineReg.GenerateNewIdentity();
            engineReg.SetPnReg(pnReg);
            engineReg.SetThrust(thrust);
            engineReg.SetSnStatus(SnStatus.装机);
            engineReg.SetIsLife(false, false, 0, 0);
            engineReg.SetMonitorStatus((OilMonitorStatus.正常));
            engineReg.CreateDate = DateTime.Now;
            engineReg.UpdateDate = DateTime.Now;

            return engineReg;
        }
예제 #2
0
        /// <summary>
        ///     更新发动机序号件
        /// </summary>
        /// <param name="installDate">初始安装日期</param>
        /// <param name="pnReg">附件</param>
        /// <param name="thrust"></param>
        /// <param name="sn">序号</param>
        /// <returns>发动机序号件</returns>
        public static EngineReg UpdateEngineReg(
            DateTime installDate,
            PnReg pnReg,
            Thrust thrust,
            string sn)
        {
            var engineReg = new EngineReg
            {
                InstallDate = installDate,
                Sn = sn,
            };
            engineReg.GenerateNewIdentity();
            engineReg.SetPnReg(pnReg);
            engineReg.SetThrust(thrust);
            engineReg.UpdateDate = DateTime.Now;

            return engineReg;
        }