[Quantproject-developers] QuantProject/b2_DataAccess SQLBuilder.cs, 1.2, 1.3
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2008-11-12 20:37:31
|
Update of /cvsroot/quantproject/QuantProject/b2_DataAccess In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv13437/b2_DataAccess Modified Files: SQLBuilder.cs Log Message: The signature for the method public static string GetTimeConstant( DateTime dateTime ) has become public static string GetTimeConstant( Time time ) Index: SQLBuilder.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b2_DataAccess/SQLBuilder.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SQLBuilder.cs 8 Nov 2008 20:31:17 -0000 1.2 --- SQLBuilder.cs 12 Nov 2008 20:37:28 -0000 1.3 *************** *** 24,27 **** --- 24,28 ---- using QuantProject.ADT; + using QuantProject.ADT.Timing; namespace QuantProject.DataAccess *************** *** 68,78 **** #region GetTimeConstant ! public static string GetTimeConstant( DateTime dateTime ) { string timeConstant = "'" + ! dateTime.Hour.ToString( "00" ) + "." + ! dateTime.Minute.ToString( "00" ) + "." + ! dateTime.Second.ToString( "00" ) + "'"; return timeConstant; } --- 69,79 ---- #region GetTimeConstant ! public static string GetTimeConstant( Time time ) { string timeConstant = "'" + ! time.Hour.ToString( "00" ) + "." + ! time.Minute.ToString( "00" ) + "." + ! time.Second.ToString( "00" ) + "'"; return timeConstant; } *************** *** 80,97 **** #region GetFilterForTime ! private static void getFilterForTime_checkParameters( DateTime time ) ! { ! // if ( ( comparisonOperator != "=" ) && ! // ( comparisonOperator != "<" ) && ! // ( comparisonOperator != "<=" ) && ! // ( comparisonOperator != ">" ) && ! // ( comparisonOperator != ">=" ) ) // throw new Exception( ! // "comparisonOperator can either be '=' or '<' or '<=' or '>' or '>='" ); ! if ( !ExtendedDateTime.IsTime( time ) ) ! throw new Exception( ! "time is actually not a time. Use the method " + ! "QuantProject.ADT.ExtendedDateTime.GetTime() to build your time" ); ! } #region getFilterForTime_actually --- 81,98 ---- #region GetFilterForTime ! // private static void getFilterForTime_checkParameters( DateTime time ) ! // { ! //// if ( ( comparisonOperator != "=" ) && ! //// ( comparisonOperator != "<" ) && ! //// ( comparisonOperator != "<=" ) && ! //// ( comparisonOperator != ">" ) && ! //// ( comparisonOperator != ">=" ) ) ! //// throw new Exception( ! //// "comparisonOperator can either be '=' or '<' or '<=' or '>' or '>='" ); ! // if ( !ExtendedDateTime.IsTime( time ) ) // throw new Exception( ! // "time is actually not a time. Use the method " + ! // "QuantProject.ADT.ExtendedDateTime.GetTime() to build your time" ); ! // } #region getFilterForTime_actually *************** *** 121,130 **** } private static string getFilterForTime_actually( ! string fieldName , SqlComparisonOperator sqlComparisonOperator , DateTime time ) { string filterForDailyTime = "(Format([baDateTimeForOpen],'hh:mm:ss')" + SQLBuilder.getSqlStringForComparisonOperator( sqlComparisonOperator ) + ! SQLBuilder.GetTimeConstant( time ); return filterForDailyTime; } --- 122,131 ---- } private static string getFilterForTime_actually( ! string fieldName , SqlComparisonOperator sqlComparisonOperator , Time time ) { string filterForDailyTime = "(Format([baDateTimeForOpen],'hh:mm:ss')" + SQLBuilder.getSqlStringForComparisonOperator( sqlComparisonOperator ) + ! SQLBuilder.GetTimeConstant( time ) + ")"; return filterForDailyTime; } *************** *** 141,147 **** /// <returns></returns> internal static string GetFilterForTime( ! string fieldName , SqlComparisonOperator sqlComparisonOperator , DateTime time ) { ! SQLBuilder.getFilterForTime_checkParameters( time ); string filterForTime = SQLBuilder.getFilterForTime_actually( --- 142,148 ---- /// <returns></returns> internal static string GetFilterForTime( ! string fieldName , SqlComparisonOperator sqlComparisonOperator , Time time ) { ! // SQLBuilder.getFilterForTime_checkParameters( time ); string filterForTime = SQLBuilder.getFilterForTime_actually( |