Ejemplo n.º 1
0
        DateTime tLimitFrom; // = checkLast_At.AddHours(-checkRetrace_Hours);
        #endregion

        public ParseOutlookItemsHandler(AppointmentPnDbContext dbContext, eFormCore.Core sdkCore, IOutlookOnlineController outlookOnlineController, OutlookExchangeOnlineAPIClient outlookExchangeOnlineAPIClient, IBus bus)
        {
            this._dbContext = dbContext;
            this.sdkCore    = sdkCore;
            this.outlookOnlineController        = outlookOnlineController;
            this.outlookExchangeOnlineAPIClient = outlookExchangeOnlineAPIClient;
            this.bus = bus;
            //checkLast_At = DateTime.Parse(sqlController.SettingRead(Settings.checkLast_At));
//            checkPreSend_Hours = double.Parse(sqlController.SettingRead(Settings.checkPreSend_Hours));
//            checkRetrace_Hours = double.Parse(sqlController.SettingRead(Settings.checkRetrace_Hours));
//            checkEvery_Mins = int.Parse(sqlController.SettingRead(Settings.checkEvery_Mins));
//            includeBlankLocations = bool.Parse(sqlController.SettingRead(Settings.includeBlankLocations));
            double checkPreSend_Hours = double.Parse(_dbContext.PluginConfigurationValues
                                                     .SingleOrDefault(x => x.Name == "AppointmentBaseSettings:checkPreSend_Hours")?.Value);
            double checkRetrace_Hours = double.Parse(_dbContext.PluginConfigurationValues
                                                     .SingleOrDefault(x => x.Name == "AppointmentBaseSettings:checkRetrace_Hours")?.Value);
            int checkEvery_Mins = int.Parse(_dbContext.PluginConfigurationValues
                                            .SingleOrDefault(x => x.Name == "AppointmentBaseSettings:checkEvery_Mins")?.Value);
            bool includeBlankLocations = bool.Parse(_dbContext.PluginConfigurationValues
                                                    .SingleOrDefault(x => x.Name == "AppointmentBaseSettings:includeBlankLocations")?.Value);

            userEmailAddess = outlookOnlineController.GetUserEmailAddress();

            timeOfRun  = DateTime.Now;
            tLimitTo   = timeOfRun.AddHours(+checkPreSend_Hours);
            tLimitFrom = timeOfRun.AddHours(-checkRetrace_Hours);
        }
Ejemplo n.º 2
0
        DateTime tLimitFrom; // = checkLast_At.AddHours(-checkRetrace_Hours);
        #endregion

        public ParseOutlookItemsHandler(SqlController sqlController, Log log, eFormCore.Core sdkCore, IOutlookOnlineController outlookOnlineController, OutlookExchangeOnlineAPIClient outlookExchangeOnlineAPIClient, IBus bus)
        {
            this.sqlController                  = sqlController;
            this.log                            = log;
            this.sdkCore                        = sdkCore;
            this.outlookOnlineController        = outlookOnlineController;
            this.outlookExchangeOnlineAPIClient = outlookExchangeOnlineAPIClient;
            this.bus                            = bus;
            //checkLast_At = DateTime.Parse(sqlController.SettingRead(Settings.checkLast_At));
            checkPreSend_Hours    = double.Parse(sqlController.SettingRead(Settings.checkPreSend_Hours));
            checkRetrace_Hours    = double.Parse(sqlController.SettingRead(Settings.checkRetrace_Hours));
            checkEvery_Mins       = int.Parse(sqlController.SettingRead(Settings.checkEvery_Mins));
            includeBlankLocations = bool.Parse(sqlController.SettingRead(Settings.includeBlankLocations));

            userEmailAddess = outlookOnlineController.GetUserEmailAddress();

            timeOfRun  = DateTime.Now;
            tLimitTo   = timeOfRun.AddHours(+checkPreSend_Hours);
            tLimitFrom = timeOfRun.AddHours(-checkRetrace_Hours);
        }