111 lines
3.6 KiB
C#
111 lines
3.6 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Globalization;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Input;
|
|
using BS.Shared.Core;
|
|
using System.Windows.Media;
|
|
using BS.Shared.Extensions;
|
|
using System.Collections;
|
|
using System.Text;
|
|
using BeWo.Controls;
|
|
using BeWo.Core;
|
|
using System.Windows.Documents;
|
|
using BeWo.Core.Service;
|
|
using System.Windows.Threading;
|
|
using BeWo.View.Detail;
|
|
using BeWo.View.Master;
|
|
using BeWo.View.Report.FLSReport;
|
|
using BS.Shared.DataContracts.Compact;
|
|
using BS.Shared.DataContracts.Reports;
|
|
using BS.Shared.DataContracts;
|
|
using BeWo.ServiceProxy;
|
|
using BS.Shared;
|
|
using BeWo.ViewModel;
|
|
using DevExpress.Xpf.Core;
|
|
using Microsoft.Win32;
|
|
|
|
|
|
namespace BeWo.View.Report.Rating
|
|
{
|
|
public partial class RatingReportView : BeWoView
|
|
{
|
|
private CompactSupportConceptDC _SelectedSupportConcept;
|
|
|
|
public RatingReportView()
|
|
{
|
|
InitializeComponent();
|
|
|
|
|
|
ThemeManager.SetTheme(BeWoApp.CurrentBeWo.MainWindow, Theme.Office2010Black);
|
|
//ThemeManager.SetTheme(docPrevControl, Theme.Office2010Black);
|
|
dp_start.EditValue = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).AddMonths(-1);
|
|
dp_end.EditValue = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day);
|
|
|
|
Unloaded += delegate
|
|
{
|
|
ThemeManager.SetTheme(BeWoApp.CurrentBeWo.MainWindow, null);
|
|
//docPrevControl.Visibility = Visibility.Collapsed;
|
|
};
|
|
}
|
|
|
|
|
|
private void button_generate_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
if (_SelectedSupportConcept != null)
|
|
{
|
|
BorderRatingView.Visibility = Visibility.Visible;
|
|
if (chkTotalTimeSpan.IsChecked.HasValue && !chkTotalTimeSpan.IsChecked.Value)
|
|
{
|
|
SupportConceptRatingView.StartDate = dp_start.DateTime;
|
|
SupportConceptRatingView.EndDate = dp_end.DateTime;
|
|
}
|
|
else
|
|
{
|
|
SupportConceptRatingView.StartDate = null;
|
|
SupportConceptRatingView.EndDate = null;
|
|
}
|
|
UpdateRatingView();
|
|
}
|
|
}
|
|
|
|
private void UpdateRatingView()
|
|
{
|
|
VMFactory.CreateSupportConceptVMAsync(_SelectedSupportConcept.SupportConceptOid,
|
|
sc => this.Dispatch(
|
|
() =>
|
|
{
|
|
SupportConceptRatingView.SupportConcept = sc;
|
|
SupportConceptRatingView.RatingList = sc.Ratings;
|
|
SupportConceptRatingView.UpdateControl();
|
|
}
|
|
|
|
));
|
|
}
|
|
|
|
private void popupedit_CostBeaerer_PopUpClick(object sender, RoutedEventArgs ev)
|
|
{
|
|
this.popup_costBearer.IsOpen = true;
|
|
}
|
|
|
|
private void Popupedit_CostBeaerer_OnPreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
|
|
{
|
|
//if (!BeWoUtils.CheckPopupEditClickableSpace((PopUpEdit)sender, e) || _SelectedSupportConcept == null || !BeWoApp.LoggedOnUser.HasRight(UserRightType.SupportConceptView_Edit))
|
|
// return;
|
|
}
|
|
|
|
private void SupportConceptSearchView_ItemSelected(object sender, EventArgs<CompactSupportConceptDC> e)
|
|
{
|
|
this.popup_costBearer.IsOpen = false;
|
|
this.popupedit_CostBeaerer.Text = e.Data.DetailDescription;
|
|
this._SelectedSupportConcept = e.Data;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|