Exemplo n.º 1
0
        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));
            }
        }
Exemplo n.º 2
0
 public void ExecutePrintComplain()
 {
     if (!SaveComplain())
     {
         MessageBox.Show("Can't Save Complain");
     }
     else
     {
         GenerateReports.PrintComplain(SelectedEmployee);
     }
 }
Exemplo n.º 3
0
        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);
 }
Exemplo n.º 5
0
 private void PrintLabourAllInOne(object obj)
 {
     SaveLabourProcess();
     GenerateReports.PrintLabourAllInOne(Employee, obj != null);
 }
Exemplo n.º 6
0
 private void PrintApplication(object obj)
 {
     SaveLabourProcess();
     GenerateReports.PrintLabourApplication(Employee, obj != null);
 }
Exemplo n.º 7
0
 private void PrintLetter(object obj)
 {
     SaveLabourProcess();
     GenerateReports.PrintCoverLetter(Employee, obj != null);
 }
Exemplo n.º 8
0
 private void PrintAllInOne(object obj)
 {
     SaveEmbassyProcess();
     GenerateReports.PrintAllInOne(Employee, obj != null);
 }
Exemplo n.º 9
0
 private void PrintEmbassySelection(object obj)
 {
     SaveEmbassyProcess();
     GenerateReports.PrintEmbassySelection(Employee, obj != null);
 }
Exemplo n.º 10
0
 private void PrintRecruitingOrder(object obj)
 {
     SaveEmbassyProcess();
     GenerateReports.PrintRecruitingOrder(Employee, obj != null);
 }