Exemple #1
0
        /// <summary>
        /// 导出
        /// </summary>
        /// <param name="folderPath"></param>
        private void ExportDataToPath(string folderPath)
        {
            Cursor.Current = Cursors.WaitCursor;
            if (Directory.Exists(folderPath))
            {
                Directory.Delete(folderPath, true);
            }
            Directory.CreateDirectory(folderPath);
            //Command
            BackupDataBll <Command> .ExportData(folderPath);

            //Dut
            BackupDataBll <Dut> .ExportData(folderPath);

            //Project
            BackupDataBll <Project> .ExportData(folderPath);

            //Step
            BackupDataBll <Step> .ExportData(folderPath);

            //TestCase
            BackupDataBll <TestCase> .ExportData(folderPath);

            //TestDevice
            BackupDataBll <TestDevice> .ExportData(folderPath);

            //TestParams
            BackupDataBll <TestParams> .ExportData(folderPath);

            Cursor.Current = Cursors.Default;
        }
        //导出
        private void ExportDataToPath(string folderPath, string dataBaseName)
        {
            Cursor.Current = Cursors.WaitCursor;
            if (Directory.Exists(folderPath))
            {
                Directory.Delete(folderPath, true);
            }
            Directory.CreateDirectory(folderPath);
            switch (dataBaseName)
            {
            case "Command":
                BackupDataBll <Command> .ExportData(folderPath);

                break;

            case "Dut":
                BackupDataBll <Dut> .ExportData(folderPath);

                break;

            case "Project":
                BackupDataBll <Project> .ExportData(folderPath);

                break;

            case "TestCase":
                BackupDataBll <TestCase> .ExportData(folderPath);

                break;

            case "TestDevice":
                BackupDataBll <TestDevice> .ExportData(folderPath);

                break;

            case "TestParams":
                BackupDataBll <TestParams> .ExportData(folderPath);

                break;
            }
            Cursor.Current = Cursors.Default;
        }