internal static void ExportReport(ReportType type, DateTime?startDate, DateTime?endDate) { if (configs.Values.Count == 0) { LoadAllConfigs(); } if (!configs.ContainsKey(type)) { ErrorHandler.HandleError(ErrorType.Critical, $"No config found for {type} orders."); return; } DataTable data = ReportReader.RunReport(startDate, endDate, type); if (data == null) { ErrorHandler.HandleError(ErrorType.Alert, "No data from report."); return; } CheckForDoneOrders(data, type); }
internal static void AutomateReport(DateTime?startDate, DateTime?endDate) { if (configs.Values.Count == 0) { LoadAllConfigs(); } CheckMacroSetup(); if (!isSetupOk) { return; } DataTable data = ReportReader.RunReport(startDate, endDate, ReportType.Cut); if (data == null) { ErrorHandler.HandleError(ErrorType.Alert, "No data from report."); return; } ProcessOrders(data); }