[Quantproject-developers] QuantProject/b3_Data/Selectors SelectorByGroup.cs, 1.2, 1.3
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2010-03-27 17:31:41
|
Update of /cvsroot/quantproject/QuantProject/b3_Data/Selectors In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv4637/Selectors Modified Files: SelectorByGroup.cs Log Message: The code has been reformatted, and it now follows a standard indentation Index: SelectorByGroup.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b3_Data/Selectors/SelectorByGroup.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SelectorByGroup.cs 27 Aug 2005 19:20:26 -0000 1.2 --- SelectorByGroup.cs 27 Mar 2010 17:31:33 -0000 1.3 *************** *** 3,7 **** SelectorByGroup.cs ! Copyright (C) 2003 Glauco Siliprandi --- 3,7 ---- SelectorByGroup.cs ! Copyright (C) 2003 Glauco Siliprandi *************** *** 19,23 **** 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; --- 19,23 ---- 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; *************** *** 33,77 **** /// Class for selection on tickers by groupId only or groupId and date /// </summary> ! public class SelectorByGroup : ITickerSelector { ! private string groupID; ! private DateTime date = new DateTime(1900,1,1); ! ! /// <summary> ! /// Creates an new instance of SelectorByGroup, in order ! /// to get tickers contained in the given group ! /// </summary> ! /// <param name="groupID">Group's code for which tickers are to be selected</param> public SelectorByGroup( string groupID ) { this.groupID = groupID; ! } ! ! /// <summary> ! /// Creates an new instance of SelectorByGroup, in order ! /// to get tickers contained in the given group ! /// </summary> ! /// <param name="groupID">Group's code for which tickers are to be selected</param> ! /// <param name="date">The date at which tickers to be selected belong effectively ! /// to the given group</param> ! public SelectorByGroup( string groupID, DateTime date ) ! { ! this.groupID = groupID; ! this.date = date; ! } public DataTable GetTableOfSelectedTickers() { if(this.date.CompareTo(new DateTime(1900,1,1)) == 0) ! //date has not be set by the user because it is still equal to default value ! return QuantProject.DataAccess.Tables.Tickers_tickerGroups.GetTickers( this.groupID ); ! else ! return QuantProject.DataAccess.Tables.Tickers_tickerGroups.GetTickers( this.groupID, this.date ); } public void SelectAllTickers() { ; ! } ! } } --- 33,76 ---- /// Class for selection on tickers by groupId only or groupId and date /// </summary> ! public class SelectorByGroup : ITickerSelector { ! private string groupID; ! private DateTime date = new DateTime(1900,1,1); ! ! /// <summary> ! /// Creates an new instance of SelectorByGroup, in order ! /// to get tickers contained in the given group ! /// </summary> ! /// <param name="groupID">Group's code for which tickers are to be selected</param> public SelectorByGroup( string groupID ) { this.groupID = groupID; ! } ! ! /// <summary> ! /// Creates an new instance of SelectorByGroup, in order ! /// to get tickers contained in the given group ! /// </summary> ! /// <param name="groupID">Group's code for which tickers are to be selected</param> ! /// <param name="date">The date at which tickers to be selected belong effectively ! /// to the given group</param> ! public SelectorByGroup( string groupID, DateTime date ) ! { ! this.groupID = groupID; ! this.date = date; ! } public DataTable GetTableOfSelectedTickers() { if(this.date.CompareTo(new DateTime(1900,1,1)) == 0) ! //date has not be set by the user because it is still equal to default value ! return QuantProject.DataAccess.Tables.Tickers_tickerGroups.GetTickers( this.groupID ); ! else ! return QuantProject.DataAccess.Tables.Tickers_tickerGroups.GetTickers( this.groupID, this.date ); } public void SelectAllTickers() { ; ! } } } |