public void Execute() { lock (_lock) { if (_shuttingDown) return; _logic = new Logic(new BeverageManagementEntities()); bool over = true; var selectedEmployeesForPayment = _logic.GetFinalSelectedEmployeesForCycle(AppConfig.Config.PerCyclePerson, AppConfig.Config.CurrentRunningCycle, out over); var names = selectedEmployeesForPayment.Select(n => n.Name).ToList(); var commaSeperatedNames = ""; foreach (var name in names) { if (commaSeperatedNames.Length != 0) commaSeperatedNames += ", "; commaSeperatedNames += name; } Mvc.Mailer.QuickSend(AppConfig.Config.AdminEmails, "hi!! mail sending reminder", "New employees (" + commaSeperatedNames+") has been selected for beverage payment this week. Please confirm there payment by going to the beverage management site.", isAsync: false); // Do work, son! } }
public PaymentCyclesController() { _logic = new Logic(db); }
public HistoriesController() { _logic = new Logic(db); }