[Quantproject-developers] QuantProject/b4_Business/a0_Validation ValidateDataTable.cs,1.1,1.2
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2004-05-08 17:21:59
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a0_Validation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7666/b4_Business/a0_Validation Modified Files: ValidateDataTable.cs Log Message: - the new Quotes DataTable class is used for quotes to be validated - now the ConstantsProvider is used to provide the SuspiciousRatio constant Index: ValidateDataTable.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a0_Validation/ValidateDataTable.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ValidateDataTable.cs 26 Apr 2004 15:37:59 -0000 1.1 --- ValidateDataTable.cs 8 May 2004 17:21:50 -0000 1.2 *************** *** 2,6 **** --- 2,9 ---- using System.Data; using System.Data.OleDb; + using QuantProject.ADT; + using QuantProject.Business.Validation.Validators; using QuantProject.DataAccess; + using QuantProject.Data.DataTables; namespace QuantProject.Business.Validation *************** *** 93,115 **** //this.Rows.Add( quotesRow ); } ! public void AddRows( string tickerIsLike , double suspiciousRatio ) { ! QuotesToBeValidated quotesToBeValidated = new QuotesToBeValidated( tickerIsLike ); ! quotesToBeValidated.SuspiciousRatio = suspiciousRatio; ! quotesToBeValidated.SuspiciousDataRow += ! new SuspiciousDataRowEventHandler( suspiciousDataRowEventHandler ); ! // new QuotesToBeValidated.SuspiciousDataRowEventHandler( suspiciousDataRowEventHandler ); ! quotesToBeValidated.Validate(); this.AcceptChanges(); } ! public void AddRows(double suspiciousRatio ) { ! QuotesToBeValidated quotesToBeValidated = new QuotesToBeValidated(this.tableOfTickersToBeValidated); ! quotesToBeValidated.SuspiciousRatio = suspiciousRatio; ! quotesToBeValidated.SuspiciousDataRow += ! new SuspiciousDataRowEventHandler( suspiciousDataRowEventHandler ); // new QuotesToBeValidated.SuspiciousDataRowEventHandler( suspiciousDataRowEventHandler ); ! quotesToBeValidated.Validate(); ! this.AcceptChanges(); } /// <summary> --- 96,140 ---- //this.Rows.Add( quotesRow ); } ! private void addRows_with_quotesToBeValidated( Quotes quotes ) { ! // quotesToBeValidated.SuspiciousDataRow += ! // new SuspiciousDataRowEventHandler( suspiciousDataRowEventHandler ); ! // quotesToBeValidated.Validate(); ! MultiValidator multiValidator = new MultiValidator(); ! // multiValidator.SuspiciousRatio = this.suspiciousRatio; ! multiValidator.SuspiciousDataRow += ! new SuspiciousDataRowEventHandler( this.suspiciousDataRowEventHandler ); ! multiValidator.Validate( quotes ); this.AcceptChanges(); } ! public void AddRows( string tickerIsLike ) { ! Quotes quotesToBeValidated = new Quotes( tickerIsLike ); ! // quotesToBeValidated.SuspiciousDataRow += ! // new SuspiciousDataRowEventHandler( suspiciousDataRowEventHandler ); // new QuotesToBeValidated.SuspiciousDataRowEventHandler( suspiciousDataRowEventHandler ); ! this.addRows_with_quotesToBeValidated( quotesToBeValidated ); ! } ! // public void AddRows(double suspiciousRatio ) ! // { ! // QuotesToBeValidated quotesToBeValidated = new QuotesToBeValidated(this.tableOfTickersToBeValidated); ! // quotesToBeValidated.SuspiciousRatio = suspiciousRatio; ! // quotesToBeValidated.SuspiciousDataRow += ! // new SuspiciousDataRowEventHandler( suspiciousDataRowEventHandler ); ! // // new QuotesToBeValidated.SuspiciousDataRowEventHandler( suspiciousDataRowEventHandler ); ! // quotesToBeValidated.Validate(); ! // this.AcceptChanges(); ! // } ! /// <summary> ! /// Add suspicious rows for the given instrument, since the startDate to the endDate ! /// </summary> ! /// <param name="ticker"></param> ! /// <param name="startDate"></param> ! /// <param name="endDate"></param> ! public void AddRows( string ticker , DateTime startDate , DateTime endDate ) ! { ! Quotes quotesToBeValidated = ! new Quotes( ticker , startDate , endDate ); ! this.addRows_with_quotesToBeValidated( quotesToBeValidated ); } /// <summary> |