示例#1
0
        /// <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;
        }
示例#2
0
        /// <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;
        }
示例#3
0
        /// <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;
        }
示例#4
0
文件: SnReg.cs 项目: unicloud/FRP
 /// <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;
 }