private static void FindCorrespondingInteropCells(Word.Table table, CellInfo[,] cellInfos)
            {
                var interopRow = 1;

                for (int r = 0; r < cellInfos.GetLength(0); r++)
                {
                    var interopCol = 0;
                    for (int c = 0; c < cellInfos.GetLength(1); c++)
                    {
                        var cellInfo = cellInfos[r, c];
                        if (cellInfo.MergedVerticallyWith != null)
                        {
                            interopCol++;
                        }
                        else
                        {
                            interopCol++;
                            cellInfo.Row    = interopRow;
                            cellInfo.Column = interopCol;
                            cellInfo.Cell   = GetCell(cellInfo, table);
                        }
                    }
                    interopRow++;
                }
            }
        public bool Q1()
        {
            bool check = false;

            OWord.Range range = this.Document.Content;
            if (range.Find.Execute("Our Most Popular Flavors*Contact Us", null, null, true))
            {
                OWord.Table   table = range.TopLevelTables[1];
                List <string> list  = new List <string>()
                {
                    "Chocolate Heaven Splurge\r\a\r\a",
                    "Fruit Heaven Splurge\r\a\r\a",
                    "Jawbreaker Mint\r\a\r\a",
                    "Pecan and Peanut Truffle\r\a\r\a",
                    "Whole Vanilla Bean Chunk\r\a\r\a"
                };

                for (int i = 1; i <= list.Count; ++i)
                {
                    check = table.Rows[i].Range.Text == list[i - 1];
                    if (!check)
                    {
                        return(false);
                    }
                }
            }
            return(check);
        }
            public static CellInfo[,] GetInfosFromTable(Word.Table table)
            {
                var doc = XDocument.Parse(table.Range.XML);

                CellInfo[,] cellInfos = GetInitializedArray(table);
                var xmlTable = doc.Descendants().First(n => n.Name.LocalName == "tbl");
                var rows     = xmlTable.Elements().Where(e => e.Name.LocalName == "tr").ToArray();

                for (int r = 0; r < rows.Length; r++)
                {
                    var row      = rows[r];
                    var rowCells = row.Elements().Where(e => e.Name.LocalName == "tc").ToArray();
                    var c        = 0;
                    foreach (var rowCell in rowCells)
                    {
                        cellInfos[r, c].XmlCell   = rowCell;
                        cellInfos[r, c].XmlRow    = r;
                        cellInfos[r, c].XmlColumn = c;
                        var gridSpan = int.Parse(rowCell.Descendants().FirstOrDefault(d => d.Name.LocalName == "gridSpan")?.Attributes().FirstOrDefault(a => a.Name.LocalName == "val")?.Value ?? "1");
                        if (gridSpan > 1)
                        {
                            for (int i = 1; i < gridSpan; i++)
                            {
                                cellInfos[r, c + i].MergedHorizontallyWith = rowCell;
                                cellInfos[r, c + i].XmlRow    = r;
                                cellInfos[r, c + i].XmlColumn = c + i;
                            }
                        }
                        c += gridSpan;
                    }
                }
                ApplyVerticalMerges(cellInfos);
                FindCorrespondingInteropCells(table, cellInfos);
                return(cellInfos);
            }
Пример #4
0
    public void firstTable()
    {
        int r = 6;
        int c = 2;

        Word.Table table = newDocument.Tables.Add(wordApplication.Selection.Range, r, c);

        for (int x = 1; x < 7; x++)
        {
            table.Cell(x, 1).SetWidth(160.00f, WdRulerStyle.wdAdjustFirstColumn);
        }

        table.Cell(1, 1).Select();
        wordApplication.Selection.Font.Bold = 1;
        wordApplication.Selection.TypeText(@"Project Details");
        table.Cell(2, 1).Select();
        wordApplication.Selection.TypeText(@"Client:");
        table.Cell(3, 1).Select();
        wordApplication.Selection.TypeText(@"Project name:");
        table.Cell(4, 1).Select();
        wordApplication.Selection.TypeText(@"URL(s) tested:");
        table.Cell(5, 1).Select();
        wordApplication.Selection.TypeText(@"Build version(s) tested:");
        table.Cell(6, 1).Select();
        wordApplication.Selection.TypeText(@"Test environment(s):");

        table.Cell(2, 2).Select();
        wordApplication.Selection.TypeText(clientName1);
        table.Cell(3, 2).Select();
        wordApplication.Selection.TypeText(projectName1);
        table.Cell(4, 2).Select();
        wordApplication.Selection.TypeText(txtURL);
        table.Cell(5, 2).Select();
        wordApplication.Selection.TypeText(txtVersion);
        table.Cell(6, 2).Select();
        wordApplication.Selection.TypeText(@"Please detail Primary functional test environment(s) where scripted testing is being carried out. 

For cross environment checks/smoke tests, please see the environments detailed in the table at the end of the report*.

For issue verifications please state: Retests executed in environments the issues were originally raised in.");

        String bobone = wordApplication.Version;

        if (bobone == "14.0")
        {
            table.Style = "Light Shading - Accent 1";
            table.ApplyStyleFirstColumn = false;
            table.ApplyStyleHeadingRows = false;
        }
        else
        {
            table.Style = "List Table 6 Colorful - Accent 1";
            table.ApplyStyleFirstColumn = false;
            table.ApplyStyleHeadingRows = false;
        }

        table.Dispose();
        return;
    }
 public bool Q2()
 {
     if (this.Document.Tables.Count == 0)
     {
         return(false);
     }
     OWord.Table table = this.Document.Tables[1];
     return((table.Style as OWord.Style).NameLocal == "Grid Table 5 Dark - Accent 5");
 }
Пример #6
0
        private void WriteTestTable1(List <TestPhysicalReport> physicalModels)
        {
            SetParaText(1, 12, "表1  工作场所稳态噪声强度测量结果             ", WdParagraphAlignment.wdAlignParagraphCenter);
            SetParaText(1, 12, "单位:dB(A)", WdParagraphAlignment.wdAlignParagraphRight);
            Word.Table table1 = m_doc.Tables.Add(m_wordApp.Selection.Range, physicalModels.Count + 1, 7);  ///physicalmodel有一条加一条
            table1.Borders.Enable           = 1;
            table1.Borders.OutsideLineStyle = WdLineStyle.wdLineStyleNone;
            table1.Borders[WdBorderType.wdBorderTop].LineStyle    = WdLineStyle.wdLineStyleSingle;
            table1.Borders[WdBorderType.wdBorderBottom].LineStyle = WdLineStyle.wdLineStyleSingle;
            table1.Rows.Height      = 20;
            table1.Rows[1].Height   = 30;
            table1.Columns[2].Width = 40;
            table1.Columns[3].Width = 100;
            table1.Cell(1, 1).Select();
            SetCellHeaderText("车间");
            table1.Cell(1, 2).Select();
            SetCellHeaderText("岗位");
            table1.Cell(1, 3).Select();
            SetCellHeaderText("测量地点");
            table1.Cell(1, 4).Select();
            SetCellHeaderText("样品编号");
            table1.Cell(1, 5).Select();
            SetCellHeaderText("接触时间h/d");
            table1.Cell(1, 6).Select();
            SetCellHeaderText("噪声强度");
            table1.Cell(1, 7).Select();
            if (physicalModels.Count == 0 || physicalModels[0].LexCategory == 0)       ////是否存在,或者LEX类别是否为0;有一条加一条
            {
                SetCellHeaderText("Lex8H");
            }
            else
            {
                SetCellHeaderText("LexW");
            }
            int i = 2;

            foreach (var item in physicalModels)
            {
                m_wordApp.Selection.Font.Bold = 0;
                m_wordApp.Selection.Font.Size = 14;
                table1.Cell(i, 1).Select();
                SetCellText(0, 12, item.WordShop, WdParagraphAlignment.wdAlignParagraphCenter, WdCellVerticalAlignment.wdCellAlignVerticalCenter);
                table1.Cell(i, 2).Select();
                SetCellText(0, 12, item.Job, WdParagraphAlignment.wdAlignParagraphCenter, WdCellVerticalAlignment.wdCellAlignVerticalCenter);
                table1.Cell(i, 3).Select();
                SetCellText(0, 12, item.Location, WdParagraphAlignment.wdAlignParagraphCenter, WdCellVerticalAlignment.wdCellAlignVerticalCenter);
                table1.Cell(i, 4).Select();
                SetCellText(0, 12, item.SampleNumber, WdParagraphAlignment.wdAlignParagraphCenter, WdCellVerticalAlignment.wdCellAlignVerticalCenter);
                table1.Cell(i, 5).Select();
                SetCellText(0, 12, item.ContactTime, WdParagraphAlignment.wdAlignParagraphCenter, WdCellVerticalAlignment.wdCellAlignVerticalCenter);
                table1.Cell(i, 6).Select();
                SetCellText(0, 12, item.NoiseIntensity, WdParagraphAlignment.wdAlignParagraphCenter, WdCellVerticalAlignment.wdCellAlignVerticalCenter);
                table1.Cell(i, 7).Select();
                SetCellText(0, 12, item.Lex8hLexw, WdParagraphAlignment.wdAlignParagraphCenter, WdCellVerticalAlignment.wdCellAlignVerticalCenter);
                i++;
            }
        }
            private static CellInfo[,] GetInitializedArray(Word.Table table)
            {
                var cellInfos = new CellInfo[table.Rows.Count, table.Columns.Count];

                for (int r = 0; r < cellInfos.GetLength(0); r++)
                {
                    for (int c = 0; c < cellInfos.GetLength(1); c++)
                    {
                        cellInfos[r, c] = new CellInfo();
                    }
                }
                return(cellInfos);
            }
Пример #8
0
    public void fithTable()
    {
        int r = 5;
        int c = 2;

        Word.Table table = newDocument.Tables.Add(wordApplication.Selection.Range, r, c);

        for (int x = 1; x < 6; x++)
        {
            table.Cell(x, 1).SetWidth(160.00f, WdRulerStyle.wdAdjustFirstColumn);
        }

        table.Cell(1, 1).Select();
        wordApplication.Selection.Font.Bold = 1;
        wordApplication.Selection.TypeText(@"Metrics");
        table.Cell(2, 1).Select();
        wordApplication.Selection.TypeText(@"New issues raised today:");
        table.Cell(3, 1).Select();
        wordApplication.Selection.TypeText(@"Issues re-opened today:");
        table.Cell(4, 1).Select();
        wordApplication.Selection.TypeText(@"Issues closed today:");
        table.Cell(5, 1).Select();
        wordApplication.Selection.TypeText(@"Total number of issues currently open against this project:");

        table.Cell(2, 2).Select();
        wordApplication.Selection.TypeText(@"4");
        table.Cell(3, 2).Select();
        wordApplication.Selection.TypeText(@"9");
        table.Cell(4, 2).Select();
        wordApplication.Selection.TypeText(@"20");
        table.Cell(5, 2).Select();
        wordApplication.Selection.TypeText(@"38");

        String bobone = wordApplication.Version;

        if (bobone == "14.0")
        {
            table.Style = "Light Shading - Accent 1";
            table.ApplyStyleFirstColumn = false;
            table.ApplyStyleHeadingRows = false;
        }
        else
        {
            table.Style = "List Table 6 Colorful - Accent 1";
            table.ApplyStyleFirstColumn = false;
            table.ApplyStyleHeadingRows = false;
        }

        table.Dispose();
        return;
    }
Пример #9
0
        public void RunExample()
        {
            // start word and turn off msg boxes
            Word.Application wordApplication = new Word.Application();
            wordApplication.DisplayAlerts = WdAlertLevel.wdAlertsNone;

            // add a new document
            Word.Document newDocument = wordApplication.Documents.Add();

            // add a table
            Word.Table table = newDocument.Tables.Add(wordApplication.Selection.Range, 3, 2);

            // insert some text into the cells
            table.Cell(1, 1).Select();
            wordApplication.Selection.TypeText("This");

            table.Cell(1, 2).Select();
            wordApplication.Selection.TypeText("table");

            table.Cell(2, 1).Select();
            wordApplication.Selection.TypeText("was");

            table.Cell(2, 2).Select();
            wordApplication.Selection.TypeText("created");

            table.Cell(3, 1).Select();
            wordApplication.Selection.TypeText("by");

            table.Cell(3, 2).Select();
            wordApplication.Selection.TypeText("NetOffice");

            // we save the document as .doc for compatibility with all word versions
            string documentFile = string.Format("{0}\\Example02{1}", _hostApplication.RootDirectory, ".doc");
            double wordVersion  = Convert.ToDouble(wordApplication.Version, CultureInfo.InvariantCulture);

            if (wordVersion >= 12.0)
            {
                newDocument.SaveAs(documentFile, WdSaveFormat.wdFormatDocumentDefault);
            }
            else
            {
                newDocument.SaveAs(documentFile);
            }

            // close word and dispose reference
            wordApplication.Quit();
            wordApplication.Dispose();

            // show dialog for the user(you!)
            _hostApplication.ShowFinishDialog(null, documentFile);
        }
 private static Word.Cell GetCell(CellInfo cellInfo, Word.Table table)
 {
     foreach (var cell in table.Range.Cells)
     {
         if (cell.NestingLevel == table.NestingLevel)
         {
             if (cellInfo.Column == cell.ColumnIndex && cellInfo.Row == cell.RowIndex)
             {
                 return(cell);
             }
         }
     }
     return(null);
 }
Пример #11
0
        public TestResult DoTest()
        {
            Word.Application application = null;
            DateTime         startTime   = DateTime.Now;

            try
            {
                application = new Word.Application();
                application.DisplayAlerts = WdAlertLevel.wdAlertsNone;

                Word.Document newDocument = application.Documents.Add();
                Word.Table    table       = newDocument.Tables.Add(application.Selection.Range, 3, 2);

                // insert some text into the cells
                table.Cell(1, 1).Select();
                application.Selection.TypeText("This");

                table.Cell(1, 2).Select();
                application.Selection.TypeText("table");

                table.Cell(2, 1).Select();
                application.Selection.TypeText("was");

                table.Cell(2, 2).Select();
                application.Selection.TypeText("created");

                table.Cell(3, 1).Select();
                application.Selection.TypeText("by");

                table.Cell(3, 2).Select();
                application.Selection.TypeText("NetOffice");

                newDocument.Close(false);

                return(new TestResult(true, DateTime.Now.Subtract(startTime), "", null, ""));
            }
            catch (Exception exception)
            {
                return(new TestResult(false, DateTime.Now.Subtract(startTime), exception.Message, exception, ""));
            }
            finally
            {
                if (null != application)
                {
                    application.Quit(WdSaveOptions.wdDoNotSaveChanges);
                    application.Dispose();
                }
            }
        }
Пример #12
0
        private void WriteTestTable2(List <TestChemicalReport> chemicalModels)
        {
            SetParaText(1, 12, "表2  工作场所空气中二氧化氮、臭氧、一氧化碳浓度检测结果     ", WdParagraphAlignment.wdAlignParagraphCenter);
            SetParaText(1, 12, "单位:mg/m3", WdParagraphAlignment.wdAlignParagraphRight);
            Word.Table table2 = m_doc.Tables.Add(m_wordApp.Selection.Range, chemicalModels.Count + 1, 7);  ///physicalmodel有一条加一条
            table2.Borders.Enable           = 1;
            table2.Borders.OutsideLineStyle = WdLineStyle.wdLineStyleNone;
            table2.Borders[WdBorderType.wdBorderTop].LineStyle    = WdLineStyle.wdLineStyleSingle;
            table2.Borders[WdBorderType.wdBorderBottom].LineStyle = WdLineStyle.wdLineStyleSingle;
            table2.Rows.Height      = 20;
            table2.Rows[1].Height   = 30;
            table2.Columns[2].Width = 40;
            table2.Columns[3].Width = 100;
            table2.Cell(1, 1).Select();
            SetCellHeaderText("车间");
            table2.Cell(1, 2).Select();
            SetCellHeaderText("岗位");
            table2.Cell(1, 3).Select();
            SetCellHeaderText("采样地点");
            table2.Cell(1, 4).Select();
            SetCellHeaderText("职业病危害因素");
            table2.Cell(1, 5).Select();
            SetCellHeaderText("样品编号");
            table2.Cell(1, 6).Select();
            SetCellHeaderText("检测结果");
            int i = 2;

            foreach (var item in chemicalModels)
            {
                m_wordApp.Selection.Font.Bold = 0;
                m_wordApp.Selection.Font.Size = 14;
                table2.Cell(i, 1).Select();
                SetCellText(0, 12, item.WorkShop, WdParagraphAlignment.wdAlignParagraphCenter, WdCellVerticalAlignment.wdCellAlignVerticalCenter);
                table2.Cell(i, 2).Select();
                SetCellText(0, 12, item.Job, WdParagraphAlignment.wdAlignParagraphCenter, WdCellVerticalAlignment.wdCellAlignVerticalCenter);
                table2.Cell(i, 3).Select();
                SetCellText(0, 12, item.Location, WdParagraphAlignment.wdAlignParagraphCenter, WdCellVerticalAlignment.wdCellAlignVerticalCenter);
                table2.Cell(i, 4).Select();
                SetCellText(0, 12, item.Factor, WdParagraphAlignment.wdAlignParagraphCenter, WdCellVerticalAlignment.wdCellAlignVerticalCenter);
                table2.Cell(i, 5).Select();
                SetCellText(0, 12, item.SampleNumber, WdParagraphAlignment.wdAlignParagraphCenter, WdCellVerticalAlignment.wdCellAlignVerticalCenter);
                table2.Cell(i, 6).Select();
                SetCellText(0, 12, item.CMAC, WdParagraphAlignment.wdAlignParagraphCenter, WdCellVerticalAlignment.wdCellAlignVerticalCenter);
                i++;
            }
            m_wordApp.Selection.MoveDown();
            SetParaText(0, 11, "注:臭氧最低检出浓度为0.07mg/m3(以采集30L空气样品计)", WdParagraphAlignment.wdAlignParagraphLeft);
        }
Пример #13
0
        private void WriteTestTable3(List <TestPhysicalReport> physicalModels)
        {
            SetParaText(1, 12, "表3 工作场所紫外辐射(电焊弧光)测量结果             ", WdParagraphAlignment.wdAlignParagraphCenter);
            SetParaText(1, 12, "单位:µW/cm2", WdParagraphAlignment.wdAlignParagraphRight);
            Word.Table table3 = m_doc.Tables.Add(m_wordApp.Selection.Range, physicalModels.Count + 1, 7);  ///physicalmodel有一条加一条
            table3.Borders.Enable           = 1;
            table3.Borders.OutsideLineStyle = WdLineStyle.wdLineStyleNone;
            table3.Borders[WdBorderType.wdBorderTop].LineStyle    = WdLineStyle.wdLineStyleSingle;
            table3.Borders[WdBorderType.wdBorderBottom].LineStyle = WdLineStyle.wdLineStyleSingle;
            table3.Rows.Height      = 20;
            table3.Rows[1].Height   = 30;
            table3.Columns[2].Width = 40;
            table3.Columns[3].Width = 100;
            table3.Cell(1, 1).Select();
            SetCellHeaderText("车间");
            table3.Cell(1, 2).Select();
            SetCellHeaderText("岗位");
            table3.Cell(1, 3).Select();
            SetCellHeaderText("测量地点");
            table3.Cell(1, 4).Select();
            SetCellHeaderText("测量位置");
            table3.Cell(1, 5).Select();
            SetCellHeaderText("样品编号");
            table3.Cell(1, 6).Select();
            SetCellHeaderText("测量结果");
            int i = 2;

            foreach (var item in physicalModels)
            {
                table3.Cell(i, 1).Select();
                SetCellText(0, 12, item.WordShop, WdParagraphAlignment.wdAlignParagraphCenter, WdCellVerticalAlignment.wdCellAlignVerticalCenter);
                table3.Cell(i, 2).Select();
                SetCellText(0, 12, item.Job, WdParagraphAlignment.wdAlignParagraphCenter, WdCellVerticalAlignment.wdCellAlignVerticalCenter);
                table3.Cell(i, 3).Select();
                SetCellText(0, 12, item.Location, WdParagraphAlignment.wdAlignParagraphCenter, WdCellVerticalAlignment.wdCellAlignVerticalCenter);
                table3.Cell(i, 4).Select();
                SetCellText(0, 12, item.TestContent, WdParagraphAlignment.wdAlignParagraphCenter, WdCellVerticalAlignment.wdCellAlignVerticalCenter);
                table3.Cell(i, 5).Select();
                SetCellText(0, 12, item.SampleNumber, WdParagraphAlignment.wdAlignParagraphCenter, WdCellVerticalAlignment.wdCellAlignVerticalCenter);
                table3.Cell(i, 6).Select();
                SetCellText(0, 12, item.ResultVerdict, WdParagraphAlignment.wdAlignParagraphCenter, WdCellVerticalAlignment.wdCellAlignVerticalCenter);
                i++;
            }
            m_wordApp.Selection.MoveDown();
            SetParaText(0, 11, "注:紫外辐照计最小分辨力为0.1µW/cm2)", WdParagraphAlignment.wdAlignParagraphLeft);
        }
Пример #14
0
        public void RunExample()
        {
            // start word and turn off msg boxes
            Word.Application wordApplication = new Word.Application();
            wordApplication.DisplayAlerts = WdAlertLevel.wdAlertsNone;

            // create a utils instance, not need for but helpful to keep the lines of code low
            CommonUtils utils = new CommonUtils(wordApplication);

            // add a new document
            Word.Document newDocument = wordApplication.Documents.Add();

            // add a table
            Word.Table table = newDocument.Tables.Add(wordApplication.Selection.Range, 3, 2);

            // insert some text into the cells
            table.Cell(1, 1).Select();
            wordApplication.Selection.TypeText("This");

            table.Cell(1, 2).Select();
            wordApplication.Selection.TypeText("table");

            table.Cell(2, 1).Select();
            wordApplication.Selection.TypeText("was");

            table.Cell(2, 2).Select();
            wordApplication.Selection.TypeText("created");

            table.Cell(3, 1).Select();
            wordApplication.Selection.TypeText("by");

            table.Cell(3, 2).Select();
            wordApplication.Selection.TypeText("NetOffice");

            // save the document
            string documentFile = utils.File.Combine(HostApplication.RootDirectory, "Example02", Word.Tools.DocumentFormat.Normal);

            newDocument.SaveAs(documentFile);

            // close word and dispose reference
            wordApplication.Quit();
            wordApplication.Dispose();

            // show dialog for the user(you!)
            HostApplication.ShowFinishDialog(null, documentFile);
        }
Пример #15
0
        /// <summary>
        /// Add a new document
        /// </summary>
        /// <param name="parameters"></param>
        /// <returns></returns>
        private object AddTable(Dictionary <string, object> parameters)
        {
            int    start   = 0;
            int    end     = 0;
            int    rows    = 0;
            int    columns = 0;
            object tmpObject;
            int    tmpInt;

            if (parameters.TryGetValue("start", out tmpObject))
            {
                if (int.TryParse(tmpObject.ToString(), out tmpInt))
                {
                    start = tmpInt;
                }
            }

            if (parameters.TryGetValue("end", out tmpObject))
            {
                if (int.TryParse(tmpObject.ToString(), out tmpInt))
                {
                    end = tmpInt;
                }
            }

            if (parameters.TryGetValue("columns", out tmpObject))
            {
                if (int.TryParse(tmpObject.ToString(), out tmpInt))
                {
                    columns = tmpInt;
                }
            }

            if (parameters.TryGetValue("rows", out tmpObject))
            {
                if (int.TryParse(tmpObject.ToString(), out tmpInt))
                {
                    rows = tmpInt;
                }
            }

            Word.Range tableLocation = application.ActiveDocument.Range(start, end);
            Word.Table table         = this.document.Tables.Add(this.application.Selection.Range, rows, columns);
            return(new Word.Table(table));
        }
Пример #16
0
    public void secondTable()
    {
        int r = 3;
        int c = 2;

        Word.Table table = newDocument.Tables.Add(wordApplication.Selection.Range, r, c);

        for (int x = 1; x < 4; x++)
        {
            table.Cell(x, 1).SetWidth(160.00f, WdRulerStyle.wdAdjustFirstColumn);
            //Console.WriteLine(table.Cell(1,1).Width);
        }

        table.Cell(1, 1).Select();
        wordApplication.Selection.Font.Bold = 1;
        wordApplication.Selection.TypeText(@"Report Details");
        table.Cell(2, 1).Select();
        wordApplication.Selection.TypeText(@"Tester Name:");
        table.Cell(3, 1).Select();
        wordApplication.Selection.TypeText(@"Date:");

        table.Cell(2, 2).Select();
        wordApplication.Selection.TypeText(configLines[1]);          //////////////////////////////////////////
        table.Cell(3, 2).Select();
        wordApplication.Selection.TypeText(DateTime.Now.ToString(@"dd/MM/yyyy"));

        String bobone = wordApplication.Version;

        if (bobone == "14.0")
        {
            table.Style = "Light Shading - Accent 1";
            table.ApplyStyleFirstColumn = false;
            table.ApplyStyleHeadingRows = false;
        }
        else
        {
            table.Style = "List Table 6 Colorful - Accent 1";
            table.ApplyStyleFirstColumn = false;
            table.ApplyStyleHeadingRows = false;
        }

        table.Dispose();
        return;
    }
Пример #17
0
        private void WriteTestTable6(List <TestChemicalReport> chemicalModels)
        {
            SetParaText(1, 12, "表6 工作场所空气中聚苯板粉尘、电焊烟尘、金属粉尘、水泥粉尘(总尘、呼尘)锰及其化合物浓度检测结果                ", WdParagraphAlignment.wdAlignParagraphCenter);
            SetParaText(1, 12, "单位:mg/m3", WdParagraphAlignment.wdAlignParagraphRight);
            Word.Table table6 = m_doc.Tables.Add(m_wordApp.Selection.Range, chemicalModels.Count + 1, 6);  ///physicalmodel有一条加一条
            table6.Borders.Enable           = 1;
            table6.Borders.OutsideLineStyle = WdLineStyle.wdLineStyleNone;
            table6.Borders[WdBorderType.wdBorderTop].LineStyle    = WdLineStyle.wdLineStyleSingle;
            table6.Borders[WdBorderType.wdBorderBottom].LineStyle = WdLineStyle.wdLineStyleSingle;
            table6.Rows.Height      = 20;
            table6.Rows[1].Height   = 30;
            table6.Columns[2].Width = 40;
            table6.Columns[3].Width = 100;
            table6.Cell(1, 1).Select();
            SetCellHeaderText("车间");
            table6.Cell(1, 2).Select();
            SetCellHeaderText("岗位");
            table6.Cell(1, 3).Select();
            SetCellHeaderText("采样地点");
            table6.Cell(1, 4).Select();
            SetCellHeaderText("样品编号");
            table6.Cell(1, 5).Select();
            SetCellHeaderText("检测结果");
            int i = 2;

            foreach (var item in chemicalModels)
            {
                table6.Cell(i, 1).Select();
                SetCellText(0, 12, item.WorkShop, WdParagraphAlignment.wdAlignParagraphCenter, WdCellVerticalAlignment.wdCellAlignVerticalCenter);
                table6.Cell(i, 2).Select();
                SetCellText(0, 12, item.Job, WdParagraphAlignment.wdAlignParagraphCenter, WdCellVerticalAlignment.wdCellAlignVerticalCenter);
                table6.Cell(i, 3).Select();
                SetCellText(0, 12, item.Location, WdParagraphAlignment.wdAlignParagraphCenter, WdCellVerticalAlignment.wdCellAlignVerticalCenter);
                table6.Cell(i, 4).Select();
                SetCellText(0, 12, item.SampleNumber, WdParagraphAlignment.wdAlignParagraphCenter, WdCellVerticalAlignment.wdCellAlignVerticalCenter);
                table6.Cell(i, 5).Select();
                SetCellText(0, 12, item.CMAC, WdParagraphAlignment.wdAlignParagraphCenter, WdCellVerticalAlignment.wdCellAlignVerticalCenter);
                i++;
            }
            m_wordApp.Selection.MoveDown();
        }
Пример #18
0
        private void WriteInstruction()
        {
            m_wordApp.Selection.ParagraphFormat.Alignment = WdParagraphAlignment.wdAlignParagraphLeft;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.TypeText("本合同由" + model.CompaneName + " (下称甲方)委托北京德康莱健康安全科技股份有限公司(下称乙方)就" + model.CompaneName + "新建" + model.ProjectName + "建设项目开展职业病危害控制效果评价技术服务工作。甲方获得乙方提供的符合国家《职业病防治法》及相关规范的该项目职业病危害控制效果评价报告书,向安监部门备案、评审。");
            m_wordApp.Selection.TypeText("双方经过平等协商,根据《中华人民共和国合同法》的规定,达成以下协议,并由双方共同恪守。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第一条 定义");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.TypeText("本合同所使用的下述名词和术语,除非根据上下文有其它明显含义,其定义为:");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("1.1 “合同”  是指由甲方与乙方签订的" + model.CompaneName + "新建" + model.ProjectName + "建设项目职业病危害控制效果评价技术服务合同,包括合同条款、相关附件以及在合同履行期间双方可能签订的备忘录和/或变更单。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("1.2 “报告”是指乙方为甲方提供的" + model.CompaneName + "   " + model.ProjectName + "  建设项目职业病危害控制效果评价报告。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("1.3 “日”是指工作日。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("1.4 “工作”是指职业病危害控制效果评价工作。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("1.5 “规范”是指合同中列出的所有规则、规格书、标准和技术规范。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("1.6 “图纸”是指由甲方提供或乙方提供用于工作的全部图纸。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("1.7 “第三方”是指除甲方和乙方以外的任何一方。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第二条 工作范围");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.TypeText("乙方按甲方要求,依据国家《职业病防治法》相关法律法规、标准和技术规范对" + model.CompaneName + "新建" + model.ProjectName + " 项目职业病危害控制效果评价,并编制相应评价文件,形成职业病危害控制效果评价报告。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("2.1 报告应包括但不限于以下内容:");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("(1) 职业病危害因素检测与评价目的、依据、范围、内容和方法;");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("(2)项目概况,包括建设地点、性质、规模、设计能力等;");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("(3) 项目工作场所存在的职业病危害因素的浓度或强度,并做出 评价;");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("(4) 职业病防护设施及职业危害控制效果;");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("(5)	职业健康监护及职业禁忌证等相关人员安置处理情况;");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("(6)	职业卫生管理及其相关制度落实情况;");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("(7)	应急救援设施及应急预案等;");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("(8)	对存在的职业卫生问题提出有效的防护建议和对策。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第三条 甲方的责任和义务");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.TypeText("3.1甲方应于本合同签订后______日内向乙方提供本合同“附件”规定的资料。甲方应对提供资料的真实性、完整性承担责任。因甲方未能在上述时间内提供材料导致乙方工作迟延的,乙方不承担迟延履行的责任。因甲方提交的上述材料存在虚假、错误或者不完整从而导致乙方无法完成工作的,乙方有权立即终止本合同,同时要求甲方按照合同约定支付全部费用。因甲方原因造成乙方重复工作的,甲方应承担相应的费用。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("3.2 按合同规定向乙方支付合同价款。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("3.3协助乙方完成现场职业卫生调查、检测,职业病防护设施、职业健康监护和职业卫生管理等相关资料的收集,并为乙方到现场工作提供相应的保障及便利。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第四条 乙方的责任和义务");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("4.1乙方应认真审查甲方提供的一切资料和文件,若发现有任何错误或不当,应及时书面通知甲方。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("4.2应按国家《职业病防治法》及相关法律法规、行业规范和标准向甲方提交能够反映该项目客观真实、准确、详细的职业病危害因素控制效果评价报告。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第五条 工作进度和完工");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("5.1甲方将本合同约定的材料交付乙方之日起_____个工作日,乙方严格按合同规定的进度计划完成职业病危害控制效果评价报告编制工作并将职业病危害控制效果评价报告的电子版交付给甲方。甲方应按照乙方通知的时间领取乙方的工作成果。甲方未按照乙方要求的时间接受工作成果的,视为甲方违约。甲方收到评价报告的电子版后应审核确认。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("甲方收到职业病危害控制效果评价报告后______日内,应组织对评价报告的内部审议工作,如认为职业病危害控制效果评价报告需要修改,应在上述日期内以文字的形式向乙方提出要求。甲方收到乙方提供的评价报告后______日内,未提出书面修改意见的,视为对乙方工作成果的确认。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("甲方认可评价报告后,乙方还应协助甲方邀请专家,组织完成职业病危害控制效果评价报告的评审工作。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("5.2合同履行期间,在乙方的实际工作进度落后于计划进度的情况下,甲方有权要求乙方加班、增加人力或其他资源以保证按时提交报告。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("5.3 由于甲方未能按3.1款和3.3款要求及时提供资料,造成乙方实际工作进度落后于计划工作进度情况下,乙方出具评价报告的时间将顺延。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("5.4甲方在向安监局提交报告进行报批时,若由于乙方工作失误导致评价报告存在缺陷,致使评价报告未能通过安监部门审批,乙方应按安监部门审批意见对评价报告进行修改直至通过审批;");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("若因甲方提供虚假的、不真实的材料而导致评价报告未能通过安监部门审批,则应视为乙方工作已经完结,甲方应按合同约定支付全部款项。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("5.5乙方向甲方提交该项目最终版的职业病危害控制效果评价报告一式_____份。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第六条 合同价格");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("6.1甲方应向乙方支付技术服务费用" + (Convert.ToDouble(model.Money) / 10000).ToString("0.00") + "万元(大写:______________万元)。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("6.2上述价款包含了乙方为履行合同所需的全部费用(包括乙方为履行合同而发生的差旅费、成本、税金、管理费、利润以及为履行合同所发生的其它费用),但不包括专家评审费、住宿费、交通费及评审会议费等用于与专家评审相关的费用。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第七条 付款方式");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("7.1甲乙双方签订本合同后 5 日内,甲方应向乙方支付合同总额的" + model.PayRatioFirst + "%,即" + ((Convert.ToDouble(model.Money) / 10000) * (Convert.ToDouble(model.PayRatioFirst) / 100)).ToString("0.00") + "万元。报告交付前甲方应向乙方支付合同总额的" + model.PayRatioFirst + "%,即" + ((Convert.ToDouble(model.Money) / 10000) * (Convert.ToDouble(model.PayRatioFirst) / 100)).ToString("0.00") + "万元。乙方在完成甲方现场检测并出具检测数据后表示已完成该项目50%的工作。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("7.2甲方收到乙方提交的该项目职业病危害控制效果评价报告后,应在7日内支付乙方" + (100 - Convert.ToInt16(model.PayRatioFirst)) + "%合同款" + ((Convert.ToDouble(model.Money) / 10000) * ((Convert.ToDouble(100) - Convert.ToDouble(model.PayRatioFirst)) / 100)).ToString("0.00") + "万元。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("7.3  乙方开户银行名称、地址和账号为:");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("收款单位:北京德康莱健康安全科技股份有限公司");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("帐    号:");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("汇 入 行:");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第八条 保密");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("甲方:");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("8.1 保密内容:未经乙方书面同意,甲方不得将乙方提交的有关本项目的评价报告及其他与之相关的任何技术性文件、资料用于本合同目的之外的任何用途,否则,乙方将要求甲方另行支付相应费用。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("非为用于本合同之目的,未经乙方书面同意或根据法律之规定及政府相关部门的要求,甲方不得将上述材料向任何第三人公开或变相公开,包括甲方故意或过失将上述材料丢失致使上述材料为不特定第三人所知。否则,甲方的行为将视为对乙方权利的侵犯。在此种情况下,乙方有权要求甲方另行支付相关费用。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("8.2 涉密人员范围:甲方所有可能接触该评价报告的工作人员。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("8.3 保密期限:自甲方知悉上述约定的保密信息之日起至上述保密信息为公众所知之日止。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("8.4 泄密责任:甲方违反上述约定,应当承担相应赔偿责任。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("乙方:");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("8.5保密内容:乙方承诺,乙方对甲方提供的可行性研究报告及技术资料仅用于编制该项目职业病危害控制效果评价报告,不得用于除此以外的其他任何目的。但乙方依照国家法律、法规及相关政府部门的要求除外。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("8.6 涉密人员范围:乙方所有涉及该项目技术资料的人员。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("8.7 保密期限:自乙方知悉上述保密内容之日起至上述保密信息为公众所知之日止。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("8.8泄密责任:乙方违反本约定造成甲方经济损失,甲方有权依法要求赔偿。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第九条  合同变更");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("本合同的变更必须由双方协商一致,并以书面形式确定。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第十条  成果验收");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("双方确定以下列标准和方式对乙方的技术服务工作成果进行验收:");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("10.1 乙方提交的技术服务工作成果形式为编制完成的" + model.ProjectName + "建设项目职业病危害控制效果评价报告书。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("10.2 技术服务成果验收标准:评价报告符合评价规范要求,经由职业卫生评价专家库抽取的专家组评审通过,符合安全生产监督管理局有关行政主管部门相关要求。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第十一条 成果归属");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("乙方利用甲方提供的技术资料和工作条件完成的该项目职业病危害控制效果评价报告书及其他相关技术资料,在甲方全部支付合同约定的服务费用前,其所有权归乙方完全所有。未经乙方同意,甲方不得以任何目的,以任何形式使用或许可他人使用。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("甲方支付合同约定的全部款项后,本合同涉及的该项目职业病危害控制效果评价报告书及其他相关技术资料的使用权归甲方(但乙方有署名权)。同时,甲方对该项目职业病危害控制效果评价报告书的权利仅限于为本合同的目的使用。甲方为本合同目的之外使用评价报告的,应经乙方同意并支付相关费用。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("该项目职业病危害控制效果评价报告书的使用权利转归甲方后,乙方可以为自身的经营业务的需要,引用上述报告的内容而不需要预先告知甲方。同时,乙方可以为宣传自身业务的需要,以任何方式向任何第三人或不特定的人群表明,乙方曾经为甲方进行过上述工作。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第十二条  适用法律");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("合同的履行及解释适用《中华人民共和国合同法》及相关法律。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第十三条  违约");
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("13.1乙方未按合同约定时间完成工作的,甲方有权按下述规定从应付给乙方的合同款项中扣除该延期的违约金,经甲方同意的延长履行期限除外。甲方未能按约定日期提交相关材料的,乙方履行期限顺延。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("13.2 乙方未按约定日期完成工作的,每延期1日的违约金为合同总金额的0.5%。乙方承担的延期履行违约金以合同总金额的20%为上限。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("13.3甲方未按本合同7.1条规定支付首付款的,乙方有权拒绝赴现场工作。甲方超过30日仍未支付首付款的,乙方有权解除本合同,同时,要求甲方支付合同款项50%的违约金。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("13.4甲方未按照合同5.1条的约定,领取乙方提交的工作成果,视为甲方违约。经乙方提示,甲方仍不领取的,乙方有权解除本合同。在此种情况下,甲方已经支付的款项乙方不予退还,同时,甲方还应向乙方支付违约金,违约金的数额为合同金额的30%。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("13.5如因合同所涉及的项目自身原因,最终导致该项目因不符合国家相关政策致评价报告未能获得安监局相关行政主管部门的认可,责任由甲方承担,甲方应按合同约定支付全部款项。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第十四条  争议");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("14.1 对合同的解释或履行所引起的任何争议,双方首先应尽最大努力通过友好协商解决。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("14.2 如争议发生后协商不成,合同任何一方可将争议提交乙方所在地人民法院。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第十五条  合同有效期");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("本合同自双方授权代表签字之日起生效,成果交付完毕、费用结算清楚后失效。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第十六条  其它");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("16.1其它未尽事宜,由双方友好协商补充完善。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("16.2合同一式四份,甲、乙双方各二份具有同等法律效力。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第十七条 联系");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("17.1 双方确定,在本合同有效期内,甲方指定" + model.ContactPersonA + "为甲方项目联系人,乙方指定" + model.ContactPersonB + "为乙方项目联系人。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("17.2 项目联系人承担以下责任:");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("(1)协调双方各项工作;");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("(2)监督双方按所签订的合同条款执行落实情况;一方变更联系人的,应当及时以书面方式通知另一方,未及时通知并影响本合同履行或造成损失的,应承担相应的责任。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("17.3 双方的任何联系应以书面形式(传真)发/送至下述地址:");
            m_wordApp.Selection.TypeParagraph();


            Word.Table basicInfo = m_doc.Tables.Add(m_wordApp.Selection.Range, 14, 4);  //-
            basicInfo.Borders.Enable           = 1;
            basicInfo.Borders.OutsideLineStyle = WdLineStyle.wdLineStyleNone;
            basicInfo.Borders[WdBorderType.wdBorderTop].LineStyle    = WdLineStyle.wdLineStyleSingle;
            basicInfo.Borders[WdBorderType.wdBorderBottom].LineStyle = WdLineStyle.wdLineStyleSingle;
            //basicInfo.Columns[1].Width = 90;
            //   basicInfo.Rows[1].Height = 20;
            basicInfo.Cell(1, 1).Select();
            SetCellHeaderText("甲方:");
            basicInfo.Cell(1, 2).Select();
            SetCellHeaderText(model.CompaneName);
            basicInfo.Cell(1, 3).Select();
            SetCellHeaderText("乙方:");
            basicInfo.Cell(1, 4).Select();
            SetCellHeaderText("北京德康莱健康安全科技股份有限公司");
            basicInfo.Cell(2, 1).Select();
            SetCellHeaderText("法定代表人:");
            basicInfo.Cell(2, 2).Select();
            SetCellHeaderText("");
            basicInfo.Cell(2, 3).Select();
            SetCellHeaderText("法定代表人:");
            basicInfo.Cell(2, 4).Select();
            SetCellHeaderText("");
            basicInfo.Cell(3, 1).Select();
            SetCellHeaderText("代表人电话:");
            basicInfo.Cell(3, 2).Select();
            SetCellHeaderText("");
            basicInfo.Cell(3, 3).Select();
            SetCellHeaderText("代表人电话:");
            basicInfo.Cell(3, 4).Select();
            SetCellHeaderText("");
            basicInfo.Cell(4, 1).Select();
            SetCellHeaderText("传真:");
            basicInfo.Cell(4, 2).Select();
            SetCellHeaderText("");
            basicInfo.Cell(4, 3).Select();
            SetCellHeaderText("传真:");
            basicInfo.Cell(4, 4).Select();
            SetCellHeaderText("");
            basicInfo.Cell(5, 1).Select();
            SetCellHeaderText("地址:");
            basicInfo.Cell(5, 2).Select();
            SetCellHeaderText("");
            basicInfo.Cell(5, 3).Select();
            SetCellHeaderText("地址:");
            basicInfo.Cell(5, 4).Select();
            SetCellHeaderText("");
            basicInfo.Cell(6, 1).Select();
            SetCellHeaderText("联系人:");
            basicInfo.Cell(6, 2).Select();
            SetCellHeaderText("");
            basicInfo.Cell(6, 3).Select();
            SetCellHeaderText("联系人:");
            basicInfo.Cell(6, 4).Select();
            SetCellHeaderText("");
            basicInfo.Cell(7, 1).Select();
            SetCellHeaderText("电话:");
            basicInfo.Cell(7, 2).Select();
            SetCellHeaderText("");
            basicInfo.Cell(7, 3).Select();
            SetCellHeaderText("电话:");
            basicInfo.Cell(7, 4).Select();
            SetCellHeaderText("");
            basicInfo.Cell(8, 1).Select();
            SetCellHeaderText("邮编:");
            basicInfo.Cell(8, 2).Select();
            SetCellHeaderText("");
            basicInfo.Cell(8, 3).Select();
            SetCellHeaderText("邮编:");
            basicInfo.Cell(8, 4).Select();
            SetCellHeaderText("");
            basicInfo.Cell(9, 1).Select();
            SetCellHeaderText("邮箱:");
            basicInfo.Cell(9, 2).Select();
            SetCellHeaderText("");
            basicInfo.Cell(9, 3).Select();
            SetCellHeaderText("邮箱:");
            basicInfo.Cell(9, 4).Select();
            SetCellHeaderText("");
            basicInfo.Cell(10, 1).Select();
            SetCellHeaderText("授权人姓名:");
            basicInfo.Cell(10, 2).Select();
            SetCellHeaderText("");
            basicInfo.Cell(10, 3).Select();
            SetCellHeaderText("授权人姓名:");
            basicInfo.Cell(10, 4).Select();
            SetCellHeaderText("");
            basicInfo.Cell(11, 1).Select();
            SetCellHeaderText("职务:");
            basicInfo.Cell(11, 2).Select();
            SetCellHeaderText("");
            basicInfo.Cell(11, 3).Select();
            SetCellHeaderText("职务:");
            basicInfo.Cell(11, 4).Select();
            SetCellHeaderText("");
            basicInfo.Cell(12, 1).Select();
            SetCellHeaderText("授权代理人签名:");
            basicInfo.Cell(12, 2).Select();

            basicInfo.Cell(12, 3).Select();
            SetCellHeaderText("授权代理人签名:");
            basicInfo.Cell(12, 4).Select();

            basicInfo.Cell(13, 1).Select();
            SetCellHeaderText("单位盖章:");
            basicInfo.Cell(13, 2).Select();

            basicInfo.Cell(13, 3).Select();
            SetCellHeaderText("单位盖章:");
            basicInfo.Cell(13, 4).Select();
            basicInfo.Cell(14, 1).Select();
            SetCellHeaderText("签订日期:");
            basicInfo.Cell(14, 2).Select();
            SetCellHeaderText(model.ContractDate.Year + "年" + model.ContractDate.Month + "月" + model.ContractDate.Day + "日");
            basicInfo.Cell(14, 3).Select();
            SetCellHeaderText("签订日期:");
            basicInfo.Cell(14, 4).Select();
            SetCellHeaderText(model.ContractDate.Year + "年" + model.ContractDate.Month + "月" + model.ContractDate.Day + "日");
            m_wordApp.Selection.MoveDown(); //光标下移,光标移出表格
            m_wordApp.Selection.MoveDown(); //光标下移,光标移出表格
            m_wordApp.Selection.MoveDown(); //光标下移,光标移出表格
            m_wordApp.Selection.MoveDown(); //光标下移,光标移出表格
            m_wordApp.Selection.MoveDown(); //光标下移,光标移出表格
            m_wordApp.Selection.MoveDown(); //光标下移,光标移出表格

            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("附件");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("建设项目职业病危害控制效果评价需要甲方提供资料清单");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 15;
            m_wordApp.Selection.TypeText("1.	职业病危害控制效果评价项目委托书");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("2.	职业病危害预评价报告书、政府监管部门对项目在可行性研究阶段及设计阶段的审查意见。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("3.	建设项目的技术资料,主要包括:");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("(1)	建设项目概况 ");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("(2)	生产过程的物料、产品及其有关职业病危害的中文说明书");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("(3)	生产工艺流程及生产工艺流程图");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("(4)	辐射源项");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("(5)	生产设备及其有关职业病危害的中文说明书");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("(6)	采取的职业病危害防护措施");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("(7)	有关设计图纸");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("(8)	有关职业卫生现场检测资料");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("(9)	有关劳动者职业健康检查资料");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("①职业卫生管理组织机构、制度、职业病防治规划、计划、(包括专兼职职业卫生负责人员任命文件、执行机构、各种职业卫生管理制度)");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("②职业健康监护计划、职业健康监护档案");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("③职业病危害因素定期监测计划、");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("④职业病危害警示告知制度、");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("⑤“三同时”及执行落实情况记录档案");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("⑥职业卫生培训教育制度及档案");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("⑦职业卫生管理档案");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("⑧各种职业卫生管理制度");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("⑨各有害因素作业岗位职业卫生操作规程");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("⑩密闭空间维检修制度");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("○11应急救援措施与应急预案(含演练方案、)");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("○12	外包职业病危害项目有关职业病危害防护协议书");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("○13	职业卫生专项经费概算财务报表");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("○14	需要提供的其他相关材料");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("4.项目试运行情况");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("5.项目建设施工期建设施工单位有关工作场所职业卫生检测与职业健康监护等相关资料。");
        }
        private void WriteInstruction()
        {
            m_wordApp.Selection.ParagraphFormat.Alignment = WdParagraphAlignment.wdAlignParagraphCenter;
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 22;
            m_wordApp.Selection.TypeText("\r\n\r\n\r\n职业卫生技术服务合同\r\n\r\n");
            m_wordApp.Selection.ParagraphFormat.Alignment = WdParagraphAlignment.wdAlignParagraphLeft;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.TypeText("本合同由" + model.CompaneName + "(下称甲方)委托北京德康莱健康安全科技股份有限公司  (下称乙方)就" + model.ProjectName + "建设项目进行职业病危害预评价技术服务工作。甲方获得乙方提供的符合国家职业病防治法及相关规范的该项目职业病危害预评价报告书,向安监部门备案、评审。双方经过平等协商,根据《中华人民共和国合同法》的规定,达成以下协议,并由双方共同恪守。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第一条 定义");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.TypeText("本合同所使用的下述名词和术语,除非根据上下文有其它明显含义,其定义为:");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("1.1“合同” 是指由甲方与乙方签订的" + model.CompaneName + "有限公司新建" + model.ProjectName + "建设项目职业病危害现状评价技术服务合同,包括合同条款、相关附件以及在合同履行期间双方可能签订的备忘录和/或变更单。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("1.2“报告”是指乙方为甲方提供的" + model.CompaneName + "有限公司" + model.ProjectName + "建设项目职业病危害现状评价报告。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("1.3 “日”是指工作日。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("1.4 “规范”是指合同中列出的所有规则、规格书、标准和技术规范。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("1.5 “图纸”是指由甲方提供或乙方提供用于工作的全部图纸。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("1.6 “第三方”是指除甲方和乙方以外的任何一方。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("1.7 “工作”是指职业病危害现状评价工作。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第二条 工作范围");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.TypeText("乙方按甲方要求,依据国家《职业病防治法》相关法律法规、标准和技术规范对" + model.CompaneName + "有限公司新建" + model.ProjectName + "建设项目职业病危害现状评价,并编制相应评价文件,形成职业病危害现状评价报告。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("2.1评价范围:以甲方提供给乙方的已定稿的可行性研究报告为依据 。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("合同签订后,乙方已开展相关工作,如甲方提供的可行性研究报告发生修改、变动,双方应重新签订合同。同时,甲方应对乙方已经开展的工作支付相关费用。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("2.2上述报告应包括但不限于以下内容:");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("1 职业病危害因素检测与评价目的、依据、范围、内容和方法;");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("2 项目概况,包括建设地点、性质、规模、设计能力等;");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("3 对建设项目选址和可能产生的职业病危害因素及其对作业场所、劳动者健康的影响进行分析和评价,主要包括职业病危害因素名称、主要产生环节、对人体的主要职业危害、可能产生的浓度(强度)及其职业危害程度预测等;");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("4	对拟采取职业病危害防护措施进行技术分析及评价,主要包括总平面布置、生产工艺及设备布局、建筑物卫生学要求、职业病危害防护设施及防护措施、应急救援措施、个人使用的职业病危害防护用品、卫生辅助设施、职业卫生管理等方面进行分析和评价;");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("5	对存在的职业卫生方面问题提出有效的防护建议和对策;");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("6	评价结论:对评价内容进行分析归纳,确定该项目职业病危害类别。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第三条 甲方的责任和义务");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.TypeText("3.1甲方应于本合同签订后___日内向乙方提供本合同“附件”规定的资料。甲方应对提供资料的真实性、完整性承担责任。因甲方未能在上述时间内提供材料导致乙方工作迟延的,乙方不承担迟延履行的责任。因甲方提交的上述材料存在虚假、错误或者不完整从而导致乙方无法完成工作的,乙方有权立即终止本合同,同时要求甲方按照合同约定支付全部费用。因甲方原因造成乙方重复工作的,甲方应承担相应的费用。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("3.2 按合同规定向乙方支付合同价款。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("3.3 协助乙方收集类比工程相关资料,并为乙方开展现场职业卫生调查提供相应的保障及便利。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第四条 乙方的责任和义务");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("4.1乙方应认真审查甲方提供的一切资料和文件,若发现有任何错误或不当,应及时书面通知甲方。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("4.2 应按国家《职业病防治法》及相关法律法规、行业规范和标准向甲方提交能够反映该项目客观真实、准确、详细的职业病危害因素现状评价报告。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第五条 工作进度和完工");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("5.1 甲方将本合同约定的材料交付乙方之日起____个工作日,乙方严格按合同规定的进度计划完成职业病危害现状评价报告编制工作并将职业病危害现状评价报告的电子版交付给甲方。甲方应按照乙方通知的时间领取乙方的工作成果。甲方未按照乙方要求的时间接受工作成果的,视为甲方违约。甲方收到评价报告的电子版后应审核确认。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("甲方收到职业病危害现状评价报告后____日内,应组织对评价报告的内部审议工作,如认为职业病危害现状评价报告需要修改,应在上述日期内以文字的形式向乙方提出要求。甲方收到乙方提供的评价报告后____日内,未提出书面修改意见的,视为对乙方工作成果的确认。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("甲方认可评价报告后,乙方还应协助甲方完成职业病危害现状评价报告安监局组织的专家评审工作。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("5.2合同履行期间,在乙方的实际工作进度落后于计划进度的情况下,甲方有权要求乙方加班、增加人力或其他资源以保证按时提交报告。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("5.3 由于甲方未能按3.1款和3.3款要求及时提供资料,造成乙方实际工作进度落后于计划工作进度情况下,乙方出具评价报告的时间将顺延。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("5.4甲方在向安监局提交报告进行报批时,若由于乙方工作失误导致评价报告存在缺陷,致使评价报告未能通过安监部门审批,乙方应按安监部门审批意见对评价报告进行修改直至通过审批;");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("若因甲方提供虚假的、不真实的材料而导致评价报告未能通过安监部门审批,则应视为乙方工作已经完结,甲方应按合同约定支付全部款项。 ");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("若因甲方所报的项目不符合国家相关产业政策、环保要求等方面的规定,导致该项目及与之相关的职业病危害预评价报告未能通过安监部门审批,则应视为乙方工作已经完结,甲方应按合同约定支付全部款项。 ");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("5.5乙方向甲方提交该项目最终版的职业病危害现状评价报告一式_____份。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第六条 合同价格");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("6.1甲方应向乙方支付职业卫生技术服务费用为" + (Convert.ToDouble(model.Money) / 10000).ToString("0.00") + "万元(大写:        元整)。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("6.2上述价款包含了乙方为履行合同所需的全部费用(包括乙方为履行合同而发生的差旅费、成本、税金、管理费、利润以及为履行合同所发生的其它费用),但不包括专家评审费、住宿费、交通费及评审会议费等用于与专家评审相关的费用。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第七条 付款方式");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("7.1合同签订后,甲方应在7日内向乙方支付" + model.PayRatioFirst + "%的合同款项" + ((Convert.ToDouble(model.Money) / 10000) * (Convert.ToDouble(model.PayRatioFirst) / 100)).ToString("0.00") + "万元,乙方在完成甲方现场检测并出具检测数据后表示已完成该项目50%的工作。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("7.2甲方收到乙方提交的该项目职业病危害现状评价报告后,应在7日内支付乙方" + (100 - Convert.ToInt16(model.PayRatioFirst)) + "%合同款" + ((Convert.ToDouble(model.Money) / 10000) * ((Convert.ToDouble(100) - Convert.ToDouble(model.PayRatioFirst)) / 100)).ToString("0.00") + "万元。");
            m_wordApp.Selection.TypeParagraph();

            m_wordApp.Selection.TypeText("收款单位:");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("帐    号:");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("汇 入 行:");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("行    号:");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第八条 保密");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("甲方:");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("8.1 保密内容:未经乙方书面同意,甲方不得将乙方提交的有关本项目的评价报告及其他与之相关的任何技术性文件、资料用于本合同目的之外的任何用途,否则,乙方将要求甲方另行支付相应费用。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("非为用于本合同之目的,未经乙方书面同意或根据法律之规定及政府相关部门的要求,甲方不得将上述材料向任何第三人公开或变相公开,包括甲方故意或过失将上述材料丢失致使上述材料为不特定第三人所知。否则,甲方的行为将视为对乙方权利的侵犯。在此种情况下,乙方有权要求甲方另行支付相关费用。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("8.2 涉密人员范围:甲方所有可能接触该评价报告的工作人员。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("8.3 保密期限:自甲方知悉上述约定的保密信息之日起至上述保密信息为公众所知之日止。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("8.4 泄密责任:甲方违反上述约定,应当承担相应赔偿责任。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("乙方:");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("8.5保密内容:乙方承诺,乙方对甲方提供的可行性研究报告及技术资料仅用于编制该项目职业病危害现状评价报告,不得用于除此以外的其他任何目的。但乙方依照国家法律、法规及相关政府部门的要求除外。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("8.6 涉密人员范围:乙方所有涉及该项目技术资料的人员。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("8.7 保密期限:自乙方知悉上述保密内容之日起至上述保密信息为公众所知之日止。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("8.8泄密责任:乙方违反本约定造成甲方经济损失,甲方有权依法要求赔偿。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第九条  合同变更");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("本合同的变更必须由双方协商一致,并以书面形式确定。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第十条 成果验收");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("双方确定以下列标准和方式对乙方的技术服务工作成果进行验收:");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("10.1 乙方提交的技术服务工作成果形式为编制完成的" + model.ProjectName + "建设项目职业病危害现状评价报告书。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("10.2 技术服务成果验收标准:评价报告符合评价规范要求,经由职业卫生评价专家库抽取的专家组评审通过,符合安全生产监督管理局有关行政主管部门相关要求。");
            m_wordApp.Selection.TypeParagraph();

            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第十一条 成果归属");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("乙方利用甲方提供的技术资料和工作条件完成的该项目评价报告书及其他相关技术资料,在甲方全部支付合同约定的服务费用前,其所有权归乙方完全所有。未经乙方同意,甲方不得以任何目的,以任何形式使用或许可他人使用。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("甲方支付合同约定的全部款项后,本合同涉及的该项目评价报告书及其他相关技术资料的使用权归甲方(但乙方有署名权)。同时,甲方对该项目评价报告书的权利仅限于为本合同的目的使用。甲方为本合同目的之外使用评价报告的,应经乙方同意并支付相关费用。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("该项目评价报告书的使用权利转归甲方后,乙方可以为自身的经营业务的需要,引用上述报告的内容而不需要预先告知甲方亦无须支付任何费用。同时,乙方可以为宣传自身业务的需要,以任何方式向任何第三人或不特定的人群表明,乙方曾经为甲方进行过上述工作。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第十二条  适用法律");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("合同的履行及解释适用《中华人民共和国合同法》及相关法律。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第十三条  违约");
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("13.1乙方未按合同约定时间完成工作的,甲方有权按下述规定从应付给乙方的合同款项中扣除该延期的违约金。经甲方同意延长履行期限的除外。甲方未能按约定日期提交相关材料的,乙方履行期限顺延。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("13.2  乙方未按约定日期完成工作的,每延期1日的违约金为合同总金额的0.5%。乙方承担的延期履行违约金以合同总金额的20%为上限。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("13.3 甲方未按本合同7.1条规定支付首付款的,乙方有权拒绝赴现场工作。甲方超过30日仍未支付首付款的,乙方有权解除本合同,同时,要求甲方支付合同款项50%的违约金。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("13.4 甲方未按照合同5.1条的约定,领取乙方提交的工作成果,视为甲方违约。经乙方提示,甲方仍不领取的,乙方有权解除本合同。在此种情况下,甲方已经支付的款项乙方不予退还,同时,甲方还应向乙方支付违约金,违约金的数额为合同金额的30%。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("13.5如因合同所涉及的项目自身原因,最终导致该项目因不符合国家相关政策致评价报告未能获得安监局相关行政主管部门的认可,责任由甲方承担,甲方应按合同约定支付全部款项。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第十四条  争议");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("14.1 对合同的解释或履行所引起的任何争议,双方首先应尽最大努力通过友好协商解决。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("14.2 如争议发生后协商不成,合同任何一方可将争议提交乙方所在地人民法院。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第十五条  合同有效期");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("本合同自双方授权代表签字之日起生效,成果交付完毕、费用结算清楚后失效。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第十六条  其它");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("16.1其它未尽事宜,由双方友好协商补充完善。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("16.2合同一式四份,甲、乙双方各二份具有同等法律效力。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第十七条 联系");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("17.1 双方确定,在本合同有效期内,甲方指定" + model.ContactPersonA + "为甲方项目联系人,乙方指定" + model.ContactPersonB + "为乙方项目联系人。");

            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("17.2 项目联系人承担以下责任:(1)协调双方各项工作;(2)监督双方按所签订的合同条款执行落实情况;一方变更联系人的,应当及时以书面方式通知另一方,未及时通知并影响本合同履行或造成损失的,应承担相应的责任。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("17.3 双方的任何联系应以书面形式(传真)发/送至下述地址:");
            m_wordApp.Selection.TypeParagraph();
            Word.Table basicInfo = m_doc.Tables.Add(m_wordApp.Selection.Range, 14, 4);  //-
            basicInfo.Borders.Enable           = 1;
            basicInfo.Borders.OutsideLineStyle = WdLineStyle.wdLineStyleNone;
            basicInfo.Borders[WdBorderType.wdBorderTop].LineStyle    = WdLineStyle.wdLineStyleSingle;
            basicInfo.Borders[WdBorderType.wdBorderBottom].LineStyle = WdLineStyle.wdLineStyleSingle;
            //basicInfo.Columns[1].Width = 90;
            basicInfo.Rows[1].Height = 20;
            basicInfo.Cell(1, 1).Select();
            SetCellHeaderText("甲方:");
            basicInfo.Cell(1, 2).Select();
            SetCellHeaderText(model.CompaneName);
            basicInfo.Cell(1, 3).Select();
            SetCellHeaderText("乙方:");
            basicInfo.Cell(1, 4).Select();
            SetCellHeaderText("北京德康莱健康安全科技股份有限公司");
            basicInfo.Cell(2, 1).Select();
            SetCellHeaderText("法定代表人:");
            basicInfo.Cell(2, 2).Select();
            SetCellHeaderText("");
            basicInfo.Cell(2, 3).Select();
            SetCellHeaderText("法定代表人:");
            basicInfo.Cell(2, 4).Select();
            SetCellHeaderText("");
            basicInfo.Cell(3, 1).Select();
            SetCellHeaderText("代表人电话:");
            basicInfo.Cell(3, 2).Select();
            SetCellHeaderText("");
            basicInfo.Cell(3, 3).Select();
            SetCellHeaderText("代表人电话:");
            basicInfo.Cell(3, 4).Select();
            SetCellHeaderText("");
            basicInfo.Cell(4, 1).Select();
            SetCellHeaderText("传真:");
            basicInfo.Cell(4, 2).Select();
            SetCellHeaderText("");
            basicInfo.Cell(4, 3).Select();
            SetCellHeaderText("传真:");
            basicInfo.Cell(4, 4).Select();
            SetCellHeaderText("");
            basicInfo.Cell(5, 1).Select();
            SetCellHeaderText("地址:");
            basicInfo.Cell(5, 2).Select();
            SetCellHeaderText("");
            basicInfo.Cell(5, 3).Select();
            SetCellHeaderText("地址:");
            basicInfo.Cell(5, 4).Select();
            SetCellHeaderText("");
            basicInfo.Cell(6, 1).Select();
            SetCellHeaderText("联系人:");
            basicInfo.Cell(6, 2).Select();
            SetCellHeaderText("");
            basicInfo.Cell(6, 3).Select();
            SetCellHeaderText("联系人:");
            basicInfo.Cell(6, 4).Select();
            SetCellHeaderText("");
            basicInfo.Cell(7, 1).Select();
            SetCellHeaderText("电话:");
            basicInfo.Cell(7, 2).Select();
            SetCellHeaderText("");
            basicInfo.Cell(7, 3).Select();
            SetCellHeaderText("电话:");
            basicInfo.Cell(7, 4).Select();
            SetCellHeaderText("");
            basicInfo.Cell(8, 1).Select();
            SetCellHeaderText("邮编:");
            basicInfo.Cell(8, 2).Select();
            SetCellHeaderText("");
            basicInfo.Cell(8, 3).Select();
            SetCellHeaderText("邮编:");
            basicInfo.Cell(8, 4).Select();
            SetCellHeaderText("");
            basicInfo.Cell(9, 1).Select();
            SetCellHeaderText("邮箱:");
            basicInfo.Cell(9, 2).Select();
            SetCellHeaderText("");
            basicInfo.Cell(9, 3).Select();
            SetCellHeaderText("邮箱:");
            basicInfo.Cell(9, 4).Select();
            SetCellHeaderText("");
            basicInfo.Cell(10, 1).Select();
            SetCellHeaderText("授权人姓名:");
            basicInfo.Cell(10, 2).Select();
            SetCellHeaderText("");
            basicInfo.Cell(10, 3).Select();
            SetCellHeaderText("授权人姓名:");
            basicInfo.Cell(10, 4).Select();
            SetCellHeaderText("");
            basicInfo.Cell(11, 1).Select();
            SetCellHeaderText("职务:");
            basicInfo.Cell(11, 2).Select();
            SetCellHeaderText("");
            basicInfo.Cell(11, 3).Select();
            SetCellHeaderText("职务:");
            basicInfo.Cell(11, 4).Select();
            SetCellHeaderText("");
            basicInfo.Cell(12, 1).Select();
            SetCellHeaderText("授权代理人签名:");
            basicInfo.Cell(12, 2).Select();

            basicInfo.Cell(12, 3).Select();
            SetCellHeaderText("授权代理人签名:");
            basicInfo.Cell(12, 4).Select();

            basicInfo.Cell(13, 1).Select();
            SetCellHeaderText("单位盖章:");
            basicInfo.Cell(13, 2).Select();

            basicInfo.Cell(13, 3).Select();
            SetCellHeaderText("单位盖章:");
            basicInfo.Cell(13, 4).Select();
            basicInfo.Cell(14, 1).Select();
            SetCellHeaderText("签订日期:");
            basicInfo.Cell(14, 2).Select();
            SetCellHeaderText(model.ContractDate.Year + "年" + model.ContractDate.Month + "月" + model.ContractDate.Day + "日");
            basicInfo.Cell(14, 3).Select();
            SetCellHeaderText("签订日期:");
            basicInfo.Cell(14, 4).Select();
            SetCellHeaderText(model.ContractDate.Year + "年" + model.ContractDate.Month + "月" + model.ContractDate.Day + "日");
            m_wordApp.Selection.MoveDown(); //光标下移,光标移出表格
            m_wordApp.Selection.MoveDown(); //光标下移,光标移出表格
            m_wordApp.Selection.MoveDown(); //光标下移,光标移出表格
            m_wordApp.Selection.MoveDown(); //光标下移,光标移出表格
            m_wordApp.Selection.MoveDown(); //光标下移,光标移出表格
            m_wordApp.Selection.MoveDown(); //光标下移,光标移出表格
        }
Пример #20
0
        private String WriteEmployerBasicInfo(ProjectInfo projectmodels, List <TestChemicalReport> chemicalmodels, List <string> str, List <string> strc, List <SampleProjectGist> ProjectGistmodels, List <Parameter> Parametermodels)
        {
            m_wordApp.Selection.ParagraphFormat.Alignment = WdParagraphAlignment.wdAlignParagraphLeft;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.Font.Bold = 2;
            m_wordApp.Selection.TypeText("基本信息:");
            m_wordApp.Selection.TypeParagraph();

            Word.Table basicInfo = m_doc.Tables.Add(m_wordApp.Selection.Range, 14 + str.Count - 4 + str.Count + strc.Count, 6);  //-
            basicInfo.Borders.Enable           = 1;
            basicInfo.Borders.OutsideLineStyle = WdLineStyle.wdLineStyleNone;
            basicInfo.Borders[WdBorderType.wdBorderTop].LineStyle    = WdLineStyle.wdLineStyleSingle;
            basicInfo.Borders[WdBorderType.wdBorderBottom].LineStyle = WdLineStyle.wdLineStyleSingle;
            basicInfo.Columns[1].Width = 90;

            basicInfo.Rows[1].Height = 10;                    ///单位名称
            basicInfo.Cell(1, 1).Select();
            SetCellHeaderText("单位名称");
            basicInfo.Cell(1, 2).Merge(basicInfo.Cell(1, 6));
            basicInfo.Cell(1, 2).Select();
            SetCellText(1, 12, projectmodels.CompaneName, WdParagraphAlignment.wdAlignParagraphLeft, WdCellVerticalAlignment.wdCellAlignVerticalCenter);
            ////SetParaText(bold, size, text, wAlign);   粗细  大小  文本

            basicInfo.Rows[2].Height = 10;                  ///单位地址
            basicInfo.Cell(2, 1).Select();
            SetCellHeaderText("单位地址");
            basicInfo.Cell(2, 2).Merge(basicInfo.Cell(2, 6));
            basicInfo.Cell(2, 2).Select();
            SetCellText(0, 12, projectmodels.CompanyAddress, WdParagraphAlignment.wdAlignParagraphLeft, WdCellVerticalAlignment.wdCellAlignVerticalCenter);


            basicInfo.Rows[3].Height = 20;                 ///项目名称
            basicInfo.Cell(3, 1).Select();
            SetCellHeaderText("项目名称");
            basicInfo.Cell(3, 2).Merge(basicInfo.Cell(3, 6));
            basicInfo.Cell(3, 2).Select();
            SetCellText(0, 12, projectmodels.ProjectName, WdParagraphAlignment.wdAlignParagraphLeft, WdCellVerticalAlignment.wdCellAlignVerticalCenter);

            basicInfo.Rows[4].Height = 10;                   ///联系人
            basicInfo.Cell(4, 1).Select();
            SetCellHeaderText("联系人");
            basicInfo.Cell(4, 2).Select();
            SetCellText(0, 12, projectmodels.CompanyContact, WdParagraphAlignment.wdAlignParagraphLeft, WdCellVerticalAlignment.wdCellAlignVerticalCenter);
            basicInfo.Cell(4, 3).Select();
            SetCellHeaderText("联系电话");
            basicInfo.Cell(4, 4).Select();
            SetCellText(1, 12, projectmodels.ContactTel, WdParagraphAlignment.wdAlignParagraphLeft, WdCellVerticalAlignment.wdCellAlignVerticalCenter);
            basicInfo.Cell(4, 5).Select();
            SetCellHeaderText("邮 编");
            basicInfo.Cell(4, 6).Select();
            SetCellText(0, 12, projectmodels.ZipCode, WdParagraphAlignment.wdAlignParagraphLeft, WdCellVerticalAlignment.wdCellAlignVerticalCenter);

            basicInfo.Rows[5].Height = 30;                    ///检测参数    传入采样项目名称
            basicInfo.Cell(5, 1).Select();
            SetCellHeaderText("检测参数");
            basicInfo.Cell(5, 2).Merge(basicInfo.Cell(5, 4));
            basicInfo.Cell(5, 2).Select();
            //SetCellText(1, 12, chemicalmodels., WdParagraphAlignment.wdAlignParagraphLeft, WdCellVerticalAlignment.wdCellAlignVerticalCenter);
            basicInfo.Cell(5, 3).Select();
            SetCellHeaderText("检测类别");
            basicInfo.Cell(5, 4).Select();
            SetCellHeaderText("   ");                         ////需要新添一条字段,字段内容为检测类别

            basicInfo.Cell(6, 1).Merge(basicInfo.Cell(8, 1)); ///需要加一大堆采样设备
            basicInfo.Cell(6, 1).Select();
            SetCellHeaderText("样品名称\r\n数量\r\n状态");
            basicInfo.Cell(6, 2).Merge(basicInfo.Cell(8, 4));
            basicInfo.Cell(6, 2).Select();
            SetCellHeaderText(" ");           ///?????
            basicInfo.Cell(6, 3).Select();
            SetCellHeaderText("采样日期");
            basicInfo.Cell(7, 3).Select();
            SetCellHeaderText("接收日期");
            basicInfo.Cell(8, 3).Select();
            SetCellHeaderText("检测日期");
            if (str.Count == 0)                                           //采样项目为空 返回错误状态 3
            {
                return("3");                                              ///采样项目为空  错误
            }
            basicInfo.Cell(9, 1).Merge(basicInfo.Cell(9 + str.Count, 1)); ////str表示的是采样个数
            basicInfo.Cell(9, 1).Select();
            SetCellHeaderText("采样");                                      ///采样
            basicInfo.Cell(9, 2).Select();
            SetCellHeaderText("采样项目");
            basicInfo.Cell(9, 3).Merge(basicInfo.Cell(9, 4));
            basicInfo.Cell(9, 3).Select();
            SetCellHeaderText("采样依据");
            basicInfo.Cell(9, 4).Select();
            SetCellHeaderText("仪器名称");
            basicInfo.Cell(9, 5).Select();
            SetCellHeaderText("仪器编号");
            int i = 10;

            foreach (var item in ProjectGistmodels)        ///从第十排开始显示采样项目
            {
                if (item != null)
                {
                    basicInfo.Cell(i, 2).Select();
                    SetCellText(0, 12, item.SampleProject, WdParagraphAlignment.wdAlignParagraphCenter, WdCellVerticalAlignment.wdCellAlignVerticalCenter);
                    basicInfo.Cell(i, 3).Select();
                    SetCellText(0, 12, item.SampleGist, WdParagraphAlignment.wdAlignParagraphCenter, WdCellVerticalAlignment.wdCellAlignVerticalCenter);
                    basicInfo.Cell(i, 4).Select();
                    SetCellText(0, 12, item.ApparatusName, WdParagraphAlignment.wdAlignParagraphCenter, WdCellVerticalAlignment.wdCellAlignVerticalCenter);
                    basicInfo.Cell(i, 5).Select();
                    SetCellText(0, 12, item.ApparatusNumber, WdParagraphAlignment.wdAlignParagraphCenter, WdCellVerticalAlignment.wdCellAlignVerticalCenter);
                }
                else
                {
                    return("2");           ///采样项目为空,返回错误2
                }
                i++;
            }

            basicInfo.Cell(10 + str.Count, 1).Merge(basicInfo.Cell(10 + str.Count + strc.Count + str.Count, 1));  ///9+str+1  到 9+str+1+strc
            basicInfo.Cell(10 + str.Count, 1).Select();
            SetCellHeaderText("检测");
            basicInfo.Cell(10 + str.Count, 2).Height = 10;
            basicInfo.Cell(10 + str.Count, 2).Select();
            SetCellHeaderText("检测项目");
            basicInfo.Cell(10 + str.Count, 3).Select();
            SetCellHeaderText("检测依据");
            basicInfo.Cell(10 + str.Count, 4).Select();
            SetCellHeaderText("仪器名称");
            basicInfo.Cell(10 + str.Count, 5).Select();
            SetCellHeaderText("仪器编号");
            int j = 11 + str.Count;          ///原本存在的11行

            foreach (var item in Parametermodels)
            {
                if (item != null)
                {
                    basicInfo.Cell(j, 2).Select();
                    SetCellText(0, 12, item.ParameterName, WdParagraphAlignment.wdAlignParagraphCenter, WdCellVerticalAlignment.wdCellAlignVerticalCenter);

                    basicInfo.Cell(j, 3).Select();
                    SetCellText(0, 12, item.DetectionPursuant, WdParagraphAlignment.wdAlignParagraphCenter, WdCellVerticalAlignment.wdCellAlignVerticalCenter);

                    basicInfo.Cell(j, 4).Select();
                    SetCellText(0, 12, item.ApparatusName, WdParagraphAlignment.wdAlignParagraphCenter, WdCellVerticalAlignment.wdCellAlignVerticalCenter);
                    basicInfo.Cell(j, 5).Select();
                    SetCellText(0, 12, item.ApparatusNumber, WdParagraphAlignment.wdAlignParagraphCenter, WdCellVerticalAlignment.wdCellAlignVerticalCenter);
                }
                else
                {
                    return("1");          ///检测项目为空,则返回错误1
                }
                j++;
            }
            m_wordApp.Selection.MoveDown();//光标下移,光标移出表格
            m_wordApp.Selection.TypeText("\r\n");
            return("0");
        }
        private void WriteReportBasicInfo()
        {
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.ParagraphFormat.Alignment = WdParagraphAlignment.wdAlignParagraphCenter;
            m_wordApp.Selection.TypeText("检测与评价委托协议书\r");
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.ParagraphFormat.Alignment = WdParagraphAlignment.wdAlignParagraphLeft;
            m_wordApp.Selection.TypeText("协议编号:" + model.ProjectNumber);
            Word.Table basicInfo = m_doc.Tables.Add(m_wordApp.Selection.Range, 14, 4);
            basicInfo.Borders.Enable           = 1;
            basicInfo.Borders.OutsideLineStyle = WdLineStyle.wdLineStyleNone;
            basicInfo.Borders[WdBorderType.wdBorderTop].LineStyle    = WdLineStyle.wdLineStyleSingle;
            basicInfo.Borders[WdBorderType.wdBorderBottom].LineStyle = WdLineStyle.wdLineStyleSingle;
            basicInfo.Columns[1].Width = 90;



            basicInfo.Rows[1].Height = 20;
            basicInfo.Cell(1, 1).Select();
            SetCellHeaderText("委托单位名称");
            //     basicInfo.Cell(1, 2).Merge(basicInfo.Cell(1, 3));
            basicInfo.Cell(1, 2).Select();
            SetCellHeaderText(model.CompaneName);
            basicInfo.Cell(1, 3).Select();
            SetCellHeaderText("委托时间");
            basicInfo.Cell(1, 4).Select();
            SetCellHeaderText(model.CreateTime.ToString("yyyy/MM/dd"));

            basicInfo.Rows[2].Height = 20;
            basicInfo.Cell(2, 1).Select();
            SetCellHeaderText("委托单位地址");
            basicInfo.Cell(2, 2).Select();
            SetCellHeaderText(model.CompanyAddress);
            //   basicInfo.Cell(2, 2).Merge(basicInfo.Cell(2, 3));
            basicInfo.Cell(2, 3).Select();
            SetCellHeaderText("电话/传真");
            basicInfo.Cell(2, 4).Select();
            SetCellHeaderText(model.ContactTel);
            basicInfo.Rows[3].Height = 20;
            basicInfo.Cell(3, 1).Select();
            SetCellHeaderText("联系人");
            //     basicInfo.Cell(3, 2).Merge(basicInfo.Cell(3, 3));
            basicInfo.Cell(3, 2).Select();
            SetCellHeaderText(model.ContactPersonA);
            basicInfo.Cell(3, 3).Select();
            SetCellHeaderText("联系电话");
            basicInfo.Cell(3, 4).Select();
            SetCellHeaderText(model.TelA);


            basicInfo.Rows[4].Height = 20;
            basicInfo.Cell(4, 1).Select();
            SetCellHeaderText("承检单位名称");

            basicInfo.Cell(4, 2).Merge(basicInfo.Cell(4, 4));
            basicInfo.Cell(4, 2).Select();
            SetCellHeaderText("北京德康莱健康安全科技股份有限公司");



            basicInfo.Rows[5].Height = 20;
            basicInfo.Cell(5, 1).Select();
            SetCellHeaderText("联系人");
            //      basicInfo.Cell(5, 2).Merge(basicInfo.Cell(5, 3));
            basicInfo.Cell(5, 2).Select();
            SetCellHeaderText("");
            basicInfo.Cell(5, 3).Select();
            SetCellHeaderText("联系电话");
            basicInfo.Cell(5, 4).Select();
            SetCellHeaderText("");



            basicInfo.Rows[6].Height = 20;
            basicInfo.Cell(6, 1).Select();
            SetCellHeaderText("检测类别");

            basicInfo.Cell(6, 2).Merge(basicInfo.Cell(6, 4));
            basicInfo.Cell(6, 2).Select();
            SetCellHeaderText("检测项目");



            basicInfo.Rows[7].Height = 20;
            basicInfo.Cell(7, 1).Select();
            SetCellHeaderText("完成时间要求");
            basicInfo.Cell(7, 2).Select();
            m_wordApp.Selection.ParagraphFormat.Alignment = WdParagraphAlignment.wdAlignParagraphLeft;
            SetCellText(1, 12, "口 依据检测进度,无特殊要求(合同生效后__个工作日内) \r口 加急!(合同生效后在__个工作日内)\r口 ________________________", WdParagraphAlignment.wdAlignParagraphLeft, WdCellVerticalAlignment.wdCellAlignVerticalCenter);

            basicInfo.Cell(7, 2).Merge(basicInfo.Cell(7, 4));



            basicInfo.Cell(8, 1).Merge(basicInfo.Cell(9, 1));
            basicInfo.Cell(8, 1).Select();
            SetCellHeaderText("取报告\r方式");
            basicInfo.Cell(8, 2).Merge(basicInfo.Cell(9, 2));
            basicInfo.Cell(8, 2).Select();
            SetCellText(1, 12, "口 自取\r口 邮寄,报告交付日期以快递发送日邮戳为准", WdParagraphAlignment.wdAlignParagraphLeft, WdCellVerticalAlignment.wdCellAlignVerticalCenter);



            basicInfo.Cell(8, 3).Select();
            SetCellHeaderText("报告收取人");
            basicInfo.Cell(9, 3).Select();
            SetCellHeaderText("邮  编");
            basicInfo.Cell(9, 4).Select();
            SetCellHeaderText("");

            basicInfo.Cell(10, 1).Select();
            //basicInfo.Rows[10].Height = 20;
            //basicInfo.Cell(10, 1).Select();
            SetCellHeaderText("委托范围");
            basicInfo.Cell(10, 2).Select();
            SetCellText(1, 12, "口" + model.CompaneName + "工作场所职业病危害因素检测与评价\r口_______________", WdParagraphAlignment.wdAlignParagraphLeft, WdCellVerticalAlignment.wdCellAlignVerticalCenter);


            basicInfo.Cell(10, 2).Merge(basicInfo.Cell(10, 4));



            //basicInfo.Rows[11].Height = 20;
            basicInfo.Cell(11, 1).Select();
            SetCellHeaderText("付款方式");
            basicInfo.Cell(11, 2).Select();
            SetCellText(1, 11, "本协议总金额:" + model.Money + "(小写)         (大写)\r本协议签订后五个工作日内支付" + model.PayRatioFirst + "%,即:" + ((Convert.ToDouble(model.Money)) * (Convert.ToDouble(model.PayRatioFirst) / 100)).ToString() + "元。  报告交付前" + (100 - Convert.ToInt16(model.PayRatioFirst)) + "%,即:" + ((Convert.ToDouble(model.Money)) * ((Convert.ToDouble(100) - Convert.ToDouble(model.PayRatioFirst)) / 100)).ToString("0.00") + "元。 \r开户行:兴业银行北京经济技术开发区\r账号:321130100100206456\r", WdParagraphAlignment.wdAlignParagraphLeft, WdCellVerticalAlignment.wdCellAlignVerticalCenter);


            basicInfo.Cell(11, 2).Merge(basicInfo.Cell(11, 4));
            basicInfo.Cell(12, 1).Select();
            SetCellHeaderText("协议说明");
            basicInfo.Cell(12, 2).Select();
            SetCellText(1, 12, "1.本协议书双方签字盖章之日起生效,本协议传真有效。\r2.承检单位在收到检测费全款后,按约定时间交付检测报告。\r3.本协议书一式四份,双方各持两份,具有同等法律效力。\r4.本协议未尽事宜,经双方友好协商解决;协商不成,以《中华人民共和国合同法》及相关法律法规为依据,双方均有保留向法院诉讼的权利。", WdParagraphAlignment.wdAlignParagraphLeft, WdCellVerticalAlignment.wdCellAlignVerticalCenter);


            basicInfo.Cell(12, 2).Merge(basicInfo.Cell(12, 4));



            //basicInfo.Rows[13].Height = 20;
            basicInfo.Cell(13, 1).Select();
            SetCellHeaderText("双方承诺");

            basicInfo.Cell(13, 2).Select();
            m_wordApp.Selection.ParagraphFormat.Alignment = WdParagraphAlignment.wdAlignParagraphLeft;
            SetCellText(1, 12, "委托单位承诺:\r1.按承检单位要求,提供工作场所工作环境、生产工艺、所用设备及防护设施、原辅材料及产品、工作方式及个体职业病防护等方面的相关资料,并保证所提供资料的真实性、完整性、客观性及与工作场所的一致性。\r2.在签订本协议书后  工作日内配合承检单位安排现场工作。\r3.委托单位未按照合同约定支付首付款的,承检单位有权拒绝赴现场工作,委托单位超过30日仍未支付首付款的,承检单位有权解除合同并要求委托方支付合同金额50%的违约金。承检单位完成检测与评价报告后,通知委托单位领取承检单位工作成果,委托单位应按照承检单位规定的时间接受承检单位的工作成果。委托单位无正当理由迟延接受超过30日的,视为委托单位已经接受承检单位的工作成果,委托单位仍应支付本合同剩余款项。\r承检单位承诺:\r1.按照国家法律、法规、标准和委托单位委托的范围开展检测与评价工作。\r2.若在收到检测费全款后未按本协议约定交付检测报告给委托单位的,承检单位每日按本协议总金额的0.5%支付违约金,直至本协议总金额的50%。", WdParagraphAlignment.wdAlignParagraphLeft, WdCellVerticalAlignment.wdCellAlignVerticalCenter);
            basicInfo.Cell(13, 2).Merge(basicInfo.Cell(13, 4));


            m_wordApp.Selection.ParagraphFormat.Alignment = WdParagraphAlignment.wdAlignParagraphCenter;

            //basicInfo.Rows[14].Height = 20;
            basicInfo.Cell(14, 1).Select();
            basicInfo.Cell(14, 1).Merge(basicInfo.Cell(14, 2));
            SetCellText(1, 12, "□	委托单位法人代表(签名):\r□	或委托代理人(签名):\r\r\r委托单位:               (盖章)\r             年    月    日 ", WdParagraphAlignment.wdAlignParagraphLeft, WdCellVerticalAlignment.wdCellAlignVerticalCenter);

            basicInfo.Cell(14, 2).Merge(basicInfo.Cell(14, 3));
            basicInfo.Cell(14, 2).Select();

            SetCellText(1, 12, "□	承检单位法人代表(签名):           \r□	或委托代理人(签名):      \r\r\r 承检单位:               (盖章)\r             年    月    日", WdParagraphAlignment.wdAlignParagraphLeft, WdCellVerticalAlignment.wdCellAlignVerticalCenter);

            m_wordApp.Selection.MoveDown();//光标下移,光标移出表格
            m_doc.Sections[1].Headers[WdHeaderFooterIndex.wdHeaderFooterPrimary].Range.Text = Header;

            m_doc.Sections[1].Footers[WdHeaderFooterIndex.wdHeaderFooterPrimary].Range.Text = Footer;

            Word.PageNumbers pns = m_wordApp.Selection.Sections[1].Headers[WdHeaderFooterIndex.wdHeaderFooterEvenPages].PageNumbers;
            pns.NumberStyle               = WdPageNumberStyle.wdPageNumberStyleNumberInDash;
            pns.HeadingLevelForChapter    = 0;
            pns.IncludeChapterNumber      = false;
            pns.ChapterPageSeparator      = WdSeparatorType.wdSeparatorHyphen;
            pns.RestartNumberingAtSection = false;
            pns.StartingNumber            = 0;
            object pagenmbetal = WdPageNumberAlignment.wdAlignPageNumberRight;
            object first       = true;

            m_wordApp.Selection.Sections[1].Footers[WdHeaderFooterIndex.wdHeaderFooterEvenPages].PageNumbers.Add(pagenmbetal, first);
            m_wordApp.Selection.Sections[1].Headers[WdHeaderFooterIndex.wdHeaderFooterEvenPages].PageNumbers.Add(pagenmbetal, first);
        }
        private void WriteTestReport(List <TestChemicalReport> chemicalmodels, List <string> strc)
        {
            int i = strc.Count;

            for (int j = 0; j < i; j++)
            {
                m_wordApp.Selection.MoveDown();//光标下移,光标移出表格
                m_wordApp.Selection.InsertBreak();
                m_wordApp.Selection.ParagraphFormat.Alignment = WdParagraphAlignment.wdAlignParagraphCenter;
                m_wordApp.Selection.Font.Size = 14;
                m_wordApp.Selection.Font.Bold = 3;
                m_wordApp.Selection.TypeText("检测结果\r\n");

                Word.Table basicInfo = m_doc.Tables.Add(m_wordApp.Selection.Range, 25, 5);
                basicInfo.Borders.Enable           = 1;
                basicInfo.Borders.OutsideLineStyle = WdLineStyle.wdLineStyleNone;
                basicInfo.Borders[WdBorderType.wdBorderTop].LineStyle    = WdLineStyle.wdLineStyleSingle;
                basicInfo.Borders[WdBorderType.wdBorderBottom].LineStyle = WdLineStyle.wdLineStyleSingle;
                basicInfo.Columns[1].Width = 90;

                basicInfo.Rows[1].Height = 10;
                basicInfo.Cell(1, 1).Select();
                SetCellHeaderText("样品编号");
                basicInfo.Cell(1, 2).Select();
                SetCellHeaderText("样品名称");
                basicInfo.Cell(1, 3).Select();
                SetCellHeaderText("样品状态");
                basicInfo.Cell(1, 4).Select();
                SetCellHeaderText("采样地点");
                basicInfo.Cell(1, 5).Select();
                SetCellHeaderText("样品包装");

                var chemicalmodel = chemicalmodels.FirstOrDefault();       ///得到数列中的一个 元素
                basicInfo.Rows[2].Height = 10;
                basicInfo.Cell(2, 1).Select();
                SetCellText(0, 12, chemicalmodel.SampleNumber, WdParagraphAlignment.wdAlignParagraphLeft, WdCellVerticalAlignment.wdCellAlignVerticalCenter);
                basicInfo.Cell(2, 2).Select();
                SetCellHeaderText("   ");
                basicInfo.Cell(2, 3).Select();
                SetCellHeaderText("   ");
                basicInfo.Cell(2, 4).Select();
                SetCellText(0, 12, chemicalmodel.Location, WdParagraphAlignment.wdAlignParagraphLeft, WdCellVerticalAlignment.wdCellAlignVerticalCenter);
                basicInfo.Cell(2, 5).Select();
                SetCellHeaderText("   ");
                chemicalmodels.Remove(chemicalmodel);

                basicInfo.Rows[3].Height = 10;
                basicInfo.Cell(3, 1).Merge(basicInfo.Cell(3, 2));
                basicInfo.Cell(3, 1).Select();
                SetCellHeaderText("检测项目");
                basicInfo.Cell(3, 2).Select();
                SetCellHeaderText("检测结果");
                basicInfo.Cell(3, 3).Merge(basicInfo.Cell(3, 4));
                basicInfo.Cell(3, 3).Select();
                SetCellHeaderText("限值");

                basicInfo.Rows[4].Height = 10;
                basicInfo.Cell(4, 1).Merge(basicInfo.Cell(4, 2));
                basicInfo.Cell(4, 1).Select();
                SetCellHeaderText("色度(铂钴色度单位)");
                basicInfo.Cell(4, 2).Select();
                SetCellHeaderText("    ");
                basicInfo.Cell(4, 3).Merge(basicInfo.Cell(4, 4));
                basicInfo.Cell(4, 3).Select();
                SetCellHeaderText("15");

                basicInfo.Rows[5].Height = 10;
                basicInfo.Cell(5, 1).Merge(basicInfo.Cell(5, 2));
                basicInfo.Cell(5, 1).Select();
                SetCellHeaderText("浑浊度(NTU)");
                basicInfo.Cell(5, 2).Select();
                SetCellHeaderText("    ");
                basicInfo.Cell(5, 3).Merge(basicInfo.Cell(5, 4));
                basicInfo.Cell(5, 3).Select();
                SetCellHeaderText("1\r\n 水源与净水技术条件限制时为3");

                basicInfo.Rows[6].Height = 10;
                basicInfo.Cell(6, 1).Merge(basicInfo.Cell(6, 2));
                basicInfo.Cell(6, 1).Select();
                SetCellHeaderText("臭和味");
                basicInfo.Cell(6, 2).Select();
                SetCellHeaderText("    ");
                basicInfo.Cell(6, 3).Merge(basicInfo.Cell(6, 4));
                basicInfo.Cell(6, 3).Select();
                SetCellHeaderText("无异臭、异味");

                basicInfo.Rows[7].Height = 10;
                basicInfo.Cell(7, 1).Merge(basicInfo.Cell(7, 2));
                basicInfo.Cell(7, 1).Select();
                SetCellHeaderText("肉眼可见物");
                basicInfo.Cell(7, 2).Select();
                SetCellHeaderText("    ");
                basicInfo.Cell(7, 3).Merge(basicInfo.Cell(7, 4));
                basicInfo.Cell(7, 3).Select();
                SetCellHeaderText("无");

                basicInfo.Rows[8].Height = 10;
                basicInfo.Cell(8, 1).Merge(basicInfo.Cell(8, 2));
                basicInfo.Cell(8, 1).Select();
                SetCellHeaderText("pH");
                basicInfo.Cell(8, 2).Select();
                SetCellHeaderText("    ");
                basicInfo.Cell(8, 3).Merge(basicInfo.Cell(8, 4));
                basicInfo.Cell(8, 3).Select();
                SetCellHeaderText("不小于6.5且不大于8.5");

                basicInfo.Rows[9].Height = 10;
                basicInfo.Cell(9, 1).Merge(basicInfo.Cell(9, 2));
                basicInfo.Cell(9, 1).Select();
                SetCellHeaderText("总硬度(以CaCO3计)/ (mg/L)");
                basicInfo.Cell(9, 2).Select();
                SetCellHeaderText("    ");
                basicInfo.Cell(9, 3).Merge(basicInfo.Cell(9, 4));
                basicInfo.Cell(9, 3).Select();
                SetCellHeaderText("450");

                basicInfo.Rows[10].Height = 10;
                basicInfo.Cell(10, 1).Merge(basicInfo.Cell(10, 2));
                basicInfo.Cell(10, 1).Select();
                SetCellHeaderText("亚硝酸盐(mg/L)");
                basicInfo.Cell(10, 2).Select();
                SetCellHeaderText("    ");
                basicInfo.Cell(10, 3).Merge(basicInfo.Cell(10, 4));
                basicInfo.Cell(10, 3).Select();
                SetCellHeaderText("1");

                basicInfo.Rows[11].Height = 10;
                basicInfo.Cell(11, 1).Merge(basicInfo.Cell(11, 2));
                basicInfo.Cell(11, 1).Select();
                SetCellHeaderText("耗氧量(CODMn法,以O2计)/ (mg/L)");
                basicInfo.Cell(11, 2).Select();
                SetCellHeaderText("    ");
                basicInfo.Cell(11, 3).Merge(basicInfo.Cell(11, 4));
                basicInfo.Cell(11, 3).Select();
                SetCellHeaderText("3\r\n 水源限制,原水耗氧量>6 mg/L时为5");

                basicInfo.Rows[12].Height = 10;
                basicInfo.Cell(12, 1).Merge(basicInfo.Cell(12, 2));
                basicInfo.Cell(12, 1).Select();
                SetCellHeaderText("铬(六价)(mg/L)");
                basicInfo.Cell(12, 2).Select();
                SetCellHeaderText("    ");
                basicInfo.Cell(12, 3).Merge(basicInfo.Cell(12, 4));
                basicInfo.Cell(12, 3).Select();
                SetCellHeaderText("0.05");

                basicInfo.Rows[13].Height = 10;
                basicInfo.Cell(13, 1).Merge(basicInfo.Cell(13, 2));
                basicInfo.Cell(13, 1).Select();
                SetCellHeaderText("氨氮(以N计)/ (mg/L)");
                basicInfo.Cell(13, 2).Select();
                SetCellHeaderText("    ");
                basicInfo.Cell(13, 3).Merge(basicInfo.Cell(13, 4));
                basicInfo.Cell(13, 3).Select();
                SetCellHeaderText("0.5");

                basicInfo.Rows[14].Height = 10;
                basicInfo.Cell(14, 1).Merge(basicInfo.Cell(14, 2));
                basicInfo.Cell(14, 1).Select();
                SetCellHeaderText("总大肠菌群(MPN/100mL)");
                basicInfo.Cell(14, 2).Select();
                SetCellHeaderText("    ");
                basicInfo.Cell(14, 3).Merge(basicInfo.Cell(14, 4));
                basicInfo.Cell(14, 3).Select();
                SetCellHeaderText("不得检出");

                basicInfo.Rows[15].Height = 10;
                basicInfo.Cell(15, 1).Merge(basicInfo.Cell(15, 2));
                basicInfo.Cell(15, 1).Select();
                SetCellHeaderText("耐热大肠菌群(MPN/100mL)");
                basicInfo.Cell(15, 2).Select();
                SetCellHeaderText("    ");
                basicInfo.Cell(15, 3).Merge(basicInfo.Cell(15, 4));
                basicInfo.Cell(15, 3).Select();
                SetCellHeaderText("不得检出");

                basicInfo.Rows[16].Height = 10;
                basicInfo.Cell(16, 1).Merge(basicInfo.Cell(16, 2));
                basicInfo.Cell(16, 1).Select();
                SetCellHeaderText("大肠埃希氏菌(MPN/100mL)");
                basicInfo.Cell(16, 2).Select();
                SetCellHeaderText("    ");
                basicInfo.Cell(16, 3).Merge(basicInfo.Cell(16, 4));
                basicInfo.Cell(16, 3).Select();
                SetCellHeaderText("不得检出");

                basicInfo.Rows[17].Height = 10;
                basicInfo.Cell(17, 1).Merge(basicInfo.Cell(17, 2));
                basicInfo.Cell(17, 1).Select();
                SetCellHeaderText("菌落总数(cfu/mL)");
                basicInfo.Cell(17, 2).Select();
                SetCellHeaderText("    ");
                basicInfo.Cell(17, 3).Merge(basicInfo.Cell(17, 4));
                basicInfo.Cell(17, 3).Select();
                SetCellHeaderText("无异臭、异味");

                basicInfo.Rows[18].Height = 10;
                basicInfo.Cell(18, 1).Merge(basicInfo.Cell(18, 2));
                basicInfo.Cell(18, 1).Select();
                SetCellHeaderText("铁(mg/L)");
                basicInfo.Cell(18, 2).Select();
                SetCellHeaderText("    ");
                basicInfo.Cell(18, 3).Merge(basicInfo.Cell(18, 4));
                basicInfo.Cell(18, 3).Select();
                SetCellHeaderText("0.3");

                basicInfo.Rows[19].Height = 10;
                basicInfo.Cell(19, 1).Merge(basicInfo.Cell(19, 2));
                basicInfo.Cell(19, 1).Select();
                SetCellHeaderText("铜(mg/L)");
                basicInfo.Cell(19, 2).Select();
                SetCellHeaderText("    ");
                basicInfo.Cell(19, 3).Merge(basicInfo.Cell(19, 4));
                basicInfo.Cell(19, 3).Select();
                SetCellHeaderText("1.0");

                basicInfo.Rows[20].Height = 10;
                basicInfo.Cell(20, 1).Merge(basicInfo.Cell(20, 2));
                basicInfo.Cell(20, 1).Select();
                SetCellHeaderText("锰(mg/L)");
                basicInfo.Cell(20, 2).Select();
                SetCellHeaderText("    ");
                basicInfo.Cell(20, 3).Merge(basicInfo.Cell(20, 4));
                basicInfo.Cell(20, 3).Select();
                SetCellHeaderText("0.1");

                basicInfo.Rows[21].Height = 10;
                basicInfo.Cell(21, 1).Merge(basicInfo.Cell(21, 2));
                basicInfo.Cell(21, 1).Select();
                SetCellHeaderText("铅(mg/L)");
                basicInfo.Cell(21, 2).Select();
                SetCellHeaderText("    ");
                basicInfo.Cell(21, 3).Merge(basicInfo.Cell(21, 4));
                basicInfo.Cell(21, 3).Select();
                SetCellHeaderText("0.01");

                basicInfo.Rows[22].Height = 10;
                basicInfo.Cell(22, 1).Merge(basicInfo.Cell(22, 2));
                basicInfo.Cell(22, 1).Select();
                SetCellHeaderText("氯化物(mg/L)");
                basicInfo.Cell(22, 2).Select();
                SetCellHeaderText("    ");
                basicInfo.Cell(22, 3).Merge(basicInfo.Cell(22, 4));
                basicInfo.Cell(22, 3).Select();
                SetCellHeaderText("250");

                basicInfo.Rows[23].Height = 10;
                basicInfo.Cell(23, 1).Merge(basicInfo.Cell(23, 2));
                basicInfo.Cell(23, 1).Select();
                SetCellHeaderText("硫酸盐(mg/L)");
                basicInfo.Cell(23, 2).Select();
                SetCellHeaderText("    ");
                basicInfo.Cell(23, 3).Merge(basicInfo.Cell(23, 4));
                basicInfo.Cell(23, 3).Select();
                SetCellHeaderText("250");

                basicInfo.Rows[24].Height = 10;
                basicInfo.Cell(24, 1).Merge(basicInfo.Cell(24, 2));
                basicInfo.Cell(24, 1).Select();
                SetCellHeaderText("游离余氯(mg/L)");
                basicInfo.Cell(24, 2).Select();
                SetCellHeaderText("    ");
                basicInfo.Cell(24, 3).Merge(basicInfo.Cell(24, 4));
                basicInfo.Cell(24, 3).Select();
                SetCellHeaderText("≥0.05\r\n (管网末梢水中余量)");

                basicInfo.Rows[25].Height = 10;
                basicInfo.Cell(25, 1).Merge(basicInfo.Cell(25, 2));
                basicInfo.Cell(25, 1).Select();
                SetCellHeaderText("硝酸盐((以N计)/mg/L)");
                basicInfo.Cell(25, 2).Select();
                SetCellHeaderText("    ");
                basicInfo.Cell(25, 3).Merge(basicInfo.Cell(25, 4));
                basicInfo.Cell(25, 3).Select();
                SetCellHeaderText("10\r\n 地下水源限制时为20");
            }
        }
        private void WriteInstruction()
        {
            m_wordApp.Selection.ParagraphFormat.Alignment = WdParagraphAlignment.wdAlignParagraphCenter;
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 22;
            m_wordApp.Selection.TypeText("\r\n\r\n\r\n职业卫生技术服务合同\r\n\r\n");
            m_wordApp.Selection.ParagraphFormat.Alignment = WdParagraphAlignment.wdAlignParagraphLeft;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.TypeText("本合同由" + model.CompaneName + " (下称甲方)委托北京德康莱健康安全科技股份有限公司(下称乙方)就" + model.CompaneName + "" + model.ProjectName + "工作场所职业危害因素检测与评价技术服务工作,使甲方取得科学、准确的评价报告。双方经过平等协商,在真实、充分地表达各自意愿的基础上,根据《中华人民共和国合同法》的规定,达成以下协议,并由双方共同恪守。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第一条 定义");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.TypeText("本合同所使用的下述名词和术语,除非根据上下文有其它明显含义,其定义为:");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("1.1 “合同”  是指由甲方与乙方签订的" + model.CompaneName + "工作场所进行职业危害因素检测与评价技术服务合同,包括合同条款及在合同履行期间双方可能签订的备忘录或变更单。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("1.2 “报告”是指乙方为甲方提供的" + model.CompaneName + "" + model.CompaneName + "工作场所职业危害因素检测与评价报告。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("1.3 “日”是指工作日。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("1.4 “规范”是指合同中列出的所有规则、规格书、标准和技术规范。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("1.5 “图纸”是指由甲方提供或乙方提供用于工作的全部图纸。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("1.6 “第三方”是指除甲方和乙方以外的任何一方。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第二条 工作范围");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.TypeText("乙方按甲方要求,依据国家《职业病防治法》相关法律法规及相关标准对" + model.CompaneName + "" + model.ProjectName + "工作场所进行职业危害因素检测与评价,并编制相应评价文件,形成职业病危害因素检测与评价报告。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("上述报告应包括但不限于以下内容:");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("1 职业病危害因素检测与评价目的、依据、范围、内容和方法;");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("2 项目概况,包括建设地点、性质、规模、设计能力等;");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("3 项目工作场所存在的职业病危害因素的浓度或强度,并做出评价;");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("4 对工作场所存在的职业卫生问题提出有效的防护对策。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第三条 甲方的责任和义务");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.TypeText("3.1自合同签订之日起___日内,甲方向乙方提供可行性研究报告为参考资料。甲方应对提供资料的真实性、完整性负责。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("3.2 按合同规定向乙方支付合同价款。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("3.3 协助乙方完成现场调查、检测,并提供相应的保障及便利。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第四条 乙方的责任和义务");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("4.1乙方应认真审查甲方提供的一切资料和文件,若发现有任何错误或不当,应及时书面通知甲方。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("4.2 乙方应按国家有关规范和行业标准向甲方提交能够反映该项目真实、准确、详细的职业病危害因素检测与评价资料,形成报告。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第五条 工作进度和完工");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("5.1甲方向乙方交付本合同约定材料后,乙方应于30日内完成作业场所职业危害因素检测评价,出具评价报告。 乙方完成评价报告并通知甲方领取评价报告。.甲方应按照乙方通知的时间领取乙方的工作成果。甲方未按照乙方要求的时间接受工作成果的,视为甲方违约。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("5.2合同履行期间,在乙方的实际工作进度落后于计划进度的情况下,甲方有权要求乙方加班、增加人力或其他资源以保证按时提交报告。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("5.3 由于甲方未能按3.1款和3.3款要求及时提供资料,造成乙方实际工作进度落后于计划工作进度情况下,乙方出具评价报告的时间将顺延。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("5.4 乙方向甲方提供各" + model.ProjectName + "检测评价报告1份(含电子版)。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第六条 合同价格");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("6.1甲方应向乙方支付技术服务费用" + (Convert.ToDouble(model.Money) / 10000).ToString("0.00") + "万元(大写:           万元)。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("6.2合同价格包含了乙方为履行合同所需的所有费用(包括检测费、评价费、成本、税金、管理费、申请备案的费用、利润以及为履行合同所发生的其它费用)。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第七条 付款方式");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("7.1甲乙双方签订本合同后 5 日内,甲方应向乙方支付合同总额的" + model.PayRatioFirst + "%,即" + ((Convert.ToDouble(model.Money) / 10000) * (Convert.ToDouble(model.PayRatioFirst) / 100)).ToString("0.00") + "万元。报告交付前甲方应向乙方支付合同总额的" + (100 - Convert.ToInt16(model.PayRatioFirst)) + "%,即" + ((Convert.ToDouble(model.Money) / 10000) * ((Convert.ToDouble(100) - Convert.ToDouble(model.PayRatioFirst)) / 100)).ToString("0.00") + "万元。乙方在完成甲方现场检测并出具检测数据后表示已完成该项目50%的工作。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("7.2  乙方开户银行名称、地址和账号为:");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("收款单位:北京德康莱健康安全科技股份有限公司");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("帐    号:");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("汇 入 行:");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第八条 保密");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("甲方:");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("8.1 保密内容:未经乙方书面同意,甲方不得将乙方提交的有关本项目的评价报告及其他与之相关的任何技术性文件、资料用于本合同目的之外的任何用途,否则,乙方将要求甲方另行支付相应费用。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("非为用于本合同之目的,未经乙方书面同意或根据法律之规定及政府相关部门的要求,甲方不得将上述材料向任何第三人公开或变相公开,包括甲方故意或过失将上述材料丢失致使上述材料为不特定第三人所知。否则,甲方的行为将视为对乙方权利的侵犯。在此种情况下,乙方有权要求甲方另行支付相关费用。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("8.2 涉密人员范围:甲方所有可能接触该评价报告的工作人员。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("8.3 保密期限:自甲方知悉上述约定的保密信息之日起至上述保密信息为公众所知之日止。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("8.4 泄密责任:甲方违反上述约定,应当承担相应赔偿责任。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("乙方:");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("8.5保密内容:乙方对甲方提供的资料仅用于编制该项目职业危害因素评价报告,不得用于除此以外的其他任何目的。但乙方依照国家法律、法规及相关政府部门的要求除外。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("8.6 涉密人员范围:乙方所有涉及该项目技术资料的人员。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("8.7 保密期限:自乙方知悉上述保密内容之日起至上述保密信息为公众所知之日止。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("8.8泄密责任:乙方违反本约定造成甲方经济损失,甲方有权依法要求赔偿。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第九条  成果验收");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("9.1 乙方提交的技术服务工作成果形式为:" + model.ProjectName + "工作场所职业危害因素检测与评价报告。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("9.3验收地点:" + model.CompaneName + "");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第十条 成果归属");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("乙方利用甲方提供的技术资料和工作条件完成的该项目评价报告书及其他相关技术资料,在甲方全部支付合同约定的服务费用前,其所有权归乙方完全所有。未经乙方同意,甲方不得以任何目的,以任何形式使用或许可他人使用。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("甲方支付合同约定的全部款项后,本合同涉及的该项目评价报告书及其他相关技术资料的使用权归甲方(但乙方有署名权)。同时,甲方对该项目评价报告书的权利仅限于为本合同的目的使用。甲方为本合同目的之外使用评价报告的,应经乙方同意并支付相关费用。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("该项目评价报告书的使用权利转归甲方后,乙方可以为自身的经营业务的需要,引用上述报告的内容而不需要预先告知甲方亦无须支付任何费用。同时,乙方可以为宣传自身业务的需要,以任何方式向任何第三人或不特定的人群表明,乙方曾经为甲方进行过上述工作。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第十一条  终止");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("乙方向甲方提交报告且双方的债权债务结清后,本合同终止。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第十二条  适用法律");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("合同的履行及解释适用《中华人民共和国合同法》及相关法律。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第十三条  违约");
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("13.1乙方未按合同约定时间完成工作的,甲方有权按下述规定从应付给乙方的合同款项中扣除该延期的违约金。经甲方同意延长履行期限的除外。甲方未能按约定日期提交相关材料的,乙方履行期限顺延。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("13.2 乙方未按约定日期完成工作的,每延期1日的违约金为合同总金额的0.5%。乙方承担的延期履行违约金以合同总金额的20%为上限。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("13.3甲方未按本合同7.1条规定支付首付款的,乙方有权拒绝赴现场工作。甲方超过30日仍未支付首付款的,乙方有权解除本合同,同时,要求甲方支付合同款项50%的违约金。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("13.4甲方未按照合同5.1条的约定,领取乙方提交的工作成果,视为甲方违约。经乙方提示,甲方仍不领取的,乙方有权解除本合同。在此种情况下,甲方已经支付的款项乙方不予退还,同时,甲方还应向乙方支付违约金,违约金的数额为合同金额的50%。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第十四条  争议");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("14.1 对合同的解释或履行所引起的任何争议,双方首先应尽最大努力通过友好协商解决。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("14.2 如争议发生后协商不成,合同任何一方可将争议提交乙方所在地人民法院。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第十五条  合同有效期");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("本合同自双方授权代表签字之日起生效,成果交付完毕、费用结算清楚后失效。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第十六条  其它");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.TypeText("16.1其它未尽事宜,由双方友好协商补充完善。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.TypeText("16.2合同一式四份,甲、乙双方各二份具有同等法律效力。");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 1;
            m_wordApp.Selection.Font.Size = 16;
            m_wordApp.Selection.TypeText("第十七条 联系");
            m_wordApp.Selection.TypeParagraph();
            m_wordApp.Selection.Font.Bold = 0;
            m_wordApp.Selection.Font.Size = 14;
            Word.Table basicInfo = m_doc.Tables.Add(m_wordApp.Selection.Range, 14, 4);  //-
            basicInfo.Borders.Enable           = 1;
            basicInfo.Borders.OutsideLineStyle = WdLineStyle.wdLineStyleNone;
            basicInfo.Borders[WdBorderType.wdBorderTop].LineStyle    = WdLineStyle.wdLineStyleSingle;
            basicInfo.Borders[WdBorderType.wdBorderBottom].LineStyle = WdLineStyle.wdLineStyleSingle;
            //basicInfo.Columns[1].Width = 90;

            basicInfo.Rows[1].Height = 20;
            basicInfo.Cell(1, 1).Select();
            SetCellHeaderText("甲方:");
            basicInfo.Cell(1, 2).Select();
            SetCellHeaderText(model.CompaneName);
            basicInfo.Cell(1, 3).Select();
            SetCellHeaderText("乙方:");
            basicInfo.Cell(1, 4).Select();
            SetCellHeaderText("北京德康莱健康安全科技股份有限公司");
            basicInfo.Cell(2, 1).Select();
            SetCellHeaderText("法定代表人:");
            basicInfo.Cell(2, 2).Select();
            SetCellHeaderText("");
            basicInfo.Cell(2, 3).Select();
            SetCellHeaderText("法定代表人:");
            basicInfo.Cell(2, 4).Select();
            SetCellHeaderText("");
            basicInfo.Cell(3, 1).Select();
            SetCellHeaderText("代表人电话:");
            basicInfo.Cell(3, 2).Select();
            SetCellHeaderText("");
            basicInfo.Cell(3, 3).Select();
            SetCellHeaderText("代表人电话:");
            basicInfo.Cell(3, 4).Select();
            SetCellHeaderText("");
            basicInfo.Cell(4, 1).Select();
            SetCellHeaderText("传真:");
            basicInfo.Cell(4, 2).Select();
            SetCellHeaderText("");
            basicInfo.Cell(4, 3).Select();
            SetCellHeaderText("传真:");
            basicInfo.Cell(4, 4).Select();
            SetCellHeaderText("");
            basicInfo.Cell(5, 1).Select();
            SetCellHeaderText("地址:");
            basicInfo.Cell(5, 2).Select();
            SetCellHeaderText("");
            basicInfo.Cell(5, 3).Select();
            SetCellHeaderText("地址:");
            basicInfo.Cell(5, 4).Select();
            SetCellHeaderText("");
            basicInfo.Cell(6, 1).Select();
            SetCellHeaderText("联系人:");
            basicInfo.Cell(6, 2).Select();
            SetCellHeaderText("");
            basicInfo.Cell(6, 3).Select();
            SetCellHeaderText("联系人:");
            basicInfo.Cell(6, 4).Select();
            SetCellHeaderText("");
            basicInfo.Cell(7, 1).Select();
            SetCellHeaderText("电话:");
            basicInfo.Cell(7, 2).Select();
            SetCellHeaderText("");
            basicInfo.Cell(7, 3).Select();
            SetCellHeaderText("电话:");
            basicInfo.Cell(7, 4).Select();
            SetCellHeaderText("");
            basicInfo.Cell(8, 1).Select();
            SetCellHeaderText("邮编:");
            basicInfo.Cell(8, 2).Select();
            SetCellHeaderText("");
            basicInfo.Cell(8, 3).Select();
            SetCellHeaderText("邮编:");
            basicInfo.Cell(8, 4).Select();
            SetCellHeaderText("");
            basicInfo.Cell(9, 1).Select();
            SetCellHeaderText("邮箱:");
            basicInfo.Cell(9, 2).Select();
            SetCellHeaderText("");
            basicInfo.Cell(9, 3).Select();
            SetCellHeaderText("邮箱:");
            basicInfo.Cell(9, 4).Select();
            SetCellHeaderText("");
            basicInfo.Cell(10, 1).Select();
            SetCellHeaderText("授权人姓名:");
            basicInfo.Cell(10, 2).Select();
            SetCellHeaderText("");
            basicInfo.Cell(10, 3).Select();
            SetCellHeaderText("授权人姓名:");
            basicInfo.Cell(10, 4).Select();
            SetCellHeaderText("");
            basicInfo.Cell(11, 1).Select();
            SetCellHeaderText("职务:");
            basicInfo.Cell(11, 2).Select();
            SetCellHeaderText("");
            basicInfo.Cell(11, 3).Select();
            SetCellHeaderText("职务:");
            basicInfo.Cell(11, 4).Select();
            SetCellHeaderText("");
            basicInfo.Cell(12, 1).Select();
            SetCellHeaderText("授权代理人签名:");
            basicInfo.Cell(12, 2).Select();

            basicInfo.Cell(12, 3).Select();
            SetCellHeaderText("授权代理人签名:");
            basicInfo.Cell(12, 4).Select();

            basicInfo.Cell(13, 1).Select();
            SetCellHeaderText("单位盖章:");
            basicInfo.Cell(13, 2).Select();

            basicInfo.Cell(13, 3).Select();
            SetCellHeaderText("单位盖章:");
            basicInfo.Cell(13, 4).Select();
            basicInfo.Cell(14, 1).Select();
            SetCellHeaderText("签订日期:");
            basicInfo.Cell(14, 2).Select();
            SetCellHeaderText(model.ContractDate.Year + "年" + model.ContractDate.Month + "月" + model.ContractDate.Day + "日");
            basicInfo.Cell(14, 3).Select();
            SetCellHeaderText("签订日期:");
            basicInfo.Cell(14, 4).Select();
            SetCellHeaderText(model.ContractDate.Year + "年" + model.ContractDate.Month + "月" + model.ContractDate.Day + "日");
            m_wordApp.Selection.MoveDown(); //光标下移,光标移出表格
            m_wordApp.Selection.MoveDown(); //光标下移,光标移出表格
            m_wordApp.Selection.MoveDown(); //光标下移,光标移出表格
            m_wordApp.Selection.MoveDown(); //光标下移,光标移出表格
            m_wordApp.Selection.MoveDown(); //光标下移,光标移出表格
            m_wordApp.Selection.MoveDown(); //光标下移,光标移出表格
        }
        private String WriteEmployerBasicInfo(ProjectInfo projectmodels)
        {
            m_wordApp.Selection.ParagraphFormat.Alignment = WdParagraphAlignment.wdAlignParagraphCenter;
            m_wordApp.Selection.Font.Size = 14;
            m_wordApp.Selection.Font.Bold = 2;
            m_wordApp.Selection.TypeText("水  质   检   测   报   告 ");
            m_wordApp.Selection.TypeParagraph();

            Word.Table basicInfo = m_doc.Tables.Add(m_wordApp.Selection.Range, 14, 4);
            basicInfo.Borders.Enable           = 1;
            basicInfo.Borders.OutsideLineStyle = WdLineStyle.wdLineStyleNone;
            basicInfo.Borders[WdBorderType.wdBorderTop].LineStyle    = WdLineStyle.wdLineStyleSingle;
            basicInfo.Borders[WdBorderType.wdBorderBottom].LineStyle = WdLineStyle.wdLineStyleSingle;
            basicInfo.Columns[1].Width = 100;

            basicInfo.Rows[1].Height = 10;                    ///单位名称
            basicInfo.Cell(1, 1).Select();
            SetCellHeaderText("委托单位:");
            basicInfo.Cell(1, 2).Merge(basicInfo.Cell(1, 4));
            basicInfo.Cell(1, 2).Select();
            SetCellText(0, 12, projectmodels.CompaneName, WdParagraphAlignment.wdAlignParagraphLeft, WdCellVerticalAlignment.wdCellAlignVerticalCenter);

            basicInfo.Rows[2].Height = 10;                    ///单位名称
            basicInfo.Cell(2, 1).Select();
            SetCellHeaderText("受检单位:");
            basicInfo.Cell(2, 2).Merge(basicInfo.Cell(2, 4));
            basicInfo.Cell(2, 2).Select();
            SetCellText(0, 12, projectmodels.CompaneName, WdParagraphAlignment.wdAlignParagraphLeft, WdCellVerticalAlignment.wdCellAlignVerticalCenter);

            basicInfo.Rows[3].Height = 10;                 ///项目名称
            basicInfo.Cell(3, 1).Select();
            SetCellHeaderText("受检单位地址:");
            basicInfo.Cell(3, 2).Merge(basicInfo.Cell(3, 4));
            basicInfo.Cell(3, 2).Select();
            SetCellText(0, 12, projectmodels.CompanyAddress, WdParagraphAlignment.wdAlignParagraphLeft, WdCellVerticalAlignment.wdCellAlignVerticalCenter);

            basicInfo.Rows[4].Height = 10;                 ///项目名称
            basicInfo.Cell(4, 1).Select();
            SetCellHeaderText("检测类别:");
            basicInfo.Cell(4, 2).Select();
            SetCellHeaderText("   ");
            basicInfo.Cell(4, 3).Select();
            SetCellHeaderText("受理日期:");
            basicInfo.Cell(4, 4).Select();

            basicInfo.Rows[5].Height = 10;                 ///项目名称
            basicInfo.Cell(5, 1).Select();
            SetCellHeaderText("样品来源:");
            basicInfo.Cell(5, 2).Select();
            SetCellHeaderText("采样");
            basicInfo.Cell(5, 3).Select();
            SetCellHeaderText("采样日期:");
            basicInfo.Cell(5, 4).Select();

            basicInfo.Rows[6].Height = 10;                 ///项目名称
            basicInfo.Cell(6, 1).Select();
            SetCellHeaderText("样品数量:");
            basicInfo.Cell(6, 2).Select();
            SetCellHeaderText("   ");
            basicInfo.Cell(6, 3).Select();
            SetCellHeaderText("检测日期:");
            basicInfo.Cell(6, 4).Select();

            basicInfo.Cell(7, 1).Merge(basicInfo.Cell(8, 1));
            basicInfo.Cell(7, 1).Select();
            SetCellHeaderText("主要仪器设备:");
            basicInfo.Cell(7, 2).Merge(basicInfo.Cell(8, 4));
            basicInfo.Cell(7, 2).Select();
            SetCellHeaderText("        ");

            basicInfo.Cell(8, 1).Merge(basicInfo.Cell(14, 1));
            basicInfo.Cell(8, 1).Select();
            SetCellHeaderText("检测依据:");
            basicInfo.Cell(8, 2).Merge(basicInfo.Cell(14, 4));
            basicInfo.Cell(8, 2).Select();
            SetCellHeaderText("        ");

            m_wordApp.Selection.MoveDown();//光标下移,光标移出表格
            m_wordApp.Selection.TypeText("\r\n");
            return("0");
        }
Пример #25
0
    public void thirdTable()
    {
        int r = 4;
        int c = 2;

        Word.Table table = newDocument.Tables.Add(wordApplication.Selection.Range, r, c);

        for (int x = 1; x < 5; x++)
        {
            table.Cell(x, 1).SetWidth(160.00f, WdRulerStyle.wdAdjustFirstColumn);
        }

        table.Cell(1, 1).Select();
        wordApplication.Selection.Font.Bold = 0;
        wordApplication.Selection.TypeText(@"Report Detail");
        table.Cell(2, 1).Select();
        wordApplication.Selection.TypeText(@"Test activities:");
        table.Cell(3, 1).Select();
        wordApplication.Selection.TypeText(@"Test tasks completed:");
        table.Cell(4, 1).Select();
        wordApplication.Selection.TypeText(@"Brief overview of testing:");

        string activtemp = "";

        if ((checkbutton1.Active == false) & (checkbutton2.Active == false) & (checkbutton3.Active == false))
        {
            activtemp = @"Scripting & Planning/Test Execution/Issue Verification & Retest (Please delete as appropriate)";
        }

        if (checkbutton1.Active)
        {
            activtemp = @"Scripting & Planning ";
            if (checkbutton2.Active)
            {
                activtemp           = activtemp + @"/ Test Execution ";
                checkbutton2.Active = false;
            }
            if (checkbutton3.Active)
            {
                activtemp           = activtemp + @"/ Issue Verification & Retest ";
                checkbutton3.Active = false;
            }
        }

        if (checkbutton2.Active)
        {
            activtemp = activtemp + @"Test Execution ";
            if (checkbutton3.Active)
            {
                activtemp           = activtemp + @"/ Issue Verification & Retest ";
                checkbutton3.Active = false;
            }
        }

        if (checkbutton3.Active)
        {
            activtemp = activtemp + @"Issue Verification & Retest ";
        }



        table.Cell(2, 2).Select();
        //wordApplication.Selection.TypeText(@"Scripting & Planning/Test Execution/Issue Verification & Retest (Please delete as appropriate)");
        wordApplication.Selection.TypeText(activtemp);
        table.Cell(3, 2).Select();
        wordApplication.Selection.TypeText(@"Brief explanation of the work you have undertaken. Be specific here as to what you have done. Relate it back to the tasks that were required of you in the brief. 
E.g. Copy/link and rendering checks of 18 IKEA Kitchen emails across all specified environments.
E.g. Retests including issue verifications of all issues marked as resolved in the tracker.
E.g. Commenced test execution against the fully scripted test plan on …environments.
E.g. Conducted tests of all the changes detailed in the “xyz.doc” document provided by the client.

If a scenario arises where you’re not in work the following day – make sure this section makes it very clear to another tester what you have done.");
        table.Cell(4, 2).Select();
        wordApplication.Selection.TypeText(@"Remember this is for the client – to give them an overview of what we have done, the results we have found and our general feedback on the application. Be factual – avoid subjective statements or opinions.  Use “We” rather than “I”. 

Things to include might be:

•	A summary of how the site/app is behaving compared to expected behaviour. 
•	How is the testing progressing against the time scheduled? Were we able to get done today what we had planned? If not, why?
•	A brief rundown of the major problems you're seeing
•	If our testing budget is used up – could more testing be required?
•	Ensure all information is measureable.
•	User experience feedback that may be valuable to the client, that is supported by factual evidence with issues in the tracker.

DO NOT:
•	Do not offer an opinion as to whether the app is ready for release.
•	Do not provide subjective feelings (e.g. “We felt that the website performed well”).
•	Do not suggest that we are ahead of schedule."    );

        String bobone = wordApplication.Version;

        if (bobone == "14.0")
        {
            table.Style = "Light Shading - Accent 1";
            table.ApplyStyleFirstColumn = false;
        }
        else
        {
            table.Style = "List Table 6 Colorful - Accent 1";
            table.ApplyStyleFirstColumn = false;
        }

        table.Dispose();
        return;
    }
Пример #26
0
    public void fouthTable()
    {
        int r = 9;
        int c = 2;

        Word.Table table = newDocument.Tables.Add(wordApplication.Selection.Range, r, c);

        for (int x = 1; x < 10; x++)
        {
            table.Cell(x, 1).SetWidth(160.00f, WdRulerStyle.wdAdjustFirstColumn);
        }

        table.Cell(1, 1).Select();
        wordApplication.Selection.Font.Bold = 1;
        wordApplication.Selection.TypeText(@"Issue Summary");
        table.Cell(2, 1).Select();
        wordApplication.Selection.TypeText(@"Have any issues been found that block test progress? (Y/N):");
        table.Cell(3, 1).Select();
        wordApplication.Selection.TypeText(@"Issues blocking testing:");
        table.Cell(4, 1).Select();
        wordApplication.Selection.TypeText(@"Top 5 issues of concern:");
        table.Cell(5, 1).Select();
        wordApplication.Selection.TypeText(@"");
        table.Cell(6, 1).Select();
        wordApplication.Selection.TypeText(@"");
        table.Cell(7, 1).Select();
        wordApplication.Selection.TypeText(@"");
        table.Cell(8, 1).Select();
        wordApplication.Selection.TypeText(@"");
        table.Cell(9, 1).Select();
        wordApplication.Selection.TypeText(@"");


        table.Cell(5, 1).Select();
        wordApplication.Selection.TypeText(@"1");
        wordApplication.Selection.ParagraphFormat.Alignment = WdParagraphAlignment.wdAlignParagraphRight;
        table.Cell(6, 1).Select();
        wordApplication.Selection.ParagraphFormat.Alignment = WdParagraphAlignment.wdAlignParagraphRight;
        wordApplication.Selection.TypeText(@"2");
        table.Cell(7, 1).Select();
        wordApplication.Selection.TypeText(@"3");
        wordApplication.Selection.ParagraphFormat.Alignment = WdParagraphAlignment.wdAlignParagraphRight;
        table.Cell(8, 1).Select();
        wordApplication.Selection.ParagraphFormat.Alignment = WdParagraphAlignment.wdAlignParagraphRight;
        wordApplication.Selection.TypeText(@"4");
        table.Cell(9, 1).Select();
        wordApplication.Selection.TypeText(@"5");
        wordApplication.Selection.ParagraphFormat.Alignment = WdParagraphAlignment.wdAlignParagraphRight;

        table.Cell(2, 2).Select();
        wordApplication.Selection.TypeText(@"N");
        table.Cell(3, 2).Select();
        wordApplication.Selection.TypeText(@"(Issue numbers)");
        table.Cell(5, 2).Select();
        wordApplication.Selection.TypeText(@"#101 - Temp text");
        table.Cell(6, 2).Select();
        wordApplication.Selection.TypeText(@"#102 - Temp text");
        table.Cell(7, 2).Select();
        wordApplication.Selection.TypeText(@"#103 - Temp text");
        table.Cell(8, 2).Select();
        wordApplication.Selection.TypeText(@"#104 - Temp text");
        table.Cell(9, 2).Select();
        wordApplication.Selection.TypeText(@"#105 - Temp text");

        String bobone = wordApplication.Version;

        if (bobone == "14.0")
        {
            table.Style = "Light Shading - Accent 1";
            table.ApplyStyleFirstColumn = false;
            table.ApplyStyleHeadingRows = false;
        }
        else
        {
            table.Style = "List Table 6 Colorful - Accent 1";
            table.ApplyStyleFirstColumn = false;
            table.ApplyStyleHeadingRows = false;
        }

        table.Dispose();
        return;
    }
Пример #27
0
    protected void runRepeatDoc()
    {
        wordApplication = new Word.Application();
        wordApplication.DisplayAlerts = WdAlertLevel.wdAlertsNone;
        newDocument = wordApplication.Documents.Add();

        Word.Table table = newDocument.Tables.Add(wordApplication.Selection.Range, 2, 1);

        table.Cell(1, 1).Select();

        string mylongtextstring = (@"Title: 
A one sentence descriptive title for the issue

Description: 
A detailed description of the issue, including the failure and reasoning.

Steps to Recreate: 
Go to URL: " + txtURL + @"
Log in with valid details 

Environment:
Device - Device used during the testing
Operating System - The operating system used during the testing
Browser - The web browser used during the testing
Firmware - Firmware version of the device if relevant
Login Details for Account used - Add login details if applicable

Supporting material:
Add where appropriate screenshots, log files etc to aid detection of the issue and its correction.

Version:
" + txtURL + @"

Date:
" + DateTime.Now.ToString(@"dd/MM/yyyy") + @"

Severity:

");

        wordApplication.Selection.TypeText(mylongtextstring);

        wordApplication.Selection.MoveDown();
        wordApplication.Selection.MoveDown();
        wordApplication.Selection.TypeParagraph();

        Word.Table table2 = newDocument.Tables.Add(wordApplication.Selection.Range, 4, 1);
        table2.Cell(1, 1).Select();
        string temp4s = (@"1. Blocking Issue/Crash 
2. Major Impact on Functionality
3. Minor Impact on Functionality
4. Cosmetic Issue/Typo
5. Feature Enhancement/Suggestion");

        wordApplication.Selection.TypeText(temp4s);
        table2.Cell(2, 1).Select();
        temp4s = (@"Issue verified as fixed - " + DateTime.Now.ToString(@"dd/MM/yyyy") + @"
Version: " + txtURL);
        wordApplication.Selection.TypeText(temp4s);
        table2.Cell(3, 1).Select();
        temp4s = (@"Issue verified as not fixed - " + DateTime.Now.ToString(@"dd/MM/yyyy") + @"
Version: " + txtURL);
        wordApplication.Selection.TypeText(temp4s);
        table2.Cell(4, 1).Select();
        temp4s = (@"Closing issue based on above Comments - " + DateTime.Now.ToString(@"dd/MM/yyyy") + @"
Version: " + txtURL);
        wordApplication.Selection.TypeText(temp4s);

        String bobone = wordApplication.Version;

        if (bobone == "14.0")
        {
            table.Style = "Table Grid";
            table.ApplyStyleFirstColumn = false;
            table.ApplyStyleHeadingRows = false;
            table2.Style = "Table Grid";
            table2.ApplyStyleFirstColumn = false;
            table2.ApplyStyleHeadingRows = false;
        }
        else
        {
            table.Style = "Table Grid";
            table.ApplyStyleFirstColumn = false;
            table.ApplyStyleHeadingRows = false;
            table2.Style = "Table Grid";
            table2.ApplyStyleFirstColumn = false;
            table2.ApplyStyleHeadingRows = false;
        }

        string documentFile = tempLocString;

        double wordVersion = Convert.ToDouble(wordApplication.Version, CultureInfo.InvariantCulture);

        if (wordVersion >= 12.0)
        {
            newDocument.SaveAs(documentFile, WdSaveFormat.wdFormatDocumentDefault);
        }
        else
        {
            newDocument.SaveAs(documentFile);
        }

        // close word and dispose reference
        wordApplication.Quit();
        wordApplication.Dispose();
    }
Пример #28
0
        private void WriteFirstPage(Costing model)
        {
            m_wordApp.Selection.ParagraphFormat.Alignment = WdParagraphAlignment.wdAlignParagraphCenter;
            m_wordApp.Selection.Font.Bold = 5;
            m_wordApp.Selection.Font.Size = 40;
            //        m_wordApp.Selection.ParagraphFormat.Alignment = WdParagraphAlignment.wdAlignParagraphCenter;
            m_wordApp.Selection.TypeText("评价项目成本分析表");

            //测试结束
            Word.Table basicInfo = m_doc.Tables.Add(m_wordApp.Selection.Range, 23, 11);
            basicInfo.Borders.Enable           = 1;
            basicInfo.Borders.OutsideLineStyle = WdLineStyle.wdLineStyleNone;
            basicInfo.Borders[WdBorderType.wdBorderTop].LineStyle    = WdLineStyle.wdLineStyleSingle;
            basicInfo.Borders[WdBorderType.wdBorderBottom].LineStyle = WdLineStyle.wdLineStyleSingle;
            basicInfo.Columns[1].Width = 90;

            basicInfo.Rows[1].Height = 20;
            basicInfo.Cell(1, 1).Merge(basicInfo.Cell(1, 11));
            basicInfo.Cell(1, 1).Select();
            SetCellHeaderText("基本信息");

            basicInfo.Rows[2].Height = 20;
            basicInfo.Cell(2, 1).Merge(basicInfo.Cell(2, 3));
            basicInfo.Cell(2, 1).Select();
            SetCellHeaderText("项目名称");
            basicInfo.Cell(2, 2).Merge(basicInfo.Cell(2, 6));
            basicInfo.Cell(2, 2).Select();
            SetCellHeaderText(model.ProjectName);
            basicInfo.Cell(2, 3).Select();
            SetCellHeaderText("项目简称");
            basicInfo.Cell(2, 4).Merge(basicInfo.Cell(2, 5));
            basicInfo.Cell(2, 4).Select();
            SetCellHeaderText(model.ProjectSynopsis);

            basicInfo.Rows[3].Height = 20;
            basicInfo.Cell(3, 1).Merge(basicInfo.Cell(3, 3));
            basicInfo.Cell(3, 1).Select();
            SetCellHeaderText("业务负责人");
            basicInfo.Cell(3, 2).Merge(basicInfo.Cell(3, 6));
            basicInfo.Cell(3, 2).Select();
            SetCellHeaderText("");
            basicInfo.Cell(3, 3).Select();
            SetCellHeaderText("项目编号");
            basicInfo.Cell(3, 4).Merge(basicInfo.Cell(3, 5));
            basicInfo.Cell(3, 4).Select();
            SetCellHeaderText("");

            basicInfo.Rows[4].Height = 20;
            basicInfo.Cell(4, 1).Merge(basicInfo.Cell(4, 3));
            basicInfo.Cell(4, 1).Select();
            SetCellHeaderText("项目类型");
            basicInfo.Cell(4, 2).Merge(basicInfo.Cell(4, 6));
            basicInfo.Cell(4, 2).Select();
            SetCellHeaderText(HYZK.FrameWork.Utility.EnumHelper.GetEnumTitle((EnumType)@Convert.ToInt32(model.Type)));
            basicInfo.Cell(4, 3).Select();
            SetCellHeaderText("客户区县");
            basicInfo.Cell(4, 4).Merge(basicInfo.Cell(4, 5));
            basicInfo.Cell(4, 4).Select();
            SetCellHeaderText(model.CustomerCounty);

            basicInfo.Rows[5].Height = 20;
            basicInfo.Cell(5, 1).Merge(basicInfo.Cell(5, 3));
            basicInfo.Cell(5, 1).Select();
            SetCellHeaderText("联系人");
            basicInfo.Cell(5, 2).Merge(basicInfo.Cell(5, 6));
            basicInfo.Cell(5, 2).Select();
            SetCellHeaderText(model.ContactsPserson);
            basicInfo.Cell(5, 3).Select();
            SetCellHeaderText("所属乡镇");
            basicInfo.Cell(5, 4).Merge(basicInfo.Cell(5, 5));
            basicInfo.Cell(5, 4).Select();
            SetCellHeaderText(model.Towns);

            basicInfo.Rows[6].Height = 20;
            basicInfo.Cell(6, 1).Merge(basicInfo.Cell(6, 3));
            basicInfo.Cell(6, 1).Select();
            SetCellHeaderText("联系方式");
            basicInfo.Cell(6, 2).Merge(basicInfo.Cell(6, 6));
            basicInfo.Cell(6, 2).Select();
            SetCellHeaderText(model.Relation);
            basicInfo.Cell(6, 3).Select();
            SetCellHeaderText("备注");
            basicInfo.Cell(6, 4).Merge(basicInfo.Cell(6, 5));
            basicInfo.Cell(6, 4).Select();
            SetCellHeaderText(model.Remark);

            basicInfo.Rows[7].Height = 20;
            basicInfo.Cell(7, 1).Merge(basicInfo.Cell(7, 11));
            basicInfo.Cell(7, 1).Select();
            SetCellHeaderText("项目利润分析");

            basicInfo.Rows[8].Height = 20;
            basicInfo.Cell(8, 1).Select();
            SetCellHeaderText("");
            basicInfo.Cell(8, 2).Merge(basicInfo.Cell(8, 3));
            basicInfo.Cell(8, 2).Select();
            SetCellHeaderText("项目内容");
            basicInfo.Cell(8, 3).Merge(basicInfo.Cell(8, 8));
            basicInfo.Cell(8, 3).Select();
            SetCellHeaderText("明细");
            basicInfo.Cell(8, 4).Select();
            SetCellHeaderText("金额(元)");
            basicInfo.Cell(8, 5).Select();
            SetCellHeaderText("备注");

            basicInfo.Rows[9].Height = 20;
            basicInfo.Cell(9, 1).Select();
            SetCellHeaderText("1");
            basicInfo.Cell(9, 2).Merge(basicInfo.Cell(9, 3));
            basicInfo.Cell(9, 2).Select();
            SetCellHeaderText("销售额");
            basicInfo.Cell(9, 3).Merge(basicInfo.Cell(9, 8));
            basicInfo.Cell(9, 3).Select();
            SetCellHeaderText("");
            basicInfo.Cell(9, 4).Select();
            SetCellHeaderText(model.Sales.ToString());
            basicInfo.Cell(9, 5).Select();
            SetCellHeaderText("备注");

            basicInfo.Rows[10].Height = 20;
            basicInfo.Cell(10, 1).Select();
            SetCellHeaderText("2");
            basicInfo.Cell(10, 2).Merge(basicInfo.Cell(10, 3));
            basicInfo.Cell(10, 2).Select();
            SetCellHeaderText("技术成本");
            basicInfo.Cell(10, 3).Merge(basicInfo.Cell(10, 4));
            basicInfo.Cell(10, 3).Select();
            SetCellHeaderText("咨询类型");
            basicInfo.Cell(10, 4).Select();
            SetCellHeaderText("所需工时");
            basicInfo.Cell(10, 5).Select();
            SetCellHeaderText("咨询单价");
            basicInfo.Cell(10, 6).Select();
            SetCellHeaderText("外聘专家数量");
            basicInfo.Cell(10, 7).Select();
            SetCellHeaderText("其他");
            basicInfo.Cell(10, 8).Select();
            SetCellHeaderText("");
            basicInfo.Cell(10, 9).Select();
            SetCellHeaderText("");

            basicInfo.Rows[11].Height = 20;
            basicInfo.Cell(11, 1).Select();
            SetCellHeaderText("");
            basicInfo.Cell(11, 2).Select();
            SetCellHeaderText("");
            basicInfo.Cell(11, 3).Select();
            SetCellHeaderText("");
            basicInfo.Cell(11, 4).Select();
            SetCellHeaderText("");
            basicInfo.Cell(11, 5).Select();
            SetCellHeaderText("");
            basicInfo.Cell(11, 6).Select();
            SetCellHeaderText("");
            basicInfo.Cell(11, 7).Select();
            SetCellHeaderText("");
            basicInfo.Cell(11, 8).Select();
            SetCellHeaderText("");
            basicInfo.Cell(11, 9).Select();
            SetCellHeaderText("");
            basicInfo.Cell(11, 10).Select();
            SetCellHeaderText("");
            basicInfo.Cell(11, 11).Select();
            SetCellHeaderText("");


            basicInfo.Rows[12].Height = 20;
            basicInfo.Cell(12, 1).Select();
            SetCellHeaderText("3");
            basicInfo.Cell(12, 2).Merge(basicInfo.Cell(12, 3));
            basicInfo.Cell(12, 2).Select();
            SetCellHeaderText("推广费(1)");
            basicInfo.Cell(12, 3).Merge(basicInfo.Cell(12, 8));
            basicInfo.Cell(12, 3).Select();
            SetCellHeaderText("按实际发生");
            basicInfo.Cell(12, 4).Select();
            SetCellHeaderText(model.PromotionFee.ToString());
            basicInfo.Cell(12, 5).Select();
            SetCellHeaderText("");

            basicInfo.Rows[13].Height = 20;
            basicInfo.Cell(13, 1).Select();
            SetCellHeaderText("4");
            basicInfo.Cell(13, 2).Merge(basicInfo.Cell(13, 3));
            basicInfo.Cell(13, 2).Select();
            SetCellHeaderText("推广费(2)");
            basicInfo.Cell(13, 3).Merge(basicInfo.Cell(13, 8));
            basicInfo.Cell(13, 3).Select();
            SetCellHeaderText("按实际发生");
            basicInfo.Cell(13, 4).Select();
            SetCellHeaderText("");
            basicInfo.Cell(13, 5).Select();
            SetCellHeaderText("");

            basicInfo.Rows[14].Height = 20;
            basicInfo.Cell(14, 1).Select();
            SetCellHeaderText("5");
            basicInfo.Cell(14, 2).Merge(basicInfo.Cell(14, 3));
            basicInfo.Cell(14, 2).Select();
            SetCellHeaderText("协作费");
            basicInfo.Cell(14, 3).Merge(basicInfo.Cell(14, 8));
            basicInfo.Cell(14, 3).Select();
            SetCellHeaderText("(销售额-推广费)*15%");
            basicInfo.Cell(14, 4).Select();
            SetCellHeaderText(model.CollaborationFee.ToString());
            basicInfo.Cell(14, 5).Select();
            SetCellHeaderText("");

            basicInfo.Rows[15].Height = 20;
            basicInfo.Cell(15, 1).Select();
            SetCellHeaderText("6");
            basicInfo.Cell(15, 2).Merge(basicInfo.Cell(15, 3));
            basicInfo.Cell(15, 2).Select();
            SetCellHeaderText("提成");
            basicInfo.Cell(15, 3).Merge(basicInfo.Cell(15, 8));
            basicInfo.Cell(15, 3).Select();
            SetCellHeaderText("(销售额-推广费-协作费)*10%");
            basicInfo.Cell(15, 4).Select();
            SetCellHeaderText(model.Commission.ToString());
            basicInfo.Cell(15, 5).Select();
            SetCellHeaderText("");

            basicInfo.Rows[16].Height = 20;
            basicInfo.Cell(16, 1).Select();
            SetCellHeaderText("8");
            basicInfo.Cell(16, 2).Merge(basicInfo.Cell(16, 3));
            basicInfo.Cell(16, 2).Select();
            SetCellHeaderText("其他费用");
            basicInfo.Cell(16, 3).Merge(basicInfo.Cell(16, 8));
            basicInfo.Cell(16, 3).Select();
            SetCellHeaderText("实际发生费用");
            basicInfo.Cell(16, 4).Select();
            SetCellHeaderText(model.OtherFees.ToString());
            basicInfo.Cell(16, 5).Select();
            SetCellHeaderText("");

            basicInfo.Rows[17].Height = 20;
            basicInfo.Cell(17, 1).Select();
            SetCellHeaderText("9");
            basicInfo.Cell(17, 2).Merge(basicInfo.Cell(17, 3));
            basicInfo.Cell(17, 2).Select();
            SetCellHeaderText("税金");
            basicInfo.Cell(17, 3).Merge(basicInfo.Cell(17, 8));
            basicInfo.Cell(17, 3).Select();
            SetCellHeaderText("销售额/1.06*0.06");
            basicInfo.Cell(17, 4).Select();
            SetCellHeaderText(model.Tax.ToString());
            basicInfo.Cell(17, 5).Select();
            SetCellHeaderText("");

            basicInfo.Rows[18].Height = 20;
            basicInfo.Cell(18, 1).Select();
            SetCellHeaderText("10");
            basicInfo.Cell(18, 2).Merge(basicInfo.Cell(18, 3));
            basicInfo.Cell(18, 2).Select();
            SetCellHeaderText("毛利润");
            basicInfo.Cell(18, 3).Merge(basicInfo.Cell(18, 8));
            basicInfo.Cell(18, 3).Select();
            SetCellHeaderText("10=1-2-3-4-5-6-7-8-9");
            basicInfo.Cell(18, 4).Select();
            SetCellHeaderText(model.GrossProfit.ToString());
            basicInfo.Cell(18, 5).Select();
            SetCellHeaderText("");

            basicInfo.Rows[19].Height = 20;
            basicInfo.Cell(19, 1).Select();
            SetCellHeaderText("11");
            basicInfo.Cell(19, 2).Merge(basicInfo.Cell(19, 3));
            basicInfo.Cell(19, 2).Select();
            SetCellHeaderText("毛利润率");
            basicInfo.Cell(19, 3).Merge(basicInfo.Cell(19, 8));
            basicInfo.Cell(19, 3).Select();
            SetCellHeaderText("毛利润/销售额");
            basicInfo.Cell(19, 4).Select();
            SetCellHeaderText(model.GrossProfitMargin.ToString());
            basicInfo.Cell(19, 5).Select();
            SetCellHeaderText("");

            basicInfo.Rows[20].Height = 20;
            basicInfo.Cell(20, 1).Merge(basicInfo.Cell(20, 11));
            basicInfo.Cell(20, 1).Select();
            SetCellHeaderText("审批签字栏");

            basicInfo.Rows[21].Height = 20;
            basicInfo.Cell(21, 1).Merge(basicInfo.Cell(21, 2));
            basicInfo.Cell(21, 1).Select();
            SetCellHeaderText("");
            basicInfo.Cell(21, 2).Merge(basicInfo.Cell(21, 3));
            basicInfo.Cell(21, 2).Select();
            SetCellHeaderText("签约人");
            basicInfo.Cell(21, 3).Merge(basicInfo.Cell(21, 4));
            basicInfo.Cell(21, 3).Select();
            SetCellHeaderText("市场部");
            basicInfo.Cell(21, 4).Merge(basicInfo.Cell(21, 5));
            basicInfo.Cell(21, 4).Select();
            SetCellHeaderText("副总经理");
            basicInfo.Cell(21, 5).Merge(basicInfo.Cell(21, 6));
            basicInfo.Cell(21, 5).Select();
            SetCellHeaderText("总经理");
            basicInfo.Cell(21, 6).Select();
            SetCellHeaderText("其他");

            basicInfo.Rows[22].Height = 20;
            basicInfo.Cell(22, 1).Merge(basicInfo.Cell(22, 2));
            basicInfo.Cell(22, 1).Select();
            SetCellHeaderText("签字栏");
            basicInfo.Cell(22, 2).Merge(basicInfo.Cell(22, 3));
            basicInfo.Cell(22, 2).Select();
            SetCellHeaderText("");
            basicInfo.Cell(22, 3).Merge(basicInfo.Cell(22, 4));
            basicInfo.Cell(22, 3).Select();
            SetCellHeaderText("");
            basicInfo.Cell(22, 4).Merge(basicInfo.Cell(22, 5));
            basicInfo.Cell(22, 4).Select();
            SetCellHeaderText("");
            basicInfo.Cell(22, 5).Merge(basicInfo.Cell(22, 6));
            basicInfo.Cell(22, 5).Select();
            SetCellHeaderText("");
            basicInfo.Cell(22, 6).Select();
            SetCellHeaderText("");

            basicInfo.Rows[23].Height = 20;
            basicInfo.Cell(23, 1).Merge(basicInfo.Cell(23, 2));
            basicInfo.Cell(23, 1).Select();
            SetCellHeaderText("日期");
            basicInfo.Cell(23, 2).Merge(basicInfo.Cell(23, 3));
            basicInfo.Cell(23, 2).Select();
            SetCellHeaderText("");
            basicInfo.Cell(23, 3).Merge(basicInfo.Cell(23, 4));
            basicInfo.Cell(23, 3).Select();
            SetCellHeaderText("");
            basicInfo.Cell(23, 4).Merge(basicInfo.Cell(23, 5));
            basicInfo.Cell(23, 4).Select();
            SetCellHeaderText("");
            basicInfo.Cell(23, 5).Merge(basicInfo.Cell(23, 6));
            basicInfo.Cell(23, 5).Select();
            SetCellHeaderText("");
            basicInfo.Cell(23, 6).Select();
            SetCellHeaderText("");

            m_wordApp.Selection.TypeText("\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n");

            m_doc.Paragraphs.Add();
            Word.Range range = m_doc.Paragraphs.First.Range;
            //Word.InlineShape shap = range.InlineShapes.AddPicture(@"NETofficeTest\NETofficeTest\bin\Debug\fv.png");

            m_doc.Sections[1].Headers[WdHeaderFooterIndex.wdHeaderFooterPrimary].Range.Text = Header;

            m_doc.Sections[1].Footers[WdHeaderFooterIndex.wdHeaderFooterPrimary].Range.Text = Footer;
            m_wordApp.Selection.TypeText("\r\n");
            Word.PageNumbers pns = m_wordApp.Selection.Sections[1].Headers[WdHeaderFooterIndex.wdHeaderFooterEvenPages].PageNumbers;
            pns.NumberStyle               = WdPageNumberStyle.wdPageNumberStyleNumberInDash;
            pns.HeadingLevelForChapter    = 0;
            pns.IncludeChapterNumber      = false;
            pns.ChapterPageSeparator      = WdSeparatorType.wdSeparatorHyphen;
            pns.RestartNumberingAtSection = false;
            pns.StartingNumber            = 0;
            object pagenmbetal = WdPageNumberAlignment.wdAlignPageNumberRight;
            object first       = true;

            m_wordApp.Selection.Sections[1].Footers[WdHeaderFooterIndex.wdHeaderFooterEvenPages].PageNumbers.Add(pagenmbetal, first);
            m_wordApp.Selection.Sections[1].Headers[WdHeaderFooterIndex.wdHeaderFooterEvenPages].PageNumbers.Add(pagenmbetal, first);
        }