/// <summary> /// Called by the <see cref="IScheduler" /> when a /// <see cref="ITrigger" /> fires that is associated with /// the <see cref="IJob" />. /// </summary> public void Execute(IJobExecutionContext context) { if (SysVars.isConsole) Console.WriteLine("Executing Job Report Notifications"); // Exipre Locks using (ReportDAO dao = new ReportDAO()) { if (!ReportDAO.ReportNotificationsActive) using (dao.DbConnection) { if (dao.DbConnection.IsConnected()) { using (dao.DbCommand) { dao.ProcessNotifications(); } } } } }
public int DoCreateCoaReport(Sample sample, Identification identification) { ReportRecord reportRecord = null; logger.Log(LogLevel.Trace, AppLib.GetCaller(logger)); using (SampleDAO dao = new SampleDAO()) { reportRecord = dao.CreateCoaReport(sample, identification); } if (reportRecord.Id.IsNotNull() && reportRecord.Id > 0) { using (ClientDAO customerDao = new ClientDAO()) { reportRecord.ParentId = customerDao.GetClientId(reportRecord.ParentId.Value); } using (ReportDAO reportDao = new ReportDAO()) { ReportNotification reportNotification = new ReportNotification(); reportNotification.ReportId = reportRecord.Id.Value; reportNotification.CustomerId = reportRecord.ParentId.Value; reportNotification.DepartmentId = reportRecord.DepartmentId.Value; reportNotification.SubjectLine = reportRecord.SubjectLine; reportDao.SaveNotificationReports(reportDao.GetNotificationRecords(reportNotification)); } } return reportRecord.Id.Value; }
public List<WorksheetForEndotoxinReportItem> GetWorksheetForEndotoxin(string token) { var results = new List<WorksheetForEndotoxinReportItem>(); if (!AppLib.DesignMode) { var userId = 0; using (var systemDao = new SystemDAO()) userId = systemDao.GetToken(new Guid(token)); if (userId > 0) { using (var reportDao = new ReportDAO()) { results = reportDao.GetWorksheetForEndotoxin(); } } } return results; }
public List<ReportSterilityFungalBeginItem> GetSterilityFungalBeginData(string token, DateTime workListDate) { var results = new List<ReportSterilityFungalBeginItem>(); if (!AppLib.DesignMode) { var userId = 0; using (var systemDao = new SystemDAO()) userId = systemDao.GetToken(new Guid(token)); if (userId > 0) { using (var reportDao = new ReportDAO()) { results = reportDao.GetSterilityFungalBeginData(workListDate); } } } return results; }
public List<ReportDueFungalResultItem> GetDueFungalResultsData(string token, DateTime reportDate) { var results = new List<ReportDueFungalResultItem>(); if (!AppLib.DesignMode) { var userId = 0; using (var systemDao = new SystemDAO()) userId = systemDao.GetToken(new Guid(token)); if (userId > 0) { using (var reportDao = new ReportDAO()) { results = reportDao.GetDueFungalResults(reportDate); } } } return results; }