Example #1
0
        //自动计算表格导入到excel文件中
        public void NewJazz_ExportBaselineDataTableToExcel(string fileName, int position)
        {
            if (ExecutionConfig.isCreateExpectedDataViewExcelFile)
            {
                Grid baselineGrid = JazzGrid.NewJazz_GetOneGrid(JazzControlLocatorKey.NewReactJSjazzBaselineAutoCalGrid, position);

                DataTable data = baselineGrid.NewJazz_BaselineGetAllData();

                //Export to excel
                string actualFileName = Path.Combine(BSPath, fileName);
                JazzFunction.DataViewOperation.NewJazz_MoveBaselineDataSheetToExcel(data, actualFileName, "自动计算平均值");
            }
        }
Example #2
0
        //比较自动计算数值
        public bool NewJazz_CompareAutoConfigBaseline(string expectedFileName, string failedFileName, int position)
        {
            if (ExecutionConfig.isCompareExpectedDataViewExcelFile)
            {
                string filePath = Path.Combine(BSPath, expectedFileName);;

                Grid baselineGrid = JazzGrid.NewJazz_GetOneGrid(JazzControlLocatorKey.NewReactJSjazzBaselineAutoCalGrid, position);

                DataTable actualData        = baselineGrid.NewJazz_BaselineGetAllData();
                DataTable expectedDataTable = JazzFunction.DataViewOperation.ImportExpectedFileToDataTable(filePath, "自动计算平均值");

                return(JazzFunction.DataViewOperation.NewJazz_CompareDataTables(expectedDataTable, actualData, failedFileName));
            }
            else
            {
                return(true);
            }
        }
Example #3
0
        //自动计算表格中,修改数值
        public void newJazz_SetBaselineAutoCalValue(int row, int column, string value, int position)
        {
            Grid baselineGrid = JazzGrid.NewJazz_GetOneGrid(JazzControlLocatorKey.NewReactJSjazzBaselineAutoCalGrid, position);

            baselineGrid.NewJazz_ReviseBaselineAutoCalValue(row, column, value);
        }