You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.4 KiB
59 lines
1.4 KiB
using GMEStatusSync.Common;
|
|
using System;
|
|
using System.Configuration;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace GMEStatusSync
|
|
{
|
|
class Program
|
|
{
|
|
static void Main(string[] args)
|
|
{
|
|
int runTimeForFullTxnSync = 22;
|
|
|
|
int currentHour = DateTime.Now.Hour;
|
|
|
|
if (currentHour >= runTimeForFullTxnSync)
|
|
{
|
|
GetStatic.WriteLog("Welcome to Automatic processing ");
|
|
DoSyncStatus("Y");
|
|
}
|
|
else
|
|
{
|
|
GetStatic.WriteLog("Welcome to Automatic processing ");
|
|
DoSyncStatus("N");
|
|
}
|
|
}
|
|
|
|
static void DoSyncStatus(string doSyncTxn = "N")
|
|
{
|
|
var m = Task.Run(() => DoSyncTxn(doSyncTxn));
|
|
m.Wait();
|
|
}
|
|
|
|
private static void DoSyncTxn(string doSyncTxn = "N")
|
|
{
|
|
try
|
|
{
|
|
Business.ICommonBusiness _business = new Business.CommonBusiness();
|
|
|
|
|
|
|
|
|
|
|
|
GetStatic.WriteLog("GME Nepal Request Started ..");
|
|
_business.GetStatusCommonBusiness("gmenepal", doSyncTxn);
|
|
GetStatic.WriteLog("GME Nepal Request Ended ..");
|
|
|
|
|
|
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
GetStatic.WriteLog(ex.ToString());
|
|
}
|
|
}
|
|
}
|
|
}
|