示例#1
0
        public void Insert()
        {
            for (int i = 1; i <= this.TotalBatch; i++)
            {
                currencyService.BatchSave_Info(this.Value);

                this.RealInsertCurrencyCount += this.BatchCount;

                DataCounter.AddCurrency(this.BatchCount);
            }
        }
示例#2
0
        public void Insert()
        {
            this.CurrentBatch = 1;

            for (; this.CurrentBatch <= this.TotalBatch; this.CurrentBatch += 1)
            {
                if (this.CurrentBatch == this.HourBatch * 0 + 1)
                {
                    DateTime nowTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 8, DateTime.Now.Minute, DateTime.Now.Second);

                    this.UpdateInesrtData(nowTime);
                }

                if (this.CurrentBatch == this.HourBatch * 1 + 1)
                {
                    DateTime nowTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 9, DateTime.Now.Minute, DateTime.Now.Second);

                    this.UpdateInesrtData(nowTime);
                }

                if (this.CurrentBatch == this.HourBatch * 2 + 1)
                {
                    DateTime nowTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 10, DateTime.Now.Minute, DateTime.Now.Second);

                    this.UpdateInesrtData(nowTime);
                }

                if (this.CurrentBatch == this.HourBatch * 3 + 1)
                {
                    DateTime nowTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 11, DateTime.Now.Minute, DateTime.Now.Second);

                    this.UpdateInesrtData(nowTime);
                }

                if (this.CurrentBatch == this.HourBatch * 4 + 1)
                {
                    DateTime nowTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 12, DateTime.Now.Minute, DateTime.Now.Second);

                    this.UpdateInesrtData(nowTime);
                }

                if (this.CurrentBatch == this.HourBatch * 5 + 1)
                {
                    DateTime nowTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 13, DateTime.Now.Minute, DateTime.Now.Second);

                    this.UpdateInesrtData(nowTime);
                }

                if (this.CurrentBatch == this.HourBatch * 6 + 1)
                {
                    DateTime nowTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 14, DateTime.Now.Minute, DateTime.Now.Second);

                    this.UpdateInesrtData(nowTime);
                }

                if (this.CurrentBatch == this.HourBatch * 7 + 1)
                {
                    DateTime nowTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 15, DateTime.Now.Minute, DateTime.Now.Second);

                    this.UpdateInesrtData(nowTime);
                }

                if (this.CurrentBatch == this.HourBatch * 8 + 1)
                {
                    DateTime nowTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 16, DateTime.Now.Minute, DateTime.Now.Second);

                    this.UpdateInesrtData(nowTime);
                }

                if (this.CurrentBatch == this.HourBatch * 9 + 1)
                {
                    DateTime nowTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 17, DateTime.Now.Minute, DateTime.Now.Second);

                    this.UpdateInesrtData(nowTime);
                }

                if (this.CurrentBatch == this.HourBatch * 10 + 1)
                {
                    DateTime nowTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 18, DateTime.Now.Minute, DateTime.Now.Second);

                    this.UpdateInesrtData(nowTime);
                }

                if (this.CurrentBatch == this.HourBatch * 11 + 1)
                {
                    DateTime nowTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 19, DateTime.Now.Minute, DateTime.Now.Second);

                    this.UpdateInesrtData(nowTime);
                }

                currencyService.BatchSave_Info(this.Value);

                this.RealInsertCurrencyCount += this.BatchCount;

                DataCounter.AddCurrency(this.BatchCount);
            }
        }