Explorar el Código

报告程序报告导出、国标导出功能替换dev插件完成

zhangjiaxin hace 3 años
padre
commit
f83567bffe

BIN
Bin/x64/Debug/ReportTemplateExe/ReportTemplate/language.db


+ 20 - 26
OTSIncAReportApp/1-UI/OTSTemplateDesigner/Export_ReportTemplate.cs

@@ -893,36 +893,30 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
         /// 国标一
         /// </summary>
         /// <returns></returns>
-        public List<DataTable> InsertReportTemplateTable_ChineseStandardABCDDS(OTSCLRINTERFACE.CPropParamClr cPropParamClr)
+        public List<DataTable> InsertReportTemplateTable_ChineseStandardABCDDS(OTSCLRINTERFACE.CPropParamClr cPropParamClr, List<string> datasourcelist , int DataSourceId ,int GB_index)
         {
             //得到国标一的DataTable表格
+            cPropParamClr.SetDataSourceList(datasourcelist);
+            cPropParamClr.SetDataSourceId(DataSourceId);//
+            cPropParamClr.SetType((int)OTSSampleReportInfo.DisplayPicutureType.AnalyzeDataTable);//table
+            cPropParamClr.SetCalTableType(GB_index);//国标1
+            if (GB_index == (int)OTSSampleReportInfo.CALCULATE_TABLE_TYPE.GB_Method1)
+            {
+                List<OTSCLRINTERFACE.CGridDataClr> listGriddataclr = m_otsreport_export.m_ReportApp.m_rstDataMgr.m_ReportMgr.GridDataTransfer(cPropParamClr);
+                m_otsreport_export.m_ReportApp.im_ChineseStandardABCDDS = new OTSIncAReportGB.ChineseStandardABCDDS(m_otsreport_export.m_ReportApp.m_rstDataMgr.m_ReportMgr, listGriddataclr);
+                m_otsreport_export.m_ReportApp.m_TablesWindow.Controls.Clear();
+                return m_otsreport_export.m_ReportApp.im_ChineseStandardABCDDS.ChineseStandardABCD_GetDataTable(); ;
+            }
+            else
+            {
+                List<OTSCLRINTERFACE.CGridDataClr> listGriddataclr2 = m_otsreport_export.m_ReportApp.m_rstDataMgr.m_ReportMgr.GridDataTransfer(cPropParamClr);//
+                m_otsreport_export.m_ReportApp.m_TablesWindow.Controls.Clear();
+                m_otsreport_export.m_ReportApp.im_NationalStandardMethodTwo = new OTSIncAReportGB.NationalStandardMethodTwo(m_otsreport_export.m_ReportApp.m_rstDataMgr.m_ReportMgr, listGriddataclr2);
+                return m_otsreport_export.m_ReportApp.im_NationalStandardMethodTwo.ChineseStandardABCD_GetDataTable();
+            }
             
-            cPropParamClr.SetDataSourceId(0);//
-            cPropParamClr.SetType(1);//table
-            cPropParamClr.SetCalTableType(6);//国标1                    
-            List<OTSCLRINTERFACE.CGridDataClr> listGriddataclr = m_otsreport_export.m_ReportApp.m_rstDataMgr.m_ReportMgr.GridDataTransfer(cPropParamClr);
-            m_otsreport_export.m_ReportApp.im_ChineseStandardABCDDS = new OTSIncAReportGB.ChineseStandardABCDDS(m_otsreport_export.m_ReportApp.m_rstDataMgr.m_ReportMgr, listGriddataclr);
-            m_otsreport_export.m_ReportApp.m_TablesWindow.Controls.Clear();
-            //List<DataTable> GB_1 = m_otsreport_export.m_ReportApp.im_ChineseStandardABCDDS.ChineseStandardABCD_GetDataTable();
-            //string s = GB_1[0].Rows[0][0].ToString();
-            return m_otsreport_export.m_ReportApp.im_ChineseStandardABCDDS.ChineseStandardABCD_GetDataTable(); ;
-        }
-        /// <summary>
-        /// 国标二 
-        /// </summary>
-        /// <returns></returns>
-        public List<DataTable> InsertReportTemplateTable_NationalStandardMethodTwo(OTSCLRINTERFACE.CPropParamClr cPropParamClr)
-        {
-            //得到国标二的DataTable表格
-            
-            cPropParamClr.SetDataSourceId(0);//
-            cPropParamClr.SetType(1);//table
-            cPropParamClr.SetCalTableType(7);//国标2  
-            List<OTSCLRINTERFACE.CGridDataClr> listGriddataclr2 = m_otsreport_export.m_ReportApp.m_rstDataMgr.m_ReportMgr.GridDataTransfer(cPropParamClr);//
-            m_otsreport_export.m_ReportApp.m_TablesWindow.Controls.Clear();
-            m_otsreport_export.m_ReportApp.im_NationalStandardMethodTwo = new OTSIncAReportGB.NationalStandardMethodTwo(m_otsreport_export.m_ReportApp.m_rstDataMgr.m_ReportMgr, listGriddataclr2);
-            return m_otsreport_export.m_ReportApp.im_NationalStandardMethodTwo.ChineseStandardABCD_GetDataTable();
         }
+       
         //-------------------------------------------------dev----------------------------------------------------------
         /// <summary>
         /// DEV颗粒列表颗粒前20个谱图排序

+ 28 - 1
OTSIncAReportApp/1-UI/OTSTemplateDesigner/OTSReport_Export.cs

@@ -1767,10 +1767,37 @@ namespace OTSIncAReportApp
 
         private void button7_Click(object sender, EventArgs e)
         {
+
+            for (int i = 0; i < m_ReportApp.m_rstDataMgr.ResultFilesList.Count; i++)
+            {
+                string anothername = m_ReportApp.m_rstDataMgr.ResultFilesList[i].anotherFileName.ToString();
+                string resultfile = m_ReportApp.m_rstDataMgr.ResultFilesList[i].FilePath.ToString() + "\\" + m_ReportApp.m_rstDataMgr.ResultFilesList[i].FileName_real.ToString();
+                m_ReportApp.m_rstDataMgr.m_ReportMgr.AddASmplMsrResultMgr(resultfile, anothername);
+            }
+            OTSCLRINTERFACE.CPropParamClr clr_prop = m_ReportApp.m_rstDataMgr.m_ReportMgr.GetPropertyParamTable();
+            List<string> datasourcelist = m_ReportApp.m_conditionChoose.m_SourceGridData.GetComboDownListByItemName(OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE);
+            List<DataTable> GB1= m_export_reporttemplate.InsertReportTemplateTable_ChineseStandardABCDDS(clr_prop, datasourcelist, cbo_sjy.SelectedIndex, (int)CALCULATE_TABLE_TYPE.GB_Method1);
+            List<string> GB1NameList = new List<string>();
+            GB1NameList.Add("A类");
+            GB1NameList.Add("B类");
+            GB1NameList.Add("C类");
+            GB1NameList.Add("D类");
+            GB1NameList.Add("DS类");
+            List<DataTable> GB2 = m_export_reporttemplate.InsertReportTemplateTable_ChineseStandardABCDDS(clr_prop, datasourcelist, cbo_sjy.SelectedIndex, (int)CALCULATE_TABLE_TYPE.GB_Method2);
+            List<string> GB2NameList = new List<string>();
+            GB2NameList.Add("A类");
+            GB2NameList.Add("B类");
+            GB2NameList.Add("C类");
+            GB2NameList.Add("D类");
+            GB2NameList.Add("D硫化物类");
+            GB2NameList.Add("DS类");
             GB_Report = new GBReport(this);
+            GB_Report.setResultGrid(m_mbszclass);
             GB_Report.International_language(dev_internationalLanguage());
+            GB_Report.set_GB_Method(GB1, GB1NameList,"方法一");
 
-            ReportPrintTool tool = new ReportPrintTool(GB_Report);
+            GB_Report.set_GB_Method(GB2, GB2NameList,"方法二");
+           ReportPrintTool tool = new ReportPrintTool(GB_Report);
             tool.ShowPreview();
 
 

+ 12 - 53
OTSIncAReportApp/ReportTemplate/GBReport.Designer.cs

@@ -35,6 +35,7 @@ namespace OTSIncAReportApp.ReportTemplate
             this.xrPictureBox1 = new DevExpress.XtraReports.UI.XRPictureBox();
             this.BottomMargin = new DevExpress.XtraReports.UI.BottomMarginBand();
             this.Detail = new DevExpress.XtraReports.UI.DetailBand();
+            this.xrPageBreak1 = new DevExpress.XtraReports.UI.XRPageBreak();
             this.xrTable1 = new DevExpress.XtraReports.UI.XRTable();
             this.xrTableRow1 = new DevExpress.XtraReports.UI.XRTableRow();
             this.GB_dev_ypsm = new DevExpress.XtraReports.UI.XRTableCell();
@@ -59,11 +60,6 @@ namespace OTSIncAReportApp.ReportTemplate
             this.GB_dev_ckbz = new DevExpress.XtraReports.UI.XRTableCell();
             this.GB_dev_ckbz_text = new DevExpress.XtraReports.UI.XRTableCell();
             this.GB_bt = new DevExpress.XtraReports.UI.XRLabel();
-            this.xrTableRow7 = new DevExpress.XtraReports.UI.XRTableRow();
-            this.GB_dev_bgsj = new DevExpress.XtraReports.UI.XRTableCell();
-            this.GB_dev_bgsj_text = new DevExpress.XtraReports.UI.XRTableCell();
-            this.GB_dev_fdbs = new DevExpress.XtraReports.UI.XRTableCell();
-            this.GB_dev_fdbs_text = new DevExpress.XtraReports.UI.XRTableCell();
             ((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
             // 
@@ -100,17 +96,23 @@ namespace OTSIncAReportApp.ReportTemplate
             // Detail
             // 
             this.Detail.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
+            this.xrPageBreak1,
             this.xrTable1,
             this.GB_bt});
-            this.Detail.HeightF = 934.3749F;
+            this.Detail.HeightF = 1218.75F;
             this.Detail.Name = "Detail";
             // 
+            // xrPageBreak1
+            // 
+            this.xrPageBreak1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 943.75F);
+            this.xrPageBreak1.Name = "xrPageBreak1";
+            // 
             // xrTable1
             // 
             this.xrTable1.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) 
             | DevExpress.XtraPrinting.BorderSide.Right) 
             | DevExpress.XtraPrinting.BorderSide.Bottom)));
-            this.xrTable1.LocationFloat = new DevExpress.Utils.PointFloat(5.000051F, 749.3749F);
+            this.xrTable1.LocationFloat = new DevExpress.Utils.PointFloat(5.000051F, 770.8333F);
             this.xrTable1.Name = "xrTable1";
             this.xrTable1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 96F);
             this.xrTable1.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
@@ -119,9 +121,8 @@ namespace OTSIncAReportApp.ReportTemplate
             this.xrTableRow3,
             this.xrTableRow4,
             this.xrTableRow5,
-            this.xrTableRow6,
-            this.xrTableRow7});
-            this.xrTable1.SizeF = new System.Drawing.SizeF(640F, 175F);
+            this.xrTableRow6});
+            this.xrTable1.SizeF = new System.Drawing.SizeF(640F, 150F);
             this.xrTable1.StylePriority.UseBorders = false;
             this.xrTable1.StylePriority.UseTextAlignment = false;
             this.xrTable1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
@@ -309,44 +310,6 @@ namespace OTSIncAReportApp.ReportTemplate
             this.GB_bt.Text = "标准评级";
             this.GB_bt.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
             // 
-            // xrTableRow7
-            // 
-            this.xrTableRow7.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
-            this.GB_dev_bgsj,
-            this.GB_dev_bgsj_text,
-            this.GB_dev_fdbs,
-            this.GB_dev_fdbs_text});
-            this.xrTableRow7.Name = "xrTableRow7";
-            this.xrTableRow7.Weight = 1D;
-            // 
-            // GB_dev_bgsj
-            // 
-            this.GB_dev_bgsj.Multiline = true;
-            this.GB_dev_bgsj.Name = "GB_dev_bgsj";
-            this.GB_dev_bgsj.Text = "报告时间:";
-            this.GB_dev_bgsj.Weight = 1D;
-            // 
-            // GB_dev_bgsj_text
-            // 
-            this.GB_dev_bgsj_text.Multiline = true;
-            this.GB_dev_bgsj_text.Name = "GB_dev_bgsj_text";
-            this.GB_dev_bgsj_text.Text = "GB_dev_bgsj_text";
-            this.GB_dev_bgsj_text.Weight = 1D;
-            // 
-            // GB_dev_fdbs
-            // 
-            this.GB_dev_fdbs.Multiline = true;
-            this.GB_dev_fdbs.Name = "GB_dev_fdbs";
-            this.GB_dev_fdbs.Text = "测量放大倍数:";
-            this.GB_dev_fdbs.Weight = 1D;
-            // 
-            // GB_dev_fdbs_text
-            // 
-            this.GB_dev_fdbs_text.Multiline = true;
-            this.GB_dev_fdbs_text.Name = "GB_dev_fdbs_text";
-            this.GB_dev_fdbs_text.Text = "GB_dev_fdbs_text";
-            this.GB_dev_fdbs_text.Weight = 1D;
-            // 
             // GBReport
             // 
             this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
@@ -392,10 +355,6 @@ namespace OTSIncAReportApp.ReportTemplate
         private DevExpress.XtraReports.UI.XRTableCell GB_dev_ckbz;
         private DevExpress.XtraReports.UI.XRTableCell GB_dev_ckbz_text;
         private DevExpress.XtraReports.UI.XRLabel GB_bt;
-        private DevExpress.XtraReports.UI.XRTableRow xrTableRow7;
-        private DevExpress.XtraReports.UI.XRTableCell GB_dev_bgsj;
-        private DevExpress.XtraReports.UI.XRTableCell GB_dev_bgsj_text;
-        private DevExpress.XtraReports.UI.XRTableCell GB_dev_fdbs;
-        private DevExpress.XtraReports.UI.XRTableCell GB_dev_fdbs_text;
+        private DevExpress.XtraReports.UI.XRPageBreak xrPageBreak1;
     }
 }

+ 249 - 2
OTSIncAReportApp/ReportTemplate/GBReport.cs

@@ -1,9 +1,13 @@
 using DevExpress.XtraReports.UI;
+using OTSIncAReportApp.OTSTemplateDesigner;
+using OTSIncAReportGrids;
 using System;
 using System.Collections;
+using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
 using System.Drawing;
+using static OTSIncAReportApp.OTSReport_Export;
 
 namespace OTSIncAReportApp.ReportTemplate
 {
@@ -11,9 +15,12 @@ namespace OTSIncAReportApp.ReportTemplate
     {
         string typeface = "宋体";
         public OTSReport_Export m_otsreport_export;
+        float LowPlace = 1000f;
+        Export_ReportTemplate m_export_reporttemplate;
         public GBReport(OTSReport_Export in_export)
         {
             m_otsreport_export = in_export;
+            m_export_reporttemplate = new Export_ReportTemplate(in_export);
             InitializeComponent();
         }
         private void setXRLabelData(XRLabel cell, string str)
@@ -46,11 +53,251 @@ namespace OTSIncAReportApp.ReportTemplate
             setXRLabelData(GB_dev_yxsj, GetlanguageData(GB_dev_yxsj.Name.ToString(), languageData));//运行时间:
             setXRLabelData(GB_dev_flfa, GetlanguageData(GB_dev_flfa.Name.ToString(), languageData));//分类方案:
             setXRLabelData(GB_dev_scmj, GetlanguageData(GB_dev_scmj.Name.ToString(), languageData));//视场面积:
-            setXRLabelData(GB_dev_bgsj, GetlanguageData(GB_dev_bgsj.Name.ToString(), languageData));//报告时间:
             setXRLabelData(GB_dev_sczs, GetlanguageData(GB_dev_sczs.Name.ToString(), languageData));//视场总数:
             setXRLabelData(GB_dev_yjctz, GetlanguageData(GB_dev_yjctz.Name.ToString(), languageData));//已检查特征:
             setXRLabelData(GB_dev_ckbz, GetlanguageData(GB_dev_ckbz.Name.ToString(), languageData));//参考标准:
-            setXRLabelData(GB_dev_fdbs, GetlanguageData(GB_dev_fdbs.Name.ToString(), languageData));//测量放大倍数:
+        }
+        public void set_GB_Method(List<DataTable> GB_List,List<string> GB1_NameList,string GBName)
+        {
+            XRPageBreak xRPage = new XRPageBreak();
+            xRPage.LocationF = new PointF(0, LowPlace + 2);
+            this.Detail.Controls.Add(xRPage);
+            LowPlace = LowPlace + 4;
+
+            XRLabel GBNameLabel = new XRLabel();
+            GBNameLabel.SizeF = new SizeF(640, 0);
+            GBNameLabel.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
+            GBNameLabel.Text = GBName;
+            GBNameLabel.LocationF = new PointF(5, LowPlace);
+            GBNameLabel.Font = new Font(typeface, 24);
+            this.Detail.Controls.Add(GBNameLabel);
+            LowPlace = LowPlace + GBNameLabel.SizeF.Height;
+
+            GB_NameData(out DataTable HeaderData, out DataTable HeaderData_DS);//获取标准表头
+
+            XRTable Template = new XRTable();
+            for (int a = 0; a < GB_List.Count - 1; a++)
+            {
+                XRTableRow Template_Rows_A_Class = new XRTableRow();
+                XRTableCell Template_Rows_A_cell = new XRTableCell();
+                Template_Rows_A_cell.WidthF = 640f;
+                Template_Rows_A_cell.Text = GB1_NameList[a];
+                Template_Rows_A_Class.Controls.Add(Template_Rows_A_cell);
+                Template_Rows_A_Class.BackColor = Color.DarkGray;
+                Template.Rows.Add(Template_Rows_A_Class);
+                Template.Rows.Add(GB_Class_dataRow(HeaderData, 0));
+                for (int i = 0; i < GB_List[0].Rows.Count; i++)
+                {
+                    Template.Rows.Add(GB_Class_dataRow(GB_List[0], i));
+                }
+            }
+
+            XRTableRow Template_Rows_A_Class_DS = new XRTableRow();
+            XRTableCell Template_Rows_A_cell_DS = new XRTableCell();
+            Template_Rows_A_cell_DS.WidthF = 640f;
+            Template_Rows_A_cell_DS.Text = GB1_NameList[GB1_NameList.Count - 1];
+            Template_Rows_A_Class_DS.Controls.Add(Template_Rows_A_cell_DS);
+            Template_Rows_A_Class_DS.BackColor= Color.DarkGray;
+            Template.Rows.Add(Template_Rows_A_Class_DS);
+            Template.Rows.Add(GB_Class_dataRows_DS(HeaderData_DS, 0));
+            for (int i = 0; i < GB_List[GB_List.Count - 1].Rows.Count; i++)
+            {
+                Template.Rows.Add(GB_Class_dataRows_DS(GB_List[GB_List.Count - 1], i));
+            }
+
+
+            Template.Borders = DevExpress.XtraPrinting.BorderSide.All;
+            Template.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
+            Template.LocationF = new PointF(5, LowPlace);
+            Template.SizeF = new SizeF(640, 0);
+            this.Detail.Controls.Add(Template);
+
+            LowPlace = LowPlace + Template.SizeF.Height + 50;
+
+        }
+
+        private XRTableRow GB_Class_dataRow(DataTable dt,int index)
+        {
+            XRTableRow Template_Rows_A_Class_data = new XRTableRow();
+
+
+            XRTableCell Template_Rows_A_cell_data_Class = new XRTableCell();
+            Template_Rows_A_cell_data_Class.WidthF = 73.96f;
+            Template_Rows_A_cell_data_Class.Text = dt.Rows[index]["Class"].ToString();
+            Template_Rows_A_Class_data.Controls.Add(Template_Rows_A_cell_data_Class);
+            XRTableCell Template_Rows_A_cell_data_Width = new XRTableCell();
+            Template_Rows_A_cell_data_Width.WidthF = 85.42f;
+            Template_Rows_A_cell_data_Width.Text = dt.Rows[index]["Width/um"].ToString();
+            Template_Rows_A_Class_data.Controls.Add(Template_Rows_A_cell_data_Width);
+            XRTableCell Template_Rows_A_cell_data_1 = new XRTableCell();
+            Template_Rows_A_cell_data_1.WidthF = 43.69f;
+            Template_Rows_A_cell_data_1.Text = dt.Rows[index]["0.0"].ToString();
+            Template_Rows_A_Class_data.Controls.Add(Template_Rows_A_cell_data_1);
+            XRTableCell Template_Rows_A_cell_data_2 = new XRTableCell();
+            Template_Rows_A_cell_data_2.WidthF = 43.69f;
+            Template_Rows_A_cell_data_2.Text = dt.Rows[index]["0.5"].ToString();
+            Template_Rows_A_Class_data.Controls.Add(Template_Rows_A_cell_data_2);
+            XRTableCell Template_Rows_A_cell_data_3 = new XRTableCell();
+            Template_Rows_A_cell_data_3.WidthF = 43.69f;
+            Template_Rows_A_cell_data_3.Text = dt.Rows[index]["1.0"].ToString();
+            Template_Rows_A_Class_data.Controls.Add(Template_Rows_A_cell_data_3);
+            XRTableCell Template_Rows_A_cell_data_4 = new XRTableCell();
+            Template_Rows_A_cell_data_4.WidthF = 43.69f;
+            Template_Rows_A_cell_data_4.Text = dt.Rows[index]["1.5"].ToString();
+            Template_Rows_A_Class_data.Controls.Add(Template_Rows_A_cell_data_4);
+            XRTableCell Template_Rows_A_cell_data_5 = new XRTableCell();
+            Template_Rows_A_cell_data_5.WidthF = 43.69f;
+            Template_Rows_A_cell_data_5.Text = dt.Rows[index]["2.0"].ToString();
+            Template_Rows_A_Class_data.Controls.Add(Template_Rows_A_cell_data_5);
+            XRTableCell Template_Rows_A_cell_data_6 = new XRTableCell();
+            Template_Rows_A_cell_data_6.WidthF = 43.69f;
+            Template_Rows_A_cell_data_6.Text = dt.Rows[index]["2.5"].ToString();
+            Template_Rows_A_Class_data.Controls.Add(Template_Rows_A_cell_data_6);
+            XRTableCell Template_Rows_A_cell_data_7 = new XRTableCell();
+            Template_Rows_A_cell_data_7.WidthF = 43.69f;
+            Template_Rows_A_cell_data_7.Text = dt.Rows[index]["3.0"].ToString();
+            Template_Rows_A_Class_data.Controls.Add(Template_Rows_A_cell_data_7);
+            XRTableCell Template_Rows_A_cell_data_8 = new XRTableCell();
+            Template_Rows_A_cell_data_8.WidthF = 43.69f;
+            Template_Rows_A_cell_data_8.Text = dt.Rows[index]["3.5"].ToString();
+            Template_Rows_A_Class_data.Controls.Add(Template_Rows_A_cell_data_8);
+            XRTableCell Template_Rows_A_cell_data_9 = new XRTableCell();
+            Template_Rows_A_cell_data_9.WidthF = 43.69f;
+            Template_Rows_A_cell_data_9.Text = dt.Rows[index]["4.0"].ToString();
+            Template_Rows_A_Class_data.Controls.Add(Template_Rows_A_cell_data_9);
+            XRTableCell Template_Rows_A_cell_data_10 = new XRTableCell();
+            Template_Rows_A_cell_data_10.WidthF = 43.69f;
+            Template_Rows_A_cell_data_10.Text = dt.Rows[index]["4.5"].ToString();
+            Template_Rows_A_Class_data.Controls.Add(Template_Rows_A_cell_data_10);
+            XRTableCell Template_Rows_A_cell_data_11 = new XRTableCell();
+            Template_Rows_A_cell_data_11.WidthF = 43.69f;
+            Template_Rows_A_cell_data_11.Text = dt.Rows[index]["5.0"].ToString();
+            Template_Rows_A_Class_data.Controls.Add(Template_Rows_A_cell_data_11);
+          
+            return Template_Rows_A_Class_data;
+        }
+        private XRTableRow GB_Class_dataRows_DS(DataTable dt, int index)
+        {
+            XRTableRow Template_Rows_A_Class_data = new XRTableRow();
+
+            XRTableCell Template_Rows_A_cell_data_Class = new XRTableCell();
+            Template_Rows_A_cell_data_Class.WidthF = 106.67f;
+            Template_Rows_A_cell_data_Class.Text = dt.Rows[index]["No."].ToString();
+            Template_Rows_A_Class_data.Controls.Add(Template_Rows_A_cell_data_Class);
+
+            XRTableCell Template_Rows_A_cell_data_Area = new XRTableCell();
+            Template_Rows_A_cell_data_Area.WidthF = 106.67f;
+            Template_Rows_A_cell_data_Area.Text = dt.Rows[index]["Area/um2"].ToString();
+            Template_Rows_A_Class_data.Controls.Add(Template_Rows_A_cell_data_Area);
+
+            XRTableCell Template_Rows_A_cell_data_MaxFeret = new XRTableCell();
+            Template_Rows_A_cell_data_MaxFeret.WidthF = 106.67f;
+            Template_Rows_A_cell_data_MaxFeret.Text = dt.Rows[index]["MaxFeret/um"].ToString();
+            Template_Rows_A_Class_data.Controls.Add(Template_Rows_A_cell_data_MaxFeret);
+
+            XRTableCell Template_Rows_A_cell_data_X = new XRTableCell();
+            Template_Rows_A_cell_data_X.WidthF = 106.67f;
+            Template_Rows_A_cell_data_X.Text = dt.Rows[index]["X/mm"].ToString();
+            Template_Rows_A_Class_data.Controls.Add(Template_Rows_A_cell_data_X);
+
+            XRTableCell Template_Rows_A_cell_data_Y = new XRTableCell();
+            Template_Rows_A_cell_data_Y.WidthF = 106.67f;
+            Template_Rows_A_cell_data_Y.Text = dt.Rows[index]["Y/mm"].ToString();
+            Template_Rows_A_Class_data.Controls.Add(Template_Rows_A_cell_data_Y);
+
+            XRTableCell Template_Rows_A_cell_data_Grade = new XRTableCell();
+            Template_Rows_A_cell_data_Grade.WidthF = 106.67f;
+            Template_Rows_A_cell_data_Grade.Text = dt.Rows[index]["Grade"].ToString();
+            Template_Rows_A_Class_data.Controls.Add(Template_Rows_A_cell_data_Grade);
+            return Template_Rows_A_Class_data;
+        }
+
+        private void GB_NameData(out DataTable GBName_dt ,out DataTable GBName_dt_DS)
+        {
+            DataTable HeaderData = new DataTable();
+            HeaderData.Columns.Add("Class");
+            HeaderData.Columns.Add("Width/um");
+            HeaderData.Columns.Add("0.0");
+            HeaderData.Columns.Add("0.5");
+            HeaderData.Columns.Add("1.0");
+            HeaderData.Columns.Add("1.5");
+            HeaderData.Columns.Add("2.0");
+            HeaderData.Columns.Add("2.5");
+            HeaderData.Columns.Add("3.0");
+            HeaderData.Columns.Add("3.5");
+            HeaderData.Columns.Add("4.0");
+            HeaderData.Columns.Add("4.5");
+            HeaderData.Columns.Add("5.0");
+
+            DataRow dr = HeaderData.NewRow();
+            dr["Class"] = "Class";
+            dr["Width/um"] = "Width/um";
+            dr["0.0"] = "0.0";
+            dr["0.5"] = "0.5";
+            dr["1.0"] = "1.0";
+            dr["1.5"] = "1.5";
+            dr["2.0"] = "2.0";
+            dr["2.5"] = "2.5";
+            dr["3.0"] = "3.0";
+            dr["3.5"] = "3.5";
+            dr["4.0"] = "4.0";
+            dr["4.5"] = "4.5";
+            dr["5.0"] = "5.0";
+            HeaderData.Rows.Add(dr);
+
+            GBName_dt = HeaderData.Copy();
+
+            DataTable HeaderData_DS = new DataTable();
+            HeaderData_DS.Columns.Add("No.");
+            HeaderData_DS.Columns.Add("Area/um2");
+            HeaderData_DS.Columns.Add("MaxFeret/um");
+            HeaderData_DS.Columns.Add("X/mm");
+            HeaderData_DS.Columns.Add("Y/mm");
+            HeaderData_DS.Columns.Add("Grade");
+
+
+            DataRow dr_DS = HeaderData_DS.NewRow();
+            dr_DS["No."] = "No.";
+            dr_DS["Area/um2"] = "Area/um2";
+            dr_DS["MaxFeret/um"] = "MaxFeret/um";
+            dr_DS["X/mm"] = "X/mm";
+            dr_DS["Y/mm"] = "Y/mm";
+            dr_DS["Grade"] = "Grade";
+
+            HeaderData_DS.Rows.Add(dr_DS);
+
+            GBName_dt_DS = HeaderData_DS.Copy();
+        }
+
+        /// <summary>
+        /// 首页部分数据插入
+        /// </summary>
+        /// <param name="m_mbszclass"></param>
+        public void setResultGrid(MBSZClass m_mbszclass)
+        {
+            #region 从Grid表中读取样品数据
+            //------------------加载模块,获取数据-------------------------------------------------
+            ResultGrid ls_resultgrid = new ResultGrid(m_otsreport_export.m_ReportApp);
+            Dictionary<string, string> keyValues_ResultGrid = ls_resultgrid.GetData_ResultGrid_Report();
+            //------------------加载模块,获取数据结束----------------------------------------------
+            Dictionary<string, string>.Enumerator en = keyValues_ResultGrid.GetEnumerator();
+
+            keyValues_ResultGrid.TryGetValue(ls_resultgrid.table["col1"].ToString(), out string str_CLJGMC);//测量结果名称
+            keyValues_ResultGrid.TryGetValue(ls_resultgrid.table["col4"].ToString(), out string str_YXSJ);//运行时间
+            keyValues_ResultGrid.TryGetValue(ls_resultgrid.table["col5"].ToString(), out string str_SCZS);//视场总数
+            keyValues_ResultGrid.TryGetValue(ls_resultgrid.table["col6"].ToString(), out string str_FLFA);//分类方案
+            keyValues_ResultGrid.TryGetValue(ls_resultgrid.table["col7"].ToString(), out string str_YJCTZ);//已检测特征
+            keyValues_ResultGrid.TryGetValue(ls_resultgrid.table["col8"].ToString(), out string str_SCMJ);//视场面积
+            keyValues_ResultGrid.TryGetValue("Magnification", out string Magnification);//放大倍数
+            #endregion
+
+            setXRLabelData(GB_dev_jcjgwj_text, str_CLJGMC);
+            setXRLabelData(GB_dev_yxsj_text, str_YXSJ);
+            setXRLabelData(GB_dev_sczs_text, str_SCZS);
+            setXRLabelData(GB_dev_flfa_text, str_FLFA);
+            setXRLabelData(GB_dev_yjctz_text, str_YJCTZ);
+            setXRLabelData(GB_dev_scmj_text, str_SCMJ);
+            setXRLabelData(GB_dev_ckbz_text, "GB30834");
         }
     }
 }