public void StartProcess() { var currentDate = DateTime.Now; //ProcessData.GetData(); var date = currentDate.ToString("yyyy-MM-dd"); currentDate = DateTime.Parse(date); if (AppConfigs.LastRun < currentDate) { // UploadFile.ProcessFile(); AppConfigs.UpdateAppconfig(); } }
protected void RunProcess(object sender, ElapsedEventArgs e) { try { var currentDate = DateTime.Now; var date = currentDate.ToString("yyyy-MM-dd"); ProcessData.GetData(); currentDate = DateTime.Parse(date); if (AppConfigs.LastRun < currentDate) { UploadFile.ProcessFile(); AppConfigs.UpdateAppconfig(); } } catch (Exception x) { EventLogging.LogError("Error Msg : " + x.Message + "\n" + "Source : " + x.Source + "\n" + "Event : RunProcess"); } }