quantproject-developers Mailing List for QuantProject (Page 143)
Brought to you by:
glauco_1
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(7) |
Nov
(103) |
Dec
(67) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(52) |
Feb
(9) |
Mar
(69) |
Apr
(53) |
May
(80) |
Jun
(23) |
Jul
(24) |
Aug
(112) |
Sep
(9) |
Oct
|
Nov
(58) |
Dec
(93) |
| 2005 |
Jan
(90) |
Feb
(93) |
Mar
(61) |
Apr
(56) |
May
(37) |
Jun
(61) |
Jul
(55) |
Aug
(68) |
Sep
(25) |
Oct
(46) |
Nov
(41) |
Dec
(37) |
| 2006 |
Jan
(33) |
Feb
(7) |
Mar
(19) |
Apr
(27) |
May
(73) |
Jun
(49) |
Jul
(83) |
Aug
(66) |
Sep
(45) |
Oct
(16) |
Nov
(15) |
Dec
(7) |
| 2007 |
Jan
(14) |
Feb
(33) |
Mar
|
Apr
(21) |
May
|
Jun
(34) |
Jul
(18) |
Aug
(100) |
Sep
(39) |
Oct
(55) |
Nov
(12) |
Dec
(2) |
| 2008 |
Jan
(120) |
Feb
(133) |
Mar
(129) |
Apr
(104) |
May
(42) |
Jun
(2) |
Jul
(52) |
Aug
(99) |
Sep
(134) |
Oct
|
Nov
(137) |
Dec
(48) |
| 2009 |
Jan
(48) |
Feb
(55) |
Mar
(61) |
Apr
(3) |
May
(2) |
Jun
(1) |
Jul
|
Aug
(51) |
Sep
|
Oct
(7) |
Nov
|
Dec
|
| 2010 |
Jan
(7) |
Feb
(1) |
Mar
(145) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(8) |
Dec
|
| 2011 |
Jan
(78) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(88) |
Sep
(6) |
Oct
(1) |
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
(1) |
Mar
|
Apr
(6) |
May
(5) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2013 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <gla...@pr...> - 2004-01-29 06:11:12
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/QuotesEditor/CloseToClose In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10174/Downloader/QuotesEditor/CloseToClose Added Files: CloseToCloseUserControl.cs Log Message: Content for the close to close validation TabPage --- NEW FILE: CloseToCloseUserControl.cs --- /* QuantProject - Quantitative Finance Library CloseToCloseUserControl.cs Copyright (C) 2003 Glauco Siliprandi This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ using System; using System.Collections; using System.ComponentModel; using System.Drawing; using System.Data; using System.Windows.Forms; using QuantProject.Applications.Downloader.Validate; namespace QuantProject.Applications.Downloader { /// <summary> /// Content for the close to close validation TabPage /// </summary> public class CloseToCloseUserControl : System.Windows.Forms.UserControl { private CloseToCloseDataGrid closeToCloseDataGrid; private CloseToCloseChart closeToCloseChart; private string ticker; public string Ticker { get { return this.ticker; } set { this.ticker = value; } } public ValidateDataTable ValidateDataTable; /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.Container components = null; public CloseToCloseUserControl() { // This call is required by the Windows.Forms Form Designer. InitializeComponent(); // TODO: Add any initialization after the InitForm call initializeCloseToCloseDataGrid(); initializeCloseToCloseChart(); } #region initializeCloseToCloseDataGrid private void closeToCloseDataGrid_mouseUp(object sender, MouseEventArgs e) { Console.WriteLine( this.closeToCloseDataGrid[ this.closeToCloseDataGrid.CurrentRowIndex , 0 ] ); this.closeToCloseChart.SuspiciousDateTime = (DateTime)this.closeToCloseDataGrid[ this.closeToCloseDataGrid.CurrentRowIndex , 0 ]; this.closeToCloseChart.Invalidate(); } private void initializeCloseToCloseDataGrid() { this.closeToCloseDataGrid = new CloseToCloseDataGrid(); this.closeToCloseDataGrid.Width = 150; this.closeToCloseDataGrid.Height = this.Height - 4; this.closeToCloseDataGrid.MouseUp += new MouseEventHandler( this.closeToCloseDataGrid_mouseUp ); this.Controls.Add( this.closeToCloseDataGrid ); } #endregion private void initializeCloseToCloseChart() { this.closeToCloseChart = new CloseToCloseChart(); this.closeToCloseChart.Location = new Point( 155 , 0 ); this.closeToCloseChart.Height = this.Height - 4; this.closeToCloseChart.Width = this.Width - 150; this.Controls.Add( this.closeToCloseChart ); } public void PaintingHandler() { this.Width = this.Parent.Width - 10; this.Height = this.Parent.Height - 10; this.closeToCloseDataGrid.DataBind( this.ValidateDataTable ); this.closeToCloseChart.Ticker = this.ticker; } /// <summary> /// Clean up any resources being used. /// </summary> protected override void Dispose( bool disposing ) { if( disposing ) { if(components != null) { components.Dispose(); } } base.Dispose( disposing ); } #region Component Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { // // CloseToCloseUserControl // this.Name = "CloseToCloseUserControl"; this.Size = new System.Drawing.Size(648, 232); // this.Paint += new System.Windows.Forms.PaintEventHandler(this.CloseToCloseUserControl_Paint); this.closeToCloseChart = new CloseToCloseChart(); } #endregion protected override void OnPaint(System.Windows.Forms.PaintEventArgs e) { this.closeToCloseDataGrid.DataBind( this.ValidateDataTable ); this.closeToCloseChart.Ticker = this.ticker; this.closeToCloseChart.SuspiciousDateTime = (DateTime)this.closeToCloseDataGrid[ this.closeToCloseDataGrid.CurrentRowIndex , 0 ]; base.OnPaint( e ); } } } |
|
From: <gla...@pr...> - 2004-01-27 15:41:00
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/Validate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6564/Downloader/Validate Modified Files: ValidateForm.cs Log Message: The ValidateDataGrid instance has been removed from the visual designer Index: ValidateForm.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/Validate/ValidateForm.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ValidateForm.cs 26 Jan 2004 15:57:15 -0000 1.6 --- ValidateForm.cs 27 Jan 2004 15:39:55 -0000 1.7 *************** *** 17,21 **** private System.Data.OleDb.OleDbDataAdapter oleDbDataAdapter1; private ValidateDataTable validateDataTable; ! private DataTable tableOfTickersToBeValidated; private System.Data.OleDb.OleDbCommand oleDbSelectCommand1; private System.Data.OleDb.OleDbCommand oleDbInsertCommand1; --- 17,21 ---- private System.Data.OleDb.OleDbDataAdapter oleDbDataAdapter1; private ValidateDataTable validateDataTable; ! private DataTable tableOfTickersToBeValidated; private System.Data.OleDb.OleDbCommand oleDbSelectCommand1; private System.Data.OleDb.OleDbCommand oleDbInsertCommand1; *************** *** 26,51 **** private System.Windows.Forms.TextBox textBoxSuspiciousRatio; private System.Windows.Forms.Label labelSuspiciousRatio; - private QuantProject.Applications.Downloader.Validate.ValidateDataGrid validateDataGrid; private System.Windows.Forms.Button buttonGoValidateCurrentSelection; ! private System.Windows.Forms.DataGridTableStyle dataGridTableStyle1; ! private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn1; ! private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn2; ! private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn3; ! private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn4; ! private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn5; ! private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn6; ! private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn7; ! private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn8; ! private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn9; ! private System.Windows.Forms.DataGridTableStyle dataGridTableStyle2; ! private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn10; ! private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn11; ! private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn12; ! private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn13; ! private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn14; ! private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn15; ! private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn16; ! private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn17; ! private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn18; /// <summary> /// Required designer variable. --- 26,31 ---- private System.Windows.Forms.TextBox textBoxSuspiciousRatio; private System.Windows.Forms.Label labelSuspiciousRatio; private System.Windows.Forms.Button buttonGoValidateCurrentSelection; ! private ValidateDataGrid validateDataGrid = new ValidateDataGrid(); /// <summary> /// Required designer variable. *************** *** 59,62 **** --- 39,47 ---- // InitializeComponent(); + + this.validateDataGrid.Location = new System.Drawing.Point(16, 56); + this.validateDataGrid.Width = this.Width - 32; + this.validateDataGrid.Height = this.Height - 130; + this.Controls.Add( this.validateDataGrid ); this.buttonGoValidateCurrentSelection.Visible = false; this.tableOfTickersToBeValidated = null; *************** *** 98,506 **** private void InitializeComponent() { ! this.textBoxTickerIsLike = new System.Windows.Forms.TextBox(); ! this.labelTickerIsLike = new System.Windows.Forms.Label(); ! this.buttonGo = new System.Windows.Forms.Button(); ! this.oleDbDataAdapter1 = new System.Data.OleDb.OleDbDataAdapter(); ! this.oleDbDeleteCommand1 = new System.Data.OleDb.OleDbCommand(); ! this.oleDbInsertCommand1 = new System.Data.OleDb.OleDbCommand(); ! this.oleDbSelectCommand1 = new System.Data.OleDb.OleDbCommand(); ! this.oleDbUpdateCommand1 = new System.Data.OleDb.OleDbCommand(); ! this.dataGridTableStyle1 = new System.Windows.Forms.DataGridTableStyle(); ! this.dataGridTableStyle2 = new System.Windows.Forms.DataGridTableStyle(); ! this.dataGridTextBoxColumn10 = new System.Windows.Forms.DataGridTextBoxColumn(); ! this.dataGridTextBoxColumn11 = new System.Windows.Forms.DataGridTextBoxColumn(); ! this.dataGridTextBoxColumn12 = new System.Windows.Forms.DataGridTextBoxColumn(); ! this.dataGridTextBoxColumn13 = new System.Windows.Forms.DataGridTextBoxColumn(); ! this.dataGridTextBoxColumn14 = new System.Windows.Forms.DataGridTextBoxColumn(); ! this.dataGridTextBoxColumn15 = new System.Windows.Forms.DataGridTextBoxColumn(); ! this.dataGridTextBoxColumn16 = new System.Windows.Forms.DataGridTextBoxColumn(); ! this.dataGridTextBoxColumn17 = new System.Windows.Forms.DataGridTextBoxColumn(); ! this.dataGridTextBoxColumn18 = new System.Windows.Forms.DataGridTextBoxColumn(); ! this.validateDataGrid = new QuantProject.Applications.Downloader.Validate.ValidateDataGrid(); ! this.dataGridTextBoxColumn1 = new System.Windows.Forms.DataGridTextBoxColumn(); ! this.dataGridTextBoxColumn2 = new System.Windows.Forms.DataGridTextBoxColumn(); ! this.dataGridTextBoxColumn3 = new System.Windows.Forms.DataGridTextBoxColumn(); ! this.dataGridTextBoxColumn4 = new System.Windows.Forms.DataGridTextBoxColumn(); ! this.dataGridTextBoxColumn5 = new System.Windows.Forms.DataGridTextBoxColumn(); ! this.dataGridTextBoxColumn6 = new System.Windows.Forms.DataGridTextBoxColumn(); ! this.dataGridTextBoxColumn7 = new System.Windows.Forms.DataGridTextBoxColumn(); ! this.dataGridTextBoxColumn8 = new System.Windows.Forms.DataGridTextBoxColumn(); ! this.dataGridTextBoxColumn9 = new System.Windows.Forms.DataGridTextBoxColumn(); ! this.buttonCommitAndRefresh = new System.Windows.Forms.Button(); ! this.textBoxSuspiciousRatio = new System.Windows.Forms.TextBox(); ! this.labelSuspiciousRatio = new System.Windows.Forms.Label(); ! this.buttonGoValidateCurrentSelection = new System.Windows.Forms.Button(); ! ((System.ComponentModel.ISupportInitialize)(this.validateDataGrid)).BeginInit(); ! this.SuspendLayout(); ! // ! // textBoxTickerIsLike ! // ! this.textBoxTickerIsLike.Location = new System.Drawing.Point(120, 16); ! this.textBoxTickerIsLike.Name = "textBoxTickerIsLike"; ! this.textBoxTickerIsLike.TabIndex = 0; ! this.textBoxTickerIsLike.Text = "CCE"; ! // ! // labelTickerIsLike ! // ! this.labelTickerIsLike.Location = new System.Drawing.Point(24, 16); ! this.labelTickerIsLike.Name = "labelTickerIsLike"; ! this.labelTickerIsLike.Size = new System.Drawing.Size(80, 16); ! this.labelTickerIsLike.TabIndex = 1; ! this.labelTickerIsLike.Text = "Ticker is Like:"; ! this.labelTickerIsLike.TextAlign = System.Drawing.ContentAlignment.MiddleRight; ! // ! // buttonGo ! // ! this.buttonGo.Location = new System.Drawing.Point(464, 16); ! this.buttonGo.Name = "buttonGo"; ! this.buttonGo.TabIndex = 2; ! this.buttonGo.Text = "Go"; ! this.buttonGo.Click += new System.EventHandler(this.buttonGo_Click); ! // ! // oleDbDataAdapter1 ! // ! this.oleDbDataAdapter1.DeleteCommand = this.oleDbDeleteCommand1; ! this.oleDbDataAdapter1.InsertCommand = this.oleDbInsertCommand1; ! this.oleDbDataAdapter1.SelectCommand = this.oleDbSelectCommand1; ! this.oleDbDataAdapter1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] { ! new System.Data.Common.DataTableMapping("Table", "quotes", new System.Data.Common.DataColumnMapping[] { ! new System.Data.Common.DataColumnMapping("Ticker", "Ticker"), ! new System.Data.Common.DataColumnMapping("TheDate", "TheDate"), ! new System.Data.Common.DataColumnMapping("TheOpen", "TheOpen"), ! new System.Data.Common.DataColumnMapping("High", "High"), ! new System.Data.Common.DataColumnMapping("Low", "Low"), ! new System.Data.Common.DataColumnMapping("TheClose", "TheClose"), ! new System.Data.Common.DataColumnMapping("Volume", "Volume"), ! new System.Data.Common.DataColumnMapping("AdjOpen", "AdjOpen"), ! new System.Data.Common.DataColumnMapping("AdjHigh", "AdjHigh"), ! new System.Data.Common.DataColumnMapping("AdjLow", "AdjLow"), ! new System.Data.Common.DataColumnMapping("AdjClose", "AdjClose"), ! new System.Data.Common.DataColumnMapping("AdjVolume", "AdjVolume"), ! new System.Data.Common.DataColumnMapping("ErrorDescription", "ErrorDescription")})}); ! this.oleDbDataAdapter1.UpdateCommand = this.oleDbUpdateCommand1; ! // ! // oleDbDeleteCommand1 ! // ! this.oleDbDeleteCommand1.CommandText = @"DELETE FROM quotes WHERE (quDate = ?) AND (quTicker = ?) AND (quAdjustedClose = ? OR ? IS NULL AND quAdjustedClose IS NULL) AND (quAdjustedHigh = ? OR ? IS NULL AND quAdjustedHigh IS NULL) AND (quAdjustedLow = ? OR ? IS NULL AND quAdjustedLow IS NULL) AND (quAdjustedOpen = ? OR ? IS NULL AND quAdjustedOpen IS NULL) AND (quAdjustedVolume = ? OR ? IS NULL AND quAdjustedVolume IS NULL) AND (quClose = ? OR ? IS NULL AND quClose IS NULL) AND (quHigh = ? OR ? IS NULL AND quHigh IS NULL) AND (quLow = ? OR ? IS NULL AND quLow IS NULL) AND (quOpen = ? OR ? IS NULL AND quOpen IS NULL)"; ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quDate", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "TheDate", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quTicker", System.Data.OleDb.OleDbType.VarWChar, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "Ticker", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quAdjustedClose", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjClose", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quAdjustedClose1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjClose", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quAdjustedHigh", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjHigh", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quAdjustedHigh1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjHigh", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quAdjustedLow", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjLow", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quAdjustedLow1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjLow", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quAdjustedOpen", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjOpen", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quAdjustedOpen1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjOpen", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quAdjustedVolume", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjVolume", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quAdjustedVolume1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjVolume", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quClose", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "TheClose", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quClose1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "TheClose", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quHigh", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "High", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quHigh1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "High", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quLow", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "Low", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quLow1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "Low", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quOpen", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "TheOpen", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quOpen1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "TheOpen", System.Data.DataRowVersion.Original, null)); ! // ! // oleDbInsertCommand1 ! // ! this.oleDbInsertCommand1.CommandText = "INSERT INTO quotes(quTicker, quDate, quOpen, quHigh, quLow, quClose, quVolume, qu" + ! "AdjustedOpen, quAdjustedHigh, quAdjustedLow, quAdjustedClose, quAdjustedVolume) " + ! "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; ! this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quTicker", System.Data.OleDb.OleDbType.VarWChar, 8, "Ticker")); ! this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quDate", System.Data.OleDb.OleDbType.DBDate, 0, "TheDate")); ! this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quOpen", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "TheOpen", System.Data.DataRowVersion.Current, null)); ! this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quHigh", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "High", System.Data.DataRowVersion.Current, null)); ! this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quLow", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "Low", System.Data.DataRowVersion.Current, null)); ! this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quClose", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "TheClose", System.Data.DataRowVersion.Current, null)); ! this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quVolume", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(10)), ((System.Byte)(0)), "Volume", System.Data.DataRowVersion.Current, null)); ! this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quAdjustedOpen", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjOpen", System.Data.DataRowVersion.Current, null)); ! this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quAdjustedHigh", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjHigh", System.Data.DataRowVersion.Current, null)); ! this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quAdjustedLow", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjLow", System.Data.DataRowVersion.Current, null)); ! this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quAdjustedClose", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjClose", System.Data.DataRowVersion.Current, null)); ! this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quAdjustedVolume", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjVolume", System.Data.DataRowVersion.Current, null)); ! // ! // oleDbSelectCommand1 ! // ! this.oleDbSelectCommand1.CommandText = @"SELECT quTicker AS Ticker, quDate AS TheDate, quOpen AS TheOpen, quHigh AS High, quLow AS Low, quClose AS TheClose, quVolume AS Volume, quAdjustedOpen AS AdjOpen, quAdjustedHigh AS AdjHigh, quAdjustedLow AS AdjLow, quAdjustedClose AS AdjClose, quAdjustedVolume AS AdjVolume, '' AS ErrorDescription FROM quotes ORDER BY quTicker, quDate"; ! // ! // oleDbUpdateCommand1 ! // ! this.oleDbUpdateCommand1.CommandText = @"UPDATE quotes SET quTicker = ?, quDate = ?, quOpen = ?, quHigh = ?, quLow = ?, quClose = ?, quVolume = ?, quAdjustedOpen = ?, quAdjustedHigh = ?, quAdjustedLow = ?, quAdjustedClose = ?, quAdjustedVolume = ? WHERE (quDate = ?) AND (quTicker = ?) AND (quAdjustedClose = ? OR ? IS NULL AND quAdjustedClose IS NULL) AND (quAdjustedHigh = ? OR ? IS NULL AND quAdjustedHigh IS NULL) AND (quAdjustedLow = ? OR ? IS NULL AND quAdjustedLow IS NULL) AND (quAdjustedOpen = ? OR ? IS NULL AND quAdjustedOpen IS NULL) AND (quAdjustedVolume = ? OR ? IS NULL AND quAdjustedVolume IS NULL) AND (quClose = ? OR ? IS NULL AND quClose IS NULL) AND (quHigh = ? OR ? IS NULL AND quHigh IS NULL) AND (quLow = ? OR ? IS NULL AND quLow IS NULL) AND (quOpen = ? OR ? IS NULL AND quOpen IS NULL)"; ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quTicker", System.Data.OleDb.OleDbType.VarWChar, 8, "Ticker")); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quDate", System.Data.OleDb.OleDbType.DBDate, 0, "TheDate")); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quOpen", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "TheOpen", System.Data.DataRowVersion.Current, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quHigh", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "High", System.Data.DataRowVersion.Current, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quLow", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "Low", System.Data.DataRowVersion.Current, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quClose", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "TheClose", System.Data.DataRowVersion.Current, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quVolume", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(10)), ((System.Byte)(0)), "Volume", System.Data.DataRowVersion.Current, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quAdjustedOpen", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjOpen", System.Data.DataRowVersion.Current, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quAdjustedHigh", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjHigh", System.Data.DataRowVersion.Current, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quAdjustedLow", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjLow", System.Data.DataRowVersion.Current, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quAdjustedClose", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjClose", System.Data.DataRowVersion.Current, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quAdjustedVolume", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjVolume", System.Data.DataRowVersion.Current, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quDate", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "TheDate", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quTicker", System.Data.OleDb.OleDbType.VarWChar, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "Ticker", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quAdjustedClose", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjClose", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quAdjustedClose1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjClose", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quAdjustedHigh", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjHigh", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quAdjustedHigh1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjHigh", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quAdjustedLow", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjLow", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quAdjustedLow1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjLow", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quAdjustedOpen", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjOpen", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quAdjustedOpen1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjOpen", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quAdjustedVolume", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjVolume", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quAdjustedVolume1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjVolume", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quClose", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "TheClose", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quClose1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "TheClose", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quHigh", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "High", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quHigh1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "High", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quLow", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "Low", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quLow1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "Low", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quOpen", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "TheOpen", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quOpen1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "TheOpen", System.Data.DataRowVersion.Original, null)); ! // ! // dataGridTableStyle1 ! // ! this.dataGridTableStyle1.DataGrid = this.validateDataGrid; ! this.dataGridTableStyle1.GridColumnStyles.AddRange(new System.Windows.Forms.DataGridColumnStyle[] { ! this.dataGridTextBoxColumn1, ! this.dataGridTextBoxColumn2, ! this.dataGridTextBoxColumn3, ! this.dataGridTextBoxColumn4, ! this.dataGridTextBoxColumn5, ! this.dataGridTextBoxColumn6, ! this.dataGridTextBoxColumn7, ! this.dataGridTextBoxColumn8, ! this.dataGridTextBoxColumn9}); ! this.dataGridTableStyle1.HeaderForeColor = System.Drawing.SystemColors.ControlText; ! this.dataGridTableStyle1.MappingName = ""; ! // ! // dataGridTableStyle2 ! // ! this.dataGridTableStyle2.DataGrid = this.validateDataGrid; ! this.dataGridTableStyle2.GridColumnStyles.AddRange(new System.Windows.Forms.DataGridColumnStyle[] { ! this.dataGridTextBoxColumn10, ! this.dataGridTextBoxColumn11, ! this.dataGridTextBoxColumn12, ! this.dataGridTextBoxColumn13, ! this.dataGridTextBoxColumn14, ! this.dataGridTextBoxColumn15, ! this.dataGridTextBoxColumn16, ! this.dataGridTextBoxColumn17, ! this.dataGridTextBoxColumn18}); ! this.dataGridTableStyle2.HeaderForeColor = System.Drawing.SystemColors.ControlText; ! this.dataGridTableStyle2.MappingName = "quotes"; ! // ! // dataGridTextBoxColumn10 ! // ! this.dataGridTextBoxColumn10.Format = ""; ! this.dataGridTextBoxColumn10.FormatInfo = null; ! this.dataGridTextBoxColumn10.HeaderText = "Ticker"; ! this.dataGridTextBoxColumn10.MappingName = "quTicker"; ! this.dataGridTextBoxColumn10.Width = 39; ! // ! // dataGridTextBoxColumn11 ! // ! this.dataGridTextBoxColumn11.Format = ""; ! this.dataGridTextBoxColumn11.FormatInfo = null; ! this.dataGridTextBoxColumn11.HeaderText = "Date"; ! this.dataGridTextBoxColumn11.MappingName = "quDate"; ! this.dataGridTextBoxColumn11.Width = 32; ! // ! // dataGridTextBoxColumn12 ! // ! this.dataGridTextBoxColumn12.Format = ""; ! this.dataGridTextBoxColumn12.FormatInfo = null; ! this.dataGridTextBoxColumn12.HeaderText = "Open"; ! this.dataGridTextBoxColumn12.MappingName = "quOpen"; ! this.dataGridTextBoxColumn12.Width = 36; ! // ! // dataGridTextBoxColumn13 ! // ! this.dataGridTextBoxColumn13.Format = ""; ! this.dataGridTextBoxColumn13.FormatInfo = null; ! this.dataGridTextBoxColumn13.HeaderText = "High"; ! this.dataGridTextBoxColumn13.MappingName = "quHigh"; ! this.dataGridTextBoxColumn13.Width = 32; ! // ! // dataGridTextBoxColumn14 ! // ! this.dataGridTextBoxColumn14.Format = ""; ! this.dataGridTextBoxColumn14.FormatInfo = null; ! this.dataGridTextBoxColumn14.HeaderText = "Low"; ! this.dataGridTextBoxColumn14.MappingName = "quLow"; ! this.dataGridTextBoxColumn14.Width = 29; ! // ! // dataGridTextBoxColumn15 ! // ! this.dataGridTextBoxColumn15.Format = ""; ! this.dataGridTextBoxColumn15.FormatInfo = null; ! this.dataGridTextBoxColumn15.HeaderText = "Close"; ! this.dataGridTextBoxColumn15.MappingName = "quClose"; ! this.dataGridTextBoxColumn15.Width = 37; ! // ! // dataGridTextBoxColumn16 ! // ! this.dataGridTextBoxColumn16.Format = ""; ! this.dataGridTextBoxColumn16.FormatInfo = null; ! this.dataGridTextBoxColumn16.HeaderText = "Adj. Close"; ! this.dataGridTextBoxColumn16.MappingName = "quAdjustedClose"; ! this.dataGridTextBoxColumn16.Width = 60; ! // ! // dataGridTextBoxColumn17 ! // ! this.dataGridTextBoxColumn17.Format = ""; ! this.dataGridTextBoxColumn17.FormatInfo = null; ! this.dataGridTextBoxColumn17.HeaderText = "Warning"; ! this.dataGridTextBoxColumn17.MappingName = "ValidationWarning"; ! this.dataGridTextBoxColumn17.Width = 50; ! // ! // dataGridTextBoxColumn18 ! // ! this.dataGridTextBoxColumn18.Format = ""; ! this.dataGridTextBoxColumn18.FormatInfo = null; ! this.dataGridTextBoxColumn18.HeaderText = "Ew"; ! this.dataGridTextBoxColumn18.MappingName = "Yuppy"; ! this.dataGridTextBoxColumn18.Width = 24; ! // ! // validateDataGrid ! // ! this.validateDataGrid.DataMember = ""; ! this.validateDataGrid.HeaderForeColor = System.Drawing.SystemColors.ControlText; ! this.validateDataGrid.Location = new System.Drawing.Point(16, 56); ! this.validateDataGrid.Name = "validateDataGrid"; ! this.validateDataGrid.PreferredColumnWidth = 50; ! this.validateDataGrid.Size = new System.Drawing.Size(696, 224); ! this.validateDataGrid.TabIndex = 3; ! this.validateDataGrid.TableStyles.AddRange(new System.Windows.Forms.DataGridTableStyle[] { ! this.dataGridTableStyle2, ! this.dataGridTableStyle1}); ! // ! // dataGridTextBoxColumn1 ! // ! this.dataGridTextBoxColumn1.Format = ""; ! this.dataGridTextBoxColumn1.FormatInfo = null; ! this.dataGridTextBoxColumn1.HeaderText = "Ticker"; ! this.dataGridTextBoxColumn1.MappingName = "quTicker"; ! this.dataGridTextBoxColumn1.Width = 39; ! // ! // dataGridTextBoxColumn2 ! // ! this.dataGridTextBoxColumn2.Format = ""; ! this.dataGridTextBoxColumn2.FormatInfo = null; ! this.dataGridTextBoxColumn2.HeaderText = "Date"; ! this.dataGridTextBoxColumn2.MappingName = "quDate"; ! this.dataGridTextBoxColumn2.Width = 32; ! // ! // dataGridTextBoxColumn3 ! // ! this.dataGridTextBoxColumn3.Format = ""; ! this.dataGridTextBoxColumn3.FormatInfo = null; ! this.dataGridTextBoxColumn3.HeaderText = "Open"; ! this.dataGridTextBoxColumn3.MappingName = "quOpen"; ! this.dataGridTextBoxColumn3.Width = 36; ! // ! // dataGridTextBoxColumn4 ! // ! this.dataGridTextBoxColumn4.Format = ""; ! this.dataGridTextBoxColumn4.FormatInfo = null; ! this.dataGridTextBoxColumn4.HeaderText = "High"; ! this.dataGridTextBoxColumn4.MappingName = "quHigh"; ! this.dataGridTextBoxColumn4.Width = 32; ! // ! // dataGridTextBoxColumn5 ! // ! this.dataGridTextBoxColumn5.Format = ""; ! this.dataGridTextBoxColumn5.FormatInfo = null; ! this.dataGridTextBoxColumn5.HeaderText = "Low"; ! this.dataGridTextBoxColumn5.MappingName = "quLow"; ! this.dataGridTextBoxColumn5.Width = 29; ! // ! // dataGridTextBoxColumn6 ! // ! this.dataGridTextBoxColumn6.Format = ""; ! this.dataGridTextBoxColumn6.FormatInfo = null; ! this.dataGridTextBoxColumn6.HeaderText = "Close"; ! this.dataGridTextBoxColumn6.MappingName = "quClose"; ! this.dataGridTextBoxColumn6.Width = 37; ! // ! // dataGridTextBoxColumn7 ! // ! this.dataGridTextBoxColumn7.Format = ""; ! this.dataGridTextBoxColumn7.FormatInfo = null; ! this.dataGridTextBoxColumn7.HeaderText = "Adj. Close"; ! this.dataGridTextBoxColumn7.MappingName = "quAdjustedClose"; ! this.dataGridTextBoxColumn7.Width = 60; ! // ! // dataGridTextBoxColumn8 ! // ! this.dataGridTextBoxColumn8.Format = ""; ! this.dataGridTextBoxColumn8.FormatInfo = null; ! this.dataGridTextBoxColumn8.HeaderText = "Warning"; ! this.dataGridTextBoxColumn8.MappingName = "ValidationWarning"; ! this.dataGridTextBoxColumn8.Width = 50; ! // ! // dataGridTextBoxColumn9 ! // ! this.dataGridTextBoxColumn9.Format = ""; ! this.dataGridTextBoxColumn9.FormatInfo = null; ! this.dataGridTextBoxColumn9.HeaderText = "Ew"; ! this.dataGridTextBoxColumn9.MappingName = "Yuppy"; ! this.dataGridTextBoxColumn9.Width = 24; ! // ! // buttonCommitAndRefresh ! // ! this.buttonCommitAndRefresh.Location = new System.Drawing.Point(272, 296); ! this.buttonCommitAndRefresh.Name = "buttonCommitAndRefresh"; ! this.buttonCommitAndRefresh.Size = new System.Drawing.Size(152, 23); ! this.buttonCommitAndRefresh.TabIndex = 4; ! this.buttonCommitAndRefresh.Text = "Commit && Refresh"; ! this.buttonCommitAndRefresh.Click += new System.EventHandler(this.buttonCommitAndRefresh_Click); ! // ! // textBoxSuspiciousRatio ! // ! this.textBoxSuspiciousRatio.Location = new System.Drawing.Point(344, 16); ! this.textBoxSuspiciousRatio.Name = "textBoxSuspiciousRatio"; ! this.textBoxSuspiciousRatio.TabIndex = 5; ! this.textBoxSuspiciousRatio.Text = "5"; ! // ! // labelSuspiciousRatio ! // ! this.labelSuspiciousRatio.Location = new System.Drawing.Point(224, 16); ! this.labelSuspiciousRatio.Name = "labelSuspiciousRatio"; ! this.labelSuspiciousRatio.Size = new System.Drawing.Size(120, 16); ! this.labelSuspiciousRatio.TabIndex = 6; ! this.labelSuspiciousRatio.Text = "Suspicious ratio:"; ! this.labelSuspiciousRatio.TextAlign = System.Drawing.ContentAlignment.MiddleRight; ! // ! // buttonGoValidateCurrentSelection ! // ! this.buttonGoValidateCurrentSelection.Location = new System.Drawing.Point(552, 16); ! this.buttonGoValidateCurrentSelection.Name = "buttonGoValidateCurrentSelection"; ! this.buttonGoValidateCurrentSelection.TabIndex = 7; ! this.buttonGoValidateCurrentSelection.Text = "Go"; ! this.buttonGoValidateCurrentSelection.Click += new System.EventHandler(this.buttonGoValidateCurrentSelection_Click); ! // ! // ValidateForm ! // ! this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); ! this.ClientSize = new System.Drawing.Size(720, 341); ! this.Controls.AddRange(new System.Windows.Forms.Control[] { ! this.buttonGoValidateCurrentSelection, ! this.labelSuspiciousRatio, ! this.textBoxSuspiciousRatio, ! this.buttonCommitAndRefresh, ! this.validateDataGrid, ! this.buttonGo, ! this.labelTickerIsLike, ! this.textBoxTickerIsLike}); ! this.Name = "ValidateForm"; ! this.Text = "Validate"; ! ((System.ComponentModel.ISupportInitialize)(this.validateDataGrid)).EndInit(); ! this.ResumeLayout(false); ! } #endregion --- 83,278 ---- private void InitializeComponent() { ! this.textBoxTickerIsLike = new System.Windows.Forms.TextBox(); ! this.labelTickerIsLike = new System.Windows.Forms.Label(); ! this.buttonGo = new System.Windows.Forms.Button(); ! this.oleDbDataAdapter1 = new System.Data.OleDb.OleDbDataAdapter(); ! this.oleDbDeleteCommand1 = new System.Data.OleDb.OleDbCommand(); ! this.oleDbInsertCommand1 = new System.Data.OleDb.OleDbCommand(); ! this.oleDbSelectCommand1 = new System.Data.OleDb.OleDbCommand(); ! this.oleDbUpdateCommand1 = new System.Data.OleDb.OleDbCommand(); ! this.buttonCommitAndRefresh = new System.Windows.Forms.Button(); ! this.textBoxSuspiciousRatio = new System.Windows.Forms.TextBox(); ! this.labelSuspiciousRatio = new System.Windows.Forms.Label(); ! this.buttonGoValidateCurrentSelection = new System.Windows.Forms.Button(); ! this.SuspendLayout(); ! // ! // textBoxTickerIsLike ! // ! this.textBoxTickerIsLike.Location = new System.Drawing.Point(120, 16); ! this.textBoxTickerIsLike.Name = "textBoxTickerIsLike"; ! this.textBoxTickerIsLike.TabIndex = 0; ! this.textBoxTickerIsLike.Text = "CCE"; ! // ! // labelTickerIsLike ! // ! this.labelTickerIsLike.Location = new System.Drawing.Point(24, 16); ! this.labelTickerIsLike.Name = "labelTickerIsLike"; ! this.labelTickerIsLike.Size = new System.Drawing.Size(80, 16); ! this.labelTickerIsLike.TabIndex = 1; ! this.labelTickerIsLike.Text = "Ticker is Like:"; ! this.labelTickerIsLike.TextAlign = System.Drawing.ContentAlignment.MiddleRight; ! // ! // buttonGo ! // ! this.buttonGo.Location = new System.Drawing.Point(464, 16); ! this.buttonGo.Name = "buttonGo"; ! this.buttonGo.TabIndex = 2; ! this.buttonGo.Text = "Go"; ! this.buttonGo.Click += new System.EventHandler(this.buttonGo_Click); ! // ! // oleDbDataAdapter1 ! // ! this.oleDbDataAdapter1.DeleteCommand = this.oleDbDeleteCommand1; ! this.oleDbDataAdapter1.InsertCommand = this.oleDbInsertCommand1; ! this.oleDbDataAdapter1.SelectCommand = this.oleDbSelectCommand1; ! this.oleDbDataAdapter1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] { ! new System.Data.Common.DataTableMapping("Table", "quotes", new System.Data.Common.DataColumnMapping[] { ! new System.Data.Common.DataColumnMapping("Ticker", "Ticker"), ! new System.Data.Common.DataColumnMapping("TheDate", "TheDate"), ! new System.Data.Common.DataColumnMapping("TheOpen", "TheOpen"), ! new System.Data.Common.DataColumnMapping("High", "High"), ! new System.Data.Common.DataColumnMapping("Low", "Low"), ! new System.Data.Common.DataColumnMapping("TheClose", "TheClose"), ! new System.Data.Common.DataColumnMapping("Volume", "Volume"), ! new System.Data.Common.DataColumnMapping("AdjOpen", "AdjOpen"), ! new System.Data.Common.DataColumnMapping("AdjHigh", "AdjHigh"), ! new System.Data.Common.DataColumnMapping("AdjLow", "AdjLow"), ! new System.Data.Common.DataColumnMapping("AdjClose", "AdjClose"), ! new System.Data.Common.DataColumnMapping("AdjVolume", "AdjVolume"), ! new System.Data.Common.DataColumnMapping("ErrorDescription", "ErrorDescription")})}); ! this.oleDbDataAdapter1.UpdateCommand = this.oleDbUpdateCommand1; ! // ! // oleDbDeleteCommand1 ! // ! this.oleDbDeleteCommand1.CommandText = @"DELETE FROM quotes WHERE (quDate = ?) AND (quTicker = ?) AND (quAdjustedClose = ? OR ? IS NULL AND quAdjustedClose IS NULL) AND (quAdjustedHigh = ? OR ? IS NULL AND quAdjustedHigh IS NULL) AND (quAdjustedLow = ? OR ? IS NULL AND quAdjustedLow IS NULL) AND (quAdjustedOpen = ? OR ? IS NULL AND quAdjustedOpen IS NULL) AND (quAdjustedVolume = ? OR ? IS NULL AND quAdjustedVolume IS NULL) AND (quClose = ? OR ? IS NULL AND quClose IS NULL) AND (quHigh = ? OR ? IS NULL AND quHigh IS NULL) AND (quLow = ? OR ? IS NULL AND quLow IS NULL) AND (quOpen = ? OR ? IS NULL AND quOpen IS NULL)"; ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quDate", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "TheDate", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quTicker", System.Data.OleDb.OleDbType.VarWChar, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "Ticker", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quAdjustedClose", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjClose", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quAdjustedClose1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjClose", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quAdjustedHigh", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjHigh", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quAdjustedHigh1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjHigh", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quAdjustedLow", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjLow", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quAdjustedLow1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjLow", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quAdjustedOpen", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjOpen", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quAdjustedOpen1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjOpen", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quAdjustedVolume", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjVolume", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quAdjustedVolume1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjVolume", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quClose", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "TheClose", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quClose1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "TheClose", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quHigh", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "High", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quHigh1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "High", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quLow", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "Low", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quLow1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "Low", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quOpen", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "TheOpen", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quOpen1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "TheOpen", System.Data.DataRowVersion.Original, null)); ! // ! // oleDbInsertCommand1 ! // ! this.oleDbInsertCommand1.CommandText = "INSERT INTO quotes(quTicker, quDate, quOpen, quHigh, quLow, quClose, quVolume, qu" + ! "AdjustedOpen, quAdjustedHigh, quAdjustedLow, quAdjustedClose, quAdjustedVolume) " + ! "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; ! this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quTicker", System.Data.OleDb.OleDbType.VarWChar, 8, "Ticker")); ! this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quDate", System.Data.OleDb.OleDbType.DBDate, 0, "TheDate")); ! this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quOpen", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "TheOpen", System.Data.DataRowVersion.Current, null)); ! this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quHigh", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "High", System.Data.DataRowVersion.Current, null)); ! this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quLow", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "Low", System.Data.DataRowVersion.Current, null)); ! this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quClose", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "TheClose", System.Data.DataRowVersion.Current, null)); ! this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quVolume", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(10)), ((System.Byte)(0)), "Volume", System.Data.DataRowVersion.Current, null)); ! this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quAdjustedOpen", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjOpen", System.Data.DataRowVersion.Current, null)); ! this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quAdjustedHigh", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjHigh", System.Data.DataRowVersion.Current, null)); ! this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quAdjustedLow", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjLow", System.Data.DataRowVersion.Current, null)); ! this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quAdjustedClose", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjClose", System.Data.DataRowVersion.Current, null)); ! this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quAdjustedVolume", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjVolume", System.Data.DataRowVersion.Current, null)); ! // ! // oleDbSelectCommand1 ! // ! this.oleDbSelectCommand1.CommandText = @"SELECT quTicker AS Ticker, quDate AS TheDate, quOpen AS TheOpen, quHigh AS High, quLow AS Low, quClose AS TheClose, quVolume AS Volume, quAdjustedOpen AS AdjOpen, quAdjustedHigh AS AdjHigh, quAdjustedLow AS AdjLow, quAdjustedClose AS AdjClose, quAdjustedVolume AS AdjVolume, '' AS ErrorDescription FROM quotes ORDER BY quTicker, quDate"; ! // ! // oleDbUpdateCommand1 ! // ! this.oleDbUpdateCommand1.CommandText = @"UPDATE quotes SET quTicker = ?, quDate = ?, quOpen = ?, quHigh = ?, quLow = ?, quClose = ?, quVolume = ?, quAdjustedOpen = ?, quAdjustedHigh = ?, quAdjustedLow = ?, quAdjustedClose = ?, quAdjustedVolume = ? WHERE (quDate = ?) AND (quTicker = ?) AND (quAdjustedClose = ? OR ? IS NULL AND quAdjustedClose IS NULL) AND (quAdjustedHigh = ? OR ? IS NULL AND quAdjustedHigh IS NULL) AND (quAdjustedLow = ? OR ? IS NULL AND quAdjustedLow IS NULL) AND (quAdjustedOpen = ? OR ? IS NULL AND quAdjustedOpen IS NULL) AND (quAdjustedVolume = ? OR ? IS NULL AND quAdjustedVolume IS NULL) AND (quClose = ? OR ? IS NULL AND quClose IS NULL) AND (quHigh = ? OR ? IS NULL AND quHigh IS NULL) AND (quLow = ? OR ? IS NULL AND quLow IS NULL) AND (quOpen = ? OR ? IS NULL AND quOpen IS NULL)"; ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quTicker", System.Data.OleDb.OleDbType.VarWChar, 8, "Ticker")); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quDate", System.Data.OleDb.OleDbType.DBDate, 0, "TheDate")); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quOpen", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "TheOpen", System.Data.DataRowVersion.Current, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quHigh", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "High", System.Data.DataRowVersion.Current, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quLow", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "Low", System.Data.DataRowVersion.Current, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quClose", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "TheClose", System.Data.DataRowVersion.Current, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quVolume", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(10)), ((System.Byte)(0)), "Volume", System.Data.DataRowVersion.Current, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quAdjustedOpen", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjOpen", System.Data.DataRowVersion.Current, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quAdjustedHigh", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjHigh", System.Data.DataRowVersion.Current, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quAdjustedLow", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjLow", System.Data.DataRowVersion.Current, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quAdjustedClose", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjClose", System.Data.DataRowVersion.Current, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quAdjustedVolume", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "AdjVolume", System.Data.DataRowVersion.Current, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbPa... [truncated message content] |
|
From: <gla...@pr...> - 2004-01-27 14:01:11
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/QuotesEditor/OHLC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17172/OHLC Log Message: Directory /cvsroot/quantproject/QuantDownloader/Downloader/QuotesEditor/OHLC added to the repository |
|
From: <gla...@pr...> - 2004-01-27 13:56:57
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/Validate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12466/Downloader/Validate Modified Files: ValidateDataGrid.cs Log Message: Now it derives from QuotesDataGrid, and some code has been moved to that base class Index: ValidateDataGrid.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/Validate/ValidateDataGrid.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ValidateDataGrid.cs 22 Jan 2004 23:47:00 -0000 1.3 --- ValidateDataGrid.cs 25 Jan 2004 15:05:19 -0000 1.4 *************** *** 8,72 **** /// Summary description for ValidateDataGrid. /// </summary> ! public class ValidateDataGrid : DataGrid ! { private ValidateDataTable validateDataTable; ! private DataGridTableStyle dataGridTableStyle; ! ! public ValidateDataGrid() ! { ! } ! #region "Validate" ! private void validate_setTableStyle_setColumnStyle( string mappingName , string headerText ) ! { ! this.dataGridTableStyle.ColumnHeadersVisible = true; ! DataGridTextBoxColumn dataGridColumnStyle = new DataGridTextBoxColumn(); ! dataGridColumnStyle.MappingName = mappingName; ! dataGridColumnStyle.HeaderText = headerText; ! this.dataGridTableStyle.GridColumnStyles.Add( dataGridColumnStyle ); ! } ! private void validate_setTableStyle() { - // DataGridTableStyle dataGridTableStyle = new DataGridTableStyle(); - // dataGridTableStyle.ColumnHeadersVisible = true; - // dataGridTableStyle.MappingName = "quotes"; - // DataGridTextBoxColumn dataGridColumnStyle = new DataGridTextBoxColumn(); - // dataGridColumnStyle.MappingName = "quTicker"; - // dataGridColumnStyle.HeaderText = "Ticker"; - // dataGridTableStyle.GridColumnStyles.Add( dataGridColumnStyle ); - // this.TableStyles.Add( dataGridTableStyle ); - this.dataGridTableStyle = new DataGridTableStyle(); - this.dataGridTableStyle.MappingName = "quotes"; - validate_setTableStyle_setColumnStyle( "quTicker" , "Ticker" ); - validate_setTableStyle_setColumnStyle( "quDate" , "Date" ); - validate_setTableStyle_setColumnStyle( "quOpen" , "Open" ); - validate_setTableStyle_setColumnStyle( "quHigh" , "High" ); - validate_setTableStyle_setColumnStyle( "quLow" , "Low" ); - validate_setTableStyle_setColumnStyle( "quClose" , "Close" ); - validate_setTableStyle_setColumnStyle( "quAdjustedClose" , "Adj. Close" ); - this.TableStyles.Add( dataGridTableStyle ); } public ValidateDataTable Validate( string tickerIsLike , string suspiciousRatio ) { this.validateDataTable = new ValidateDataTable(); this.DataSource = validateDataTable; - if ( this.TableStyles.Count == 0 ) - // styles have not been defined yet - validate_setTableStyle(); validateDataTable.AddRows( tickerIsLike , Convert.ToDouble( suspiciousRatio ) ); return this.validateDataTable; } ! public ValidateDataTable Validate(DataTable dataTable, string suspiciousRatio ) ! { ! this.validateDataTable = new ValidateDataTable(dataTable); ! this.DataSource = validateDataTable; ! if ( this.TableStyles.Count == 0 ) ! // styles have not been defined yet ! validate_setTableStyle(); ! validateDataTable.AddRows(Convert.ToDouble( suspiciousRatio ) ); ! return this.validateDataTable; ! } #endregion ! } } --- 8,38 ---- /// Summary description for ValidateDataGrid. /// </summary> ! public class ValidateDataGrid : QuotesDataGrid ! { private ValidateDataTable validateDataTable; ! public ValidateDataGrid() { } + #region "Validate" public ValidateDataTable Validate( string tickerIsLike , string suspiciousRatio ) { this.validateDataTable = new ValidateDataTable(); this.DataSource = validateDataTable; validateDataTable.AddRows( tickerIsLike , Convert.ToDouble( suspiciousRatio ) ); return this.validateDataTable; } ! public ValidateDataTable Validate(DataTable dataTable, string suspiciousRatio ) ! { ! this.validateDataTable = new ValidateDataTable(dataTable); ! this.DataSource = validateDataTable; ! // if ( this.TableStyles.Count == 0 ) ! // // styles have not been defined yet ! // validate_setTableStyle(); ! validateDataTable.AddRows(Convert.ToDouble( suspiciousRatio ) ); ! return this.validateDataTable; ! } #endregion ! } } |
|
From: <gla...@pr...> - 2004-01-27 13:56:42
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/QuotesEditor/CloseToClose In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9689/Downloader/QuotesEditor/CloseToClose Added Files: CloseToCloseDataGrid.cs Log Message: Contains the quotes with suspicious close to close ratio --- NEW FILE: CloseToCloseDataGrid.cs --- /* QuantProject - Quantitative Finance Library CloseToCloseDataGrid.cs Copyright (C) 2003 Glauco Siliprandi This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ using System; using System.Data; using System.Windows.Forms; using QuantProject.Applications.Downloader.Validate; namespace QuantProject.Applications.Downloader { /// <summary> /// Contains the quotes with suspicious close to close ratio /// </summary> public class CloseToCloseDataGrid : QuotesDataGrid { public CloseToCloseDataGrid() { } public void DataBind( ValidateDataTable validateDataTable ) { DataView dataView = new DataView( validateDataTable ); dataView.RowFilter = "ValidationWarning=" + Convert.ToInt16( ValidationWarning.SuspiciousCloseToCloseRatio ); for (int i=0; i<TableStyles[ "quotes" ].GridColumnStyles.Count; i++) { DataGridColumnStyle dataGridColumnStyle = this.TableStyles[ "quotes" ].GridColumnStyles[i]; if ( ( dataGridColumnStyle.HeaderText != "Date" ) && ( dataGridColumnStyle.HeaderText != "Close" ) ) this.TableStyles[ "quotes" ].GridColumnStyles.Remove( dataGridColumnStyle ); } this.DataSource = dataView; } } } |
|
From: <mi...@pr...> - 2004-01-27 13:46:13
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/Validate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29868/Downloader/Validate Modified Files: ValidateForm.cs Log Message: Changed the default cursor to hourglass when validating code is working. Index: ValidateForm.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/Validate/ValidateForm.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ValidateForm.cs 22 Jan 2004 23:43:19 -0000 1.4 --- ValidateForm.cs 25 Jan 2004 19:08:09 -0000 1.5 *************** *** 309,315 **** private void buttonGoValidateCurrentSelection_Click(object sender, System.EventArgs e) { this.validateDataTable = this.validateDataGrid.Validate(this.tableOfTickersToBeValidated, this.textBoxSuspiciousRatio.Text); ! } #endregion --- 309,323 ---- private void buttonGoValidateCurrentSelection_Click(object sender, System.EventArgs e) { + try + { + Cursor.Current = Cursors.WaitCursor; this.validateDataTable = this.validateDataGrid.Validate(this.tableOfTickersToBeValidated, this.textBoxSuspiciousRatio.Text); ! } ! finally ! { ! Cursor.Current = Cursors.Default; ! } ! } #endregion |
|
From: <gla...@pr...> - 2004-01-27 11:26:07
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/QuotesEditor/OHLC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22006/Downloader/QuotesEditor/OHLC Modified Files: OHLCdataGrid.cs Log Message: Added copyright notice and fixed comment Index: OHLCdataGrid.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/QuotesEditor/OHLC/OHLCdataGrid.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** OHLCdataGrid.cs 25 Jan 2004 14:47:08 -0000 1.1 --- OHLCdataGrid.cs 25 Jan 2004 15:46:40 -0000 1.2 *************** *** 1,2 **** --- 1,24 ---- + /* + QuantProject - Quantitative Finance Library + + OHLCdataGrid.cs + Copyright (C) 2003 + Glauco Siliprandi + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + using System; using System.Data; *************** *** 7,11 **** { /// <summary> ! /// It contains the quotes with Open High Low Close inconsistency /// </summary> public class OHLCdataGrid : QuotesDataGrid --- 29,33 ---- { /// <summary> ! /// Contains the quotes with Open High Low Close inconsistency /// </summary> public class OHLCdataGrid : QuotesDataGrid |
|
From: <gla...@pr...> - 2004-01-27 05:21:56
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/QuotesEditor/CloseToClose In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8869/Downloader/QuotesEditor/CloseToClose Added Files: CloseToCloseChart.cs Log Message: Displays the charts for the quotes within the interval around the quotes with suspicious Close To Close ratio --- NEW FILE: CloseToCloseChart.cs --- /* QuantProject - Quantitative Finance Library CloseToCloseChart.cs Copyright (C) 2003 Glauco Siliprandi This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ using System; using System.Drawing; using scpl; using scpl.Windows; using QuantProject.ADT.Histories; using QuantProject.Data; using QuantProject.Presentation.Charting; namespace QuantProject.Applications.Downloader { /// <summary> /// Displays the charts for the quotes within the interval around the quotes /// with suspicious Close To Close ratio /// </summary> public class CloseToCloseChart : Chart { private string ticker; private DateTime suspiciousDateTime; private History history; private DateTime startDateTime; private DateTime endDateTime; public string Ticker { get { return this.ticker; } set { this.ticker = value; } } public DateTime SuspiciousDateTime { get { return this.suspiciousDateTime; } set { this.suspiciousDateTime = value; } } public CloseToCloseChart() { InitializeComponent(); } private void InitializeComponent() { this.Name = "CloseToCloseChart"; } #region "OnPaint" protected void onPaint_setTimeInterval() { this.startDateTime = (DateTime) this.history.GetKey( Math.Max( 0 , this.history.IndexOfKeyOrPrevious( this.suspiciousDateTime ) - 20 ) ); this.endDateTime = (DateTime) this.history.GetKey( Math.Min( this.history.Count - 1 , this.history.IndexOfKeyOrPrevious( this.suspiciousDateTime ) ) + 20 ); } protected override void OnPaint(System.Windows.Forms.PaintEventArgs e) { Console.WriteLine( "CloseToCloseChart.OnPaint()" ); this.Clear(); this.history = DataProvider.GetCloseHistory( this.ticker ); this.onPaint_setTimeInterval(); this.Add( this.history , Color.Red , this.startDateTime , this.endDateTime ); base.OnPaint( e ); } #endregion } } |
|
From: <gla...@pr...> - 2004-01-27 03:55:09
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/Validate/Validators In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21582/Downloader/Validate/Validators Modified Files: OHLCvalidator.cs Log Message: Added the ValidationWarning type specification to the SuspsiciousDataRowEventArgs instance Index: OHLCvalidator.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/Validate/Validators/OHLCvalidator.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** OHLCvalidator.cs 16 Dec 2003 16:24:03 -0000 1.1 --- OHLCvalidator.cs 25 Jan 2004 15:45:01 -0000 1.2 *************** *** 36,41 **** ( Convert.ToDouble( quotesRow[ "quHigh" ] ) ) ) ) ! ) ! SuspiciousDataRow( this , new SuspiciousDataRowEventArgs( quotesRow ) ); } /// <summary> --- 36,42 ---- ( Convert.ToDouble( quotesRow[ "quHigh" ] ) ) ) ) ! ) ! SuspiciousDataRow( this , new SuspiciousDataRowEventArgs( ! quotesRow , ValidationWarning.OpenHighLowCloseLogicalInconsistency ) ); } /// <summary> |
|
From: <gla...@pr...> - 2004-01-26 23:02:39
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/Validate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17813/Downloader/Validate Modified Files: ValidateDataTable.cs Log Message: - Fixed CVS conflict - Added the CloseToCloseHasBeenVisuallyValidated boolean column Index: ValidateDataTable.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/Validate/ValidateDataTable.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ValidateDataTable.cs 26 Jan 2004 15:57:15 -0000 1.8 --- ValidateDataTable.cs 26 Jan 2004 23:01:31 -0000 1.9 *************** *** 20,24 **** --- 20,45 ---- public ValidateDataTable() { + //<<<<<<< ValidateDataTable.cs + // this.selectStatement = + // "select * from quotes where 1=2"; + // this.oleDbDataAdapter = + // new OleDbDataAdapter( selectStatement , ConnectionProvider.OleDbConnection ); + // this.oleDbCommandBuilder = new OleDbCommandBuilder( oleDbDataAdapter ); + // this.oleDbDataAdapter.UpdateCommand = this.oleDbCommandBuilder.GetUpdateCommand(); + // this.oleDbDataAdapter.Fill( this ); + // this.Columns.Add( new DataColumn( "CloseToCloseHasBeenVisuallyValidated" , + // System.Type.GetType( "System.Boolean" ) ) ); + // + // this.TableName = "quotes"; + ////<<<<<<< ValidateDataTable.cs + // this.Columns.Add( "ValidationWarning" , + // ValidationWarning.OpenHighLowCloseLogicalInconsistency.GetType() ); + + //======= + // + //>>>>>>> 1.6 + //======= initializeValidateDataTable(); + //>>>>>>> 1.8 } *************** *** 35,39 **** private void initializeValidateDataTable() { ! this.selectStatement = "select * from quotes where 1=2"; this.oleDbDataAdapter = --- 56,60 ---- private void initializeValidateDataTable() { ! this.selectStatement = "select * from quotes where 1=2"; this.oleDbDataAdapter = *************** *** 42,46 **** this.oleDbDataAdapter.UpdateCommand = this.oleDbCommandBuilder.GetUpdateCommand(); this.oleDbDataAdapter.Fill( this ); ! this.TableName = "quotes"; //<<<<<<< ValidateDataTable.cs this.Columns.Add( "ValidationWarning" , --- 63,69 ---- this.oleDbDataAdapter.UpdateCommand = this.oleDbCommandBuilder.GetUpdateCommand(); this.oleDbDataAdapter.Fill( this ); ! this.Columns.Add( new DataColumn( "CloseToCloseHasBeenVisuallyValidated" , ! System.Type.GetType( "System.Boolean" ) ) ); ! this.TableName = "quotes"; //<<<<<<< ValidateDataTable.cs this.Columns.Add( "ValidationWarning" , |
|
From: <mi...@pr...> - 2004-01-26 15:58:10
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/Validate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32282/Downloader/Validate Modified Files: ValidateDataTable.cs ValidateForm.cs Log Message: Some bugs have been fixed and the code now is more readable Index: ValidateDataTable.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/Validate/ValidateDataTable.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ValidateDataTable.cs 25 Jan 2004 15:03:05 -0000 1.7 --- ValidateDataTable.cs 26 Jan 2004 15:57:15 -0000 1.8 *************** *** 20,53 **** public ValidateDataTable() { ! this.selectStatement = ! "select * from quotes where 1=2"; ! this.oleDbDataAdapter = ! new OleDbDataAdapter( selectStatement , ConnectionProvider.OleDbConnection ); ! this.oleDbCommandBuilder = new OleDbCommandBuilder( oleDbDataAdapter ); ! this.oleDbDataAdapter.UpdateCommand = this.oleDbCommandBuilder.GetUpdateCommand(); ! this.oleDbDataAdapter.Fill( this ); ! this.TableName = "quotes"; ! //<<<<<<< ValidateDataTable.cs ! this.Columns.Add( "ValidationWarning" , ! ValidationWarning.OpenHighLowCloseLogicalInconsistency.GetType() ); ! ! //======= ! // ! //>>>>>>> 1.6 } public ValidateDataTable(DataTable tableOfTickers) { this.tableOfTickersToBeValidated = tableOfTickers; - - this.selectStatement = - "select * from quotes where 1=2"; - this.oleDbDataAdapter = - new OleDbDataAdapter( selectStatement , ConnectionProvider.OleDbConnection ); - this.oleDbCommandBuilder = new OleDbCommandBuilder( oleDbDataAdapter ); - this.oleDbDataAdapter.UpdateCommand = this.oleDbCommandBuilder.GetUpdateCommand(); - this.oleDbDataAdapter.Fill( this ); - this.TableName = "quotes"; } /// <summary> /// Adds quotesRow to the ValidateDataTable --- 20,56 ---- public ValidateDataTable() { ! initializeValidateDataTable(); } public ValidateDataTable(DataTable tableOfTickers) { + initializeValidateDataTable(); + // specific code used by this constructor + // the table member is used when the validation procedure + // is called by the tickerViewer object this.tableOfTickersToBeValidated = tableOfTickers; } + + #region initializeValidateDataTable + private void initializeValidateDataTable() + { + this.selectStatement = + "select * from quotes where 1=2"; + this.oleDbDataAdapter = + new OleDbDataAdapter( selectStatement , ConnectionProvider.OleDbConnection ); + this.oleDbCommandBuilder = new OleDbCommandBuilder( oleDbDataAdapter ); + this.oleDbDataAdapter.UpdateCommand = this.oleDbCommandBuilder.GetUpdateCommand(); + this.oleDbDataAdapter.Fill( this ); + this.TableName = "quotes"; + //<<<<<<< ValidateDataTable.cs + this.Columns.Add( "ValidationWarning" , + ValidationWarning.OpenHighLowCloseLogicalInconsistency.GetType() ); + + //======= + // + //>>>>>>> 1.6 + } + #endregion + /// <summary> /// Adds quotesRow to the ValidateDataTable Index: ValidateForm.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/Validate/ValidateForm.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ValidateForm.cs 25 Jan 2004 19:08:09 -0000 1.5 --- ValidateForm.cs 26 Jan 2004 15:57:15 -0000 1.6 *************** *** 28,31 **** --- 28,51 ---- private QuantProject.Applications.Downloader.Validate.ValidateDataGrid validateDataGrid; private System.Windows.Forms.Button buttonGoValidateCurrentSelection; + private System.Windows.Forms.DataGridTableStyle dataGridTableStyle1; + private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn1; + private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn2; + private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn3; + private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn4; + private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn5; + private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn6; + private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn7; + private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn8; + private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn9; + private System.Windows.Forms.DataGridTableStyle dataGridTableStyle2; + private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn10; + private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn11; + private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn12; + private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn13; + private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn14; + private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn15; + private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn16; + private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn17; + private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn18; /// <summary> /// Required designer variable. *************** *** 86,90 **** --- 106,130 ---- this.oleDbSelectCommand1 = new System.Data.OleDb.OleDbCommand(); this.oleDbUpdateCommand1 = new System.Data.OleDb.OleDbCommand(); + this.dataGridTableStyle1 = new System.Windows.Forms.DataGridTableStyle(); + this.dataGridTableStyle2 = new System.Windows.Forms.DataGridTableStyle(); + this.dataGridTextBoxColumn10 = new System.Windows.Forms.DataGridTextBoxColumn(); + this.dataGridTextBoxColumn11 = new System.Windows.Forms.DataGridTextBoxColumn(); + this.dataGridTextBoxColumn12 = new System.Windows.Forms.DataGridTextBoxColumn(); + this.dataGridTextBoxColumn13 = new System.Windows.Forms.DataGridTextBoxColumn(); + this.dataGridTextBoxColumn14 = new System.Windows.Forms.DataGridTextBoxColumn(); + this.dataGridTextBoxColumn15 = new System.Windows.Forms.DataGridTextBoxColumn(); + this.dataGridTextBoxColumn16 = new System.Windows.Forms.DataGridTextBoxColumn(); + this.dataGridTextBoxColumn17 = new System.Windows.Forms.DataGridTextBoxColumn(); + this.dataGridTextBoxColumn18 = new System.Windows.Forms.DataGridTextBoxColumn(); this.validateDataGrid = new QuantProject.Applications.Downloader.Validate.ValidateDataGrid(); + this.dataGridTextBoxColumn1 = new System.Windows.Forms.DataGridTextBoxColumn(); + this.dataGridTextBoxColumn2 = new System.Windows.Forms.DataGridTextBoxColumn(); + this.dataGridTextBoxColumn3 = new System.Windows.Forms.DataGridTextBoxColumn(); + this.dataGridTextBoxColumn4 = new System.Windows.Forms.DataGridTextBoxColumn(); + this.dataGridTextBoxColumn5 = new System.Windows.Forms.DataGridTextBoxColumn(); + this.dataGridTextBoxColumn6 = new System.Windows.Forms.DataGridTextBoxColumn(); + this.dataGridTextBoxColumn7 = new System.Windows.Forms.DataGridTextBoxColumn(); + this.dataGridTextBoxColumn8 = new System.Windows.Forms.DataGridTextBoxColumn(); + this.dataGridTextBoxColumn9 = new System.Windows.Forms.DataGridTextBoxColumn(); this.buttonCommitAndRefresh = new System.Windows.Forms.Button(); this.textBoxSuspiciousRatio = new System.Windows.Forms.TextBox(); *************** *** 222,225 **** --- 262,369 ---- this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quOpen1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "TheOpen", System.Data.DataRowVersion.Original, null)); // + // dataGridTableStyle1 + // + this.dataGridTableStyle1.DataGrid = this.validateDataGrid; + this.dataGridTableStyle1.GridColumnStyles.AddRange(new System.Windows.Forms.DataGridColumnStyle[] { + this.dataGridTextBoxColumn1, + this.dataGridTextBoxColumn2, + this.dataGridTextBoxColumn3, + this.dataGridTextBoxColumn4, + this.dataGridTextBoxColumn5, + this.dataGridTextBoxColumn6, + this.dataGridTextBoxColumn7, + this.dataGridTextBoxColumn8, + this.dataGridTextBoxColumn9}); + this.dataGridTableStyle1.HeaderForeColor = System.Drawing.SystemColors.ControlText; + this.dataGridTableStyle1.MappingName = ""; + // + // dataGridTableStyle2 + // + this.dataGridTableStyle2.DataGrid = this.validateDataGrid; + this.dataGridTableStyle2.GridColumnStyles.AddRange(new System.Windows.Forms.DataGridColumnStyle[] { + this.dataGridTextBoxColumn10, + this.dataGridTextBoxColumn11, + this.dataGridTextBoxColumn12, + this.dataGridTextBoxColumn13, + this.dataGridTextBoxColumn14, + this.dataGridTextBoxColumn15, + this.dataGridTextBoxColumn16, + this.dataGridTextBoxColumn17, + this.dataGridTextBoxColumn18}); + this.dataGridTableStyle2.HeaderForeColor = System.Drawing.SystemColors.ControlText; + this.dataGridTableStyle2.MappingName = "quotes"; + // + // dataGridTextBoxColumn10 + // + this.dataGridTextBoxColumn10.Format = ""; + this.dataGridTextBoxColumn10.FormatInfo = null; + this.dataGridTextBoxColumn10.HeaderText = "Ticker"; + this.dataGridTextBoxColumn10.MappingName = "quTicker"; + this.dataGridTextBoxColumn10.Width = 39; + // + // dataGridTextBoxColumn11 + // + this.dataGridTextBoxColumn11.Format = ""; + this.dataGridTextBoxColumn11.FormatInfo = null; + this.dataGridTextBoxColumn11.HeaderText = "Date"; + this.dataGridTextBoxColumn11.MappingName = "quDate"; + this.dataGridTextBoxColumn11.Width = 32; + // + // dataGridTextBoxColumn12 + // + this.dataGridTextBoxColumn12.Format = ""; + this.dataGridTextBoxColumn12.FormatInfo = null; + this.dataGridTextBoxColumn12.HeaderText = "Open"; + this.dataGridTextBoxColumn12.MappingName = "quOpen"; + this.dataGridTextBoxColumn12.Width = 36; + // + // dataGridTextBoxColumn13 + // + this.dataGridTextBoxColumn13.Format = ""; + this.dataGridTextBoxColumn13.FormatInfo = null; + this.dataGridTextBoxColumn13.HeaderText = "High"; + this.dataGridTextBoxColumn13.MappingName = "quHigh"; + this.dataGridTextBoxColumn13.Width = 32; + // + // dataGridTextBoxColumn14 + // + this.dataGridTextBoxColumn14.Format = ""; + this.dataGridTextBoxColumn14.FormatInfo = null; + this.dataGridTextBoxColumn14.HeaderText = "Low"; + this.dataGridTextBoxColumn14.MappingName = "quLow"; + this.dataGridTextBoxColumn14.Width = 29; + // + // dataGridTextBoxColumn15 + // + this.dataGridTextBoxColumn15.Format = ""; + this.dataGridTextBoxColumn15.FormatInfo = null; + this.dataGridTextBoxColumn15.HeaderText = "Close"; + this.dataGridTextBoxColumn15.MappingName = "quClose"; + this.dataGridTextBoxColumn15.Width = 37; + // + // dataGridTextBoxColumn16 + // + this.dataGridTextBoxColumn16.Format = ""; + this.dataGridTextBoxColumn16.FormatInfo = null; + this.dataGridTextBoxColumn16.HeaderText = "Adj. Close"; + this.dataGridTextBoxColumn16.MappingName = "quAdjustedClose"; + this.dataGridTextBoxColumn16.Width = 60; + // + // dataGridTextBoxColumn17 + // + this.dataGridTextBoxColumn17.Format = ""; + this.dataGridTextBoxColumn17.FormatInfo = null; + this.dataGridTextBoxColumn17.HeaderText = "Warning"; + this.dataGridTextBoxColumn17.MappingName = "ValidationWarning"; + this.dataGridTextBoxColumn17.Width = 50; + // + // dataGridTextBoxColumn18 + // + this.dataGridTextBoxColumn18.Format = ""; + this.dataGridTextBoxColumn18.FormatInfo = null; + this.dataGridTextBoxColumn18.HeaderText = "Ew"; + this.dataGridTextBoxColumn18.MappingName = "Yuppy"; + this.dataGridTextBoxColumn18.Width = 24; + // // validateDataGrid // *************** *** 231,234 **** --- 375,453 ---- this.validateDataGrid.Size = new System.Drawing.Size(696, 224); this.validateDataGrid.TabIndex = 3; + this.validateDataGrid.TableStyles.AddRange(new System.Windows.Forms.DataGridTableStyle[] { + this.dataGridTableStyle2, + this.dataGridTableStyle1}); + // + // dataGridTextBoxColumn1 + // + this.dataGridTextBoxColumn1.Format = ""; + this.dataGridTextBoxColumn1.FormatInfo = null; + this.dataGridTextBoxColumn1.HeaderText = "Ticker"; + this.dataGridTextBoxColumn1.MappingName = "quTicker"; + this.dataGridTextBoxColumn1.Width = 39; + // + // dataGridTextBoxColumn2 + // + this.dataGridTextBoxColumn2.Format = ""; + this.dataGridTextBoxColumn2.FormatInfo = null; + this.dataGridTextBoxColumn2.HeaderText = "Date"; + this.dataGridTextBoxColumn2.MappingName = "quDate"; + this.dataGridTextBoxColumn2.Width = 32; + // + // dataGridTextBoxColumn3 + // + this.dataGridTextBoxColumn3.Format = ""; + this.dataGridTextBoxColumn3.FormatInfo = null; + this.dataGridTextBoxColumn3.HeaderText = "Open"; + this.dataGridTextBoxColumn3.MappingName = "quOpen"; + this.dataGridTextBoxColumn3.Width = 36; + // + // dataGridTextBoxColumn4 + // + this.dataGridTextBoxColumn4.Format = ""; + this.dataGridTextBoxColumn4.FormatInfo = null; + this.dataGridTextBoxColumn4.HeaderText = "High"; + this.dataGridTextBoxColumn4.MappingName = "quHigh"; + this.dataGridTextBoxColumn4.Width = 32; + // + // dataGridTextBoxColumn5 + // + this.dataGridTextBoxColumn5.Format = ""; + this.dataGridTextBoxColumn5.FormatInfo = null; + this.dataGridTextBoxColumn5.HeaderText = "Low"; + this.dataGridTextBoxColumn5.MappingName = "quLow"; + this.dataGridTextBoxColumn5.Width = 29; + // + // dataGridTextBoxColumn6 + // + this.dataGridTextBoxColumn6.Format = ""; + this.dataGridTextBoxColumn6.FormatInfo = null; + this.dataGridTextBoxColumn6.HeaderText = "Close"; + this.dataGridTextBoxColumn6.MappingName = "quClose"; + this.dataGridTextBoxColumn6.Width = 37; + // + // dataGridTextBoxColumn7 + // + this.dataGridTextBoxColumn7.Format = ""; + this.dataGridTextBoxColumn7.FormatInfo = null; + this.dataGridTextBoxColumn7.HeaderText = "Adj. Close"; + this.dataGridTextBoxColumn7.MappingName = "quAdjustedClose"; + this.dataGridTextBoxColumn7.Width = 60; + // + // dataGridTextBoxColumn8 + // + this.dataGridTextBoxColumn8.Format = ""; + this.dataGridTextBoxColumn8.FormatInfo = null; + this.dataGridTextBoxColumn8.HeaderText = "Warning"; + this.dataGridTextBoxColumn8.MappingName = "ValidationWarning"; + this.dataGridTextBoxColumn8.Width = 50; + // + // dataGridTextBoxColumn9 + // + this.dataGridTextBoxColumn9.Format = ""; + this.dataGridTextBoxColumn9.FormatInfo = null; + this.dataGridTextBoxColumn9.HeaderText = "Ew"; + this.dataGridTextBoxColumn9.MappingName = "Yuppy"; + this.dataGridTextBoxColumn9.Width = 24; // // buttonCommitAndRefresh |
|
From: <mi...@pr...> - 2004-01-26 15:58:09
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32282/Downloader Modified Files: DataBaseImporter.cs TickerViewer.cs WebDownloader.cs Log Message: Some bugs have been fixed and the code now is more readable Index: DataBaseImporter.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/DataBaseImporter.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DataBaseImporter.cs 30 Nov 2003 22:36:47 -0000 1.3 --- DataBaseImporter.cs 26 Jan 2004 15:57:15 -0000 1.4 *************** *** 60,65 **** myRow[ "quVolume" ]=Double.Parse( LineIn[5] ); myRow[ "quAdjustedClose" ]=Double.Parse( LineIn[6] ); ! myRow[ "quAdjustedOpen" ]=Convert.ToDouble(myRow[ "quOpen" ])* ! (Convert.ToDouble(myRow[ "quAdjustedClose" ])/Convert.ToDouble(myRow[ "quOpen" ])); // myRow["date"]=DateTime.Parse(LineIn[0]); --- 60,65 ---- myRow[ "quVolume" ]=Double.Parse( LineIn[5] ); myRow[ "quAdjustedClose" ]=Double.Parse( LineIn[6] ); ! //myRow[ "quAdjustedOpen" ]=Convert.ToDouble(myRow[ "quOpen" ])* ! // (Convert.ToDouble(myRow[ "quAdjustedClose" ])/Convert.ToDouble(myRow[ "quOpen" ])); // myRow["date"]=DateTime.Parse(LineIn[0]); Index: TickerViewer.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/TickerViewer.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TickerViewer.cs 25 Jan 2004 19:10:54 -0000 1.2 --- TickerViewer.cs 26 Jan 2004 15:57:15 -0000 1.3 *************** *** 54,58 **** InitializeComponent(); this.oleDbConnection = ConnectionProvider.OleDbConnection; - this.oleDbConnection.Open(); this.tableTickers = new DataTable("tickers"); this.dataGrid1.DataSource = this.tableTickers; --- 54,57 ---- *************** *** 200,203 **** --- 199,204 ---- try { + Cursor.Current = Cursors.WaitCursor; + this.oleDbConnection.Open(); string criteria = "SELECT * FROM tickers WHERE tiTicker LIKE '" + this.textBoxStringToFind.Text + "'"; *************** *** 225,229 **** finally { ! ; } --- 226,231 ---- finally { ! Cursor.Current = Cursors.Default; ! this.oleDbConnection.Close(); } Index: WebDownloader.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/WebDownloader.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** WebDownloader.cs 25 Jan 2004 19:12:57 -0000 1.7 --- WebDownloader.cs 26 Jan 2004 15:57:15 -0000 1.8 *************** *** 42,53 **** // InitializeComponent(); this.Text = "Download quotes of all tickers in the database"; this.buttonDownloadQuotesOfSelectedTickers.Visible = false; // ! // TODO: Add any constructor code after InitializeComponent call ! // ! //this.oleDbDataAdapter1.Fill(this.dataSet11); ! this.OleDbConnection1.Open(); ! //this.OleDbConnection1.Close(); } --- 42,50 ---- // InitializeComponent(); + // this.Text = "Download quotes of all tickers in the database"; this.buttonDownloadQuotesOfSelectedTickers.Visible = false; // ! } *************** *** 58,70 **** // InitializeComponent(); this.Text = "Download quotes of selected tickers"; this.button1.Visible = false; this.tableOfSelectedTickers = tableOfSelectedTickers; // ! // TODO: Add any constructor code after InitializeComponent call ! // ! //this.oleDbDataAdapter1.Fill(this.dataSet11); ! this.OleDbConnection1.Open(); ! //this.OleDbConnection1.Close(); } --- 55,65 ---- // InitializeComponent(); + + // this.Text = "Download quotes of selected tickers"; this.button1.Visible = false; this.tableOfSelectedTickers = tableOfSelectedTickers; // ! } *************** *** 107,113 **** this.button1.Location = new System.Drawing.Point(48, 24); this.button1.Name = "button1"; ! this.button1.Size = new System.Drawing.Size(112, 24); this.button1.TabIndex = 0; ! this.button1.Text = "button1"; this.button1.Click += new System.EventHandler(this.button1_Click); // --- 102,108 ---- this.button1.Location = new System.Drawing.Point(48, 24); this.button1.Name = "button1"; ! this.button1.Size = new System.Drawing.Size(112, 32); this.button1.TabIndex = 0; ! this.button1.Text = "Download all Tickers\'quotes"; this.button1.Click += new System.EventHandler(this.button1_Click); // *************** *** 200,206 **** // buttonDownloadQuotesOfSelectedTickers // ! this.buttonDownloadQuotesOfSelectedTickers.Location = new System.Drawing.Point(48, 72); this.buttonDownloadQuotesOfSelectedTickers.Name = "buttonDownloadQuotesOfSelectedTickers"; ! this.buttonDownloadQuotesOfSelectedTickers.Size = new System.Drawing.Size(112, 24); this.buttonDownloadQuotesOfSelectedTickers.TabIndex = 2; this.buttonDownloadQuotesOfSelectedTickers.Text = "Download quotes"; --- 195,201 ---- // buttonDownloadQuotesOfSelectedTickers // ! this.buttonDownloadQuotesOfSelectedTickers.Location = new System.Drawing.Point(48, 80); this.buttonDownloadQuotesOfSelectedTickers.Name = "buttonDownloadQuotesOfSelectedTickers"; ! this.buttonDownloadQuotesOfSelectedTickers.Size = new System.Drawing.Size(112, 32); this.buttonDownloadQuotesOfSelectedTickers.TabIndex = 2; this.buttonDownloadQuotesOfSelectedTickers.Text = "Download quotes"; *************** *** 392,401 **** this.OleDbConnection1.Close(); } private void button1_Click(object sender, System.EventArgs e) { ! oleDbCommand1.Connection = this.OleDbConnection1; ! this.oleDbCommand1.ExecuteNonQuery(); ! downloadQuotes(); } --- 387,419 ---- this.OleDbConnection1.Close(); } + + private void openDbAndExecuteNonQuery() + { + try + { + Cursor.Current = Cursors.WaitCursor; + this.OleDbConnection1.Open(); + oleDbCommand1.Connection = this.OleDbConnection1; + this.oleDbCommand1.ExecuteNonQuery(); + + } + catch(Exception ex) + { + MessageBox.Show(ex.ToString()); + } + + finally + { + this.OleDbConnection1.Close(); + Cursor.Current = Cursors.Default; + } + + } + private void button1_Click(object sender, System.EventArgs e) { ! this.openDbAndExecuteNonQuery(); ! downloadQuotes(); } *************** *** 407,423 **** private void buttonDownloadQuotesOfSelectedTickers_Click(object sender, System.EventArgs e) { ! try ! { ! Cursor.Current = Cursors.WaitCursor; ! oleDbCommand1.Connection = this.OleDbConnection1; ! this.oleDbCommand1.ExecuteNonQuery(); ! downloadQuotes(this.tableOfSelectedTickers); ! ! } ! finally ! { ! Cursor.Current = Cursors.Default; ! } ! } --- 425,430 ---- private void buttonDownloadQuotesOfSelectedTickers_Click(object sender, System.EventArgs e) { ! this.openDbAndExecuteNonQuery(); ! downloadQuotes(this.tableOfSelectedTickers); } |
|
From: <gla...@pr...> - 2004-01-26 15:23:55
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/QuotesEditor/OHLC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8243/Downloader/QuotesEditor/OHLC Added Files: OHLCuserControl.cs Log Message: Content for the OHLC validation TabPage --- NEW FILE: OHLCuserControl.cs --- /* QuantProject - Quantitative Finance Library OHLCuserControl.cs Copyright (C) 2003 Glauco Siliprandi This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ using System; using System.Collections; using System.ComponentModel; using System.Drawing; using System.Data; using System.Windows.Forms; using QuantProject.Applications.Downloader.Validate; namespace QuantProject.Applications.Downloader { /// <summary> /// Content for the OHLC validation TabPage /// </summary> public class OHLCuserControl : System.Windows.Forms.UserControl { private OHLCdataGrid openHighLowCloseDataGrid; public ValidateDataTable ValidateDataTable; /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.Container components = null; public OHLCuserControl() { // This call is required by the Windows.Forms Form Designer. InitializeComponent(); // TODO: Add any initialization after the InitForm call initializeOHLCdataGrid(); } private void initializeOHLCdataGrid() { this.openHighLowCloseDataGrid = new OHLCdataGrid(); this.Controls.Add( this.openHighLowCloseDataGrid ); this.openHighLowCloseDataGrid.Width = this.Width - 4; this.openHighLowCloseDataGrid.Height = this.Height - 4; } public void PaintingHandler() { this.openHighLowCloseDataGrid.DataBind( this.ValidateDataTable ); } /// <summary> /// Clean up any resources being used. /// </summary> protected override void Dispose( bool disposing ) { if( disposing ) { if(components != null) { components.Dispose(); } } base.Dispose( disposing ); } #region Component Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { // // OHLCuserControl // this.Name = "OHLCuserControl"; this.Size = new System.Drawing.Size(648, 232); this.Paint += new System.Windows.Forms.PaintEventHandler(this.OHLCuserControl_Paint); } #endregion private void OHLCuserControl_Paint(object sender, System.Windows.Forms.PaintEventArgs e) { this.Width = this.Parent.Width - 10; this.Height = this.Parent.Height - 10; this.PaintingHandler(); } } } |
|
From: <gla...@pr...> - 2004-01-26 15:02:05
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10736/Downloader Added Files: QuotesDataGrid.cs Log Message: Base class for data grids containing quotes --- NEW FILE: QuotesDataGrid.cs --- /* QuantProject - Quantitative Finance Library QuotesDataGrid.cs Copyright (C) 2003 Glauco Siliprandi This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ using System; using System.Windows.Forms; using System.Drawing; namespace QuantProject.Applications.Downloader { /// <summary> /// Base class for data grids containing quotes /// </summary> public class QuotesDataGrid : DataGrid { DataGridTableStyle dataGridTableStyle; public QuotesDataGrid() { this.setTableStyles(); } #region setTableStyles private void setTableStyles_setColumnStyle( string mappingName , string headerText ) { this.dataGridTableStyle.ColumnHeadersVisible = true; DataGridTextBoxColumn dataGridColumnStyle = new DataGridTextBoxColumn(); dataGridColumnStyle.MappingName = mappingName; dataGridColumnStyle.HeaderText = headerText; Graphics g = this.CreateGraphics(); dataGridColumnStyle.Width = (int)g.MeasureString( headerText , this.Font ).Width + 5; this.dataGridTableStyle.GridColumnStyles.Add( dataGridColumnStyle ); } private void setTableStyles() { this.dataGridTableStyle = new DataGridTableStyle(); this.dataGridTableStyle.MappingName = "quotes"; this.setTableStyles_setColumnStyle( "quTicker" , "Ticker" ); this.setTableStyles_setColumnStyle( "quDate" , "Date" ); this.setTableStyles_setColumnStyle( "quOpen" , "Open" ); this.setTableStyles_setColumnStyle( "quHigh" , "High" ); this.setTableStyles_setColumnStyle( "quLow" , "Low" ); this.setTableStyles_setColumnStyle( "quClose" , "Close" ); this.setTableStyles_setColumnStyle( "quAdjustedClose" , "Adj. Close" ); this.setTableStyles_setColumnStyle( "ValidationWarning" , "Warning" ); this.setTableStyles_setColumnStyle( "Yuppy" , "Ew" ); this.TableStyles.Add( dataGridTableStyle ); } #endregion } } |
|
From: <gla...@pr...> - 2004-01-26 15:01:18
|
Update of /cvsroot/quantproject/QuantProject In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23408 Modified Files: QuantProject.suo Log Message: no message Index: QuantProject.suo =================================================================== RCS file: /cvsroot/quantproject/QuantProject/QuantProject.suo,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 Binary files /tmp/cvsr5nhl1 and /tmp/cvsguqqlj differ |
|
From: <gla...@pr...> - 2004-01-26 14:48:57
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/Validate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7235/Downloader/Validate Added Files: ValidationWarnings.cs Log Message: Types of warnings that can be arisen when quotes are validated --- NEW FILE: ValidationWarnings.cs --- /* QuantProject - Quantitative Finance Library BarComponent.cs Copyright (C) 2003 Glauco Siliprandi This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ using System; namespace QuantProject.Applications.Downloader.Validate { /// <summary> /// Types of warnings that can be arisen when quotes are validated /// </summary> public enum ValidationWarning { OpenHighLowCloseLogicalInconsistency, SuspiciousCloseToCloseRatio, SuspiciousRangeToRangeRatio } } |
|
From: <mi...@pr...> - 2004-01-26 14:48:36
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30517/Downloader Modified Files: TickerViewer.cs Log Message: Added code to control error (no action if the user doesn't select any ticker) Index: TickerViewer.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/TickerViewer.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TickerViewer.cs 22 Jan 2004 23:28:15 -0000 1.1 --- TickerViewer.cs 25 Jan 2004 19:10:54 -0000 1.2 *************** *** 47,50 **** --- 47,51 ---- private System.Windows.Forms.ContextMenu contextMenuTickerViewer; private System.Windows.Forms.MenuItem menuItemValidateCurrentRows; + private System.Windows.Forms.MenuItem menuItemDownloadCurrentRows; private DataTable tableTickers; *************** *** 87,93 **** this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.dataGrid1 = new System.Windows.Forms.DataGrid(); - this.buttonFindTickers = new System.Windows.Forms.Button(); this.contextMenuTickerViewer = new System.Windows.Forms.ContextMenu(); this.menuItemValidateCurrentRows = new System.Windows.Forms.MenuItem(); ((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit(); this.SuspendLayout(); --- 88,95 ---- this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.dataGrid1 = new System.Windows.Forms.DataGrid(); this.contextMenuTickerViewer = new System.Windows.Forms.ContextMenu(); this.menuItemValidateCurrentRows = new System.Windows.Forms.MenuItem(); + this.buttonFindTickers = new System.Windows.Forms.Button(); + this.menuItemDownloadCurrentRows = new System.Windows.Forms.MenuItem(); ((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit(); this.SuspendLayout(); *************** *** 122,125 **** --- 124,139 ---- this.dataGrid1.TabIndex = 2; // + // contextMenuTickerViewer + // + this.contextMenuTickerViewer.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { + this.menuItemValidateCurrentRows, + this.menuItemDownloadCurrentRows}); + // + // menuItemValidateCurrentRows + // + this.menuItemValidateCurrentRows.Index = 0; + this.menuItemValidateCurrentRows.Text = "Validate selected tickers"; + this.menuItemValidateCurrentRows.Click += new System.EventHandler(this.menuItemValidateCurrentRows_Click); + // // buttonFindTickers // *************** *** 131,144 **** this.buttonFindTickers.Click += new System.EventHandler(this.buttonFindTickers_Click); // ! // contextMenuTickerViewer ! // ! this.contextMenuTickerViewer.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { ! this.menuItemValidateCurrentRows}); ! // ! // menuItemValidateCurrentRows // ! this.menuItemValidateCurrentRows.Index = 0; ! this.menuItemValidateCurrentRows.Text = "Validate current rows"; ! this.menuItemValidateCurrentRows.Click += new System.EventHandler(this.menuItemValidateCurrentRows_Click); // // TickerViewer --- 145,153 ---- this.buttonFindTickers.Click += new System.EventHandler(this.buttonFindTickers_Click); // ! // menuItemDownloadCurrentRows // ! this.menuItemDownloadCurrentRows.Index = 1; ! this.menuItemDownloadCurrentRows.Text = "Download quotes of selected tickers"; ! this.menuItemDownloadCurrentRows.Click += new System.EventHandler(this.menuItemDownloadCurrentRows_Click); // // TickerViewer *************** *** 227,231 **** DataTable tableOfSelectedTickers = dataTableOfDataGrid1.Copy(); tableOfSelectedTickers.Clear(); ! // so the two tables have the same structure int indexOfRow = 0; while(indexOfRow != dataTableOfDataGrid1.Rows.Count) --- 236,240 ---- DataTable tableOfSelectedTickers = dataTableOfDataGrid1.Copy(); tableOfSelectedTickers.Clear(); ! // doing so, the two tables have the same structure int indexOfRow = 0; while(indexOfRow != dataTableOfDataGrid1.Rows.Count) *************** *** 244,251 **** --- 253,275 ---- private void menuItemValidateCurrentRows_Click(object sender, System.EventArgs e) { + DataTable tableOfSelectedTickers = this.getTableOfSelectedTickers(); + if(tableOfSelectedTickers.Rows.Count == 0) + { + MessageBox.Show("No ticker has been selected!\n\n" + + "Click on the grey area on the left to " + + "select a ticker", "QuantDownloader error message", + MessageBoxButtons.OK, MessageBoxIcon.Error); + return; + } QuantProject.Applications.Downloader.Validate.ValidateForm validateForm = new Validate.ValidateForm(this.getTableOfSelectedTickers()); validateForm.Show(); } + + private void menuItemDownloadCurrentRows_Click(object sender, System.EventArgs e) + { + WebDownloader webDownloader = new WebDownloader(this.getTableOfSelectedTickers()); + webDownloader.Show(); + } |
|
From: <gla...@pr...> - 2004-01-26 14:40:35
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/Validate/Validators In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22209/Downloader/Validate/Validators Modified Files: CloseToCloseValidator.cs Log Message: Added the ValidationWarning type specification to the SuspsiciousDataRowEventArgs instance Index: CloseToCloseValidator.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/Validate/Validators/CloseToCloseValidator.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CloseToCloseValidator.cs 16 Dec 2003 15:49:24 -0000 1.1 --- CloseToCloseValidator.cs 25 Jan 2004 15:47:36 -0000 1.2 *************** *** 55,59 **** // the current close to close value is suspiciously larger // than the average close to close ratio ! this.SuspiciousDataRow( this , new SuspiciousDataRowEventArgs( quoteRow ) ); } private void validate_currentTicker_withHistories( --- 55,60 ---- // the current close to close value is suspiciously larger // than the average close to close ratio ! this.SuspiciousDataRow( this , new SuspiciousDataRowEventArgs( ! quoteRow , ValidationWarning.SuspiciousCloseToCloseRatio ) ); } private void validate_currentTicker_withHistories( |
|
From: <gla...@pr...> - 2004-01-26 14:03:06
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/QuotesEditor/CloseToClose In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17040/CloseToClose Log Message: Directory /cvsroot/quantproject/QuantDownloader/Downloader/QuotesEditor/CloseToClose added to the repository |
|
From: <gla...@pr...> - 2004-01-26 13:28:33
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/Validate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20345/Downloader/Validate Modified Files: SospiciousDataRowEventArgs.cs Log Message: Added the ValidationWarning type specification Index: SospiciousDataRowEventArgs.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/Validate/SospiciousDataRowEventArgs.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SospiciousDataRowEventArgs.cs 12 Dec 2003 00:19:25 -0000 1.1 --- SospiciousDataRowEventArgs.cs 25 Jan 2004 15:40:00 -0000 1.2 *************** *** 10,13 **** --- 10,14 ---- { private DataRow dataRow; + private ValidationWarning validationWarning; /// <summary> *************** *** 26,33 **** } ! public SuspiciousDataRowEventArgs( DataRow dataRow ) ! { ! this.dataRow = dataRow; ! } ! } } --- 27,53 ---- } ! /// <summary> ! /// The suspicious DataRow ! /// </summary> ! public ValidationWarning ValidationWarning ! { ! get ! { ! return this.validationWarning; ! } ! set ! { ! value = this.validationWarning; ! } ! } ! public SuspiciousDataRowEventArgs( DataRow dataRow ) ! { ! this.dataRow = dataRow; ! } ! public SuspiciousDataRowEventArgs( DataRow dataRow , ValidationWarning validationWarning ) ! { ! this.dataRow = dataRow; ! this.validationWarning = validationWarning; ! } ! } } |
|
From: <gla...@pr...> - 2004-01-26 11:51:32
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/Validate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12036/Downloader/Validate Modified Files: ValidateDataTable.cs Log Message: Solved (apparently nonexistent) CVS conflict Index: ValidateDataTable.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/Validate/ValidateDataTable.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ValidateDataTable.cs 22 Jan 2004 23:47:02 -0000 1.6 --- ValidateDataTable.cs 25 Jan 2004 15:03:05 -0000 1.7 *************** *** 28,32 **** --- 28,38 ---- this.oleDbDataAdapter.Fill( this ); this.TableName = "quotes"; + //<<<<<<< ValidateDataTable.cs + this.Columns.Add( "ValidationWarning" , + ValidationWarning.OpenHighLowCloseLogicalInconsistency.GetType() ); + //======= + // + //>>>>>>> 1.6 } *************** *** 55,58 **** --- 61,65 ---- foreach (DataColumn dataColumn in quotesRow.Table.Columns ) dataRow[ dataColumn.ColumnName ] = quotesRow[ dataColumn ]; + dataRow[ "ValidationWarning" ] = eventArgs.ValidationWarning; this.Rows.Add( dataRow ); //this.Rows.Add( quotesRow ); |
|
From: <mi...@pr...> - 2004-01-26 11:49:34
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30789/Downloader Modified Files: WebDownloader.cs Log Message: Added a new constructor in order to interact with TickerViewer (there are some bugs to fix, anyway) Index: WebDownloader.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/WebDownloader.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** WebDownloader.cs 21 Dec 2003 21:14:52 -0000 1.6 --- WebDownloader.cs 25 Jan 2004 19:12:57 -0000 1.7 *************** *** 29,32 **** --- 29,34 ---- private System.Data.OleDb.OleDbCommand oleDbCommand1; public DataSet1 DsTickerCurrentlyDownloaded = new DataSet1(); + private System.Windows.Forms.Button buttonDownloadQuotesOfSelectedTickers; + private DataTable tableOfSelectedTickers; /// <summary> /// Required designer variable. *************** *** 40,50 **** // InitializeComponent(); // // TODO: Add any constructor code after InitializeComponent call // ! //this.oleDbDataAdapter1.Fill(this.dataSet11); ! this.OleDbConnection1.Open(); ! //this.OleDbConnection1.Close(); } --- 42,70 ---- // InitializeComponent(); + this.Text = "Download quotes of all tickers in the database"; + this.buttonDownloadQuotesOfSelectedTickers.Visible = false; + // + // TODO: Add any constructor code after InitializeComponent call + // + //this.oleDbDataAdapter1.Fill(this.dataSet11); + this.OleDbConnection1.Open(); + //this.OleDbConnection1.Close(); + } + public WebDownloader(DataTable tableOfSelectedTickers) + { + // + // Required for Windows Form Designer support + // + InitializeComponent(); + this.Text = "Download quotes of selected tickers"; + this.button1.Visible = false; + this.tableOfSelectedTickers = tableOfSelectedTickers; // // TODO: Add any constructor code after InitializeComponent call // ! //this.oleDbDataAdapter1.Fill(this.dataSet11); ! this.OleDbConnection1.Open(); ! //this.OleDbConnection1.Close(); } *************** *** 71,194 **** private void InitializeComponent() { ! this.button1 = new System.Windows.Forms.Button(); ! this.dataGrid1 = new System.Windows.Forms.DataGrid(); ! this.oleDbDataAdapter1 = new System.Data.OleDb.OleDbDataAdapter(); ! this.oleDbDeleteCommand1 = new System.Data.OleDb.OleDbCommand(); ! this.oleDbInsertCommand1 = new System.Data.OleDb.OleDbCommand(); ! this.oleDbSelectCommand1 = new System.Data.OleDb.OleDbCommand(); ! this.oleDbUpdateCommand1 = new System.Data.OleDb.OleDbCommand(); ! this.oleDbCommand1 = new System.Data.OleDb.OleDbCommand(); ! ((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit(); ! this.SuspendLayout(); ! // ! // button1 ! // ! this.button1.Location = new System.Drawing.Point(48, 24); ! this.button1.Name = "button1"; ! this.button1.Size = new System.Drawing.Size(112, 24); ! this.button1.TabIndex = 0; ! this.button1.Text = "button1"; ! this.button1.Click += new System.EventHandler(this.button1_Click); ! // ! // dataGrid1 ! // ! this.dataGrid1.DataMember = ""; ! this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText; ! this.dataGrid1.Location = new System.Drawing.Point(176, 16); ! this.dataGrid1.Name = "dataGrid1"; ! this.dataGrid1.Size = new System.Drawing.Size(336, 216); ! this.dataGrid1.TabIndex = 1; ! // ! // oleDbDataAdapter1 ! // ! this.oleDbDataAdapter1.DeleteCommand = this.oleDbDeleteCommand1; ! this.oleDbDataAdapter1.InsertCommand = this.oleDbInsertCommand1; ! this.oleDbDataAdapter1.SelectCommand = this.oleDbSelectCommand1; ! this.oleDbDataAdapter1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] { ! new System.Data.Common.DataTableMapping("Table", "quotes", new System.Data.Common.DataColumnMapping[] { ! new System.Data.Common.DataColumnMapping("quId", "quId"), ! new System.Data.Common.DataColumnMapping("quTicker", "quTicker"), ! new System.Data.Common.DataColumnMapping("quDate", "quDate"), ! new System.Data.Common.DataColumnMapping("quOpen", "quOpen"), ! new System.Data.Common.DataColumnMapping("quHigh", "quHigh"), ! new System.Data.Common.DataColumnMapping("quLow", "quLow"), ! new System.Data.Common.DataColumnMapping("quClose", "quClose")})}); ! this.oleDbDataAdapter1.UpdateCommand = this.oleDbUpdateCommand1; ! // ! // oleDbDeleteCommand1 ! // ! this.oleDbDeleteCommand1.CommandText = @"DELETE FROM quotes WHERE (quId = ?) AND (quClose = ? OR ? IS NULL AND quClose IS NULL) AND (quDate = ? OR ? IS NULL AND quDate IS NULL) AND (quHigh = ? OR ? IS NULL AND quHigh IS NULL) AND (quLow = ? OR ? IS NULL AND quLow IS NULL) AND (quOpen = ? OR ? IS NULL AND quOpen IS NULL) AND (quTicker = ? OR ? IS NULL AND quTicker IS NULL)"; ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quId", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(10)), ((System.Byte)(0)), "quId", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quClose", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quClose", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quClose1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quClose", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quDate", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "quDate", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quDate1", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "quDate", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quHigh", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quHigh", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quHigh1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quHigh", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quLow", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quLow", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quLow1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quLow", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quOpen", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quOpen", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quOpen1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quOpen", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quTicker", System.Data.OleDb.OleDbType.VarWChar, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "quTicker", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quTicker1", System.Data.OleDb.OleDbType.VarWChar, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "quTicker", System.Data.DataRowVersion.Original, null)); ! // ! // oleDbInsertCommand1 ! // ! this.oleDbInsertCommand1.CommandText = "INSERT INTO quotes (quClose, quDate, quHigh, quLow, quOpen, quTicker, quVolume) V" + ! "ALUES (?, ?, ?, ?, ?, ?, ?)"; ! this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quClose", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quClose", System.Data.DataRowVersion.Current, null)); ! this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quDate", System.Data.OleDb.OleDbType.DBDate, 0, "quDate")); ! this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quHigh", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quHigh", System.Data.DataRowVersion.Current, null)); ! this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quLow", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quLow", System.Data.DataRowVersion.Current, null)); ! this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quOpen", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quOpen", System.Data.DataRowVersion.Current, null)); ! this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quTicker", System.Data.OleDb.OleDbType.VarWChar, 8, "quTicker")); ! this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quVolume", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(10)), ((System.Byte)(0)), "quVolume", System.Data.DataRowVersion.Current, null)); ! // ! // oleDbSelectCommand1 ! // ! this.oleDbSelectCommand1.CommandText = "SELECT quClose, quDate, quHigh, quLow, quOpen, quTicker FROM quotes"; ! // ! // oleDbUpdateCommand1 ! // ! this.oleDbUpdateCommand1.CommandText = @"UPDATE quotes SET quClose = ?, quDate = ?, quHigh = ?, quLow = ?, quOpen = ?, quTicker = ? WHERE (quId = ?) AND (quClose = ? OR ? IS NULL AND quClose IS NULL) AND (quDate = ? OR ? IS NULL AND quDate IS NULL) AND (quHigh = ? OR ? IS NULL AND quHigh IS NULL) AND (quLow = ? OR ? IS NULL AND quLow IS NULL) AND (quOpen = ? OR ? IS NULL AND quOpen IS NULL) AND (quTicker = ? OR ? IS NULL AND quTicker IS NULL)"; ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quClose", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quClose", System.Data.DataRowVersion.Current, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quDate", System.Data.OleDb.OleDbType.DBDate, 0, "quDate")); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quHigh", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quHigh", System.Data.DataRowVersion.Current, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quLow", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quLow", System.Data.DataRowVersion.Current, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quOpen", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quOpen", System.Data.DataRowVersion.Current, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quTicker", System.Data.OleDb.OleDbType.VarWChar, 8, "quTicker")); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quId", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(10)), ((System.Byte)(0)), "quId", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quClose", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quClose", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quClose1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quClose", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quDate", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "quDate", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quDate1", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "quDate", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quHigh", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quHigh", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quHigh1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quHigh", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quLow", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quLow", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quLow1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quLow", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quOpen", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quOpen", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quOpen1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quOpen", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quTicker", System.Data.OleDb.OleDbType.VarWChar, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "quTicker", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quTicker1", System.Data.OleDb.OleDbType.VarWChar, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "quTicker", System.Data.DataRowVersion.Original, null)); ! // ! // oleDbCommand1 ! // ! this.oleDbCommand1.CommandText = "DELETE quotes.* FROM quotes INNER JOIN tickers ON quotes.quTicker = tickers.tiTic" + ! "ker"; ! // ! // WebDownloader ! // ! this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); ! this.ClientSize = new System.Drawing.Size(592, 285); ! this.Controls.AddRange(new System.Windows.Forms.Control[] { ! this.dataGrid1, ! this.button1}); ! this.Name = "WebDownloader"; ! this.Text = "Form1"; ! this.Load += new System.EventHandler(this.Form1_Load); ! ((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).EndInit(); ! this.ResumeLayout(false); ! } #endregion --- 91,225 ---- private void InitializeComponent() { ! this.button1 = new System.Windows.Forms.Button(); ! this.dataGrid1 = new System.Windows.Forms.DataGrid(); ! this.oleDbDataAdapter1 = new System.Data.OleDb.OleDbDataAdapter(); ! this.oleDbDeleteCommand1 = new System.Data.OleDb.OleDbCommand(); ! this.oleDbInsertCommand1 = new System.Data.OleDb.OleDbCommand(); ! this.oleDbSelectCommand1 = new System.Data.OleDb.OleDbCommand(); ! this.oleDbUpdateCommand1 = new System.Data.OleDb.OleDbCommand(); ! this.oleDbCommand1 = new System.Data.OleDb.OleDbCommand(); ! this.buttonDownloadQuotesOfSelectedTickers = new System.Windows.Forms.Button(); ! ((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit(); ! this.SuspendLayout(); ! // ! // button1 ! // ! this.button1.Location = new System.Drawing.Point(48, 24); ! this.button1.Name = "button1"; ! this.button1.Size = new System.Drawing.Size(112, 24); ! this.button1.TabIndex = 0; ! this.button1.Text = "button1"; ! this.button1.Click += new System.EventHandler(this.button1_Click); ! // ! // dataGrid1 ! // ! this.dataGrid1.DataMember = ""; ! this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText; ! this.dataGrid1.Location = new System.Drawing.Point(176, 16); ! this.dataGrid1.Name = "dataGrid1"; ! this.dataGrid1.Size = new System.Drawing.Size(336, 216); ! this.dataGrid1.TabIndex = 1; ! // ! // oleDbDataAdapter1 ! // ! this.oleDbDataAdapter1.DeleteCommand = this.oleDbDeleteCommand1; ! this.oleDbDataAdapter1.InsertCommand = this.oleDbInsertCommand1; ! this.oleDbDataAdapter1.SelectCommand = this.oleDbSelectCommand1; ! this.oleDbDataAdapter1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] { ! new System.Data.Common.DataTableMapping("Table", "quotes", new System.Data.Common.DataColumnMapping[] { ! new System.Data.Common.DataColumnMapping("quId", "quId"), ! new System.Data.Common.DataColumnMapping("quTicker", "quTicker"), ! new System.Data.Common.DataColumnMapping("quDate", "quDate"), ! new System.Data.Common.DataColumnMapping("quOpen", "quOpen"), ! new System.Data.Common.DataColumnMapping("quHigh", "quHigh"), ! new System.Data.Common.DataColumnMapping("quLow", "quLow"), ! new System.Data.Common.DataColumnMapping("quClose", "quClose")})}); ! this.oleDbDataAdapter1.UpdateCommand = this.oleDbUpdateCommand1; ! // ! // oleDbDeleteCommand1 ! // ! this.oleDbDeleteCommand1.CommandText = @"DELETE FROM quotes WHERE (quId = ?) AND (quClose = ? OR ? IS NULL AND quClose IS NULL) AND (quDate = ? OR ? IS NULL AND quDate IS NULL) AND (quHigh = ? OR ? IS NULL AND quHigh IS NULL) AND (quLow = ? OR ? IS NULL AND quLow IS NULL) AND (quOpen = ? OR ? IS NULL AND quOpen IS NULL) AND (quTicker = ? OR ? IS NULL AND quTicker IS NULL)"; ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quId", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(10)), ((System.Byte)(0)), "quId", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quClose", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quClose", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quClose1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quClose", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quDate", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "quDate", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quDate1", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "quDate", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quHigh", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quHigh", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quHigh1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quHigh", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quLow", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quLow", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quLow1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quLow", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quOpen", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quOpen", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quOpen1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quOpen", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quTicker", System.Data.OleDb.OleDbType.VarWChar, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "quTicker", System.Data.DataRowVersion.Original, null)); ! this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quTicker1", System.Data.OleDb.OleDbType.VarWChar, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "quTicker", System.Data.DataRowVersion.Original, null)); ! // ! // oleDbInsertCommand1 ! // ! this.oleDbInsertCommand1.CommandText = "INSERT INTO quotes (quClose, quDate, quHigh, quLow, quOpen, quTicker, quVolume) V" + ! "ALUES (?, ?, ?, ?, ?, ?, ?)"; ! this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quClose", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quClose", System.Data.DataRowVersion.Current, null)); ! this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quDate", System.Data.OleDb.OleDbType.DBDate, 0, "quDate")); ! this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quHigh", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quHigh", System.Data.DataRowVersion.Current, null)); ! this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quLow", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quLow", System.Data.DataRowVersion.Current, null)); ! this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quOpen", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quOpen", System.Data.DataRowVersion.Current, null)); ! this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quTicker", System.Data.OleDb.OleDbType.VarWChar, 8, "quTicker")); ! this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quVolume", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(10)), ((System.Byte)(0)), "quVolume", System.Data.DataRowVersion.Current, null)); ! // ! // oleDbSelectCommand1 ! // ! this.oleDbSelectCommand1.CommandText = "SELECT quClose, quDate, quHigh, quLow, quOpen, quTicker FROM quotes"; ! // ! // oleDbUpdateCommand1 ! // ! this.oleDbUpdateCommand1.CommandText = @"UPDATE quotes SET quClose = ?, quDate = ?, quHigh = ?, quLow = ?, quOpen = ?, quTicker = ? WHERE (quId = ?) AND (quClose = ? OR ? IS NULL AND quClose IS NULL) AND (quDate = ? OR ? IS NULL AND quDate IS NULL) AND (quHigh = ? OR ? IS NULL AND quHigh IS NULL) AND (quLow = ? OR ? IS NULL AND quLow IS NULL) AND (quOpen = ? OR ? IS NULL AND quOpen IS NULL) AND (quTicker = ? OR ? IS NULL AND quTicker IS NULL)"; ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quClose", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quClose", System.Data.DataRowVersion.Current, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quDate", System.Data.OleDb.OleDbType.DBDate, 0, "quDate")); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quHigh", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quHigh", System.Data.DataRowVersion.Current, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quLow", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quLow", System.Data.DataRowVersion.Current, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quOpen", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quOpen", System.Data.DataRowVersion.Current, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("quTicker", System.Data.OleDb.OleDbType.VarWChar, 8, "quTicker")); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quId", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(10)), ((System.Byte)(0)), "quId", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quClose", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quClose", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quClose1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quClose", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quDate", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "quDate", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quDate1", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "quDate", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quHigh", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quHigh", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quHigh1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quHigh", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quLow", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quLow", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quLow1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quLow", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quOpen", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quOpen", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quOpen1", System.Data.OleDb.OleDbType.Single, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(7)), ((System.Byte)(0)), "quOpen", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quTicker", System.Data.OleDb.OleDbType.VarWChar, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "quTicker", System.Data.DataRowVersion.Original, null)); ! this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_quTicker1", System.Data.OleDb.OleDbType.VarWChar, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "quTicker", System.Data.DataRowVersion.Original, null)); ! // ! // oleDbCommand1 ! // ! this.oleDbCommand1.CommandText = "DELETE quotes.* FROM quotes INNER JOIN tickers ON quotes.quTicker = tickers.tiTic" + ! "ker"; ! // ! // buttonDownloadQuotesOfSelectedTickers ! // ! this.buttonDownloadQuotesOfSelectedTickers.Location = new System.Drawing.Point(48, 72); ! this.buttonDownloadQuotesOfSelectedTickers.Name = "buttonDownloadQuotesOfSelectedTickers"; ! this.buttonDownloadQuotesOfSelectedTickers.Size = new System.Drawing.Size(112, 24); ! this.buttonDownloadQuotesOfSelectedTickers.TabIndex = 2; ! this.buttonDownloadQuotesOfSelectedTickers.Text = "Download quotes"; ! this.buttonDownloadQuotesOfSelectedTickers.Click += new System.EventHandler(this.buttonDownloadQuotesOfSelectedTickers_Click); ! // ! // WebDownloader ! // ! this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); ! this.ClientSize = new System.Drawing.Size(592, 285); ! this.Controls.AddRange(new System.Windows.Forms.Control[] { ! this.buttonDownloadQuotesOfSelectedTickers, ! this.dataGrid1, ! this.button1}); ! this.Name = "WebDownloader"; ! this.Text = "Form1"; ! this.Load += new System.EventHandler(this.Form1_Load); ! ((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).EndInit(); ! this.ResumeLayout(false); ! } #endregion *************** *** 353,356 **** --- 384,396 ---- } + private void downloadQuotes(DataTable tableOfSelectedTickers) + { + DataSet ds=new DataSet(); + ds.Tables.Add(tableOfSelectedTickers); + //this.OleDbConnection1.Open(); + downloadQuotes_withTickerDataSet( ds ); + this.OleDbConnection1.Close(); + } + private void button1_Click(object sender, System.EventArgs e) { *************** *** 364,367 **** --- 404,425 ---- } + + private void buttonDownloadQuotesOfSelectedTickers_Click(object sender, System.EventArgs e) + { + try + { + Cursor.Current = Cursors.WaitCursor; + oleDbCommand1.Connection = this.OleDbConnection1; + this.oleDbCommand1.ExecuteNonQuery(); + downloadQuotes(this.tableOfSelectedTickers); + + } + finally + { + Cursor.Current = Cursors.Default; + } + + + } } |
|
From: <gla...@pr...> - 2004-01-26 11:34:41
|
Update of /cvsroot/quantproject/QuantDownloader In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22737 Modified Files: QuantDownloader.suo QuantDownloader.sln Log Message: Added the Validation TabPage with the OHLC and the CloseToClose sub TabPages Index: QuantDownloader.suo =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/QuantDownloader.suo,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 Binary files /tmp/cvseNdvte and /tmp/cvsatukTR differ Index: QuantDownloader.sln =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/QuantDownloader.sln,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** QuantDownloader.sln 30 Nov 2003 18:31:45 -0000 1.2 --- QuantDownloader.sln 25 Jan 2004 15:50:27 -0000 1.3 *************** *** 6,9 **** --- 6,15 ---- Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "b1_ADT", "..\QuantProject\b1_ADT\b1_ADT.csproj", "{B8A01161-3698-4591-B1EF-90F5FC7D8DBA}" EndProject + Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "b3_Data", "..\QuantProject\b3_Data\b3_Data.csproj", "{6AC0A2C1-B926-4921-A685-F5AA80E81C94}" + EndProject + Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "b5_Presentation", "..\QuantProject\b5_Presentation\b5_Presentation.csproj", "{D3DC9EA6-3B06-4255-B19A-5FC5B66A1402}" + EndProject + Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "b4_Business", "..\QuantProject\b4_Business\b4_Business.csproj", "{6EE31501-376E-491B-869E-F06D5B7C9C30}" + EndProject Global GlobalSection(SolutionConfiguration) = preSolution *************** *** 28,31 **** --- 34,49 ---- {B8A01161-3698-4591-B1EF-90F5FC7D8DBA}.Release.ActiveCfg = Release|.NET {B8A01161-3698-4591-B1EF-90F5FC7D8DBA}.Release.Build.0 = Release|.NET + {6AC0A2C1-B926-4921-A685-F5AA80E81C94}.Debug.ActiveCfg = Debug|.NET + {6AC0A2C1-B926-4921-A685-F5AA80E81C94}.Debug.Build.0 = Debug|.NET + {6AC0A2C1-B926-4921-A685-F5AA80E81C94}.Release.ActiveCfg = Release|.NET + {6AC0A2C1-B926-4921-A685-F5AA80E81C94}.Release.Build.0 = Release|.NET + {D3DC9EA6-3B06-4255-B19A-5FC5B66A1402}.Debug.ActiveCfg = Debug|.NET + {D3DC9EA6-3B06-4255-B19A-5FC5B66A1402}.Debug.Build.0 = Debug|.NET + {D3DC9EA6-3B06-4255-B19A-5FC5B66A1402}.Release.ActiveCfg = Release|.NET + {D3DC9EA6-3B06-4255-B19A-5FC5B66A1402}.Release.Build.0 = Release|.NET + {6EE31501-376E-491B-869E-F06D5B7C9C30}.Debug.ActiveCfg = Debug|.NET + {6EE31501-376E-491B-869E-F06D5B7C9C30}.Debug.Build.0 = Debug|.NET + {6EE31501-376E-491B-869E-F06D5B7C9C30}.Release.ActiveCfg = Release|.NET + {6EE31501-376E-491B-869E-F06D5B7C9C30}.Release.Build.0 = Release|.NET EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution |
|
From: <gla...@pr...> - 2004-01-26 10:36:41
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/QuotesEditor/OHLC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8562/Downloader/QuotesEditor/OHLC Added Files: OHLCdataGrid.cs Log Message: Contains the quotes with Open High Low Close inconsistency --- NEW FILE: OHLCdataGrid.cs --- using System; using System.Data; using System.Windows.Forms; using QuantProject.Applications.Downloader.Validate; namespace QuantProject.Applications.Downloader { /// <summary> /// It contains the quotes with Open High Low Close inconsistency /// </summary> public class OHLCdataGrid : QuotesDataGrid { private DataTable openHighLowCloseDataTable; public OHLCdataGrid() { } public void DataBind( ValidateDataTable validateDataTable ) { this.openHighLowCloseDataTable = validateDataTable.Clone(); string select = "1=1"; DataRow[] dataRows = validateDataTable.Select( select ); DataView dataView = new DataView( validateDataTable ); dataView.RowFilter = "ValidationWarning=" + Convert.ToInt16( ValidationWarning.OpenHighLowCloseLogicalInconsistency ); this.DataSource = dataView; // foreach ( DataRow dataRow in dataRows ) // this.openHighLowCloseDataTable.Rows.Add( dataRow ); } } } |
|
From: <gla...@pr...> - 2004-01-26 10:33:01
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22737/Downloader Modified Files: Downloader.csproj.user Downloader.csproj Log Message: Added the Validation TabPage with the OHLC and the CloseToClose sub TabPages Index: Downloader.csproj.user =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/Downloader.csproj.user,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Downloader.csproj.user 30 Nov 2003 18:31:45 -0000 1.2 --- Downloader.csproj.user 25 Jan 2004 15:50:27 -0000 1.3 *************** *** 2,6 **** <CSHARP> <Build> ! <Settings ReferencePath = "" > <Config Name = "Debug" --- 2,6 ---- <CSHARP> <Build> ! <Settings ReferencePath = "c:\windows\assembly\gac\crystaldecisions.windows.forms\9.1.3300.0__692fbea5521e1304\;C:\Documents and Settings\Glauco\Desktop\QuantProject\lib\" > <Config Name = "Debug" Index: Downloader.csproj =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/Downloader.csproj,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Downloader.csproj 22 Jan 2004 23:28:07 -0000 1.10 --- Downloader.csproj 25 Jan 2004 15:50:27 -0000 1.11 *************** *** 93,96 **** --- 93,136 ---- Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" /> + <Reference + Name = "scpl" + AssemblyName = "scpl" + HintPath = "..\..\lib\scpl.dll" + /> + <Reference + Name = "b3_Data" + Project = "{6AC0A2C1-B926-4921-A685-F5AA80E81C94}" + Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" + /> + <Reference + Name = "b4_Business" + Project = "{6EE31501-376E-491B-869E-F06D5B7C9C30}" + Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" + /> + <Reference + Name = "b5_Presentation" + Project = "{D3DC9EA6-3B06-4255-B19A-5FC5B66A1402}" + Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" + /> + <Reference + Name = "crystaldecisions.windows.forms" + AssemblyName = "CrystalDecisions.Windows.Forms" + HintPath = "..\..\..\..\..\..\windows\assembly\gac\crystaldecisions.windows.forms\9.1.3300.0__692fbea5521e1304\crystaldecisions.windows.forms.dll" + /> + <Reference + Name = "CrystalDecisions.Shared" + AssemblyName = "CrystalDecisions.Shared" + HintPath = "..\..\..\..\..\..\Program Files\Common Files\Crystal Decisions\1.0\Managed\CrystalDecisions.Shared.dll" + /> + <Reference + Name = "CrystalDecisions.ReportSource" + AssemblyName = "CrystalDecisions.ReportSource" + HintPath = "..\..\..\..\..\..\Program Files\Common Files\Crystal Decisions\1.0\Managed\CrystalDecisions.ReportSource.dll" + /> + <Reference + Name = "System.Web.Services" + AssemblyName = "System.Web.Services" + HintPath = "..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.Web.Services.dll" + /> </References> </Build> *************** *** 136,139 **** --- 176,189 ---- /> <File + RelPath = "QuotesDataGrid.cs" + SubType = "Component" + BuildAction = "Compile" + /> + <File + RelPath = "QuotesDataGrid.resx" + DependentUpon = "QuotesDataGrid.cs" + BuildAction = "EmbeddedResource" + /> + <File RelPath = "TestDownloadedData.cs" SubType = "Form" *************** *** 161,164 **** --- 211,224 ---- /> <File + RelPath = "WebDownloader.resx" + DependentUpon = "WebDownloader.cs" + BuildAction = "EmbeddedResource" + /> + <File + RelPath = "QuotesEditor\QuotesChart.cs" + SubType = "UserControl" + BuildAction = "Compile" + /> + <File RelPath = "QuotesEditor\QuotesEditor.cs" SubType = "Form" *************** *** 166,197 **** /> <File ! RelPath = "Validate\IValidator.cs" ! SubType = "Code" BuildAction = "Compile" /> <File ! RelPath = "Validate\QuotesToBeValidated.cs" SubType = "Component" BuildAction = "Compile" /> <File ! RelPath = "Validate\QuotesToBeValidated.resx" ! DependentUpon = "QuotesToBeValidated.cs" BuildAction = "EmbeddedResource" /> <File ! RelPath = "Validate\SospiciousDataRowEventArgs.cs" SubType = "Code" BuildAction = "Compile" /> <File ! RelPath = "Validate\ValidateDataGrid.cs" SubType = "Component" BuildAction = "Compile" /> <File ! RelPath = "Validate\ValidateDataGrid.resx" ! DependentUpon = "ValidateDataGrid.cs" ! BuildAction = "EmbeddedResource" /> <File --- 226,282 ---- /> <File ! RelPath = "QuotesEditor\CloseToClose\CloseToCloseChart.cs" ! SubType = "UserControl" BuildAction = "Compile" /> <File ! RelPath = "QuotesEditor\CloseToClose\CloseToCloseDataGrid.cs" SubType = "Component" BuildAction = "Compile" /> <File ! RelPath = "QuotesEditor\CloseToClose\CloseToCloseUserControl.cs" ! SubType = "UserControl" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "QuotesEditor\CloseToClose\CloseToCloseUserControl.resx" ! DependentUpon = "CloseToCloseUserControl.cs" BuildAction = "EmbeddedResource" /> <File ! RelPath = "QuotesEditor\OHLC\OHLCdataGrid.cs" ! SubType = "Component" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "QuotesEditor\OHLC\OHLCuserControl.cs" ! SubType = "UserControl" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "QuotesEditor\OHLC\OHLCuserControl.resx" ! DependentUpon = "OHLCuserControl.cs" ! BuildAction = "EmbeddedResource" ! /> ! <File ! RelPath = "Validate\IValidator.cs" SubType = "Code" BuildAction = "Compile" /> <File ! RelPath = "Validate\QuotesToBeValidated.cs" SubType = "Component" BuildAction = "Compile" /> <File ! RelPath = "Validate\SospiciousDataRowEventArgs.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "Validate\ValidateDataGrid.cs" ! SubType = "Component" ! BuildAction = "Compile" /> <File *************** *** 216,219 **** --- 301,309 ---- /> <File + RelPath = "Validate\ValidationWarnings.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Validate\Validators\CloseToCloseValidator.cs" SubType = "Code" |