From 8e8d49c2358c9a0ca1dfc2db3bba665ac37c8fc0 Mon Sep 17 00:00:00 2001 From: Youngho Kim <1> Date: Thu, 14 Apr 2022 12:10:22 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B2=80=EC=A6=9D=EA=B8=B0=20=EC=99=84?= =?UTF-8?q?=EB=A3=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Million Prototype/Form1.Designer.cs | 13 +++++++++++++ Million Prototype/Form1.cs | 16 ++++++++++++++++ Million/DbMangement/DBServiceFunctions.cs | 8 +------- 3 files changed, 30 insertions(+), 7 deletions(-) diff --git a/Million Prototype/Form1.Designer.cs b/Million Prototype/Form1.Designer.cs index 7064b21..aab7c5b 100644 --- a/Million Prototype/Form1.Designer.cs +++ b/Million Prototype/Form1.Designer.cs @@ -33,6 +33,7 @@ this.listBox1 = new System.Windows.Forms.ListBox(); this.button2 = new System.Windows.Forms.Button(); this.button3 = new System.Windows.Forms.Button(); + this.button4 = new System.Windows.Forms.Button(); this.SuspendLayout(); // // label1 @@ -85,11 +86,22 @@ this.button3.UseVisualStyleBackColor = true; this.button3.Click += new System.EventHandler(this.button3_Click); // + // button4 + // + this.button4.Location = new System.Drawing.Point(47, 299); + this.button4.Name = "button4"; + this.button4.Size = new System.Drawing.Size(75, 23); + this.button4.TabIndex = 5; + this.button4.Text = "검증기"; + this.button4.UseVisualStyleBackColor = true; + this.button4.Click += new System.EventHandler(this.button4_Click); + // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(1415, 703); + this.Controls.Add(this.button4); this.Controls.Add(this.button3); this.Controls.Add(this.button2); this.Controls.Add(this.listBox1); @@ -109,6 +121,7 @@ private System.Windows.Forms.ListBox listBox1; private System.Windows.Forms.Button button2; private System.Windows.Forms.Button button3; + private System.Windows.Forms.Button button4; } } diff --git a/Million Prototype/Form1.cs b/Million Prototype/Form1.cs index ee3c706..5640525 100644 --- a/Million Prototype/Form1.cs +++ b/Million Prototype/Form1.cs @@ -170,5 +170,21 @@ namespace Million_Prototype } } } + + private void button4_Click(object sender, EventArgs e) + { + DbServiceFunctions.GetMarketTable_FromDB("Upbit"); + var tableList = CommonProperty.selectedMarketOfPlaceList; + + var selectTable = tableList.FirstOrDefault(t => t.CodeFullName == "KRW-BTC"); + if (selectTable != null) + { + var startDate = new DateTime(2000, 1, 1); + var candleData = DbServiceFunctions.GetCandleData(selectTable, startDate,DateTime.Now, MCandleTimeType.M1); + var temp = new List(); + temp.Add(candleData); + var returndata = ValidationCheckManager.ValidateCandleDataList(temp, MCandleTimeType.M1); + } + } } } diff --git a/Million/DbMangement/DBServiceFunctions.cs b/Million/DbMangement/DBServiceFunctions.cs index 2742344..8757c3d 100644 --- a/Million/DbMangement/DBServiceFunctions.cs +++ b/Million/DbMangement/DBServiceFunctions.cs @@ -125,7 +125,7 @@ namespace Million.DbManagement else if (candleTimeType == MCandleTimeType.MT1) startDate = startDate.AddMonths(-72); - var sqlQuery = string.Format(@"SELECT [DateTime],[StartValue],[EndValue],[HighValue],[LowValue],[MoneyVolume],[CandleTimeType] FROM [{0}] WHERE [DateTime] >= '{1}' AND [DateTime] <= '{2}' AND [CandleTimeType] = {3} ORDER BY [DateTime] ASC", marketData.CodeFullName, startDate.ToString("yyyy-MM-dd HH:mm:ss"), endDate.ToString("yyyy-MM-dd HH:mm:ss"), candleTimeType); + var sqlQuery = string.Format(@"SELECT [DateTime],[StartValue],[EndValue],[HighValue],[LowValue],[MoneyVolume],[CandleTimeType] FROM [{0}] WHERE [DateTime] >= '{1}' AND [DateTime] <= '{2}' AND [CandleTimeType] = {3} ORDER BY [DateTime] ASC", marketData.CodeFullName, startDate.ToString("yyyy-MM-dd HH:mm:ss"), endDate.ToString("yyyy-MM-dd HH:mm:ss"), (int)candleTimeType); var dataList = DBConnection.QueryGetExcuter_Candle(strDbCon, sqlQuery); @@ -179,12 +179,6 @@ namespace Million.DbManagement returnData.ConGoodsData = marketData; returnData.CandleDataLists_Im = dataList; - var temps = new List(); - temps.Add(returnData); - //Test - var temp = ValidationCheckManager.ValidateCandleDataList(temps, candleTimeType); - - return returnData; }