Esempio n. 1
0
        /// <summary>
        /// 创建规划文档
        /// </summary>
        /// <param name="issuedUnit">发文单位</param>
        /// <param name="issuedDate">发文日期</param>
        /// <param name="docNumber">发文文号</param>
        /// <param name="documentId">文档外键</param>
        /// <param name="docName">文档名称</param>
        /// <param name="programming">规划期间</param>
        /// <param name="type">规划文档类型</param>
        /// <returns>规划文档</returns>
        public static ProgrammingFile CreateProgrammingFile(IssuedUnit issuedUnit,DateTime? issuedDate,string docNumber,Guid documentId,string docName,Programming programming,int type)
        {
            var programmingFile = new ProgrammingFile
            {
                CreateDate = DateTime.Now,
                Type=type,
            };

            programmingFile.GenerateNewIdentity();
            programmingFile.SetDocNumber(docNumber);
            programmingFile.SetDocument(documentId,docName);
            programmingFile.SetIssuedDate(issuedDate);
            programmingFile.SetIssuedUnit(issuedUnit);
            programmingFile.SetProgramming(programming);
            return programmingFile;
        }
Esempio n. 2
0
        /// <summary>
        ///     设置规划期间
        /// </summary>
        /// <param name="programming">规划期间</param>
        public void SetProgramming(Programming programming)
        {
            if (programming == null || programming.IsTransient())
            {
                throw new ArgumentException("规划期间参数为空!");
            }

            Programming = programming;
            ProgrammingId = programming.Id;
        }