private void Exportdue_Click(object sender, RoutedEventArgs e) { if (mindate.SelectedDate != null && maxdate.SelectedDate != null) { var firstdate = mindate.SelectedDate.ToDateTime(); var seconddate = maxdate.SelectedDate.ToDateTime(); var min = new DateTime(firstdate.Year, firstdate.Month, firstdate.Day, minhr.Text.To <int>(), minmin.Text.To <int>(), 0); var max = new DateTime(seconddate.Year, seconddate.Month, seconddate.Day, maxhr.Text.To <int>(), maxmin.Text.To <int>(), 0); using (var fbd = new FolderBrowserDialog()) { var result = fbd.ShowDialog(); if (fbd.SelectedPath.HasValue()) { ExportHandler.Export(fbd.SelectedPath, min, max); } } } else { EventBus.Notify("Dates are empty", "Alert"); } }
private async void Exportall_Click(object sender, RoutedEventArgs e) { using (var fbd = new FolderBrowserDialog()) { var result = fbd.ShowDialog(); if (fbd.SelectedPath.HasValue()) { ExportHandler.Export(fbd.SelectedPath); } } }
private void Exportthis_Click(object sender, RoutedEventArgs e) { using (var fbd = new FolderBrowserDialog()) { var result = fbd.ShowDialog(); if (fbd.SelectedPath.HasValue()) { ExportHandler.Export(fbd.SelectedPath, skip.Text.To <int>(), take.Text.To <int>()); } } }
public override int Run(string[] remainingArguments) { if ((Skip.HasValue() && Take.HasValue()) || (Min.HasValue() && Max.HasValue())) { if (Min.HasValue() && Max.HasValue()) { var min = DateTime.ParseExact(Min, "d", CultureInfo.InvariantCulture); var max = DateTime.ParseExact(Max, "d", CultureInfo.InvariantCulture); ExportHandler.Export(FileLocation, min, max); } if (Skip.HasValue() && Take.HasValue()) { ExportHandler.Export(FileLocation, Skip.To <int>(), Take.To <int>()); } } else { ExportHandler.Export(FileLocation); } return(1); }