Merge branch 'master' of ssh://float.beyondsoft.de/git/beyondSoft/BeWo
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -460,30 +460,68 @@
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<CheckBox Grid.Column="1" Grid.Row="1" Content="Nur inhaltliche Doku anzeigen" Margin="3" x:Name="chkContentFilter"
|
||||
Visibility="Visible" Grid.ColumnSpan="3" IsChecked="{Binding Path=ShowOnlyContentServiceRecords, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
<Label Grid.Column="1" Grid.Row="2" Content="Zeitraum:"></Label>
|
||||
<StackPanel Orientation="Horizontal" Grid.Column="2" Grid.Row="2" Grid.ColumnSpan="3">
|
||||
<dxe:ComboBoxEdit ItemsSource="{x:Static core:EnumTranslations.ServiceRecordTimeIntervalTranslations}"
|
||||
|
||||
<Label Grid.Column="1" Grid.Row="2" Content="Zeitraum:"></Label>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Grid.Column="2" Grid.Row="2" Grid.ColumnSpan="3" x:Name="ZeitraumComboStackPanel">
|
||||
<dxe:ComboBoxEdit ItemsSource="{x:Static core:EnumTranslations.ServiceRecordTimeIntervalTranslations}" Margin="3,3,3,3"
|
||||
EditValue="{Binding Path=ServiceRecordTimeInterval, UpdateSourceTrigger=PropertyChanged}" DisplayMember="Value" ValueMember="Key"
|
||||
IsTextEditable="False" x:Name="TimeIntervalComboBox" Width="120" />
|
||||
IsTextEditable="False" x:Name="TimeIntervalComboBox" Width="120" SelectedIndexChanged="TimeIntervalComboBox_OnSelectedIndexChanged"/>
|
||||
<!--<TextBox x:Name="NDayTextbox" Visibility="Collapsed" Text="{Binding Path=NDays, UpdateSourceTrigger=PropertyChanged}" Width="70" VerticalContentAlignment="Center" />-->
|
||||
<!--<Button x:Name="NLadenBtn" Visibility="Collapsed" Click="NLadenBtn_Click" HorizontalContentAlignment="Center" Content="Ok" Width="24" Height="24" Margin="3,0,0,0" />-->
|
||||
|
||||
</StackPanel>
|
||||
|
||||
<Label Grid.Column="1" Content="Ansicht:" Grid.Row="3"></Label>
|
||||
<RadioButton Grid.Column="2" Grid.Row="3" Checked="ChkRowView_Checked" IsChecked="True" ToolTip="Liste anzeigen" Margin="5" GroupName="viewType">
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="3" Grid.ColumnSpan="4" Visibility="Collapsed" x:Name="NDays">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Column="0" Grid.Row="0" Content="Anzahl Tage:"></Label>
|
||||
|
||||
<dxe:SpinEdit MinValue="0" Increment="1" IsFloatValue="False" AllowNullInput="False" x:Name="NDays_Auswahl" HorizontalAlignment="Right" VerticalAlignment="Center" Width="50"
|
||||
Grid.Column="1" Grid.Row="0" Margin="0,0,15,0" EditValue="{Binding Path=XTage, Converter={StaticResource Int2DecimalConverter},UpdateSourceTrigger=PropertyChanged}" />
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="3" Grid.ColumnSpan="4" Visibility="Collapsed" x:Name="NDays_Von_Bis">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="0" Content="von " />
|
||||
<dxe:DateEdit Grid.Column="1" Grid.Row="0"
|
||||
x:Name="NDay_Von" Width="80" Margin="3,3,3,3" MaskType="DateTimeAdvancingCaret" EditValue="{val:ValidationBinding Mode=TwoWay, Path=XTageVon}"/>
|
||||
|
||||
<Label Grid.Column="2" Grid.Row="0" Content="bis" />
|
||||
<dxe:DateEdit Grid.Column="3" Grid.Row="0"
|
||||
x:Name="NDay_Bis" Width="80" Margin="3,3,3,3" MaskType="DateTimeAdvancingCaret" EditValue="{val:ValidationBinding Mode=TwoWay, Path=XTageBis}" />
|
||||
|
||||
</Grid>
|
||||
|
||||
<Label Grid.Column="1" Content="Ansicht:" Grid.Row="4"></Label>
|
||||
<RadioButton Grid.Column="2" Grid.Row="4" Checked="ChkRowView_Checked" IsChecked="True" ToolTip="Liste anzeigen" Margin="5" GroupName="viewType">
|
||||
Liste
|
||||
</RadioButton>
|
||||
<RadioButton x:Name="ChkDetailView" Grid.Column="3" Grid.Row="3" Checked="ChkDetailView_Checked" ToolTip="Tabelle anzeigen" Margin="5" GroupName="viewType">
|
||||
<RadioButton x:Name="ChkDetailView" Grid.Column="3" Grid.Row="4" Checked="ChkDetailView_Checked" ToolTip="Tabelle anzeigen" Margin="5" GroupName="viewType">
|
||||
Tabelle
|
||||
</RadioButton>
|
||||
<Button Grid.Column="4" Grid.Row="3" Click="ReloadButton_OnClick" Margin="3,0,0,0" ToolTip="Liste aktualisieren" Width="24" Height="24">
|
||||
<Button Grid.Column="4" Grid.Row="4" Click="ReloadButton_OnClick" Margin="3,0,0,0" ToolTip="Liste aktualisieren" Width="24" Height="24">
|
||||
<Button.Template>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Grid>
|
||||
|
||||
@@ -111,6 +111,17 @@ namespace BeWo.View.Detail
|
||||
|
||||
// NLadenBtn.Visibility = Visibility.Visible;
|
||||
//}
|
||||
if (ViewModel.ServiceRecordTimeInterval == ServiceRecordTimeInterval.XTage)
|
||||
{
|
||||
NDays.Visibility = Visibility.Visible;
|
||||
}
|
||||
else if (ViewModel.ServiceRecordTimeInterval == ServiceRecordTimeInterval.ZeitraumWaehlen)
|
||||
{
|
||||
NDays_Von_Bis.Visibility = Visibility.Visible;
|
||||
ZeitraumComboStackPanel.HorizontalAlignment = HorizontalAlignment.Right;
|
||||
TimeIntervalComboBox.Width = 110;
|
||||
}
|
||||
|
||||
|
||||
ViewModel.StatisticInfosLoaded += ViewModelOnStatisticInfosLoaded;
|
||||
|
||||
@@ -3962,5 +3973,32 @@ namespace BeWo.View.Detail
|
||||
ReloadMedRecordViewModel(ViewModel.BedarfsMedViewModel.NewVM.Customer, ViewModel.BedarfsMedViewModel.NewVM.Employee);
|
||||
}
|
||||
|
||||
private void TimeIntervalComboBox_OnSelectedIndexChanged(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (ViewModel.ServiceRecordTimeInterval == ServiceRecordTimeInterval.XTage)
|
||||
{
|
||||
NDays.Visibility = Visibility.Visible;
|
||||
|
||||
NDays_Von_Bis.Visibility = Visibility.Collapsed;
|
||||
ZeitraumComboStackPanel.HorizontalAlignment = HorizontalAlignment.Left;
|
||||
TimeIntervalComboBox.Width = 120;
|
||||
}
|
||||
else if (ViewModel.ServiceRecordTimeInterval == ServiceRecordTimeInterval.ZeitraumWaehlen)
|
||||
{
|
||||
NDays_Von_Bis.Visibility = Visibility.Visible;
|
||||
ZeitraumComboStackPanel.HorizontalAlignment = HorizontalAlignment.Right;
|
||||
TimeIntervalComboBox.Width = 110;
|
||||
|
||||
NDays.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
else
|
||||
{
|
||||
NDays.Visibility = Visibility.Collapsed;
|
||||
|
||||
NDays_Von_Bis.Visibility = Visibility.Collapsed;
|
||||
ZeitraumComboStackPanel.HorizontalAlignment = HorizontalAlignment.Left;
|
||||
TimeIntervalComboBox.Width = 120;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -105,7 +105,7 @@ namespace BeWo.View.Navigation
|
||||
{
|
||||
var cdc = obj as CompactCustomerDC;
|
||||
if (cdc != null)
|
||||
{
|
||||
{
|
||||
if (MessageBox.Show("Wollen Sie den Klient '" + cdc.FirstName + " " + cdc.LastName + "' wirklich archivieren?", "Archivieren", MessageBoxButton.YesNo, MessageBoxImage.Exclamation) == MessageBoxResult.Yes)
|
||||
{
|
||||
ServiceFacade.DoCustomerServiceAsync(
|
||||
@@ -118,7 +118,7 @@ namespace BeWo.View.Navigation
|
||||
|
||||
Cache.GetInstance().ClearSupportConceptTree();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -152,15 +152,17 @@ namespace BeWo.View.Navigation
|
||||
}
|
||||
if (delete)
|
||||
{
|
||||
|
||||
ServiceFacade.DoCustomerServiceAsync(
|
||||
s =>
|
||||
{
|
||||
s.DeactivateCustomer(cdc.CustomerOid, cdc.CustomerVersion);
|
||||
return cdc;
|
||||
}, cb => cb.CustomerVersion++);
|
||||
s =>
|
||||
{
|
||||
s.DeactivateCustomer(cdc.CustomerOid, cdc.CustomerVersion);
|
||||
return cdc;
|
||||
}, cb => cb.CustomerVersion++);
|
||||
|
||||
Cache.GetInstance().ClearSupportConceptTree();
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,13 +75,20 @@ namespace BeWo.View.Navigation
|
||||
CompactUserDC dc = obj as CompactUserDC;
|
||||
if (dc != null)
|
||||
{
|
||||
if (MessageBox.Show("Wollen Sie den Benutzer '" + dc.LoginName + "' wirklich löschen?", "Löschen", MessageBoxButton.YesNo, MessageBoxImage.Exclamation) == MessageBoxResult.Yes)
|
||||
if (dc.UserOid != BeWoApp.LoggedOnUser.UserOid.Value)
|
||||
{
|
||||
ServiceFacade.DoUserServiceAsync(s => s.DeactivateUser(dc.UserOid, dc.UserVersion), () => this.Dispatch(() => ReloadData(true)), true);
|
||||
if (MessageBox.Show("Wollen Sie den Benutzer '" + dc.LoginName + "' wirklich löschen?", "Löschen", MessageBoxButton.YesNo, MessageBoxImage.Exclamation) == MessageBoxResult.Yes)
|
||||
{
|
||||
ServiceFacade.DoUserServiceAsync(s => s.DeactivateUser(dc.UserOid, dc.UserVersion), () => this.Dispatch(() => ReloadData(true)), true);
|
||||
|
||||
//ServiceFacade.DoUserServiceAsync(s => s.DeactivateUserGroup(ugdc.UserGroupOid.Value, ugdc.UserGroupVersion.Value), () => this.Dispatch(() => ReloadData(true)), true);
|
||||
//ServiceFacade.DoUserServiceAsync(s => s.DeactivateUserGroup(ugdc.UserGroupOid.Value, ugdc.UserGroupVersion.Value), () => this.Dispatch(() => ReloadData(true)), true);
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Sie können Ihren eigenen Benutzer nicht löschen", "Fehler", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -87,6 +87,12 @@ namespace BeWo.ViewModel.ListViewModel
|
||||
|
||||
private int _NDays;
|
||||
|
||||
//meins
|
||||
private DateTime? _XTageVon;
|
||||
|
||||
private DateTime? _XTageBis;
|
||||
|
||||
private int _XTage;
|
||||
//private WohnheimbuchungsVM selectedWohnheimbuchung;
|
||||
|
||||
//private static List<DarreichungsformDC> _AllDosageForms;
|
||||
@@ -232,6 +238,75 @@ namespace BeWo.ViewModel.ListViewModel
|
||||
}
|
||||
}
|
||||
|
||||
//######################### ServiceRecordTimeInterval Erweiterung #############################
|
||||
public int XTage
|
||||
{
|
||||
get { return _XTage; }
|
||||
|
||||
set
|
||||
{
|
||||
if (_XTage != value)
|
||||
{
|
||||
_XTage = value;
|
||||
ServiceRecordTimeInterval = ServiceRecordTimeInterval.XTage;
|
||||
BuildServiceRecordsForSelectedTreeNode(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
public DateTime? XTageBis
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_XTageBis == null)
|
||||
{
|
||||
_XTageBis = DateTime.Now;
|
||||
}
|
||||
return _XTageBis;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (_XTageBis != value) //null ersetzen durch _XTageBis
|
||||
{
|
||||
_XTageBis = value;
|
||||
ServiceRecordTimeInterval = ServiceRecordTimeInterval.ZeitraumWaehlen;
|
||||
|
||||
if (XTageVon == null)
|
||||
{
|
||||
XTageVon = DateTime.Now;
|
||||
}
|
||||
|
||||
BuildServiceRecordsForSelectedTreeNode(true);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public DateTime? XTageVon
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_XTageVon == null)
|
||||
{
|
||||
_XTageVon = new DateTime(DateTime.Now.Year, DateTime.Now.Month,1,0,0,0);
|
||||
}
|
||||
return _XTageVon;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (_XTageVon != value)//null ersetzen durch _XTageVon
|
||||
{
|
||||
_XTageVon = value;
|
||||
ServiceRecordTimeInterval = ServiceRecordTimeInterval.ZeitraumWaehlen;
|
||||
|
||||
BuildServiceRecordsForSelectedTreeNode(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//###########################################################################################################
|
||||
public List<SupportConceptPeriodStatisticsVM> Statistics
|
||||
{
|
||||
get { return _Statistics; }
|
||||
@@ -766,7 +841,7 @@ namespace BeWo.ViewModel.ListViewModel
|
||||
{
|
||||
long? days = null;
|
||||
switch (ServiceRecordTimeInterval)
|
||||
{
|
||||
{
|
||||
case ServiceRecordTimeInterval.LastWeek:
|
||||
days = 7;
|
||||
break;
|
||||
@@ -779,6 +854,15 @@ namespace BeWo.ViewModel.ListViewModel
|
||||
case ServiceRecordTimeInterval.LastNDays:
|
||||
days = NDays;
|
||||
break;
|
||||
case ServiceRecordTimeInterval.XTage:
|
||||
days = _XTage;
|
||||
break;
|
||||
//case ServiceRecordTimeInterval.ZeitraumWaehlen:
|
||||
// //zu test zwecken
|
||||
// var x = XTageBis.Value.Date - XTageVon.Value.Date;
|
||||
|
||||
// days = (long)x.TotalDays;
|
||||
// break;
|
||||
}
|
||||
|
||||
if (WithoutClient)
|
||||
@@ -806,13 +890,30 @@ namespace BeWo.ViewModel.ListViewModel
|
||||
BuildServiceRecordsForTreeNode(null, true, null);
|
||||
}));
|
||||
}
|
||||
else if (DispatcherObject != null && ServiceRecordTimeInterval == ServiceRecordTimeInterval.ZeitraumWaehlen)
|
||||
{
|
||||
ServiceFacade.DoOperationsServiceAsync(s => s.GetEmployeesServiceRecordsWithStartEndDate(emp.EmployeeOid, XTageVon.Value, XTageBis.Value),
|
||||
r => DispatcherObject.Dispatch(delegate
|
||||
{
|
||||
VMList.Clear();
|
||||
foreach (ServiceRecordDC dc in r)
|
||||
AddServiceRecordToList(dc, null, null, null);
|
||||
|
||||
//_EmployeeServiceRecordsLoaded.Add(emp, true);
|
||||
|
||||
// BuildServiceRecordsForTreeNode(_SelectedCustomerNode);
|
||||
// if (!_CustomerServiceRecordsLoaded.ContainsKey(customer))
|
||||
// _CustomerServiceRecordsLoaded.Add(customer, true);
|
||||
BuildServiceRecordsForTreeNode(null, true, null);
|
||||
}));
|
||||
}
|
||||
else
|
||||
{
|
||||
BuildServiceRecordsForTreeNode(null, true, null);
|
||||
}
|
||||
|
||||
PrototypeVM.ChangeGoalTree(null, null);
|
||||
}
|
||||
}//hier ne abfrage zwischen und ein service ausführen um alle rauszuholen vllt
|
||||
else
|
||||
{
|
||||
if (_SelectedCustomerNode != null)
|
||||
@@ -927,8 +1028,8 @@ namespace BeWo.ViewModel.ListViewModel
|
||||
// BuildServiceRecordsForTreeNode(_SelectedCustomerNode, true, OnlyWithThisType);
|
||||
//else
|
||||
//{
|
||||
|
||||
if (DispatcherObject != null)
|
||||
|
||||
if (DispatcherObject != null && ServiceRecordTimeInterval != ServiceRecordTimeInterval.ZeitraumWaehlen)
|
||||
{
|
||||
ServiceFacade.DoOperationsServiceAsync(
|
||||
s =>
|
||||
@@ -945,6 +1046,26 @@ namespace BeWo.ViewModel.ListViewModel
|
||||
if (refreshFinishedCallback != null)
|
||||
refreshFinishedCallback();
|
||||
}));
|
||||
}else
|
||||
if (DispatcherObject != null && ServiceRecordTimeInterval == ServiceRecordTimeInterval.ZeitraumWaehlen)
|
||||
{
|
||||
|
||||
//Hole alle des Bestimmten Zeitraumes
|
||||
ServiceFacade.DoOperationsServiceAsync(
|
||||
s =>
|
||||
s.GetCustomerServiceRecordsCompactWithStartEndDate(customer.CustomerOid, cb2scOid, XTageVon.Value, XTageBis.Value),
|
||||
r => DispatcherObject.Dispatch(delegate
|
||||
{
|
||||
VMList.Clear();
|
||||
foreach (ServiceRecordDC dc in r)
|
||||
AddServiceRecordToList(dc, goalCats, goals, _SelectedCustomerNode);
|
||||
|
||||
BuildServiceRecordsForTreeNode(_SelectedCustomerNode, true, OnlyWithThisType);
|
||||
//_ServiceRecordsLoaded[key] = (days ?? long.MaxValue);
|
||||
|
||||
if (refreshFinishedCallback != null)
|
||||
refreshFinishedCallback();
|
||||
}));
|
||||
}
|
||||
//}
|
||||
|
||||
@@ -1003,6 +1124,8 @@ namespace BeWo.ViewModel.ListViewModel
|
||||
if (fetchStatistics)
|
||||
Statistics = null;
|
||||
|
||||
bool isTypeZeitraumWaehlen = false;
|
||||
|
||||
if (WithoutClient || (treeNode != null && treeNode.SupportConceptTreeNodeDC != null))
|
||||
{
|
||||
SupportConceptCostBearerRelDC relDC = null;
|
||||
@@ -1064,7 +1187,7 @@ namespace BeWo.ViewModel.ListViewModel
|
||||
{
|
||||
long? days = null;
|
||||
switch (ServiceRecordTimeInterval)
|
||||
{
|
||||
{
|
||||
case ServiceRecordTimeInterval.LastWeek:
|
||||
days = 7;
|
||||
break;
|
||||
@@ -1077,6 +1200,19 @@ namespace BeWo.ViewModel.ListViewModel
|
||||
case ServiceRecordTimeInterval.LastNDays:
|
||||
days = NDays;
|
||||
break;
|
||||
case ServiceRecordTimeInterval.XTage:
|
||||
days = _XTage;
|
||||
break;
|
||||
//case ServiceRecordTimeInterval.ZeitraumWaehlen:
|
||||
|
||||
// //zu test zwecken
|
||||
// var x = XTageBis.Value.Date - XTageVon.Value.Date;
|
||||
|
||||
// days = (long)x.TotalDays;
|
||||
|
||||
// isTypeZeitraumWaehlen = true;
|
||||
|
||||
// break;
|
||||
}
|
||||
|
||||
DateTime minDate = DateTime.MinValue;
|
||||
@@ -1088,7 +1224,7 @@ namespace BeWo.ViewModel.ListViewModel
|
||||
_ServiceRecordsForSelectedCustomer.Add(vm);
|
||||
}
|
||||
|
||||
if (!WithoutClient && relDC != null)
|
||||
if (!WithoutClient && relDC != null && isTypeZeitraumWaehlen == false)
|
||||
{
|
||||
if (fetchStatistics)
|
||||
{
|
||||
@@ -1113,7 +1249,6 @@ namespace BeWo.ViewModel.ListViewModel
|
||||
}), false));
|
||||
}
|
||||
}
|
||||
|
||||
_RecordCountInformationString = "Anzahl Einträge: " + _ServiceRecordsForSelectedCustomer.Count;
|
||||
}
|
||||
|
||||
|
||||
@@ -896,12 +896,14 @@ namespace BeWo.ViewModel
|
||||
{
|
||||
if (BeWoApp.AppSettings.IsEndDateVisible)
|
||||
{
|
||||
if (_StartTime.Value.Date == null)
|
||||
{
|
||||
StartTime = new DateTime(StartTime.Value.Year, StartTime.Value.Month, StartTime.Value.Day, StartTime.Value.Hour, 0, 0);
|
||||
}
|
||||
//if (_StartTime.Value.Date == null)
|
||||
//{
|
||||
// StartTime = new DateTime(StartTime.Value.Year, StartTime.Value.Month, StartTime.Value.Day, StartTime.Value.Hour, 0, 0);
|
||||
//}
|
||||
|
||||
_StartTime = new DateTime(Date.Value.Year, Date.Value.Month, Date.Value.Day, StartTime.Value.Hour, StartTime.Value.Minute, StartTime.Value.Second);
|
||||
|
||||
var diff = _EndTime.Value.Subtract(_StartTime.Value);
|
||||
var diff = _EndTime.Value.Subtract(_StartTime.Value);
|
||||
|
||||
if (_DurationInStunden == ZeiterfassungsDauer.Stunden)
|
||||
{
|
||||
|
||||
@@ -274,7 +274,23 @@ namespace BeWo.Data.Access
|
||||
return criteria.List<ServiceRecord>().ToList();
|
||||
}
|
||||
|
||||
public IList<ServiceRecord> FindEmployeeServiceRecords(long pEmployeeOid, DateTimeSpan pSpan, long? customerOid, ServiceRecordTypeId? srTypeFilter)
|
||||
public IEnumerable<ServiceRecord> FindEmployeeServiceRecordsWithoutCustomerWithStartEndDate(long pEmployeeOid, DateTime start, DateTime ende)
|
||||
{
|
||||
|
||||
var c = CreateCriteria<ServiceRecord>()
|
||||
.Add(Restrictions.Eq(ServiceRecord.PropertyName_EmployeeOid, pEmployeeOid))
|
||||
.Add(Restrictions.IsNull(ServiceRecord.PropertyName_CostBearer2SupportConceptOid));
|
||||
|
||||
var max = ende.AddDays(1);
|
||||
|
||||
c.Add(Restrictions.Ge(ServiceRecord.PropertyName_Start, start.Date))
|
||||
.Add(Restrictions.Lt(ServiceRecord.PropertyName_End, max.Date));
|
||||
|
||||
|
||||
return c.List<ServiceRecord>().ToList();
|
||||
}
|
||||
|
||||
public IList<ServiceRecord> FindEmployeeServiceRecords(long pEmployeeOid, DateTimeSpan pSpan, long? customerOid, ServiceRecordTypeId? srTypeFilter)
|
||||
{
|
||||
var lCriteria = CreateCriteria<ServiceRecord>()
|
||||
.Add(Restrictions.Eq(ServiceRecord.PropertyName_EmployeeOid, pEmployeeOid));
|
||||
@@ -621,6 +637,26 @@ namespace BeWo.Data.Access
|
||||
.List<ServiceRecord>();
|
||||
}
|
||||
|
||||
public IList<ServiceRecord> FindServiceRecordsDetailsForLastDaysWithStartEndDate(long costbearer2SupportConcept, DateTime start, DateTime ende)
|
||||
{
|
||||
var c = CreateCriteria<ServiceRecord>()
|
||||
.Add(Restrictions.Eq(ServiceRecord.PropertyName_CostBearer2SupportConceptOid, costbearer2SupportConcept));
|
||||
|
||||
|
||||
var max = ende.AddDays(1);
|
||||
|
||||
c.Add(Restrictions.Ge(ServiceRecord.PropertyName_Start, start.Date))
|
||||
.Add(Restrictions.Lt(ServiceRecord.PropertyName_End, max.Date));
|
||||
|
||||
|
||||
return c.CreateAlias(ServiceRecord.PropertyName_ValueList, "vl", JoinType.LeftOuterJoin)
|
||||
.CreateAlias(ServiceRecord.PropertyName_ServiceDescription, "sd", JoinType.InnerJoin)
|
||||
.CreateAlias("sd." + ServiceDescription.PropertyName_ServiceCategory, "sc", JoinType.InnerJoin)
|
||||
.CreateAlias(ServiceRecord.PropertyName_Employee, "e", JoinType.InnerJoin)
|
||||
.CreateCriteria("e." + Employee.PropertyName_Person, JoinType.InnerJoin)
|
||||
.List<ServiceRecord>();
|
||||
}
|
||||
|
||||
public IList<ServiceRecord> FindServiceRecordsDetailWithServiceInfo(long costbearer2SupportConcept)
|
||||
{
|
||||
var c = CreateCriteria<ServiceRecord>()
|
||||
|
||||
@@ -573,6 +573,13 @@ namespace BeWo.Service.ServiceContracts
|
||||
[FaultContract(typeof (BeWoFault))]
|
||||
[OperationContract]
|
||||
void CreateNewPerson2OrganisationRelation(long organi, ValueListEntryDC value, long personOid, string mail, string fax, string tele, string notice);
|
||||
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
List<ServiceRecordDC> GetEmployeesServiceRecordsWithStartEndDate(long pEmployeeOid, DateTime start, DateTime ende);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
List<ServiceRecordDC> GetCustomerServiceRecordsCompactWithStartEndDate(long pCustomerOid, long costbearer2SupportConceptOid, DateTime start, DateTime ende);
|
||||
}
|
||||
}
|
||||
@@ -636,7 +636,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public List<ServiceRecordDC> GetCustomerServiceRecordsInMonth(long pCustomerOid, DateTime pMonth)
|
||||
{
|
||||
try
|
||||
@@ -679,7 +679,56 @@ namespace BeWo.Service.ServiceImplementations
|
||||
}
|
||||
}
|
||||
|
||||
public List<ServiceRecordDC> GetEmployeesServiceRecordsInSpan(long pEmployeeOid, DateTimeSpan limitinDateTimeSpan)
|
||||
public List<ServiceRecordDC> GetEmployeesServiceRecordsWithStartEndDate(long pEmployeeOid, DateTime start, DateTime ende)
|
||||
{
|
||||
try
|
||||
{
|
||||
IEnumerable<ServiceRecord> list = DAOFactory.SearchDAO.FindEmployeeServiceRecordsWithoutCustomerWithStartEndDate(pEmployeeOid,start,ende);
|
||||
|
||||
return MapperFactory.ServiceRecordDC_ServiceRecord.MapToNewDCs(list);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public List<ServiceRecordDC> GetCustomerServiceRecordsCompactWithStartEndDate(long pCustomerOid, long costbearer2SupportConceptOid, DateTime start, DateTime ende)
|
||||
{
|
||||
try
|
||||
{
|
||||
var result = new List<ServiceRecordDC>();
|
||||
var srList = DAOFactory.SearchDAO.FindServiceRecordsDetailsForLastDaysWithStartEndDate(costbearer2SupportConceptOid, start,ende);
|
||||
|
||||
if (srList != null)
|
||||
{
|
||||
var serviceRecordsProcessed = new Dictionary<long, bool>();
|
||||
foreach (var item in srList)
|
||||
{
|
||||
if (!serviceRecordsProcessed.ContainsKey(item.Oid.Value))
|
||||
{
|
||||
//ServiceRecordDC dc = MapperFactory.ServiceRecordDC_ServiceRecord.MapToNewDC(item);
|
||||
//result.Add(dc);
|
||||
var dc = CreateServiceRecordDCCompact(item);
|
||||
if (dc != null)
|
||||
{
|
||||
result.Add(dc);
|
||||
}
|
||||
|
||||
serviceRecordsProcessed.Add(item.Oid.Value, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public List<ServiceRecordDC> GetEmployeesServiceRecordsInSpan(long pEmployeeOid, DateTimeSpan limitinDateTimeSpan)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -662,7 +662,9 @@ namespace BS.Shared
|
||||
LastMonth,
|
||||
Last3Month,
|
||||
All,
|
||||
LastNDays
|
||||
LastNDays,
|
||||
XTage,
|
||||
ZeitraumWaehlen
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -654,6 +654,10 @@ namespace BS.Shared.Core
|
||||
#region ServiceRecordTimeIntervalTranslations
|
||||
ServiceRecordTimeIntervalTranslations = new Dictionary<object, String>
|
||||
{
|
||||
{
|
||||
ServiceRecordTimeInterval.XTage, "Letzten X Tage"
|
||||
|
||||
},
|
||||
{
|
||||
ServiceRecordTimeInterval.LastWeek, "Letzten 7 Tage"
|
||||
},
|
||||
@@ -665,11 +669,10 @@ namespace BS.Shared.Core
|
||||
},
|
||||
{
|
||||
ServiceRecordTimeInterval.All, "Alle"
|
||||
},
|
||||
{
|
||||
ServiceRecordTimeInterval.ZeitraumWaehlen, "Zeitraum wählen"
|
||||
}
|
||||
//,
|
||||
//{
|
||||
// ServiceRecordTimeInterval.LastNDays, "Letzten N Tage"
|
||||
//}
|
||||
};
|
||||
#endregion
|
||||
|
||||
|
||||
Reference in New Issue
Block a user