/// <summary> /// 设置附件 /// </summary> /// <param name="pnReg">附件</param> public void SetPnReg(PnReg pnReg) { if (pnReg == null || pnReg.IsTransient()) { throw new ArgumentException("附件参数为空!"); } Pn = pnReg.Pn; PnRegId = pnReg.Id; }
/// <summary> /// 设置依赖项 /// </summary> /// <param name="dependencyPnReg">依赖项附件</param> public void SetPnReg(PnReg dependencyPnReg) { if (dependencyPnReg == null || dependencyPnReg.IsTransient()) { throw new ArgumentException("依赖项附件参数为空!"); } Pn = dependencyPnReg.Pn; DependencyPnId = dependencyPnReg.Id; }
/// <summary> /// 新增依赖项 /// </summary> /// <param name="dependencyPnReg">依赖项附件</param> /// <returns>依赖项</returns> public Dependency AddNewDependency(PnReg dependencyPnReg) { var dependency = new Dependency { InstallControllerId = Id, }; dependency.GenerateNewIdentity(); dependency.SetPnReg(dependencyPnReg); return dependency; }
/// <summary> /// 设置附件 /// </summary> /// <param name="pnReg">附件</param> public void SetPnReg(PnReg pnReg) { if (pnReg == null || pnReg.IsTransient()) { throw new ArgumentException("附件参数为空!"); } //当件号发生改变的时候,将原来的件号记录起来 if (Pn != pnReg.Pn) { AllPnName += (pnReg.Pn + ";"); } Pn = pnReg.Pn; PnRegId = pnReg.Id; }