MH: Farbliche Hinterlegung für markierte Zeilen in Zeiterfassung hinzugefügt
This commit is contained in:
@@ -5087,6 +5087,11 @@ namespace BeWo.ServiceProxy
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetColorForStatusBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
string GetColorForStatus(bool status);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetColorForServiceRecordView2", ReplyAction="http://tempuri.org/IOperationsService/GetColorForServiceRecordView2Response")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetColorForServiceRecordView2BeWoFaultFault" +
|
||||
"", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
string GetColorForServiceRecordView2();
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/UpdateIsChatActiveCustomerAPPCodeDC", ReplyAction="http://tempuri.org/IOperationsService/UpdateIsChatActiveCustomerAPPCodeDCResponse" +
|
||||
"")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/UpdateIsChatActiveCustomerAPPCodeDCBeWoFaul" +
|
||||
@@ -6292,6 +6297,11 @@ namespace BeWo.ServiceProxy
|
||||
return base.Channel.GetColorForStatus(status);
|
||||
}
|
||||
|
||||
public string GetColorForServiceRecordView2()
|
||||
{
|
||||
return base.Channel.GetColorForServiceRecordView2();
|
||||
}
|
||||
|
||||
public void UpdateIsChatActiveCustomerAPPCodeDC(long customerOid, int activeType)
|
||||
{
|
||||
base.Channel.UpdateIsChatActiveCustomerAPPCodeDC(customerOid, activeType);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<localView:BeWoView x:Class="BeWo.View.Detail.ServiceRecordView2"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:BeWo.View.Detail"
|
||||
xmlns:localView="clr-namespace:BeWo.View"
|
||||
xmlns:localViewModel="clr-namespace:BeWo.ViewModel"
|
||||
xmlns:localViewControls="clr-namespace:BeWo.View.Controls"
|
||||
@@ -854,7 +855,6 @@
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Row="0" Content="Betrag" Grid.Column="0" x:Name="lblBetrag" HorizontalAlignment="Right" />
|
||||
<dxe:TextEdit x:Name="numerictb_betrag" Grid.Column="1" Grid.Row="0" Height="23" Margin="3,0,3,3" Width="52" HorizontalAlignment="Stretch" MaskType="Numeric" MaskUseAsDisplayFormat="True" EditValue="{Binding Path=PrototypeVM.Betrag, UpdateSourceTrigger=PropertyChanged}" Mask="########0.00"/>
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="Eintrag markieren" HorizontalAlignment="Right"/>
|
||||
|
||||
|
||||
</Grid>
|
||||
@@ -1205,14 +1205,14 @@
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<Grid x:Name="serviceRecordListContent" Margin="0,0,0,25" Grid.Column="1" Grid.Row="0" MinWidth="300" >
|
||||
<Grid x:Name="serviceRecordListContent" Margin="0,0,0,25" Grid.Column="1" Grid.Row="0" MinWidth="300" >
|
||||
<dxb:BarManager>
|
||||
<dxb:BarManager.Items>
|
||||
<dxb:BarButtonItem Name="dxEditButton" Content="Eintrag bearbeiten" Glyph="..\..\Ressources\Icons\Symbol Edit.png" ItemClick="DxEditButton_OnItemClick"/>
|
||||
<dxb:BarButtonItem Name="dxDeleteButton" Content="Eintrag löschen" Glyph="..\..\Ressources\Icons\Symbol Delete.png" ItemClick="DxDeleteButton_OnItemClick"/>
|
||||
<dxb:BarButtonItem Name="dxHistoryButton" Content="Änderungshistorie anzeigen" Glyph="..\..\Ressources\Icons\History24.png" ItemClick="DxHistoryButton_OnItemClick"/>
|
||||
</dxb:BarManager.Items>
|
||||
<dxg:GridControl x:Name="srGridControl" TabIndex="1" AutoExpandAllGroups="True" Visibility="Hidden" >
|
||||
<dxg:GridControl x:Name="srGridControl" TabIndex="1" AutoExpandAllGroups="True" Visibility="Hidden">
|
||||
<dxb:BarManager.DXContextMenu>
|
||||
<dxb:PopupMenuInfo Opened="PopupInfo_OnOpened" >
|
||||
<dxb:BarButtonItemLink BarItemName="dxEditButton" />
|
||||
@@ -1296,7 +1296,17 @@
|
||||
ShowTotalSummary="False"
|
||||
NavigationStyle="Row"
|
||||
MouseDoubleClick="SrTableView_OnMouseDoubleClick"
|
||||
ShowAutoFilterRow="True"/>
|
||||
ShowAutoFilterRow="True">
|
||||
<dxg:TableView.RowStyle>
|
||||
<Style TargetType="dxg:RowControl">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding RowState.(local:RowBackgroundHelper.IsEnabled)}" Value="True">
|
||||
<Setter Property="Background" Value="{Binding RowState.(local:RowBackgroundHelper.Background)}"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</dxg:TableView.RowStyle>
|
||||
</dxg:TableView>
|
||||
</dxg:GridControl.View>
|
||||
</dxg:GridControl>
|
||||
</dxb:BarManager>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
//using System.Drawing;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
@@ -41,6 +41,7 @@ using DevExpress.Xpf.Docking.Platform;
|
||||
using DevExpress.Xpf.Editors;
|
||||
using DevExpress.Xpf.RichEdit;
|
||||
using Microsoft.Win32;
|
||||
using System.Windows.Media;
|
||||
using Brushes = System.Windows.Media.Brushes;
|
||||
using Color = System.Windows.Media.Color;
|
||||
using ColorConverter = System.Windows.Media.ColorConverter;
|
||||
@@ -2004,12 +2005,34 @@ namespace BeWo.View.Detail
|
||||
srListBox.ItemsSource = list;
|
||||
//###Bars
|
||||
srGridControl.ItemsSource = list;
|
||||
|
||||
ColorLinesWithMarker(list);
|
||||
|
||||
|
||||
//this.serviceRecordScheduler.ServiceRecordList = list;
|
||||
|
||||
if (_AssessmentSheet != null)
|
||||
_AssessmentSheet.ServiceRecords = list;
|
||||
}
|
||||
|
||||
private void ColorLinesWithMarker(List<ServiceRecordVM> list)
|
||||
{
|
||||
var converter = new BrushConverter();
|
||||
|
||||
var colorString = ServiceFacade.DoOperationsServiceSync(s => s.GetColorForServiceRecordView2());
|
||||
var color = (Brush)converter.ConvertFromString(colorString);
|
||||
|
||||
for (int i = 0; i < list.Count; i++)
|
||||
{
|
||||
if(list[i].ServiceRecordType.ToString().Equals("Content"))
|
||||
{
|
||||
var rowstate = srGridControl.GetRowState(i, true);
|
||||
rowstate.SetValue(RowBackgroundHelper.IsEnabledProperty, true);
|
||||
rowstate.SetValue(RowBackgroundHelper.BackgroundProperty, color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void BtnDelete_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var vm = ((Button) sender).Tag as ServiceRecordVM;
|
||||
@@ -4701,5 +4724,37 @@ namespace BeWo.View.Detail
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class RowBackgroundHelper
|
||||
{
|
||||
public static Brush GetBackground(DependencyObject obj)
|
||||
{
|
||||
return (Brush)obj.GetValue(BackgroundProperty);
|
||||
}
|
||||
public static void SetBackground(DependencyObject obj, Brush value)
|
||||
{
|
||||
obj.SetValue(BackgroundProperty, value);
|
||||
}
|
||||
public static readonly DependencyProperty BackgroundProperty =
|
||||
DependencyProperty.RegisterAttached("Background", typeof(Brush), typeof(RowBackgroundHelper), null);
|
||||
|
||||
|
||||
|
||||
public static bool GetIsEnabled(DependencyObject obj)
|
||||
{
|
||||
return (bool)obj.GetValue(IsEnabledProperty);
|
||||
}
|
||||
|
||||
public static void SetIsEnabled(DependencyObject obj, bool value)
|
||||
{
|
||||
obj.SetValue(IsEnabledProperty, value);
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty IsEnabledProperty =
|
||||
DependencyProperty.RegisterAttached("IsEnabled", typeof(bool), typeof(RowBackgroundHelper), new PropertyMetadata(false));
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1057,5 +1057,10 @@ namespace BeWo.Service.ServiceContracts
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
string GetColorForStatus(bool status);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
string GetColorForServiceRecordView2();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -6601,6 +6601,18 @@ namespace BeWo.Service.ServiceImplementations
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public string GetColorForServiceRecordView2()
|
||||
{
|
||||
try
|
||||
{
|
||||
return "#FF8686";
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user