Exemple #1
0
 /// <summary>
 /// 添加宗地描述模块(作为市公司的下级)
 /// </summary>
 /// <param name="document"></param>
 /// <param name="childcountryID"></param>
 public void Addparcels(DocX document, Companymodel childcountry, NumoftitleHelper title)
 {
     foreach (Parcelmodel pm in lstPM)
     {
         parcelHelper phelper = new parcelHelper(pm, (int)childcountry.ID);//添加各个地块的信息
         if (childcountry.property == "培训单位" || childcountry.property == "直属单位")
         {
             phelper.insertInfo(document, lstFM, lstPM, false, true, title);
         }
         else
         {
             phelper.insertInfo(document, lstFM, lstPM, true, false, title);
         }
     }
 }
Exemple #2
0
        /// <summary>
        /// 生成汇编文档
        /// </summary>
        void createword()
        {
            try
            {
                lstFM = FDXXtbl.GetInfo();
                lstp  = FDXXtbl.Parcels(lstFM);
                using (DocX document = DocX.Create(WordPath))
                {
                    Addcover(document);                                   //添加封面
                    document.InsertSectionPageBreak(true);                //分节符

                    Addtoc(document);                                     //添加目录
                    document.InsertSectionPageBreak(true);                //分节符

                    Addintro(document);                                   //添加概述

                    Addloc(document);                                     //添加位置分布图

                    Addfdxx(document);                                    //添加房地信息统计

                    parcelHelper phelper = new parcelHelper("通湖路699号地块"); //添加各个地块的信息
                    phelper.insertInfo(document, lstFM, lstp);

                    document.Save();
                }
                Console.WriteLine("创建文档成功!");
            }
            catch (System.Exception ex)
            {
                LogHelper.WriteLog(typeof(Program), ex);
                Console.WriteLine("创建文档失败!请查看日志!");
            }
        }
Exemple #3
0
 /// <summary>
 /// 添加宗地描述模块
 /// </summary>
 /// <param name="document"></param>
 public void Addparcels(DocX document)
 {
     foreach (Parcelmodel pm in lstPM)
     {
         parcelHelper phelper = new parcelHelper(pm, CompanyID);//添加各个地块的信息
         phelper.insertInfo(document, lstFM, lstPM, false, false, title_country);
     }
 }