本文整理汇总了C#中ReportType.ToEnumAttr方法的典型用法代码示例。如果您正苦于以下问题:C# ReportType.ToEnumAttr方法的具体用法?C# ReportType.ToEnumAttr怎么用?C# ReportType.ToEnumAttr使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ReportType
的用法示例。
在下文中一共展示了ReportType.ToEnumAttr方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RunReport
//.........这里部分代码省略.........
// if (!IsDemo)
// FileUtility.CopyFile(AppNEnvConfig.GetReportsProcessingPath + AppNEnvConfig.GetFileSeperator + CurrentRunningReportType.ToEnumDesc<ReportXlsmType>(), AppNEnvConfig.GetReportsPath, toMove: true);
// FileUtility.CleanReportsProcessingDir(new List<string> { ReportXmlType.eOR.ToEnumDesc<ReportXmlType>() });
// //System.Threading.Thread.Sleep(5000);
// CurrentRunningReportType = ReportXlsmType.eCheckup;
// if (IsDemo)
// FileUtility.CreateReport(new List<string> { ReportXmlType.eCheckup.ToEnumDesc<ReportXmlType>(), CurrentRunningReportType.ToEnumDesc<ReportXlsmType>() });
// else
// eAudITUtility.GenerateReport(RequestInfo.SSCTechActivity.SourceMAFGuid, workbookDetails, CurrentRunningReportType, RequestInfo.SSCTechActivity.SourceMAFName);
// if (!IsDemo)
// FileUtility.CopyFile(AppNEnvConfig.GetReportsProcessingPath + AppNEnvConfig.GetFileSeperator + CurrentRunningReportType.ToEnumDesc<ReportXlsmType>(), AppNEnvConfig.GetReportsPath, toMove: true);
// FileUtility.CleanReportsProcessingDir(new List<string> { ReportXmlType.eCheckup.ToEnumDesc<ReportXmlType>() });
// MsgUtility.ShowMessageBox("Reports generated successfully.", MessageType.Info);
// if (IsDemo)
// RequestInfo.IsReportGenerated = false;
// }
// //}
// };
// worker.RunWorkerCompleted += (s, e) =>
// {
// if (e.Error != null)
// {
// IsProgressBarVisible = false;
// IsBusy = false;
// SSCLog.HandleError(e.Error);
// }
// IsProgressBarVisible = false;
// IsBusy = false;
// };
// IsBusy = true;
// worker.RunWorkerAsync();
// }
//}
private void RunReport(List<WorkbookDetail> workbookDetails, ReportType reportType, DispatcherTimer dt)
{
//dt.Stop();
//ProgressBarMsg = string.Format("Generating Report {0}", reportType.ToString());
pMsg = string.Format("Generating Report {0}", reportType.ToString());
currentStartTimmer = 0;
//dt.Start();
using (BackgroundWorker worker = new BackgroundWorker())
{
worker.DoWork += (s, e) =>
{
CurrentRunningReportType = reportType;
if (IsDemo)
FileUtility.CreateReport(new List<string> { reportType.ToEnumAttr<ReportType, ReportAttribute>().XmlFileName, CurrentRunningReportType.ToEnumAttr<ReportType, ReportAttribute>().XlsmFileName });
else
{
//Thread.Sleep(50000);
eAudITUtility.GenerateReport(RequestInfo.SSCTechActivity.SourceMAFGuid, workbookDetails, CurrentRunningReportType);
}
if (!IsDemo)
FileUtility.CopyFile(AppNEnvConfig.GetReportsProcessingPath + AppNEnvConfig.GetFileSeperator + CurrentRunningReportType.ToEnumAttr<ReportType, ReportAttribute>().XlsmFileName, FilePathType.Reports.DirPath(), toMove: false);
FileUtility.CleanReportsProcessingDir(new List<string> {
reportType.ToEnumAttr<ReportType, ReportAttribute>().XlsmFileName,
reportType.ToEnumAttr<ReportType, ReportAttribute>().XmlFileName });
};
worker.RunWorkerCompleted += (s, e) =>
{
if (e.Error != null)
{
dt.Stop();
IsReportInProgress = false;
IsProgressBarVisible = false;
IsBusy = false;
SSCLog.HandleError(e.Error);
}
else
{
if (reportType == ReportType.eOR)
{
SSCTechInfo.TimeInSecToGenerateReporteOR = currentStartTimmer;
RunReport(workbookDetails, ReportType.eCheckup, dt);
}
else if (reportType == ReportType.eCheckup)
{
SSCTechInfo.TimeInSecToGenerateReporteCheckup = currentStartTimmer;
dt.Stop();
IsReportInProgress = false;
IsProgressBarVisible = false;
IsBusy = false;
if (Directory.EnumerateFiles(this.ReportsViewModel.DirPath).Any())
{
MsgUtility.ShowMessageBox("Reports generated successfully.", MessageType.Info);
}
}
}
};
worker.RunWorkerAsync();
}
}