/// <summary>
 /// Store the specified reprocess job result.
 /// Note that this method will ALWAYS try to create a new row. If one already exists in
 /// the database with the same job and item IDs then an EMMADataException is thrown.
 /// </summary>
 /// <param name="itemData">The result data to be stored</param>
 /// <exception cref="EMMADataException"></exception>
 private static void StoreResult(ReprocessResult resultData, DateTime jobDate)
 {
     EMMADataSet.ReprocessResultDataTable table = new EMMADataSet.ReprocessResultDataTable();
     EMMADataSet.ReprocessResultRow row = table.NewReprocessResultRow();
     row.JobID = resultData.JobID;
     row.ItemID = resultData.ItemID;
     row.Quantity = resultData.Quantity;
     row.EffectiveBuyPrice = resultData.EffectiveBuyPrice;
     row.EstSellPrice = resultData.EstSellPrice;
     row.JobDate = jobDate;
     table.AddReprocessResultRow(row);
     try
     {
         lock (resultTableAdapter)
         {
             resultTableAdapter.Update(table);
         }
     }
     catch (Exception ex)
     {
         throw new EMMADataException(ExceptionSeverity.Error, "Problem adding reprocess result data " +
             "to the database.", ex);
     }
 }