Esempio n. 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, "自动计算平均值");
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Import expected data file and compare to the data view currently, if not equal, export to another file
        /// </summary>
        /// <param name="expectedFileName"></param>
        /// <param name="failedFileName"></param>
        /// /// <param name="basePath"></param>
        /// <param name="widgetName"></param>
        public bool CompareMinWidgetDataView(string basePath, string expectedFileName, string failedFileName, string widgetName)
        {
            if (ExecutionConfig.isCompareExpectedDataViewExcelFile)
            {
                string    filePath   = Path.Combine(basePath, expectedFileName);
                DataTable actualData = GetWidgetMinDataViewAllData(widgetName);
                Grid      dataGrid   = JazzGrid.GetOneGrid(JazzControlLocatorKey.GridHomepageMinWidgetDataView, widgetName);

                DataTable expectedDataTable = JazzFunction.DataViewOperation.ImportExpectedFileToDataTable(filePath, JazzFunction.DataViewOperation.sheetNameExpected);

                return(JazzFunction.DataViewOperation.CompareDataTables(expectedDataTable, actualData, failedFileName, dataGrid.GetGridHeader(), true));
            }
            else
            {
                return(true);
            }
        }
Esempio n. 3
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);
            }
        }
Esempio n. 4
0
        public HierarchysAndTags[] GetActualHierarchysAndTags()
        {
            int hierarchyNum = MultiHierarchysContainer.GetElementNumber();
            var hietagsList  = new List <HierarchysAndTags>();
            var hietagsVlaue = new HierarchysAndTags();

            for (int i = 1; i < hierarchyNum + 1; i++)
            {
                Label hierarchys    = JazzLabel.GetOneLabel(JazzControlLocatorKey.LabelMultiHieararchy, i);
                Grid  hierarchyTags = JazzGrid.GetOneGrid(JazzControlLocatorKey.GridMultiHieararchyTagsList, i);

                hietagsVlaue.Hieararchy = hierarchys.GetLabelTextValue();
                hietagsVlaue.tags       = hierarchyTags.GetRowsData(1);

                hietagsList.Add(hietagsVlaue);
            }

            return(hietagsList.ToArray());
        }
Esempio n. 5
0
 public Grid GetSpecialGrid(string title)
 {
     return(JazzGrid.GetOneGrid(JazzControlLocatorKey.GridEASelectedTagsList, title));
 }
Esempio n. 6
0
        public DataTable GetWidgetMinDataViewAllData(string widgetName)
        {
            Grid dataGrid = JazzGrid.GetOneGrid(JazzControlLocatorKey.GridHomepageMinWidgetDataView, widgetName);

            return(dataGrid.GetAllData());
        }
Esempio n. 7
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);
        }