CheckRunCriteria
This commit is contained in:
36
Program.cs
36
Program.cs
@@ -1715,21 +1715,26 @@ namespace MarketData
|
||||
if(null==result||!(result.ToUpper().Equals("Y")||result.ToUpper().Equals("YES")))return;
|
||||
}
|
||||
|
||||
if(!dateGenerator.IsMarketOpen(currentDate))
|
||||
if(!CheckRunCriteria())
|
||||
{
|
||||
String description="";
|
||||
if(HolidayDA.IsMarketHoliday(currentDate)) description=HolidayDA.GetHolidayDescription(currentDate);
|
||||
else description=Utility.DayOfWeekToString(currentDate.DayOfWeek);
|
||||
Console.WriteLine(String.Format("Market is closed today ({0}), please confirm Y/N:{1}?",description,startDate.ToShortDateString()));
|
||||
String result=Console.ReadLine();
|
||||
if(null==result||!(result.ToUpper().Equals("Y")||result.ToUpper().Equals("YES"))) return;
|
||||
return;
|
||||
}
|
||||
if(!NetworkStatus.IsInternetConnected())
|
||||
{
|
||||
Console.WriteLine(String.Format("The internet is not connected, continue anyway Y/N:?"));
|
||||
String result=Console.ReadLine();
|
||||
if(null==result||!(result.ToUpper().Equals("Y")||result.ToUpper().Equals("YES")))return;
|
||||
}
|
||||
|
||||
// if(!dateGenerator.IsMarketOpen(currentDate))
|
||||
// {
|
||||
// String description="";
|
||||
// if(HolidayDA.IsMarketHoliday(currentDate)) description=HolidayDA.GetHolidayDescription(currentDate);
|
||||
// else description=Utility.DayOfWeekToString(currentDate.DayOfWeek);
|
||||
// Console.WriteLine(String.Format("Market is closed today ({0}), please confirm Y/N:{1}?",description,startDate.ToShortDateString()));
|
||||
// String result=Console.ReadLine();
|
||||
// if(null==result||!(result.ToUpper().Equals("Y")||result.ToUpper().Equals("YES"))) return;
|
||||
// }
|
||||
//if(!NetworkStatus.IsInternetConnected())
|
||||
//{
|
||||
// Console.WriteLine(String.Format("The internet is not connected, continue anyway Y/N:?"));
|
||||
// String result=Console.ReadLine();
|
||||
// if(null==result||!(result.ToUpper().Equals("Y")||result.ToUpper().Equals("YES")))return;
|
||||
//}
|
||||
|
||||
Utility.RemoveLogFiles();
|
||||
int STAGE_1=0,STAGE_FINAL=2;
|
||||
@@ -3784,9 +3789,8 @@ namespace MarketData
|
||||
}
|
||||
if(!NetworkStatus.IsInternetConnected())
|
||||
{
|
||||
Console.WriteLine(String.Format("The internet is not connected, continue anyway Y/N:?"));
|
||||
String result=Console.ReadLine();
|
||||
if(null==result||!(result.ToUpper().Equals("Y")||result.ToUpper().Equals("YES")))return false;
|
||||
Console.WriteLine(String.Format("The internet is not connected."));
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user