40 lines
1.4 KiB
C#
40 lines
1.4 KiB
C#
using System;
|
|
using System.Windows;
|
|
using BeWo.Core;
|
|
using BeWo.ServiceProxy;
|
|
|
|
using BS.Shared.DataContracts;
|
|
|
|
namespace BeWo.View.Report.Finance
|
|
{
|
|
public partial class FinanceOverviewView
|
|
{
|
|
public FinanceOverviewView()
|
|
{
|
|
InitializeComponent();
|
|
|
|
datePickerStartDate.DateTime = DateTime.MinValue;
|
|
datePickerEndDate.DateTime = DateTime.MinValue;
|
|
datePickerStartDate.DateTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
|
|
datePickerEndDate.DateTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).AddMonths(1).AddDays(-1);
|
|
}
|
|
|
|
private void buttonRefresh_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
|
|
var url = string.Format("{0}/ReportView.aspx?type={1}&start={2:ddMMyyyy}&end={3:ddMMyyyy}", BeWoApp.SiteOfOrigin, ReportTypes.FinanceReport, datePickerStartDate.DateTime, datePickerEndDate.DateTime);
|
|
if (checkbox_onlyNotApproved.IsChecked == true)
|
|
{
|
|
url += "&onlyNotApproved=1";
|
|
}
|
|
//var tempToken = string.Empty;
|
|
//ServiceFacade.DoDownloadServiceSync(s => tempToken = s.CreateTemporaryToken(url, true));
|
|
//var addChar = (url.Contains("?")) ? "&" : "?";
|
|
//url = url + addChar + "token=" + tempToken;
|
|
|
|
//url = BeWoWpfUtils.GetHTMLEncodedURL(url);
|
|
|
|
BeWoUtils.NavigateToReportUriWithDocumentPreviewControl(url, "Finanzauswertung", docPrevControl, null);
|
|
}
|
|
}
|
|
} |