public static async Task ConfigureReportsDate(Container container, UserManager <User> userManager) { using (var connection = JobStorage.Current.GetConnection()) { foreach (var recurringJob in connection.GetRecurringJobs()) { RecurringJob.RemoveIfExists(recurringJob.Id); } } using (AsyncScopedLifestyle.BeginScope(container)) { var restaurantDetailsRepository = container.GetInstance <IRestaurantDetailsRepository>(); var details = await restaurantDetailsRepository.GetRestaurantDetails(); GenerateReports gr = new GenerateReports(container, userManager); //RecurringJob.AddOrUpdate("DailyReport", () => gr.GenerateDailyReport(), Cron.Minutely()); // test //RecurringJob.AddOrUpdate("MonthlyReport", () => gr.GenerateMonthlyReport(), Cron.Minutely()); //test //********** Deploy //RecurringJob.AddOrUpdate("DailyReport", () => gr.GenerateDailyReport(), Cron.Daily(details.ClosingHour)); //RecurringJob.AddOrUpdate("MonthlyReport", () => gr.GenerateMonthlyReport(), Cron.Monthly(1, details.OpeningHour)); } }
public void ExecutePrintComplain() { if (!SaveComplain()) { MessageBox.Show("Can't Save Complain"); } else { GenerateReports.PrintComplain(SelectedEmployee); } }
public void PrintSummaryList(object obj) { switch (ReportType) { case ReportTypes.LabourMonthly: GenerateReports.PrintMonthlyList(FilterStartDate, FilterEndDate); break; case ReportTypes.LabourLost: GenerateReports.PrintLost(FilterStartDate, FilterEndDate); break; case ReportTypes.LabourReturned: GenerateReports.PrintReturned(FilterStartDate, FilterEndDate); break; case ReportTypes.LabourContractEnd: GenerateReports.PrintContratCompleted(FilterStartDate, FilterEndDate); break; case ReportTypes.LabourDiscontinued: GenerateReports.PrintDiscontinued(FilterStartDate, FilterEndDate); break; case ReportTypes.EmbassyMonthly: GenerateReports.PrintEmbassyMonthly(FilterStartDate, FilterEndDate); break; case ReportTypes.TicketList: GenerateReports.PrintFlightList(FilterStartDate, FilterEndDate, new GetTicketList(), ReportTypes.TicketList); break; case ReportTypes.TicketAmountList: GenerateReports.PrintFlightList(FilterStartDate, FilterEndDate, new TicketAmountList(), ReportTypes.TicketAmountList); break; } }
private void ExecutePrintTestimonyViewCommand(object obj) { GenerateReports.PrintTestimonialLetter(Employee, false); CloseWindow(obj); }
private void PrintLabourAllInOne(object obj) { SaveLabourProcess(); GenerateReports.PrintLabourAllInOne(Employee, obj != null); }
private void PrintApplication(object obj) { SaveLabourProcess(); GenerateReports.PrintLabourApplication(Employee, obj != null); }
private void PrintLetter(object obj) { SaveLabourProcess(); GenerateReports.PrintCoverLetter(Employee, obj != null); }
private void PrintAllInOne(object obj) { SaveEmbassyProcess(); GenerateReports.PrintAllInOne(Employee, obj != null); }
private void PrintEmbassySelection(object obj) { SaveEmbassyProcess(); GenerateReports.PrintEmbassySelection(Employee, obj != null); }
private void PrintRecruitingOrder(object obj) { SaveEmbassyProcess(); GenerateReports.PrintRecruitingOrder(Employee, obj != null); }