public IEnumerable<Wrapper2> GetContainerLabels(int arlNumber) { SmartCollection<SampleContainer> results = new SmartCollection<SampleContainer>(); try { using (SampleDAO sampleDao = new SampleDAO()) { results = sampleDao.GetContainerLabels(arlNumber); } return IndexData(results); } catch (Exception) { throw; } }
public Sample DoGetSampleCoaData(int sampleId, int? billGroupId, int departmentId, Identification identification) { logger.Log(LogLevel.Trace, AppLib.GetCaller(logger)); using (SampleDAO dao = new SampleDAO()) { return dao.GetSampleCoaData(sampleId, billGroupId, departmentId, identification); } }
public int DoFinalizeSampleTestSubmission(int id, Identification identification) { logger.Log(LogLevel.Trace, AppLib.GetCaller(logger)); using (SampleDAO dao = new SampleDAO()) { return dao.FinalizeSampleTestSubmission(id, identification); } }
public string DoCreateMultiSampleInvoice(string arlNumbers, Identification identification) { logger.Log(LogLevel.Trace, AppLib.GetCaller(logger)); using (SampleDAO dao = new SampleDAO()) { return dao.CreateMultiSampleInvoice(arlNumbers, identification); } }
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 int DoCancelSample(int arlNumber, bool descriptionYN, bool storageYN, bool containersYN, bool containerDescriptionYN, bool fillVolumeYN, bool dosageYN, bool analytesYN, bool testsYN, bool chargesYN, bool notesYN, Identification identification) { logger.Log(LogLevel.Trace, AppLib.GetCaller(logger)); using (SampleDAO dao = new SampleDAO()) { return dao.CloneSample(arlNumber, descriptionYN, storageYN, containersYN, containerDescriptionYN, fillVolumeYN, dosageYN, analytesYN, testsYN, chargesYN, notesYN, identification); } }
public int DoApproveSampleSubmission(Sample sample, Identification identification) { logger.Log(LogLevel.Trace, AppLib.GetCaller(logger)); using (SampleDAO dao = new SampleDAO()) { return dao.ApproveSampleSubmission(sample, identification); } }
public SmartCollection<Order> DoSearchOrders(string searchString, Collection<SearchItem> searchItems, Identification identification) { logger.Log(LogLevel.Trace, AppLib.GetCaller(logger)); using (SampleDAO dao = new SampleDAO()) { return dao.SearchOrders(searchString, searchItems, identification); } }
public List<DateTime> DoGetSubmissionHistoryForLast12Months(int? customerId) { logger.Log(LogLevel.Trace, AppLib.GetCaller(logger)); using (SampleDAO dao = new SampleDAO()) { return dao.GetSubmissionHistoryForLast12Months(customerId); } }
public SmartCollection<SampleTest> DoGetSampleTestsResultsList(SmartCollection<SampleTest> list, Identification identification) { logger.Log(LogLevel.Trace, AppLib.GetCaller(logger)); using (SampleDAO dao = new SampleDAO()) { return dao.GetSampleTestsResultsList(list, identification); } }
public SmartCollection<SampleTest> DoGetSampleTests(int arlNumber, bool loadCanceled, Identification identification) { logger.Log(LogLevel.Trace, AppLib.GetCaller(logger)); using (SampleDAO dao = new SampleDAO()) { return dao.GetSampleTests(arlNumber, loadCanceled, identification); } }
public SmartCollection<Sample> DoGetSamples(string searchString, Guid userToken, Identification identification) { logger.Log(LogLevel.Trace, AppLib.GetCaller(logger)); using (SampleDAO dao = new SampleDAO()) { return dao.GetSamples(searchString, identification); } }
public SmartCollection<SampleNote> DoGetSampleNotes(int arlNumber, Identification identification) { logger.Log(LogLevel.Trace, AppLib.GetCaller(logger)); using (SampleDAO dao = new SampleDAO()) { return dao.GetSampleNotes(arlNumber, identification); } }
public SmartCollection<SampleDocument> DoGetSampleDocuments(int arlNumber) { logger.Log(LogLevel.Trace, AppLib.GetCaller(logger)); using (var dao = new SampleDAO()) { return dao.GetSampleDocuments(arlNumber); } }
public byte[] DoGetSampleDocumentData(int sampleDocumentId) { logger.Log(LogLevel.Trace, AppLib.GetCaller(logger)); using (var dao = new SampleDAO()) { return dao.GetSampleDocumentData(sampleDocumentId); } }
public int DoSaveResults(SmartCollection<Result> results, Identification identification) { logger.Log(LogLevel.Trace, AppLib.GetCaller(logger)); // Save Results using (SampleDAO dao = new SampleDAO()) { return dao.SaveResults(results, identification); } }
public int DoSaveSample(Sample sample, Identification identification) { logger.Log(LogLevel.Trace, AppLib.GetCaller(logger)); //Validate Order Object if (!sample.ValidateModel()) throw new FaultException<ServiceFault>(new ServiceFault(sample.CurrentErrors), new FaultReason(SysVars.InvalidFormat)); // Validate All SampleTests Dictionary<string, List<string>> sampleTestErrors = new Dictionary<string, List<string>>(); foreach (SampleTest sampleTest in sample.SampleTests) { if (!sampleTest.ValidateModel()) sampleTestErrors = sampleTest.CurrentErrors; } if (sampleTestErrors.Count > 0) throw new FaultException<ServiceFault>(new ServiceFault(sampleTestErrors), new FaultReason(SysVars.InvalidFormat)); // Validate All SampleCharges Dictionary<string, List<string>> chargesErrors = new Dictionary<string, List<string>>(); foreach (SampleCharge charge in sample.SampleCharges) { if (!charge.ValidateModel()) chargesErrors = charge.CurrentErrors; } if (chargesErrors.Count > 0) throw new FaultException<ServiceFault>(new ServiceFault(chargesErrors), new FaultReason(SysVars.InvalidFormat)); // Validate All SampleNotes Dictionary<string, List<string>> notesErrors = new Dictionary<string, List<string>>(); foreach (SampleNote note in sample.SampleNotes) { if (!note.ValidateModel()) notesErrors = note.CurrentErrors; } if (notesErrors.Count > 0) throw new FaultException<ServiceFault>(new ServiceFault(notesErrors), new FaultReason(SysVars.InvalidFormat)); // Save Order using (SampleDAO dao = new SampleDAO()) { return dao.SaveSample(sample, identification); } }
public SmartCollection<Submission> DoGetWebSubmissions(Identification identification) { logger.Log(LogLevel.Trace, AppLib.GetCaller(logger)); using (SampleDAO dao = new SampleDAO()) { return dao.GetWebSubmissions(identification); } }
public SmartCollection<SampleTest> DoSearchSampleTestResults(string searchString, Identification identification) { logger.Log(LogLevel.Trace, AppLib.GetCaller(logger)); using (SampleDAO dao = new SampleDAO()) { return dao.SearchResultSampleTests(searchString, identification); } }
public SmartCollection<SampleTest> DoGetWorkLoad(CatalogItem filterItem, SmartCollection<Analyte> filterAnalytes, DateTime beginStartDate, DateTime beginEndDate, Identification identification) { logger.Log(LogLevel.Trace, AppLib.GetCaller(logger)); using (SampleDAO dao = new SampleDAO()) { return dao.GetWorkLoad(filterItem, filterAnalytes, beginStartDate, beginEndDate, identification); } }
public SmartCollection<Order> DoBeginSearchModuleOrders(int? customerId, DateTime? orderReceivedStartDate, DateTime? orderReceivedEndDate, int? testId, int? analyteId) { logger.Log(LogLevel.Trace, AppLib.GetCaller(logger)); using (SampleDAO dao = new SampleDAO()) { return dao.SearchModuleOrders(customerId, orderReceivedStartDate, orderReceivedEndDate, testId, analyteId); } }
public List<DateTime> DoGetWorkloadDates(int analystId) { logger.Log(LogLevel.Trace, AppLib.GetCaller(logger)); using (SampleDAO dao = new SampleDAO()) { return dao.GetWorkloadDates(analystId); } }
public int DoCancelSampleTest(int id, SampleNote note, Identification identification) { logger.Log(LogLevel.Trace, AppLib.GetCaller(logger)); using (SampleDAO dao = new SampleDAO()) { return dao.CancelSampleTest(id, note, identification); } }
public int DoImportSample(int requestId, Identification identification) { logger.Log(LogLevel.Trace, AppLib.GetCaller(logger)); using (SampleDAO dao = new SampleDAO()) { return dao.ImportSample(requestId, identification); } }
public string DoCreateInvoice(Invoice invoice, Identification identification) { logger.Log(LogLevel.Trace, AppLib.GetCaller(logger)); using (SampleDAO dao = new SampleDAO()) { return dao.CreateInvoice(invoice, identification); } }
public int DoRemoveSampleTest(int id, Identification identification) { logger.Log(LogLevel.Trace, AppLib.GetCaller(logger)); using (SampleDAO dao = new SampleDAO()) { return dao.RemoveOrderSampleTest(id, identification.UserId); } }
public int DoDeleteOos(int oosId, string reason, Identification identification) { logger.Log(LogLevel.Trace, AppLib.GetCaller(logger)); // Delete Oos using (SampleDAO dao = new SampleDAO()) { return dao.DeleteOOS(oosId, reason, identification); } }
public int DoReturnToOos(TimePoint timePoint, SampleNote note, Identification identification) { logger.Log(LogLevel.Trace, AppLib.GetCaller(logger)); using (SampleDAO dao = new SampleDAO()) { return dao.ReturnToOos(timePoint, note, identification); } }
public SmartCollection<Sample> DoGetClientSamples(int clientId, Identification identification) { logger.Log(LogLevel.Trace, AppLib.GetCaller(logger)); using (SampleDAO dao = new SampleDAO()) { return dao.GetClientSamples(clientId, identification); } }
public int DoSaveOos(Oos oos, Identification identification) { logger.Log(LogLevel.Trace, AppLib.GetCaller(logger)); //Validate Oos Object if (!oos.ValidateModel()) throw new FaultException<ServiceFault>(new ServiceFault(oos.CurrentErrors), new FaultReason(SysVars.InvalidFormat)); // Save Oos using (SampleDAO dao = new SampleDAO()) { return dao.SaveOOS(oos, identification); } }