Beispiel #1
0
        /// <summary>
        ///     更新序号件
        /// </summary>
        /// <param name="updateSnReg">需要更新的序号件</param>
        /// <param name="installDate">初始安装日期</param>
        /// <param name="pnReg">附件</param>
        /// <param name="sn">序号</param>
        /// <returns>序号件</returns>
        public static SnReg UpdateSnReg(
            SnReg updateSnReg,
            DateTime installDate,
            PnReg pnReg,
            string sn)
        {
            updateSnReg.InstallDate = installDate;
            updateSnReg.Sn = sn;

            updateSnReg.SetPnReg(pnReg);
            updateSnReg.UpdateDate = DateTime.Now;

            return updateSnReg;
        }
Beispiel #2
0
        /// <summary>
        ///     创建序号件
        /// </summary>
        /// <param name="installDate">初始安装日期</param>
        /// <param name="pnReg">附件</param>
        /// <param name="sn">序号</param>
        /// <returns>序号件</returns>
        public static SnReg CreateSnReg(
            DateTime installDate,
            PnReg pnReg,
            string sn)
        {
            var snReg = new SnReg
            {
                InstallDate = installDate,
                Sn = sn,
            };
            snReg.GenerateNewIdentity();
            snReg.SetPnReg(pnReg);
            snReg.CreateDate = DateTime.Now;
            snReg.UpdateDate = DateTime.Now;

            return snReg;
        }