コード例 #1
0
 public void SampleColection(SampleCollectionsRequest ssData)
 {
     try
     {
         var stProc = AddSampleCollection;
         var retVal = new SqlParameter("@SCOPE_OUTPUT", 1)
         {
             Direction = ParameterDirection.Output
         };
         var pList = new List <SqlParameter>()
         {
             new SqlParameter("@UniqueSubjectID", ssData.uniqueSubjectId ?? ssData.uniqueSubjectId),
             new SqlParameter("@BarcodeNo", ssData.barcodeNo ?? ssData.barcodeNo),
             new SqlParameter("@SampleCollectionDate", ssData.sampleCollectionDate ?? ssData.sampleCollectionDate),
             new SqlParameter("@SampleCollectionTime", ssData.sampleCollectionTime ?? ssData.sampleCollectionTime),
             new SqlParameter("@Reason", ssData.reason ?? ssData.reason),
             new SqlParameter("@CollectionFrom", ssData.collectionFrom),
             new SqlParameter("@CollectedBy", ssData.collectedBy),
             retVal
         };
         UtilityDL.ExecuteNonQuery(stProc, pList);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #2
0
 public List <ErrorBarcodeId> NewSampleCollection(SampleCollectionsRequest ssData)
 {
     try
     {
         var stProc = AddSampleCollectionNew;
         var pList  = new List <SqlParameter>()
         {
             new SqlParameter("@UniqueSubjectID", ssData.uniqueSubjectId ?? ssData.uniqueSubjectId),
             new SqlParameter("@BarcodeNo", ssData.barcodeNo ?? ssData.barcodeNo),
             new SqlParameter("@SampleCollectionDate", ssData.sampleCollectionDate ?? ssData.sampleCollectionDate),
             new SqlParameter("@SampleCollectionTime", ssData.sampleCollectionTime ?? ssData.sampleCollectionTime),
             new SqlParameter("@Reason", ssData.reason ?? ssData.reason),
             new SqlParameter("@CollectionFrom", ssData.collectionFrom),
             new SqlParameter("@CollectedBy", ssData.collectedBy),
         };
         var msg = UtilityDL.FillData <ErrorBarcodeId>(stProc, pList);
         return(msg);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }