/// <summary> /// 创建序号件 /// </summary> /// <param name="sn">序号</param> /// <returns>序号件</returns> public static SnReg CreateSnReg(string sn) { var snReg = new SnReg { Sn = sn, }; snReg.GenerateNewIdentity(); snReg.CreateDate = DateTime.Now; return snReg; }
/// <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; }