Ejemplo n.º 1
0
 protected void CreateSamplePerMonth(SampleDataConfiguration conf)
 {
     //var conf = e.Argument as SampleDataConfiguration;
     HccRequestContext.Current = conf.HccRequestContext;
     for (var i = 0; i < 24; i++)
     {
         CreateSampleAnalyticsByMonth(i);
     }
 }
Ejemplo n.º 2
0
        public static void CreateSampleAnalyticsForStoreAsync(HccRequestContext context = null)
        {
            var sampleData = new SampleData(context ?? HccRequestContext.Current);

            sampleData.AddSampleProductsWithoutStatistics();

            EventLog.LogEvent("SampleData", "Product and categories created", EventLogSeverity.Information);

            var objArguments = new SampleDataConfiguration
            {
                HccRequestContext = HccRequestContext.Current
            };

            //Start process in background
            ThreadPool.QueueUserWorkItem(_ => sampleData.CreateSamplePerMonth(objArguments));
        }