[Quantproject-developers] QuantProject/b2_DataAccess/Tables Quotes.cs,1.20,1.21
Brought to you by:
glauco_1
|
From: Marco M. <mi...@us...> - 2005-01-08 11:49:48
|
Update of /cvsroot/quantproject/QuantProject/b2_DataAccess/Tables In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26711/b2_DataAccess/Tables Modified Files: Quotes.cs Log Message: Added static public methods for getting raw (not adjusted) values for open and close Index: Quotes.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b2_DataAccess/Tables/Quotes.cs,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Quotes.cs 6 Jan 2005 18:43:57 -0000 1.20 --- Quotes.cs 8 Jan 2005 11:49:39 -0000 1.21 *************** *** 120,123 **** --- 120,149 ---- return (float)dataTable.Rows[0][0]; } + /// <summary> + /// Returns the raw (not adjusted) close for the given ticker at the specified date + /// is returned + /// </summary> + /// <param name="ticker">ticker for which the raw close has to be returned</param> + /// <returns></returns> + public static float GetRawClose( string ticker, DateTime date ) + { + DataTable dataTable = SqlExecutor.GetDataTable( + "select quClose from quotes where quTicker='" + ticker + "' " + + "and quDate=" + SQLBuilder.GetDateConstant(date) ); + return (float)dataTable.Rows[0][0]; + } + /// <summary> + /// Returns the raw (not adjusted) open for the given ticker at the specified date + /// is returned + /// </summary> + /// <param name="ticker">ticker for which the raw open has to be returned</param> + /// <returns></returns> + public static float GetRawOpen( string ticker, DateTime date ) + { + DataTable dataTable = SqlExecutor.GetDataTable( + "select quOpen from quotes where quTicker='" + ticker + "' " + + "and quDate=" + SQLBuilder.GetDateConstant(date) ); + return (float)dataTable.Rows[0][0]; + } /* moved now to the quotes object in the data layer, where the names are slightly different |