コード例 #1
0
 private List <ProductInformationSize> GetProductsWithChangedPricesData(int vendorID)
 {
     try
     {
         using (var db = new PetaPoco.Database(Environments.Current.Connection, "System.Data.SqlClient"))
         {
             db.CommandTimeout = 600; //10 minutes
             var products = db.Fetch <ProductInformationSize>(string.Format(QueryHelper.GetProductsWithPriceChangesQuery(), vendorID, VendorSettingsHelper.GetLastPriceExportDateTime(vendorID).ToUniversalTime().ToString(MessageHelper.ISO8601, CultureInfo.InvariantCulture)));
             return(products);
         }
     }
     catch (Exception ex)
     {
         log.Error("Error while retrieving products to export to Wehkamp.", ex);
         return(null);
     }
 }