| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- using System;
- using System.Windows;
- using FastReport.Data;
- using InABox.Wpf;
- using InABox.WPF;
- using javax.sql;
- using Microsoft.Office.Interop.Outlook;
- namespace PRSDesktop
- {
- public partial class TimeSheetLeaveProcessor : Window
- {
- private DateTime _from;
- private DateTime _to;
-
- public TimeSheetLeaveProcessor(DateTime from, DateTime to)
- {
-
- InitializeComponent();
- _from = from;
- _to = to;
-
- standardleave.From = from;
- standardleave.To = to;
- standardleave.Refresh(true, true);
-
- leaverequests.From = from;
- leaverequests.To = to;
- leaverequests.Refresh(true, true);
- }
- private void OK_OnClick(object sender, RoutedEventArgs e)
- {
- if(standardleave.SelectedIDs.Count == 0 && leaverequests.SelectedIDs.Count == 0)
- {
- MessageWindow.ShowMessage("You haven't selected any leave entries to process. Please tick the required entries by clicking the right-hand column.", "No entries selected");
- return;
- }
- if (MessageWindow.ShowYesNo("Process these leave entries?", "Process Leave"))
- {
- Progress.ShowModal("Processing Leave", (progress) =>
- {
- standardleave.Process(progress);
- leaverequests.Process(progress);
- });
- DialogResult = true;
- }
- }
- private void Cancel_OnClick(object sender, RoutedEventArgs e)
- {
- DialogResult = false;
- }
- }
- }
|