Merge branch 'master' of ssh://float.ownsoft.de/git/beyondSoft/BeWo

This commit is contained in:
2025-05-23 12:24:49 +02:00
54 changed files with 1522 additions and 1100 deletions

View File

@@ -2101,7 +2101,6 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ServiceInvoicePeriodDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.InvoiceNumberDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.InvoiceNumberDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AppResponseDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.InvoiceType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.GkvTransferResultType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.GkvRawDataType))]
@@ -2117,6 +2116,7 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungSendResponseDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungGetIKRequestDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungGetIKResponseDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AppResponseDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.IO.MemoryStream))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.IO.Stream))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<System.DateTime>))]
@@ -6009,7 +6009,6 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ServiceInvoicePeriodDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.InvoiceNumberDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.InvoiceNumberDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AppResponseDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.InvoiceType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.GkvTransferResultType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.GkvRawDataType))]
@@ -6025,6 +6024,7 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungSendResponseDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungGetIKRequestDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungGetIKResponseDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AppResponseDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.IO.MemoryStream))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.IO.Stream))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<System.DateTime>))]
@@ -6115,6 +6115,11 @@ namespace BeWo.ServiceProxy
"loyeeAndCustomerBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
bool HasConfirmationReceiptSignatureByDateAndEmployeeAndCustomer(out System.Collections.Generic.List<BS.Shared.DataContracts.ConfirmationReceiptSignatureDC> confirmationReceiptSignatures, long customerOid, long employeeOid, System.DateTime start, System.DateTime end, long costBearer2SupportConceptOid);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/CreateRtfDocumentFromTemplate", ReplyAction="http://tempuri.org/IOperationsService/CreateRtfDocumentFromTemplateResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/CreateRtfDocumentFromTemplateBeWoFaultFault" +
"", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
string CreateRtfDocumentFromTemplate(long vorlageOid, BS.Shared.TableID objectTid, System.Collections.Generic.List<long> objectOids);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/DeleteDienstvertretung2", ReplyAction="http://tempuri.org/IOperationsService/DeleteDienstvertretung2Response")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/DeleteDienstvertretung2BeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
bool DeleteDienstvertretung2(long empId, long wohnId, int zeile, System.DateTime date, BS.Shared.DataContracts.DienstvertretungDC dienstvertretung, System.Collections.Generic.List<BS.Shared.DataContracts.DienstEintragDC> alleDiensteintraege, System.Collections.Generic.List<BS.Shared.DataContracts.DienstvertretungDC> alleDienstvertretungen, int day, System.DateTime pflichtStart, System.DateTime pflichtEnde);
@@ -7700,6 +7705,11 @@ namespace BeWo.ServiceProxy
return base.Channel.HasConfirmationReceiptSignatureByDateAndEmployeeAndCustomer(out confirmationReceiptSignatures, customerOid, employeeOid, start, end, costBearer2SupportConceptOid);
}
public string CreateRtfDocumentFromTemplate(long vorlageOid, BS.Shared.TableID objectTid, System.Collections.Generic.List<long> objectOids)
{
return base.Channel.CreateRtfDocumentFromTemplate(vorlageOid, objectTid, objectOids);
}
public bool DeleteDienstvertretung2(long empId, long wohnId, int zeile, System.DateTime date, BS.Shared.DataContracts.DienstvertretungDC dienstvertretung, System.Collections.Generic.List<BS.Shared.DataContracts.DienstEintragDC> alleDiensteintraege, System.Collections.Generic.List<BS.Shared.DataContracts.DienstvertretungDC> alleDienstvertretungen, int day, System.DateTime pflichtStart, System.DateTime pflichtEnde)
{
return base.Channel.DeleteDienstvertretung2(empId, wohnId, zeile, date, dienstvertretung, alleDiensteintraege, alleDienstvertretungen, day, pflichtStart, pflichtEnde);
@@ -9795,42 +9805,6 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAccountingService/StorniereInvoiceBases", ReplyAction="http://tempuri.org/IAccountingService/StorniereInvoiceBasesResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAccountingService/StorniereInvoiceBasesBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
void StorniereInvoiceBases(System.Collections.Generic.List<BS.Shared.DataContracts.InvoiceBaseDC> invoices);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAccountingService/GetGkvAbrechnung", ReplyAction="http://tempuri.org/IAccountingService/GetGkvAbrechnungResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAccountingService/GetGkvAbrechnungBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungDC GetGkvAbrechnung(long oid);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAccountingService/GetAllGkvAbrechnungen", ReplyAction="http://tempuri.org/IAccountingService/GetAllGkvAbrechnungenResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAccountingService/GetAllGkvAbrechnungenBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
System.Collections.Generic.List<BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungDC> GetAllGkvAbrechnungen();
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAccountingService/GetFilteredGkvAbrechnungen", ReplyAction="http://tempuri.org/IAccountingService/GetFilteredGkvAbrechnungenResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAccountingService/GetFilteredGkvAbrechnungenBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
System.Collections.Generic.List<BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungDC> GetFilteredGkvAbrechnungen(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungViewFilterDC gkvAbrechnungViewFilter);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAccountingService/GetProtokollRawDataString", ReplyAction="http://tempuri.org/IAccountingService/GetProtokollRawDataStringResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAccountingService/GetProtokollRawDataStringBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
string GetProtokollRawDataString(long oid, BS.Shared.GkvRawDataType gkvRawData);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAccountingService/CreateNewGkvAbrechnung", ReplyAction="http://tempuri.org/IAccountingService/CreateNewGkvAbrechnungResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAccountingService/CreateNewGkvAbrechnungBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungCreateResponseDC CreateNewGkvAbrechnung(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungCreateRequestDC request);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAccountingService/UpdateGkvAbrechnung", ReplyAction="http://tempuri.org/IAccountingService/UpdateGkvAbrechnungResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAccountingService/UpdateGkvAbrechnungBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungDC UpdateGkvAbrechnung(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungDC abrechnung);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAccountingService/DeleteGkvAbrechnung", ReplyAction="http://tempuri.org/IAccountingService/DeleteGkvAbrechnungResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAccountingService/DeleteGkvAbrechnungBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
void DeleteGkvAbrechnung(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungDC abrechnung);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAccountingService/SendNewGkvAbrechnung", ReplyAction="http://tempuri.org/IAccountingService/SendNewGkvAbrechnungResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAccountingService/SendNewGkvAbrechnungBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungSendResponseDC SendNewGkvAbrechnung(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungSendRequestDC req);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAccountingService/SendGetIKRequest", ReplyAction="http://tempuri.org/IAccountingService/SendGetIKRequestResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAccountingService/SendGetIKRequestBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungGetIKResponseDC SendGetIKRequest(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungGetIKRequestDC req);
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
@@ -10026,51 +10000,6 @@ namespace BeWo.ServiceProxy
{
base.Channel.StorniereInvoiceBases(invoices);
}
public BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungDC GetGkvAbrechnung(long oid)
{
return base.Channel.GetGkvAbrechnung(oid);
}
public System.Collections.Generic.List<BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungDC> GetAllGkvAbrechnungen()
{
return base.Channel.GetAllGkvAbrechnungen();
}
public System.Collections.Generic.List<BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungDC> GetFilteredGkvAbrechnungen(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungViewFilterDC gkvAbrechnungViewFilter)
{
return base.Channel.GetFilteredGkvAbrechnungen(gkvAbrechnungViewFilter);
}
public string GetProtokollRawDataString(long oid, BS.Shared.GkvRawDataType gkvRawData)
{
return base.Channel.GetProtokollRawDataString(oid, gkvRawData);
}
public BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungCreateResponseDC CreateNewGkvAbrechnung(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungCreateRequestDC request)
{
return base.Channel.CreateNewGkvAbrechnung(request);
}
public BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungDC UpdateGkvAbrechnung(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungDC abrechnung)
{
return base.Channel.UpdateGkvAbrechnung(abrechnung);
}
public void DeleteGkvAbrechnung(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungDC abrechnung)
{
base.Channel.DeleteGkvAbrechnung(abrechnung);
}
public BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungSendResponseDC SendNewGkvAbrechnung(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungSendRequestDC req)
{
return base.Channel.SendNewGkvAbrechnung(req);
}
public BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungGetIKResponseDC SendGetIKRequest(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungGetIKRequestDC req)
{
return base.Channel.SendGetIKRequest(req);
}
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]

View File

@@ -79,35 +79,45 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Label
Grid.Row="0"
Grid.Column="0"
Content="Eigenes Aktenzeichen" />
Content="AZ der Staatsanwaltschaft/des Gerichts" />
<TextBox
Grid.Row="0"
Grid.Column="1"
IsReadOnly="{Binding PermissionCustomerGemeinnutzigeArbeitManage, Mode=OneTime, Converter={StaticResource BoolReverseConverter}, ElementName=root}"
Text="{Binding Path=AktenzeichenGericht, UpdateSourceTrigger=PropertyChanged}" />
<Label
Grid.Row="1"
Grid.Column="0"
Content="Eigenes Aktenzeichen" />
<TextBox
Grid.Row="1"
Grid.Column="1"
IsReadOnly="{Binding PermissionCustomerGemeinnutzigeArbeitManage, Mode=OneTime, Converter={StaticResource BoolReverseConverter}, ElementName=root}"
Text="{Binding Path=EigenesAktenzeichen, UpdateSourceTrigger=PropertyChanged}" />
<Label
Grid.Row="1"
Grid.Row="2"
Grid.Column="0"
Content="Auftragseingang" />
<dxe:DateEdit
Grid.Row="1"
Grid.Row="2"
Grid.Column="1"
EditValue="{Binding Path=Auftragseingang, UpdateSourceTrigger=PropertyChanged}"
IsReadOnly="{Binding PermissionCustomerGemeinnutzigeArbeitManage, Mode=OneTime, Converter={StaticResource BoolReverseConverter}, ElementName=root}"
ShowClearButton="False" />
<Label
Grid.Row="2"
Grid.Row="3"
Grid.Column="0"
Content="Auftragsherkunft" />
<uc:NullItemComboBox
x:Name="comboBox_Auftragsherkunft"
Grid.Row="2"
Grid.Row="3"
Grid.Column="1"
DisplayMemberPath="TypeDescription"
IsEnabled="{Binding PermissionCustomerGemeinnutzigeArbeitManage, Mode=OneTime, ElementName=root}"
@@ -116,12 +126,12 @@
Style="{StaticResource PrimaryNullItemComboBox}" />
<Label
Grid.Row="3"
Grid.Row="4"
Grid.Column="0"
Content="Vermittlungsgrundlage" />
<uc:NullItemComboBox
x:Name="comboBox_Vermittlungsgrundlage"
Grid.Row="3"
Grid.Row="4"
Grid.Column="1"
DisplayMemberPath="TypeDescription"
IsEnabled="{Binding PermissionCustomerGemeinnutzigeArbeitManage, Mode=OneTime, ElementName=root}"
@@ -129,65 +139,65 @@
SelectedValue="{Binding Path=Vermittlungsgrundlage, Mode=TwoWay}" />
<Label
Grid.Row="4"
Grid.Row="5"
Grid.Column="0"
Content="Tagessätze" />
<dxe:TextEdit
Grid.Row="4"
Grid.Row="5"
Grid.Column="1"
EditValue="{Binding Path=Tagessatze, UpdateSourceTrigger=PropertyChanged}"
IsReadOnly="{Binding PermissionCustomerGemeinnutzigeArbeitManage, Mode=OneTime, Converter={StaticResource BoolReverseConverter}, ElementName=root}"
Style="{StaticResource TextEditNumberDecimalNullable}" />
<Label
Grid.Row="5"
Grid.Row="6"
Grid.Column="0"
Content="Tagessatzhöhe" />
<dxe:TextEdit
Grid.Row="5"
Grid.Row="6"
Grid.Column="1"
EditValue="{Binding Path=Tagessatzhohe, UpdateSourceTrigger=PropertyChanged}"
IsReadOnly="{Binding PermissionCustomerGemeinnutzigeArbeitManage, Mode=OneTime, Converter={StaticResource BoolReverseConverter}, ElementName=root}"
Style="{StaticResource TextEditCurrency}" />
<Label
Grid.Row="6"
Grid.Row="7"
Grid.Column="0"
Content="Höhe der Geldstrafe" />
<dxe:TextEdit
Grid.Row="6"
Grid.Row="7"
Grid.Column="1"
EditValue="{Binding Path=HoheDerGeldstrafe, UpdateSourceTrigger=PropertyChanged}"
IsReadOnly="True"
Style="{StaticResource TextEditCurrency}" />
<Label
Grid.Row="7"
Grid.Row="8"
Grid.Column="0"
Content="Zu leistende Arbeitsstunden" />
<dxe:TextEdit
Grid.Row="7"
Grid.Row="8"
Grid.Column="1"
EditValue="{Binding Path=ZuLeistendeArbeitsstunden, UpdateSourceTrigger=PropertyChanged}"
IsReadOnly="{Binding PermissionCustomerGemeinnutzigeArbeitManage, Mode=OneTime, Converter={StaticResource BoolReverseConverter}, ElementName=root}"
Style="{StaticResource TextEditHours}" />
<Label
Grid.Row="8"
Grid.Row="9"
Grid.Column="0"
Content="Hinweis" />
<TextBox
Grid.Row="8"
Grid.Row="9"
Grid.Column="1"
IsReadOnly="{Binding PermissionCustomerGemeinnutzigeArbeitManage, Mode=OneTime, Converter={StaticResource BoolReverseConverter}, ElementName=root}"
Text="{Binding Path=Hinweis, UpdateSourceTrigger=PropertyChanged}" />
<Label
Grid.Row="9"
Grid.Row="10"
Grid.Column="0"
Content="Termin" />
<dxe:DateEdit
Grid.Row="9"
Grid.Row="10"
Grid.Column="1"
EditValue="{Binding Path=Termin, UpdateSourceTrigger=PropertyChanged}"
IsReadOnly="{Binding PermissionCustomerGemeinnutzigeArbeitManage, Mode=OneTime, Converter={StaticResource BoolReverseConverter}, ElementName=root}"
@@ -200,12 +210,12 @@
</dxe:DateEdit>
<Label
Grid.Row="10"
Grid.Row="11"
Grid.Column="0"
Content="Bearbeitungsstatus" />
<uc:NullItemComboBox
x:Name="combobox_bearbeitungsstatus"
Grid.Row="10"
Grid.Row="11"
Grid.Column="1"
HorizontalAlignment="Stretch"
IsEnabled="{Binding PermissionCustomerGemeinnutzigeArbeitManage, Mode=OneTime, ElementName=root}"
@@ -214,75 +224,75 @@
Style="{StaticResource EnumTranslationNullItemComboBox}" />
<Label
Grid.Row="11"
Grid.Row="12"
Grid.Column="0"
Content="Auftragsrückgabe" />
<TextBox
Grid.Row="11"
Grid.Row="12"
Grid.Column="1"
IsReadOnly="{Binding PermissionCustomerGemeinnutzigeArbeitManage, Mode=OneTime, Converter={StaticResource BoolReverseConverter}, ElementName=root}"
Text="{Binding Path=Auftragsruckgabe, UpdateSourceTrigger=PropertyChanged}" />
<Label
Grid.Row="12"
Grid.Row="13"
Grid.Column="0"
Content="Verlauf" />
<TextBox
Grid.Row="12"
Grid.Row="13"
Grid.Column="1"
IsReadOnly="{Binding PermissionCustomerGemeinnutzigeArbeitManage, Mode=OneTime, Converter={StaticResource BoolReverseConverter}, ElementName=root}"
Text="{Binding Path=Verlauf, UpdateSourceTrigger=PropertyChanged}" />
<Label
Grid.Row="13"
Grid.Row="14"
Grid.Column="0"
Content="Abgeleistete Stunden" />
<dxe:TextEdit
Grid.Row="13"
Grid.Row="14"
Grid.Column="1"
EditValue="{Binding Path=AbgeleisteteStunden, UpdateSourceTrigger=PropertyChanged}"
IsReadOnly="{Binding PermissionCustomerGemeinnutzigeArbeitManage, Mode=OneTime, Converter={StaticResource BoolReverseConverter}, ElementName=root}"
Style="{StaticResource TextEditHours}" />
<Label
Grid.Row="14"
Grid.Row="15"
Grid.Column="0"
Content="Ersparte Hafttage" />
<dxe:TextEdit
Grid.Row="14"
Grid.Row="15"
Grid.Column="1"
EditValue="{Binding Path=ErsparteHafttage, UpdateSourceTrigger=PropertyChanged}"
IsReadOnly="{Binding PermissionCustomerGemeinnutzigeArbeitManage, Mode=OneTime, Converter={StaticResource BoolReverseConverter}, ElementName=root}"
Style="{StaticResource TextEditDays}" />
<Label
Grid.Row="15"
Grid.Row="16"
Grid.Column="0"
Content="Geleistete Ratenzahlung" />
<dxe:TextEdit
Grid.Row="15"
Grid.Row="16"
Grid.Column="1"
EditValue="{Binding Path=GeleisteteRatenzahlung, UpdateSourceTrigger=PropertyChanged}"
IsReadOnly="{Binding PermissionCustomerGemeinnutzigeArbeitManage, Mode=OneTime, Converter={StaticResource BoolReverseConverter}, ElementName=root}"
Style="{StaticResource TextEditCurrency}" />
<Label
Grid.Row="16"
Grid.Row="17"
Grid.Column="0"
Content="Geleistete Einmalzahlung" />
<dxe:TextEdit
Grid.Row="16"
Grid.Row="17"
Grid.Column="1"
EditValue="{Binding Path=GeleisteteEinmalzahlung, UpdateSourceTrigger=PropertyChanged}"
IsReadOnly="{Binding PermissionCustomerGemeinnutzigeArbeitManage, Mode=OneTime, Converter={StaticResource BoolReverseConverter}, ElementName=root}"
Style="{StaticResource TextEditCurrency}" />
<Label
Grid.Row="17"
Grid.Row="18"
Grid.Column="0"
Content="Bemerkung" />
<TextBox
Grid.Row="17"
Grid.Row="18"
Grid.Column="1"
Height="92"
MaxHeight="184"

View File

@@ -15,6 +15,7 @@ using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media.Imaging;
using System.Windows.Threading;
namespace BeWo.View.Document
{
@@ -30,10 +31,8 @@ namespace BeWo.View.Document
{
var view = new SingleTemplateSelectionView();
var customerFolderList = VMFactory.CreateFolderList(objectTid, objectOid);
var templateFolderList = VMFactory.CreateFolderList(TableID.Vorlagentabelle, tabelle.VorlagentabelleOid.Value);
view.InitView(tabelle, alleVorlagen, templateFolderList, customerFolderList, true, false);
view.InitView(tabelle, alleVorlagen, templateFolderList, null, true, false, "");
var beWoWindow = BeWoWindowBuilder.GetBeWoWindow(Translator.Translate("Vorlage auswählen"), view, 500, 500);
view.ButtonCancelClicked += () => beWoWindow.Close();
@@ -47,32 +46,66 @@ namespace BeWo.View.Document
beWoWindow.ShowDialog();
}
}
public static BeWoFolderDC OpenAndSelectBeWoFolderSelectionDialog(TableID objectTid, long objectOid, String fileName)
{
BeWoFolderDC selectedFolder = null;
var view = new SingleTemplateSelectionView();
var customerFolderList = VMFactory.CreateFolderList(objectTid, objectOid);
//var alleVorlagenTabellen = ServiceFacade.DoOperationsServiceSync(s => s.GetVorlagentabelleDCs());
//var tabelle = alleVorlagenTabellen.FirstOrDefault(v => v.VorlagentabelleObjectTid.HasValue && v.VorlagentabelleObjectTid.Value == (int)objectTid);
//if (tabelle != null)
//{
view.InitView(null, null, null, customerFolderList, false, true, fileName);
var beWoWindow = BeWoWindowBuilder.GetBeWoWindow(Translator.Translate("Ordner auswählen"), view, 500, 500);
view.ButtonCancelClicked += () => beWoWindow.Close();
view.ButtonCreateForSelectionClicked += () =>
{
selectedFolder = view.SelectedFolder;
beWoWindow.Close();
};
beWoWindow.ShowDialog();
//}
return selectedFolder;
}
public static void CreateTemplateTreeViewItems(TreeListControl treeControl, IList<VorlagentabelleDC> vorlagentabellen, List<BeWoFolderDC> allFolder, bool expandItems)
{
treeControl.BeginDataUpdate();
foreach (var table in vorlagentabellen)
if (vorlagentabellen != null)
{
TreeListNode node = new TreeListNode();
DocumentTreeItemDC dc = new DocumentTreeItemDC()
foreach (var table in vorlagentabellen)
{
DocTreeItemOid = table.VorlagentabelleOid,
ParentOid = null,
Name = table.Tabellenname,
Table = BS.Shared.TableID.Vorlagentabelle,
ObjectOid = table.VorlagentabelleOid,
Node = node,
BeWoFolderDC = new BeWoFolderDC { Name = "RootFolder", SubFolders = new List<BeWoFolderDC>() }
};
DocumentTreeItemVM vm = new DocumentTreeItemVM(dc);
node.Content = vm;
treeControl.View.Nodes.Add(node);
node.IsExpandButtonVisible = DefaultBoolean.True;
node.IsExpanded = expandItems;
node.Image = LoadImage(table.ImageName);
TreeListNode node = new TreeListNode();
DocumentTreeItemDC dc = new DocumentTreeItemDC()
{
DocTreeItemOid = table.VorlagentabelleOid,
ParentOid = null,
Name = table.Tabellenname,
Table = BS.Shared.TableID.Vorlagentabelle,
ObjectOid = table.VorlagentabelleOid,
Node = node,
BeWoFolderDC = new BeWoFolderDC { Name = "RootFolder", SubFolders = new List<BeWoFolderDC>() }
};
DocumentTreeItemVM vm = new DocumentTreeItemVM(dc);
node.Content = vm;
treeControl.View.Nodes.Add(node);
node.IsExpandButtonVisible = DefaultBoolean.True;
node.IsExpanded = expandItems;
node.Image = LoadImage(table.ImageName);
}
}
if (allFolder != null && allFolder.Count > 0)
{
AddFolderToTreeView(treeControl, allFolder, expandItems);
@@ -140,38 +173,81 @@ namespace BeWo.View.Document
{
treeControl.BeginDataUpdate();
foreach (var node in treeControl.View.Nodes)
if (treeControl.View.Nodes.Count > 0) // Wenn Nodes vorhanden sind (Vorlagen Ordner) hänge die Folder an die Vorlagen Objekte
{
AddFolderToNode(node, folders, expandItems);
foreach (var node in treeControl.View.Nodes)
{
AddFolderToNode(treeControl, node, folders, expandItems);
}
}
else
{
AddFolderToNode(treeControl, null, folders, expandItems);
//foreach (var folder in folders)
//{
// DocumentTreeItemDC dc = new DocumentTreeItemDC()
// {
// DocTreeItemOid = folder.BeWoFolderOid,
// Name = folder.Name,
// FilesInFolder = new List<FileAttachmentDC>(),
// BeWoFolderDC = folder
// };
// DocumentTreeItemVM folder_vm = new DocumentTreeItemVM(dc);
// var newFolderNode = new TreeListNode()
// {
// Content = folder_vm,
// IsExpandButtonVisible = folder.SubFolders != null && folder.SubFolders.Count > 0 ? DefaultBoolean.True : DefaultBoolean.False,
// IsExpanded = expandItems,
// Tag = false,
// Image = LoadFolderImage()
// };
// dc.Node = newFolderNode;
// AddFolderToNode(newFolderNode, folder.SubFolders, expandItems);
// //}
// }
// else
// {
// if (folder.ObjectOid.HasValue && folder.ObjectOid == parentVm.DocTreeItemOid)
// {
// AddFolderToNode(parentNode, folder.SubFolders, expandItems);
// }
// }
//}
}
treeControl.EndDataUpdate();
}
private static void AddFolderToNode(TreeListNode parentNode, List<BeWoFolderDC> folders, bool expandItems)
private static void AddFolderToNode(TreeListControl treeControl, TreeListNode parentNode, List<BeWoFolderDC> folders, bool expandItems)
{
if (parentNode != null && folders != null)
if (folders != null)
{
var parentVm = parentNode.Content as DocumentTreeItemVM;
DocumentTreeItemVM parentVm = null;
if (parentNode != null)
{
parentVm = parentNode.Content as DocumentTreeItemVM;
}
foreach (var folder in folders)
{
if (folder.BeWoFolderOid.HasValue)
if (folder.BeWoFolderOid.HasValue || (folder.Name == "Alle Ordner" && folder.ObjectTid != TableID.Vorlagentabelle))// && folder.ObjectTid !=
{
//if (parentVm != null && parentVm.DocTreeItemOid == folder.ObjectOid)
//{
DocumentTreeItemDC dc = new DocumentTreeItemDC()
{
DocTreeItemOid = folder.BeWoFolderOid,
ParentOid = parentVm.DocTreeItemOid,
ParentOid = parentVm?.DocTreeItemOid,
Name = folder.Name,
FilesInFolder = new List<FileAttachmentDC>(),
BeWoFolderDC = folder,
Table = parentVm.DataContract.Table,
ObjectOid = parentVm.DataContract.ObjectOid
Table = parentVm != null ? parentVm.DataContract.Table : folder.ObjectTid,
ObjectOid = parentVm?.DataContract.ObjectOid
};
if (folder.Files.Count != 0)
{
@@ -190,16 +266,22 @@ namespace BeWo.View.Document
Image = LoadFolderImage()
};
dc.Node = newFolderNode;
parentNode.Nodes.Add(newFolderNode);
AddFolderToNode(newFolderNode, folder.SubFolders, expandItems);
if (parentNode != null)
{
parentNode.Nodes.Add(newFolderNode);
}
else
{
treeControl.View.Nodes.Add(newFolderNode);
}
AddFolderToNode(treeControl, newFolderNode, folder.SubFolders, expandItems);
//}
}
else
{
if (folder.ObjectOid.HasValue && folder.ObjectOid == parentVm.DocTreeItemOid)
if (folder.ObjectOid.HasValue && parentVm != null && folder.ObjectOid == parentVm.DocTreeItemOid)
{
AddFolderToNode(parentNode, folder.SubFolders, expandItems);
AddFolderToNode(treeControl, parentNode, folder.SubFolders, expandItems);
}
}
}
@@ -266,17 +348,128 @@ namespace BeWo.View.Document
}
//public static DokumentvorlageVM EditTemplate(VorlagentabelleDC vt, DokumentvorlageVM vm)
//{
// var control = new VorlageEditView();
// control.InitView(vt, vm);
// var beWoWindow = new BeWoWindow
// {
// rootGroupBox = { Header = "Vorlage bearbeiten" },
// Height = this.Height,
// Width = 1200,
// MinWidth = 550,
// WindowStartupLocation = WindowStartupLocation.CenterOwner,
// GroupBoxContent = control,
// Owner = BeWoApp.CurrentBeWo.MainWindow
// };
// bool saved = false;
// control.ButtonSavedClicked += () =>
// {
// saved = true;
// if (control.ViewModel.IsNew || control.ViewModel.IsDirty)
// {
// var dc = SaveInDatabase(control.ViewModel);
// vm.DataContract = dc;
// RefreshSelectedList();
// }
// beWoWindow.Close();
// };
// control.ButtonCancelClicked += () =>
// {
// beWoWindow.Close();
// };
// beWoWindow.ShowDialog();
// if (!saved)
// {
// return null;
// }
// return control.ViewModel;
//}
private static void PrintTemplate(DokumentvorlageDC vorlage, TableID objectTid, long objectOid)
{
string url = GenerateURL(vorlage.DokumentvorlageOid.Value, objectTid, new List<long> { objectOid });
BeWoUtils.NavigateToReportUri(url, vorlage.Name);
ServiceFacade.DoOperationsServiceAsync(s => s.CreateRtfDocumentFromTemplate(vorlage.DokumentvorlageOid.Value, objectTid, new List<long> { objectOid }),
rtf =>
BeWoApp.CurrentBeWo.Dispatcher.BeginInvoke(
DispatcherPriority.Normal,
(Action)delegate
{
var control = new RtfEditView();
control.InitView(rtf);
var window = BeWoWindowBuilder.GetBeWoWindow(vorlage.Name, control, Math.Min(BeWoApp.MainControl.ActualHeight, 1000), Math.Min(BeWoApp.MainControl.ActualWidth, 1600));
control.ButtonSavedClicked += () =>
{
var selectedFolder = OpenAndSelectBeWoFolderSelectionDialog(objectTid, objectOid, vorlage.Name);
if (selectedFolder != null)
{
var newRtfText = control.RtfText;
var filename = selectedFolder.Name;
window.Close();
SaveRtfInBeWoFolder(selectedFolder, newRtfText, filename, objectTid, objectOid);
}
};
control.ButtonCancelClicked += () =>
{
window.Close();
};
window.ShowDialog();
}));
//var rtf = ServiceFacade.DoOperationsServiceSync(s => s.CreateRtfDocumentFromTemplate(vorlage.DokumentvorlageOid.Value, objectTid, new List<long> { objectOid }));
//string url = GenerateURL(vorlage.DokumentvorlageOid.Value, objectTid, new List<long> { objectOid });
//BeWoUtils.NavigateToReportUri(url, vorlage.Name);
}
private static void SaveRtfInBeWoFolder(BeWoFolderDC selectedFolder, string rtfText, string filename, TableID objectTid, long objectOid)
{
try
{
var ms = new System.IO.MemoryStream(Encoding.Default.GetBytes(rtfText));
var upload = new ProgressStream(ms);
var lUlPackage = new UploadPackage(selectedFolder.BeWoFolderOid, 0, String.Format("{0}.{1}", filename, "rtf"), "", objectOid, (int)objectTid, upload);
ServiceFacade.DoStreamingServiceAsync(
s => s.UploadDocument(lUlPackage),
r =>
{
upload.Dispose();
ms.Dispose();
},
() =>
{
upload.Dispose();
ms.Dispose();
});
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Fehler", MessageBoxButton.OK, MessageBoxImage.Exclamation);
}
}
public static string GenerateURL(long vorlage, TableID objectTid, List<long> objectOids)
{

View File

@@ -1535,11 +1535,6 @@ namespace BeWo.View.Document
private DokumentvorlageDC SaveInDatabase(DokumentvorlageVM savedTemplate)
{
var dc = savedTemplate.CommitToDataContract();
if (!String.IsNullOrEmpty(dc.RTFText))
{
var textasbytes = Encoding.ASCII.GetBytes(dc.RTFText);
dc.Data = textasbytes;
}
var updatedDC = ServiceFacade.DoOperationsServiceSync(s => s.InsertTemplate(dc));
return updatedDC;
@@ -1740,7 +1735,7 @@ namespace BeWo.View.Document
objectOids.Add((long)p.ObjectOid);
}
string url = GenerateURL((long)templateVM.DataContract.DokumentvorlageOid, objectOids, (long)printSelectionVMs[0].Table);
string url = DokumentViewHelper.GenerateURL(templateVM.DataContract.DokumentvorlageOid.Value, (TableID)printSelectionVMs[0].Table.Value, objectOids);
BeWoUtils.NavigateToReportUri(url, Translator.Translate("Dokument mit ersetzten Platzhaltern"), () => { });
@@ -1858,28 +1853,6 @@ namespace BeWo.View.Document
}
}
public string GenerateURL(long vorlage, List<long> objectOids, long table)
{
string url = BeWoApp.SiteOfOrigin + "/ReportView.aspx?";
url += "&vorlage=" + vorlage;
url += "&obj=";
foreach (var oid in objectOids)
{
if (objectOids.IndexOf(oid) == objectOids.Count - 1)
url += oid;
else
url += oid + ",";
}
url += "&table=" + table;
url += "&type=" + Utils.EnumName(ReportTypes.VorlagenReport);
url = BeWoWpfUtils.GetHTMLEncodedURL(url);
return url;
}
private void TextBox_KeyDown(object sender, System.Windows.Input.KeyEventArgs e)
{
if (e.Key != Key.Enter)

View File

@@ -19,14 +19,14 @@
<Grid Margin="0,3,0,0" Background="{StaticResource ObjectEditBackgroundBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="*" /> <!-- Felder für Vorlagenname und Beschreibung -->
<RowDefinition Height="*" />
<RowDefinition Height="Auto" /> <!-- Speichern und abbrechen -->
</Grid.RowDefinitions>
<dxre:RichEditControl x:Name="EditorControl" Grid.Row="0" Grid.Column="0" Language="de-DE" CommandBarStyle="Ribbon" Margin="0,0,0,0" VerticalAlignment="Stretch" Grid.ColumnSpan="2" ShowReviewingPane="False" RtfTextChanged="EditorControl_RtfTextChanged"/>
<dxre:RichEditControl x:Name="EditorControl" Grid.Row="0" Grid.Column="0" Language="de-DE" CommandBarStyle="Ribbon" Margin="0,0,0,0" VerticalAlignment="Stretch" Grid.ColumnSpan="2" ShowReviewingPane="False" />
<StackPanel Grid.ColumnSpan="3" Grid.Row="2" Orientation="Horizontal" VerticalAlignment="Center" Height="Auto" Margin="0,5,0,5" HorizontalAlignment="Right">
<StackPanel Grid.ColumnSpan="3" Grid.Row="1" Orientation="Horizontal" VerticalAlignment="Center" Height="Auto" Margin="0,5,0,5" HorizontalAlignment="Right">
<Button x:Name="btnSave" Content="Als Dokument speichern" Margin="0,0,3,0" Height="25" Click="btnSave_Click"/>
<Button x:Name="btnClose" Content="Schließen" Margin="0,0,3,0" Height="25" Click="btnClose_Click"/>
</StackPanel>

View File

@@ -32,141 +32,41 @@ namespace BeWo.View.Document
{
public partial class RtfEditView
{
List<PlatzhalterVM> Templates = new List<PlatzhalterVM>();
Dictionary<string, BitmapImage> ImageTypeToImage = new Dictionary<string, BitmapImage>();
public event Action ButtonSavedClicked;
public event Action ButtonCancelClicked;
public VorlagentabelleDC VorlagenTabelle { get; set; }
public DokumentvorlageVM ViewModel { get; set; }
public RtfEditView()
{
InitializeComponent();
}
public override bool IsDirty
{
get
{
//if (ViewModel.SelectedVMForEditing != null && _SelectedEmployee != null &&
// !_SelectedEmployee.Equals(ViewModel.SelectedVMForEditing.Employee))
// return true;
return ViewModel != null && ViewModel.IsDirty;
}
}
public void InitView(VorlagentabelleDC vorlagenTabelle, DokumentvorlageVM pVM)
public void InitView(String rtfText)
{
InitializeComponent();
VorlagenTabelle = vorlagenTabelle;
ViewModel = pVM;
DataContext = pVM;
if (pVM.Text != null)
{
EditorControl.RtfText = pVM.RTFText;
}
RtfText = rtfText;
Focus();
}
private void LoadImagesForNodes(List<PlatzhalterVM> templates)
public String RtfText
{
// Icons in ImageTypeToImage laden
foreach (var item in templates)
get
{
if (item.Children != null)
LoadImagesForNodes(item.Children);
if (item.IconType != null)
item.Icon = LoadImage(item.IconType);
return EditorControl.RtfText;
}
set
{
EditorControl.RtfText = value;
}
}
private BitmapImage LoadImage(string imageName)
{
return new BitmapImage(new Uri("/Ressources/Icons/" + imageName + ".png", UriKind.Relative));
}
private PlatzhalterVM ConvertDataContractToViewModel(PlatzhalterDC dc)
{
var vm = new PlatzhalterVM()
{
Bezeichnung = dc.Bezeichnung,
Children = new List<PlatzhalterVM>(),
FieldName = dc.FieldName,
Icon = LoadImage(dc.IconType),
IconType = dc.IconType,
Platzhalter = dc.Platzhalter
};
if (dc.Children != null && dc.Children.Count > 0)
{
foreach (var item in dc.Children)
vm.Children.Add(ConvertDataContractToViewModel(item));
}
return vm;
}
private List<PlatzhalterVM> ConvertListOfDataContractsToViewModels(List<PlatzhalterDC> dcs)
{
List<PlatzhalterVM> vms = new List<PlatzhalterVM>();
foreach (var dc in dcs)
vms.Add(ConvertDataContractToViewModel(dc));
return vms;
}
//private List<PlatzhalterDC> LoadTemplates(long? tabelle)
//{
// List<PlatzhalterDC> templates = new List<PlatzhalterDC>();
// List<PlatzhalterDC> platzhalterDCs = new List<PlatzhalterDC>();
// switch (tabelle)
// {
// case 1: platzhalterDCs = ServiceFacade.DoOperationsServiceSync(s => s.GetPlatzhalterForSupportConcept()); break;
// case 2: platzhalterDCs = TemplatesForCustomers(); break;
// case 3: platzhalterDCs = TemplatesForEmployee(); break;
// }
// return templates;
//}
private List<PlatzhalterVM> GetPlatzhalter()
{
return ConvertListOfDataContractsToViewModels(ServiceFacade.DoOperationsServiceSync(s => s.GetPlatzhalterForTemplate(VorlagenTabelle)));
}
/*
private void combobox_templates_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (combobox_templates.SelectedItem == null)
return;
var selected = combobox_templates.SelectedItem as PlatzhalterDC;
if(selected.ToString().StartsWith("-") && selected.ToString().EndsWith("-"))
{
MessageBox.Show("Bindestriche kennzeichnen eine Vorlagenkategorie. Wählen Sie eine Vorlage ohne Bindestriche.", "BeWoPlaner", MessageBoxButton.OK, MessageBoxImage.Information);
return;
}
EditorControl.Document.InsertText(EditorControl.Document.CaretPosition, "[" + selected.Platzhalter + "]");
//EditorControl.Text += "[" + selected.Platzhalter + "]";
//EditorControl.RtfText += "[" + selected.Platzhalter + "]";
combobox_templates.SelectedItem = null;
}
*/
private void btnSave_Click(object sender, RoutedEventArgs e)
{
@@ -176,15 +76,14 @@ namespace BeWo.View.Document
private void btnClose_Click(object sender, RoutedEventArgs e)
{
bool close = true;
if (ViewModel.IsDirty)
{
if (MessageBox.Show(
Translator.Translate("Möchten Sie wirklich abbrechen und die Änderungen verwerfen?"),
if (MessageBox.Show(
Translator.Translate("Möchten Sie wirklich abbrechen und das Dokument verwerfen?"),
"BeWoPlaner", MessageBoxButton.OKCancel, MessageBoxImage.Question) == MessageBoxResult.Cancel)
{
close = false;
}
{
close = false;
}
if (close)
{
@@ -192,24 +91,5 @@ namespace BeWo.View.Document
}
}
// Mouseup, um die aktuelle Position des Cursors zu speichern, um dort den Platzhalter an der aktuellen Stelle einzusetzen
// Klappt nur, wenn in Text geklickt wird und nicht hinter ein Wort..
// Hat aber keine verwendbaren Inhalte
private void richEditControl1_MouseUp(object sender, MouseButtonEventArgs e)
{
RichEditControl richEditControl = sender as RichEditControl;
System.Windows.Point point = e.GetPosition(richEditControl);
System.Drawing.Point docPoint = new System.Drawing.Point((int)point.X, (int)point.Y);
docPoint = Units.PixelsToDocuments(docPoint, richEditControl.DpiX, richEditControl.DpiY);
DocumentPosition pos = richEditControl.GetPositionFromPoint(docPoint);
//pos.
}
private void EditorControl_RtfTextChanged(object sender, EventArgs e)
{
ViewModel.Text = EditorControl.Text;
ViewModel.RTFText = EditorControl.RtfText;
}
}
}

View File

@@ -16,46 +16,53 @@
Focusable="True">
<Grid Background="{StaticResource ObjectEditBackgroundBrush}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition x:Name="GridRowTemplate" Height="*" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition x:Name="GridRowFolder" Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Label Margin="0,0,0,0" x:Name="lblTemplate" Content="Vorlage:"/>
<dxg:TreeListControl x:Name="treelistcontrol_template" Grid.Row="1" DefaultSorting="Name" Margin="5,0,5,0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" >
<dxg:TreeListControl x:Name="treelistcontrol_template" Grid.Row="1" Grid.ColumnSpan="2" DefaultSorting="Name" Margin="5,0,5,0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" >
<dxg:TreeListControl.Columns>
<dxg:TreeListColumn FieldName="Name" AllowSorting="True" CellToolTipBinding="{Binding Description}"/>
</dxg:TreeListControl.Columns>
<dxg:TreeListControl.View>
<dxg:TreeListView x:Name="TreeView_template" ShowColumnHeaders="False" ShowIndicator="False" ShowHorizontalLines="False" ShowVerticalLines="False" AutoWidth="True"
FocusedRowChanged="DocumentsTreeView_FocusedRowChanged" PreviewMouseLeftButtonDown="DocumentsTreeView_folderStructureForSelection_PreviewMouseLeftButtonDown"
NodeExpanding="DocumentsTreeView_NodeExpanding" AllowEditing="False" ShowNodeImages="True" PrintNodeImages="True"
AllowEditing="False" ShowNodeImages="True" PrintNodeImages="True"
KeyFieldName="{Binding DocumentTreeItemVM.DocTreeItemOid}" ParentFieldName="Binding DocumentTreeItemVM.ParentOid">
</dxg:TreeListView>
</dxg:TreeListControl.View>
</dxg:TreeListControl>
<CheckBox x:Name="chkSaveDoc" Content="Dokument abspeichern" Grid.Row="2" Checked="CheckBox_Checked" Margin="5,8,0,0" Unchecked="CheckBox_Unchecked" />
<!--<CheckBox x:Name="chkSaveDoc" Content="Dokument abspeichern" Grid.Row="2" Checked="CheckBox_Checked" Margin="5,8,0,0" Unchecked="CheckBox_Unchecked" />-->
<dxg:TreeListControl x:Name="treelistcontrol_folderStructureForSelection" Grid.Row="3" DefaultSorting="Name" Margin="5,5,5,0" VerticalAlignment="Stretch" Visibility="Visible">
<Label x:Name="lblFileName" Grid.Row="2" Margin="0,3,0,0" Content="Name:" />
<TextBox x:Name="txtFileName" Grid.Row="2" Grid.Column="1" Margin="3,3,0,0" HorizontalAlignment="Stretch"/>
<dxg:TreeListControl x:Name="treelistcontrol_folderStructureForSelection" Grid.Row="4" Grid.ColumnSpan="2" DefaultSorting="Name" Margin="5,5,5,0" VerticalAlignment="Stretch" Visibility="Visible">
<dxg:TreeListControl.Columns>
<dxg:TreeListColumn FieldName="Name" AllowSorting="True"/>
</dxg:TreeListControl.Columns>
<dxg:TreeListControl.View>
<dxg:TreeListView x:Name="TreeView_folderStructureForSelection" ShowColumnHeaders="False" ShowIndicator="False" ShowHorizontalLines="False" ShowVerticalLines="False" AutoWidth="True"
FocusedRowChanged="DocumentsTreeView_FocusedRowChanged" PreviewMouseLeftButtonDown="DocumentsTreeView_folderStructureForSelection_PreviewMouseLeftButtonDown"
NodeExpanding="DocumentsTreeView_NodeExpanding" AllowEditing="False" ShowNodeImages="True" PrintNodeImages="True"
AllowEditing="False" ShowNodeImages="True" PrintNodeImages="True"
KeyFieldName="{Binding DocumentTreeItemVM.DocTreeItemOid}" ParentFieldName="Binding DocumentTreeItemVM.ParentOid">
</dxg:TreeListView>
</dxg:TreeListControl.View>
</dxg:TreeListControl>
<WrapPanel Grid.Row="4" VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="0 5 5 5">
<Button x:Name="Button_CreateTemplateBasedDocument_OnlyOne" Content="Dokument erstellen" Margin="0 0 5 0" Click="Button_CreateTemplateForSelection_Click" />
<WrapPanel Grid.Row="5" Grid.ColumnSpan="2" VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="0 5 5 5">
<Button x:Name="Button_SelectTemplate" Content="Dokument erstellen" Margin="0 0 5 0" Click="Button_CreateTemplateForSelection_Click" />
<Button x:Name="Button_SelectFolder" Content="Dokument speichern" Margin="0 0 5 0" Click="Button_SelectFolder_Click" />
<Button x:Name="Button_Cancel_OnlyOne" Content="Abbrechen" Click="Button_Cancel_Click" />
</WrapPanel>
</Grid>

View File

@@ -32,9 +32,7 @@ namespace BeWo.View.Document
{
public partial class SingleTemplateSelectionView
{
public event Action ButtonCreateClicked;
public event Action ButtonCreateForSelectionClicked;
public event Action ButtonCreateForAllClicked;
public event Action ButtonCancelClicked;
private VorlagentabelleDC vorlagenTabelle;
private List<DokumentvorlageDC> alleVorlagen;
@@ -46,11 +44,11 @@ namespace BeWo.View.Document
InitializeComponent();
}
public DocumentTreeItemVM SelectedFolder { get; set; }
public BeWoFolderDC SelectedFolder { get; set; }
public DokumentvorlageDC SelectedTemplate { get; set; }
public void InitView(VorlagentabelleDC vt, List<DokumentvorlageDC> alleVorlagen, List<BeWoFolderDC> allTemplateFolder, List<BeWoFolderDC> allObjectFolder, bool showTemplateTree, bool showDocumentTree)
public void InitView(VorlagentabelleDC vt, List<DokumentvorlageDC> alleVorlagen, List<BeWoFolderDC> allTemplateFolder, List<BeWoFolderDC> allObjectFolder, bool showTemplateTree, bool showDocumentTree, String defaultFileName)
{
//tableId = tid;
@@ -58,23 +56,33 @@ namespace BeWo.View.Document
this.alleVorlagen = alleVorlagen;
this.allTemplateFolder = allTemplateFolder;
this.allObjectFolder = allObjectFolder;
DokumentViewHelper.CreateTemplateTreeViewItems(treelistcontrol_template, new List<VorlagentabelleDC>() { vt }, allTemplateFolder, true);
DokumentViewHelper.AddTemplatesToTreeView(treelistcontrol_template, alleVorlagen, true);
this.txtFileName.Text = defaultFileName;
List<PrintSelectionVM> vms = new List<PrintSelectionVM>();
if (!showTemplateTree)
if (showTemplateTree)
{
DokumentViewHelper.CreateTemplateTreeViewItems(treelistcontrol_template, new List<VorlagentabelleDC>() { vt }, allTemplateFolder, true);
DokumentViewHelper.AddTemplatesToTreeView(treelistcontrol_template, alleVorlagen, true);
}
else
{
Button_SelectTemplate.Visibility = Visibility.Collapsed;
lblTemplate.Visibility = Visibility.Collapsed;
treelistcontrol_template.Visibility = Visibility.Collapsed;
GridRowTemplate.Height = GridLength.Auto;
}
if (!showDocumentTree)
if (showDocumentTree)
{
chkSaveDoc.Visibility = Visibility.Collapsed;
DokumentViewHelper.CreateTemplateTreeViewItems(treelistcontrol_folderStructureForSelection, null, allObjectFolder, true);
}
else
{
//chkSaveDoc.Visibility = Visibility.Collapsed;
lblFileName.Visibility = Visibility.Collapsed;
txtFileName.Visibility = Visibility.Collapsed;
Button_SelectFolder.Visibility = Visibility.Collapsed;
treelistcontrol_folderStructureForSelection.Visibility = Visibility.Collapsed;
GridRowFolder.Height = GridLength.Auto;
}
@@ -112,6 +120,22 @@ namespace BeWo.View.Document
ButtonCreateForSelectionClicked?.Invoke();
}
private void Button_SelectFolder_Click(object sender, RoutedEventArgs e)
{
var selected = treelistcontrol_folderStructureForSelection.SelectedItem as DocumentTreeItemVM;
if (selected == null || selected.DataContract.BeWoFolderDC == null)
{
MessageBox.Show("Bitte wählen Sie einen Ordner aus.", "BeWoPlaner", MessageBoxButton.OK, MessageBoxImage.Information);
return;
}
SelectedFolder = selected.DataContract.BeWoFolderDC;
//Kleiner Hack;-)
SelectedFolder.Name = txtFileName.Text;
ButtonCreateForSelectionClicked?.Invoke();
}
//private void Button_CreateTemplateBasedDocumentForAll_Click(object sender, RoutedEventArgs e)
//{
// var selected = datagrid_enabled_for_template.ItemsSource as List<PrintSelectionVM>;
@@ -135,101 +159,9 @@ namespace BeWo.View.Document
treelistcontrol_folderStructureForSelection.Visibility = Visibility.Collapsed;
}
//private void GenerateFolderStructure(TableID table, TreeListNode node, List<BeWoFolderDC> folderDCs)
//{
// if (node == null)
// {
// node = new TreeListNode()
// {
// IsExpandButtonVisible = DefaultBoolean.True,
// Tag = false,
// Image = LoadFolderImage()
// };
// }
// var content = node.Content as DocumentTreeItemVM;
// foreach (var folder in folderDCs)
// {
// //Falls kein übergeordneter Knoten exisitert
// //if(content == null)
// //{
// // PrintSelectionVM selected = combobox_elementList.SelectedItem as PrintSelectionVM;
// // var dc = new DocumentTreeItemDC()
// // {
// // DocTreeItemOid = 0,
// // ParentOid = null,
// // Name = "Alle Ordner",
// // Table = table
// // };
// // content = new DocumentTreeItemVM(dc);
// // node.Content = content;
// // DocumentsTreeView_folderStructureForSelection.Nodes.Add(node);
// //}
// PrintSelectionVM selected = combobox_elementList.SelectedItem as PrintSelectionVM;
// DocumentTreeItemDC folder_dc = new DocumentTreeItemDC()
// {
// DocTreeItemOid = folder.BeWoFolderOid,
// ParentOid = null,
// Name = folder.Name,
// FilesInFolder = new List<FileAttachmentDC>(),
// BeWoFolderDC = folder,
// Table = table,
// ObjectOid = selected.ObjectOid
// };
// if (content != null)
// folder_dc.ParentOid = content.DocTreeItemOid;
// DocumentTreeItemVM folder_vm = new DocumentTreeItemVM(folder_dc);
// TreeListNode newNode_folder = new TreeListNode()
// {
// Content = folder_vm,
// IsExpandButtonVisible = DefaultBoolean.True,
// Tag = false,
// Image = LoadFolderImage()
// };
// folder_dc.Node = newNode_folder;
// if(node.Content == null)
// DocumentsTreeView_folderStructureForSelection.Nodes.Add(newNode_folder);
// else
// node.Nodes.Add(newNode_folder);
// if (folder.SubFolders.Count != 0)
// {
// GenerateFolderStructure(table, newNode_folder, folder.SubFolders);
// }
// }
//}
private BitmapImage LoadFolderImage()
{
return new BitmapImage(new Uri("/Ressources/Icons/Folder.png", UriKind.Relative));
}
private void DocumentsTreeView_FocusedRowChanged(object sender, DevExpress.Xpf.Grid.FocusedRowChangedEventArgs e)
{
//if(DocumentsTreeView_folderStructureForSelection.SelectedRows.Count != 0)
// selectedFolder = DocumentsTreeView_folderStructureForSelection.SelectedRows[0] as DocumentTreeItemVM;
}
private void DocumentsTreeView_NodeExpanding(object sender, DevExpress.Xpf.Grid.TreeList.TreeListNodeAllowEventArgs e)
{
}
private void DocumentsTreeView_folderStructureForSelection_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
if (TreeView_template.SelectedRows.Count != 0)
SelectedFolder = TreeView_template.SelectedRows[0] as DocumentTreeItemVM;
}
//public List<PrintSelectionVM> SelectAllElements()
//{
// return datagrid_enabled_for_template.ItemsSource as List<PrintSelectionVM>;
//}
}
}

View File

@@ -67,7 +67,7 @@ namespace BeWo.View.Document
ViewModel = pVM;
DataContext = pVM;
if (pVM.Text != null)
if (pVM.RTFText != null)
{
EditorControl.RtfText = pVM.RTFText;
}
@@ -220,11 +220,24 @@ namespace BeWo.View.Document
}
private void TemplatesTreeView_MouseDoubleClick(object sender, MouseButtonEventArgs e)
{
var selection = TreeListControlTemplates.SelectedItem as PlatzhalterVM;
if (selection.Platzhalter != null)
try
{
EditorControl.Document.InsertText(EditorControl.Document.CaretPosition, "[" + selection.Platzhalter + "]");
var selection = TreeListControlTemplates.SelectedItem as PlatzhalterVM;
if (selection.Platzhalter != null)
{
var doc = EditorControl.Document as DevExpress.XtraRichEdit.API.Native.Implementation.NativeDocument;
//var test = doc.ActiveSubDocument.EndPosition;
var sd = doc.ActiveSubDocument;
sd.InsertText(EditorControl.Document.CaretPosition, "[" + selection.Platzhalter + "]");
//EditorControl.Document.InsertText(EditorControl.Document.CaretPosition, "[" + selection.Platzhalter + "]");
}
}
catch (Exception)
{
//Ignore
}
}
}

View File

@@ -10,6 +10,7 @@ namespace BeWo.ViewModel
{
public class CustomerVermittlungArbeitVM : AbstractDCMapperVM<CustomerVermittlungArbeitDC>
{
private string _AktenzeichenGericht;
private string _EigenesAktenzeichen;
private DateTime? _Auftragseingang;
private ValueListEntryDC _Auftragsherkunft;
@@ -57,7 +58,21 @@ namespace BeWo.ViewModel
}
public string Displayname => $"AZ: {EigenesAktenzeichen}";
public string Displayname => $"AZ: {AktenzeichenGericht}";
public string AktenzeichenGericht
{
get { return _AktenzeichenGericht; }
set
{
if (!AreDifferent(_AktenzeichenGericht, value))
return;
_AktenzeichenGericht = value;
StoreDirtyInformation(AreDifferent(DataContract.AktenzeichenGericht, value), nameof(AktenzeichenGericht));
FirePropertyChanged(nameof(AktenzeichenGericht));
FirePropertyChanged(nameof(Displayname));
}
}
public string EigenesAktenzeichen
{
get { return _EigenesAktenzeichen; }
@@ -69,7 +84,6 @@ namespace BeWo.ViewModel
_EigenesAktenzeichen = value;
StoreDirtyInformation(AreDifferent(DataContract.EigenesAktenzeichen, value), nameof(EigenesAktenzeichen));
FirePropertyChanged(nameof(EigenesAktenzeichen));
FirePropertyChanged(nameof(Displayname));
}
}
public DateTime? Auftragseingang
@@ -515,6 +529,7 @@ namespace BeWo.ViewModel
protected override void InitByDataContract(CustomerVermittlungArbeitDC pDataContract)
{
_AktenzeichenGericht = pDataContract.AktenzeichenGericht;
_EigenesAktenzeichen = pDataContract.EigenesAktenzeichen;
_Auftragseingang = pDataContract.Auftragseingang;
_Auftragsherkunft = pDataContract.Auftragsherkunft;
@@ -559,6 +574,7 @@ namespace BeWo.ViewModel
protected override CustomerVermittlungArbeitDC MapToDataContract(CustomerVermittlungArbeitDC pDataContract, bool doCommit)
{
pDataContract.AktenzeichenGericht = _AktenzeichenGericht;
pDataContract.EigenesAktenzeichen = _EigenesAktenzeichen;
pDataContract.Auftragseingang = _Auftragseingang;
pDataContract.Auftragsherkunft = _Auftragsherkunft;

View File

@@ -18,7 +18,7 @@ namespace BeWo.ViewModel.ListViewModel
{
AddVMCommand = new DelegateCommand(() => AddNewVMToListAndSelect(true), CanAddVM);
DeleteSelectedVMCommand = new DelegateCommand(() => DeleteSelectedVM($"Aktenzeichen '{SelectedVM.EigenesAktenzeichen}'"));
DeleteSelectedVMCommand = new DelegateCommand(() => DeleteSelectedVM($"Aktenzeichen '{SelectedVM.AktenzeichenGericht}'"));
PermissionManageVM = BeWoApp.HasLoggedOnUserRight(BS.Shared.UserRightType.Customer_GemeinnutzigeArbeit_Manage);

View File

@@ -22,6 +22,7 @@ using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
using BS.Shared.Extensions;
using BS.Shared.Services;
using DevExpress.Mvvm.ModuleInjection.Native;
using DevExpress.XtraScheduler;
using DevExpress.XtraScheduler.Compatibility;
using Newtonsoft.Json;
@@ -105,10 +106,10 @@ namespace BeWoPlanerMobil.Controllers
switch(MobileSessionFacade.PasswordStrength)
{
case 0:
tempDataValue = "Sie benutzen ein sehr schwaches Passwort.<br/><br/>Bitte &auml;ndern Sie Ihr Passwort, indem Sie im Men&uuml; auf 'Password &auml;ndern' klicken.";
tempDataValue = "Sie benutzen ein sehr schwaches Passwort.<br><br>Bitte &auml;ndern Sie Ihr Passwort, indem Sie im Men&uuml; auf 'Password &auml;ndern' klicken.";
break;
case 1:
tempDataValue = "Sie benutzen ein schwaches Passwort.<br/><br/>Bitte &auml;ndern Sie Ihr Passwort, indem Sie im Men&uuml; auf 'Password &auml;ndern' klicken.";
tempDataValue = "Sie benutzen ein schwaches Passwort.<br><br>Bitte &auml;ndern Sie Ihr Passwort, indem Sie im Men&uuml; auf 'Password &auml;ndern' klicken.";
break;
}
@@ -246,7 +247,7 @@ namespace BeWoPlanerMobil.Controllers
if(Model.SelectedCostBearer2SupportConceptRelListObject is null || !isInList)
{
if(!(Model.SelectedCostBearer2SupportConceptRelListObject is null) && !isInList)
if(Model.SelectedCostBearer2SupportConceptRelListObject != null && !isInList)
{
Log.Info($"Model.SelectedSupportConceptListObject.Oid = {Model.SelectedCostBearer2SupportConceptRelListObject.CostBearer2SupportConceptOid} is not in list !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
@@ -481,6 +482,7 @@ namespace BeWoPlanerMobil.Controllers
if(supportConcept is null)
{
Log.Info($"Hilfeplan von Bewilligung mit Oid {Model.CostBearer2SupportConceptOid} nicht gefunden beim Laden der Ziele (LoadGoals).");
return;
}
@@ -958,6 +960,7 @@ namespace BeWoPlanerMobil.Controllers
{
if(Model is null)
{
Log.Info($"Model ist null bei CreateOrUpdateServiceRecord; User: {MobileSessionFacade.LoggedInUser.Oid} {MobileSessionFacade.LoggedInUser.LoginName} ({MobileSessionFacade.LoggedInUser.Employee})");
TempData[TempDataConstants.DoLogoutKey] = true;
return Logout();
}
@@ -993,6 +996,7 @@ namespace BeWoPlanerMobil.Controllers
if(string.IsNullOrEmpty(collection[FormCollectionConstants.DateKey]))
{
Log.Info($"CreateOrUpdateServiceRecord: Das Startdatum ist null. Breche das {(Model.IsInEditingMode ? "Speichern" : "Anlegen")} ab.");
return View("Main", Model);
}
@@ -1080,6 +1084,7 @@ namespace BeWoPlanerMobil.Controllers
if(Model.NewServiceRecord is null)
{
Log.Info("CreateOrUpdateServiceRecord: NewServiceRecord ist null. Breche ab.");
return RedirectToActionPermanent("Main");
}
@@ -1743,6 +1748,7 @@ namespace BeWoPlanerMobil.Controllers
{
if(Model is null)
{
Log.Info($"Model ist null in Methode LoadServiceCategoriesToModel({cb2ScOid})");
return;
}
@@ -1757,6 +1763,8 @@ namespace BeWoPlanerMobil.Controllers
if(cb2ScOid is null && (Model.IsInGroupBookingMode || Model.IsInMultiBookingMode))
{
Log.Info("Oid der Bewilligung ist null und der MoK befindet sich im Gruppen- oder Mehrfachbuchungsmodus");
var selectedSupportConcepts = Model.IsInGroupBookingMode ?
Model.GroupBookingSelectedSupportConcepts :
Model.IsInMultiBookingMode ?
@@ -1930,7 +1938,7 @@ namespace BeWoPlanerMobil.Controllers
var serviceRecordDC = Model.ServiceRecords.FirstOrDefault(f => f.ServiceRecordOid != null && f.ServiceRecordOid.Value.Equals(Model.ServiceRecordOidToDelete));
var version = serviceRecordDC?.ServiceRecordVersion;
if(version != null && MainModel.IsAllowedToDeleteServiceRecord(serviceRecordDC))
if(version != null && Model.IsAllowedToDeleteServiceRecord(serviceRecordDC))
{
OperationsService.DeleteServiceRecord(Model.ServiceRecordOidToDelete.Value, version.Value);
@@ -1938,9 +1946,7 @@ namespace BeWoPlanerMobil.Controllers
}
}
ResetEditingMode();
return RedirectToActionPermanent("Main");
return ResetEditingMode();
}
[Authorize]
@@ -3064,7 +3070,6 @@ namespace BeWoPlanerMobil.Controllers
}
LoadSupportConceptThings(Model.CostBearer2SupportConceptOid);
//LoadGoals();
}
private void ResetMultiBookingMode()
@@ -4731,6 +4736,12 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public override string SaveCollapsibleStatus(bool isOpen, string identifier)
{
if(Model is null)
{
TempData[TempDataConstants.DoLogoutKey] = true;
return LeerzeichenFuerGetMethoden;
}
Model.Collapsibles2IsShown[identifier] = isOpen;
return LeerzeichenFuerGetMethoden;

View File

@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Diagnostics;
using System.Linq;
using System.Web.Mvc;
using BeWo.View.Navigation.Filter;
@@ -16,6 +17,10 @@ namespace BeWoPlanerMobil.Models
{
public class MainModel : AbstractModel
{
protected static readonly log4net.ILog Log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
public long? SelectedCostBearerSupportConceptRelOid { get; set; }
[Display(Name = "Nur meine Klienten anzeigen")]
@@ -94,8 +99,19 @@ namespace BeWoPlanerMobil.Models
[Display(Name = "Abgelaufene Hilfepläne anzeigen")]
public bool ShowExpiredSupportConcepts { get; set; }
[Display(Name = "Hilfeplan")]
public long? CostBearer2SupportConceptOid { get; set; }
private long? _CostBearer2SupportConceptOid;
[Display(Name = "Hilfeplan")]
public long? CostBearer2SupportConceptOid
{
get => _CostBearer2SupportConceptOid;
set
{
Log.Info($"CostBearer2SupportConceptOid ausgewählt: {value}. Vorher: {_CostBearer2SupportConceptOid}; Benutzer: {MobileSessionFacade.LoggedInUser.LoginName} UserOid: {MobileSessionFacade.LoggedInUser.Oid}");
_CostBearer2SupportConceptOid = value;
}
}
public long? SelectedServiceCategoryOid => SelectedServiceCategory?.ServiceCategoryOid;
@@ -103,7 +119,7 @@ namespace BeWoPlanerMobil.Models
public long? SelectedServiceRecordOid { get; set; }
public static bool IsAllowedToDeleteServiceRecord(ServiceRecordDC serviceRecord)
public bool IsAllowedToDeleteServiceRecord(ServiceRecordDC serviceRecord)
{
var allowed = false;
@@ -176,8 +192,22 @@ namespace BeWoPlanerMobil.Models
}
public ServiceRecordDC SelectedServiceRecord { get; set; }
public SupportConceptDC SelectedSupportConcept { get; set; }
private SupportConceptDC _SelectedSupportConcept;
public SupportConceptDC SelectedSupportConcept
{
get => _SelectedSupportConcept;
set
{
var stackTrace = new StackTrace();
var callingMethodsName = stackTrace.GetFrame(1).GetMethod().Name;
Log.Info($"SC mit Oid {value?.SupportConceptOid} ausgewählt. Vorheriger SC: {_SelectedSupportConcept?.SupportConceptOid}. Aufrufende Methode: {callingMethodsName}");
_SelectedSupportConcept = value;
}
}
public int Zeitraum { get; set; }
@@ -256,8 +286,6 @@ namespace BeWoPlanerMobil.Models
}
}
public CostBearer2SupportConceptRelListObject SelectedCostBearer2SupportConceptRelListObject { get; set; }
public List<SupportConceptCostBearerRelDC> SelectedConceptCostBearerRelations { get; set; }
@@ -386,7 +414,23 @@ namespace BeWoPlanerMobil.Models
public CompactEmployeeDC PreviouslySelectedEmployee { get; set; }
public SupportConceptDC PreviouslySelectedSupportConcept { get; set; }
public long? PreviouslySelectedCostbearer2SupportConceptOid { get; set; }
private long? _PreviouslySelectedCostbearer2SupportConceptOid;
public long? PreviouslySelectedCostbearer2SupportConceptOid
{
get => _PreviouslySelectedCostbearer2SupportConceptOid;
set
{
var stackTrace = new StackTrace();
var callingMethodsName = stackTrace.GetFrame(1).GetMethod().Name;
var alt = _PreviouslySelectedCostbearer2SupportConceptOid;
Log.Info($"PreviouslySelectedCostbearer2SupportConceptOid-Set von {alt} zu {value} von Methode: {callingMethodsName}");
_PreviouslySelectedCostbearer2SupportConceptOid = value;
}
}
public bool IsEndDateVisible { get; set; }
public static string GetServiceRecordTimeHeader(ServiceRecordDC serviceRecord, bool isForServiceRecordsList)
@@ -742,7 +786,7 @@ namespace BeWoPlanerMobil.Models
public ServiceDescriptionDC GetSelectedOrFirstServiceDescription()
{
if(!(SelectedServiceDescription is null) || Categories2Descriptions is null)
if(SelectedServiceDescription != null || Categories2Descriptions is null)
{
return SelectedServiceDescription;
}

View File

@@ -317,12 +317,14 @@ function calcTimeWithDuration(timeAsString, timeElement, start, duration, isForm
}
function beiDaueraenderung(idPrefix) {
const hoursMinutesDropdown = $(`#${idPrefix}-hours-minutes-dropdown-btn`);
const startTimeInput = $(`#${idPrefix}-start-time-input`);
const endTimeInput = $(`#${idPrefix}-end-time-input`);
const durationInput = $(`#${idPrefix}-duration-input`);
const startDateInput = $(`#${idPrefix}-start-date-input`);
const endDateInput = $(`#${idPrefix}-end-date-input`);
const isInMin = $(`#${idPrefix}-hours-minutes-dropdown-btn`).text().replaceAll(/\s/g, "") === "Minuten";
const isInMin = getIsZeiterfassungseinheitInMinutes();//hoursMinutesDropdown.length && hoursMinutesDropdown.text().replaceAll(/\s/g, "") === "Minuten" || 0 === hoursMinutesDropdown.length;
const startTimeCondition = startTimeInput.val().length > 0;
const endTimeCondition = endTimeInput.val().length > 0;

View File

@@ -160,16 +160,24 @@ function validateForm(form, prefix) {
var numberOfNoticeTextareas = window.getNumberOfDokutypes();
var isValid = true;
if(isNoticeMandatory) {
if(numberOfNoticeTextareas === 0) {
var doku = $(`#${prefix}-dokufeld`).val();
var doku = $(`#${prefix}-dokufeld-textarea`).val();
if(doku === undefined || doku === null) {
doku = "";
}
isValid = doku.length > 0;
} else {
for(var i = 0; i < numberOfNoticeTextareas; i++) {
var d = $(`#${prefix}-doku-textarea-${i}`).val();
if(d === undefined || d === null) {
d = "";
}
isValid = d.length > 0;
if(isValid) {
@@ -179,7 +187,7 @@ function validateForm(form, prefix) {
}
if(isValid === false) {
errorMessage = `Bitte füllen Sie ${numberOfNoticeTextareas > 1 ? "mindestens ein" : "das"} Dokumentationsfeld aus.<br/>`;
errorMessage = `Bitte füllen Sie ${numberOfNoticeTextareas > 1 ? "mindestens ein" : "das"} Dokumentationsfeld aus.<br>`;
}
}
@@ -187,7 +195,7 @@ function validateForm(form, prefix) {
if(startAndEndDates === null && isValid) {
isValid = false;
errorMessage += "Die Datums- und / oder Zeitangaben sind nicht korrekt.<br/>";
errorMessage += "Die Datums- und / oder Zeitangaben sind nicht korrekt.<br>";
}
if(isValid === false) {
@@ -269,7 +277,7 @@ function getDokuTexte(prefix) {
x += ", ";
}
}
} catch (error) {
} catch(error) {
window.showErrorPopup(error);
} finally {
return noticeList;
@@ -326,7 +334,6 @@ function checkNumberInput(inputId) {
}
// Wird bei der Validierung des Formulars benutzt
// ToDo: Umbauen zu JavaScript-Date-Objekt
function getStartAndEndDate(prefix) {
if(prefix === undefined || prefix === null) {
prefix = "";
@@ -337,6 +344,19 @@ function getStartAndEndDate(prefix) {
const startTimeInput = $(`#${prefix}-start-time-input`);
const endTimeInput = $(`#${prefix}-end-time-input`);
return validateStartAndEndInputs(startDateInput, startTimeInput, endDateInput, endTimeInput, true, false);
}
// ToDo: eine Validierungsmethode für alle Anwendungsfälle (Zeiterfassung, Abwesenheiten, Kalendertermine)
function validateStartAndEndInputs(startDateInput, startTimeInput, endDateInput, endTimeInput, isServiceRecord, hasOpenEnd) {
if(hasOpenEnd === undefined || hasOpenEnd === null) {
hasOpenEnd = false;
}
if(isServiceRecord === undefined || isServiceRecord === null) {
isServiceRecord = false;
}
const startDate = new Date(startDateInput.val());
const startTime = startTimeInput.val();
@@ -347,13 +367,13 @@ function getStartAndEndDate(prefix) {
const isEndDateValid = endDateInput.length ? false === isNaN(endDate.getTime()) : true;
if(false === isStartDateValid && startTimeInput.length === 0 || false === isEndDateValid && endTimeInput.length === 0) {
return [new Date(`${startDate}T00:00:01`), new Date(`${endDate}T00:00:01`)];
return [new Date(`${startDate}T00:00:0${(isServiceRecord ? "1" : "0")}`), new Date(`${endDate}T00:00:0${(isServiceRecord ? "1" : "0")}`)];
}
const isStartTimeValid = startTime.length > 0;
const isEndTimeValid = endTime.length > 0;
if (false === isStartTimeValid || false === isStartDateValid || false === isEndTimeValid || false === isEndDateValid) {
if(false === isStartTimeValid || false === isStartDateValid || false === isEndTimeValid || false === isEndDateValid) {
return null;
}
@@ -361,7 +381,6 @@ function getStartAndEndDate(prefix) {
}
function supportConceptSearchOnChange() {
try {
var text = $("#support-concept-search-input").val().toLowerCase();

View File

@@ -49,13 +49,22 @@ namespace BeWoPlanerMobil.Service
var serverPath = HttpContext.Current.Server.MapPath(null);
serverPath = Path.Combine(serverPath, ConfigurationManager.AppSettings.Get("MultitenancyPath"));
var multitenancyPath = ConfigurationManager.AppSettings.Get("MultitenancyPath");
var configFileName = $"{MobileSessionFacade.Tenant}.config";
serverPath = Path.Combine(serverPath, MobileSessionFacade.Tenant + ".config");
serverPath = Path.Combine(serverPath, multitenancyPath);
serverPath = Path.Combine(serverPath, configFileName);
if(!File.Exists(serverPath))
{
return null;
serverPath = HttpContext.Current.Server.MapPath(null);
serverPath = Path.Combine(serverPath, Path.Combine("..\\", Path.Combine(multitenancyPath, configFileName)));
if(!File.Exists(serverPath))
{
return null;
}
}
var config = new Configuration().Configure(serverPath).SetInterceptor(new MobileUpdInsInterceptor()).BuildSessionFactory();

View File

@@ -76,16 +76,16 @@ namespace BeWoPlanerMobil.Util
public JsonCustomer(CustomerDC customer, List<BeWoFolderDC> folderTree, Dictionary<string, string> icd10Diagnosen)
{
Krankenkasse = customer.HealthInsurance;
Krankenkasse = customer.HealthInsurance;
Versichertennummer = customer.InsuranceNumber;
Versichertenstatus = customer.VersichertenStatus;
HasDisabilities = customer.Disabilities.Any();
SchwebiIsUnlimited = customer.AusweisUnbefristetGueltig == true ? "JA" : "NEIN";
HasDisabilities = customer.Disabilities.Any();
SchwebiIsUnlimited = customer.AusweisUnbefristetGueltig == true ? "JA" : "NEIN";
SchwebiGradDerBehinderung = customer.GradDerBehinderung;
SchwebiPflegegrad = customer.Pflegegrad?.ToString() ?? string.Empty;
SchwebiAktenzeichen = customer.AusweisAktenzeichen;
SchwebiMerkzeichen = string.Empty;
SchwebiPflegegrad = customer.Pflegegrad?.ToString() ?? string.Empty;
SchwebiAktenzeichen = customer.AusweisAktenzeichen;
SchwebiMerkzeichen = string.Empty;
foreach(var mz in customer.MerkzeichenListe)
{
SchwebiMerkzeichen += $"{mz}; ";
@@ -119,7 +119,7 @@ namespace BeWoPlanerMobil.Util
Vorname = customer.FirstName;
Nachname = customer.LastName;
Alias = customer.CustomerAlias;
Geburtstag = customer.DateOfBirth?.ToShortDateString() ?? string.Empty;
Geburtstag = customer.DateOfBirth?.ToString("yyyy-MM-dd") ?? string.Empty;
switch(customer.Sex)
{

View File

@@ -10,7 +10,6 @@
<script type="text/javascript">
$(document).ready(function() {
$(".collapse").on("shown.bs.collapse", function () {
logInfo3(`Das Collapsible-Element '${$(this).attr("id")}' ist geöffnet.`);
window.saveCollapsibleState($(this).attr("id"), "@Url.Action("SaveCollapsibleStatus")");
});
@@ -169,12 +168,12 @@
</div>
</div>
<div class="container-fluid mt-3 px-0 lg-max-width" id="customer-container">
<div class="container-fluid mt-1 px-0 lg-max-width" id="customer-container">
@if(Model?.SelectedJsonCustomer != null)
{
@* ----- Details ----- *@
<div class="col-12 my-3">
<div class="card w-100 h-100">
<div class="col-12">
<div class="card w-100 h-100 my-1">
<div class="card-header" onclick="cardHeaderClick2(this, resizeCustomerPrependElements)">
<div class="d-inline-flex">
<i class="fas fa-chevron-down h-100 text-bewo-customer-card-header"></i>
@@ -192,14 +191,14 @@
var inputDisabled = !AbstractModel.HasRightToEditCustomers ? "disabled" : string.Empty;
<div class="row" id="stammdaten-container">
<div class="col-sm-6 col-md-6 col-lg-6 col-xl-3 mt-3 px-1">
<div class="col-sm-6 col-md-6 col-lg-6 col-xl-3 mt-2 px-1">
<div class="card">
<div class="card-body pb-0">
<div class="card-title text-bewo-customer-card-header">
Eigenschaften
</div>
<div class="row">
<div class="form-group w-100">
<div class="form-group w-100 mt-1 my-0">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text customer-prepend-text-eigenschaften">
@@ -214,7 +213,7 @@
</div>
</div>
<div class="row">
<div class="form-group w-100">
<div class="form-group w-100 mt-1 my-0">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text customer-prepend-text-eigenschaften">
@@ -229,7 +228,7 @@
</div>
</div>
<div class="row">
<div class="form-group w-100">
<div class="form-group w-100 mt-1 my-0">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text customer-prepend-text-eigenschaften">
@@ -241,29 +240,22 @@
</div>
</div>
<div class="row">
<div class="form-group w-100">
<div class="input-group date" id="date-of-birth-picker" data-target-input="nearest">
<div class="form-group w-100 mt-1 my-0">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text customer-prepend-text-eigenschaften">
Geburtstag
</div>
</div>
<input type="text" @inputDisabled id="date-of-birth"
<input type="date" @inputDisabled id="date-of-birth-input"
autocomplete="on"
name="geburtstag" class="form-control datetimepicker-input"
data-target="#date-of-birth-picker"
value="@Model.SelectedJsonCustomer.Geburtstag"
data-toggle="datetimepicker" />
<div class="input-group-append" data-target="#date-of-birth-picker" data-toggle="datetimepicker">
<div class="input-group-text px-2">
<i class="fas fa-calendar-alt"></i>
</div>
</div>
name="geburtstag" class="form-control"
value="@Model.SelectedJsonCustomer.Geburtstag" />
</div>
</div>
</div>
<div class="row">
<div class="form-group w-100">
<div class="form-group w-100 mt-1 my-0">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text customer-prepend-text-eigenschaften">
@@ -287,7 +279,7 @@
</div>
</div>
<div class="row">
<div class="form-group w-100">
<div class="form-group w-100 mt-1 mb-0">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text">
@@ -299,7 +291,7 @@
</div>
</div>
<div class="row">
<div class="form-group w-100">
<div class="form-group w-100 mt-1 mb-0">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text">
@@ -311,7 +303,7 @@
</div>
</div>
<div class="row">
<div class="form-group w-100">
<div class="form-group w-100 my-1">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text">
@@ -325,14 +317,14 @@
</div>
</div>
</div>
<div class="col-sm-6 col-md-6 col-lg-6 col-xl-3 mt-3 px-1">
<div class="col-sm-6 col-md-6 col-lg-6 col-xl-3 mt-2 px-1">
<div class="card">
<div class="card-body pb-0">
<div class="card-title text-bewo-customer-card-header">
<a href="@Model.SelectedJsonCustomer.GoogleMapsLink" target="_blank" class="text-bewo-customer-card-header">Adresse<i class="fas fa-map-marker-alt ml-3"></i></a>
</div>
<div class="row">
<div class="form-group w-100">
<div class="form-group w-100 mt-1 mb-0">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text customer-prepend-text-adresse">
@@ -344,7 +336,7 @@
</div>
</div>
<div class="row">
<div class="form-group w-100">
<div class="form-group w-100 mt-1 mb-0">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text customer-prepend-text-adresse">
@@ -356,7 +348,7 @@
</div>
</div>
<div class="row">
<div class="form-group w-100">
<div class="form-group w-100 mt-1 mb-0">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text customer-prepend-text-adresse">
@@ -368,7 +360,7 @@
</div>
</div>
<div class="row">
<div class="form-group w-100">
<div class="form-group w-100 my-1">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text customer-prepend-text-adresse">
@@ -382,14 +374,14 @@
</div>
</div>
</div>
<div class="col-sm-6 col-md-6 col-lg-6 col-xl-3 mt-3 px-1">
<div class="col-sm-6 col-md-6 col-lg-6 col-xl-3 mt-2 px-1">
<div class="card">
<div class="card-body pb-0">
<div class="card-title text-bewo-customer-card-header">
Rechnungsadresse
</div>
<div class="row">
<div class="form-group w-100">
<div class="form-group w-100 mt-1 mb-0">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text customer-prepend-text-rechnungsadresse">
@@ -401,7 +393,7 @@
</div>
</div>
<div class="row">
<div class="form-group w-100">
<div class="form-group w-100 mt-1 mb-0">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text customer-prepend-text-rechnungsadresse">
@@ -413,7 +405,7 @@
</div>
</div>
<div class="row">
<div class="form-group w-100">
<div class="form-group w-100 mt-1 mb-0">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text customer-prepend-text-rechnungsadresse">
@@ -425,7 +417,7 @@
</div>
</div>
<div class="row">
<div class="form-group w-100">
<div class="form-group w-100 mb-1">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text customer-prepend-text-rechnungsadresse">
@@ -439,14 +431,14 @@
</div>
</div>
</div>
<div class="col-sm-6 col-md-6 col-lg-6 col-xl-3 mt-3 px-1">
<div class="col-sm-6 col-md-6 col-lg-6 col-xl-3 mt-2 px-1">
<div class="card">
<div class="card-body pb-0">
<div class="card-title text-bewo-customer-card-header">
Kontakt
</div>
<div class="row">
<div class="form-group w-100">
<div class="form-group w-100 mt-1 mb-0">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text customer-prepend-text-kontakt">
@@ -463,7 +455,7 @@
</div>
</div>
<div class="row">
<div class="form-group w-100">
<div class="form-group w-100 mt-1 mb-0">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text customer-prepend-text-kontakt">
@@ -480,7 +472,7 @@
</div>
</div>
<div class="row">
<div class="form-group w-100">
<div class="form-group w-100 mt-1 mb-0">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text customer-prepend-text-kontakt">
@@ -492,7 +484,7 @@
</div>
</div>
<div class="row">
<div class="form-group w-100">
<div class="form-group w-100 my-1">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text customer-prepend-text-kontakt">
@@ -512,7 +504,7 @@
</div>
</div>
<div class="col-sm-12 col-md-6 col-lg-12 my-3 px-1">
<div class="col-sm-12 col-md-6 col-lg-12 mt-2 px-1">
<div class="card w-100 h-100">
<div class="card-header">
<div class="clearfix">
@@ -529,7 +521,7 @@
@if(AbstractModel.HasRightToEditCustomers)
{
<div class="col-12 my-3 px-1">
<div class="col-12 mb-2 px-1 mt-2">
<button type="submit" class="btn btn-primary float-right w-100 m-0" onclick="showSpinner()">Speichern</button>
</div>
}
@@ -543,8 +535,8 @@
@* ----- Aktenzeichen ----- *@
if(Model.SelectedJsonCustomer.ReferenceNumbers.Any())
{
<div class="col-12 my-3">
<div class="card w-100 h-100">
<div class="col-12">
<div class="card w-100 h-100 my-1">
<div class="card-header" onclick="cardHeaderClick2(this)">
<div class="d-inline-flex">
<i class="fas fa-chevron-down h-100 text-bewo-customer-card-header"></i>
@@ -593,8 +585,8 @@
@* ----- Umfeld ----- *@
if(Model.SelectedJsonCustomer.Umfeldpersonen.Any())
{
<div class="col-12 my-3">
<div class="card w-100 h-100">
<div class="col-12">
<div class="card w-100 h-100 my-1">
<div class="card-header" onclick="cardHeaderClick2(this)">
<div class="d-inline-flex">
<i class="fas fa-chevron-down h-100 text-bewo-customer-card-header"></i>
@@ -695,8 +687,8 @@
@* ----- Organisationen des Umfelds ----- *@
if(Model.SelectedJsonCustomer.Organisations.Any())
{
<div class="col-12 my-3">
<div class="card w-100 h-100">
<div class="col-12">
<div class="card w-100 h-100 my-1">
<div class="card-header" onclick="cardHeaderClick2(this)">
<div class="d-inline-flex">
<i class="fas fa-chevron-down text-bewo-customer-card-header h-100"></i>
@@ -818,8 +810,8 @@
@* ----- Dokumente ----- *@
if(AbstractModel.HasRightToViewCustomerDocuments)
{
<div class="col-12 my-3">
<div class="card w-100 h-100">
<div class="col-12">
<div class="card w-100 h-100 my-1">
<div class="card-header" onclick="cardHeaderClick2(this)">
<div class="d-inline-flex">
<i class="fas fa-chevron-down h-100 text-bewo-customer-card-header"></i>
@@ -845,8 +837,8 @@
@* ----- Medikamentenliste ----- *@
if(AbstractModel.IsAllowedToSeeMedikamentenliste)
{
<div class="col-12 my-3">
<div class="card w-100 h-100">
<div class="col-12">
<div class="card w-100 h-100 my-1">
<div class="card-header" onclick="cardHeaderClick2(this)">
<div class="d-inline-flex">
<i class="fas fa-chevron-down h-100 text-bewo-customer-card-header"></i>
@@ -869,8 +861,8 @@
@* ----- Diagnosen ----- *@
if(AbstractModel.HasRightToViewDiagnosen && (Model.SelectedJsonCustomer.HasDiagnosen || Model.SelectedJsonCustomer.HasDisabilities || Model.SelectedJsonCustomer.HasSchwebi))
{
<div class="col-12 my-3">
<div class="card w-100 h-100">
<div class="col-12">
<div class="card w-100 h-100 my-1">
<div class="card-header" onclick="cardHeaderClick2(this)">
<div class="d-inline-flex">
<i class="fas fa-chevron-down h-100 text-bewo-customer-card-header"></i>
@@ -1006,7 +998,7 @@
if(isAllowedToViewBargeldkassen)
{
<div class="col-12">
<div class="card w-100 h-100">
<div class="card w-100 h-100 my-1">
<div class="card-header" onclick="cardHeaderClick2(this)">
<div class="d-inline-flex">
<i class="fas fa-chevron-down h-100 text-bewo-customer-card-header"></i>
@@ -1031,8 +1023,8 @@
@* ----- Abwesenheiten ----- *@
if(AbstractModel.HasRightToViewCustomerAbsenceTimes)
{
<div class="col-12 my-3">
<div class="card w-100 h-100">
<div class="col-12">
<div class="card w-100 h-100 my-1">
<div class="card-header" onclick="cardHeaderClick2(this)">
<div class="d-inline-flex">
<i class="fas fa-chevron-down h-100 text-bewo-customer-card-header"></i>
@@ -1064,8 +1056,8 @@
if(AbstractModel.HasRightToViewBetreuung && (hasRelatedEmployees || hasRelatedTeams))
{
<div class="col-12 my-3">
<div class="card w-100 h-100">
<div class="col-12">
<div class="card w-100 h-100 my-1">
<div class="card-header" onclick="cardHeaderClick2(this)">
<div class="d-inline-flex">
<i class="fas fa-chevron-down h-100 text-bewo-customer-card-header"></i>
@@ -1100,10 +1092,10 @@
<span>&times;</span>
</button>
</div>
<div class="modal-body" id="customer-absence-time-modal-body">
<div class="modal-body p-2" id="customer-absence-time-modal-body">
@Html.Partial("CustomerAbsenceTimeFormPartial", Model)
</div>
<div class="modal-footer">
<div class="modal-footer p-2">
<button class="btn btn-primary" type="button" onclick="submitCustomerAbsenceTimesForm()">OK</button>
<button class="btn btn-secondary" type="button" data-dismiss="modal" onclick="clearCustomerAbsenceTimesForm()">Abbrechen</button>
</div>

View File

@@ -40,31 +40,30 @@
$("#form-validation-result-column").addClass("d-none");
$("#form-validation-result-container").html("");
var validationMessage = "";
let validationMessage = "";
var allDay = $("#customer-absence-time-allday-cb").is(":checked");
const allDay = $("#customer-absence-time-allday-cb").is(":checked");
var startDateString = $("#customer-absence-time-start-date").val();
var endDateString = $("#customer-absence-time-end-date").val();
var startTimeString = $("#customer-absence-time-start-time").val();
var endTimeString = $("#customer-absence-time-end-time").val();
const startDateString = $("#customer-absence-time-start-date-input").val();
const endDateString = $("#customer-absence-time-end-date-input").val(); // z.B. 2025-05-20
const startTimeString = $("#customer-absence-time-start-time-input").val(); // z.B. 09:17
const endTimeString = $("#customer-absence-time-end-time-input").val();
var isInfinite = endDateString.length === 0 && endTimeString.length === 0;
const isInfinite = endDateString.length === 0 && endTimeString.length === 0;
var start = allDay ? moment(startDateString, "DD.MM.YYYY") : moment(startDateString + " " + startTimeString, "DD.MM.YYYY hh:mm");
var end = allDay ? moment(endDateString, "DD.MM.YYYY") : moment(endDateString + " " + endTimeString, "DD.MM.YYYY hh:mm");
const start = allDay ? new Date(startDateString) : combineDateAndTime(new Date(startDateString), startTimeString);
const end = allDay ? new Date(endDateString) : combineDateAndTime(new Date(endDateString), endTimeString);
var isStartValid = start.isValid();
var isEndValid = end.isValid() || isInfinite;
const isStartValid = false === isNaN(start.getTime());
const isEndValid = false === isNaN(end.getTime()) || isInfinite;
if(!isStartValid || !isEndValid) {
return "Die Datumsangaben sind ungültig!";
}
var selectedOption = $("#absence-reason-select option:selected");
const selectedOption = $("#absence-reason-select option:selected");
if(!isInfinite && isStartValid === true && end.isBefore(start)) {
if(!isInfinite && end.getTime() > start.getTime()) {
validationMessage = "Das Enddatum muss vor dem Startdatum liegen.";
}
@@ -84,13 +83,14 @@
function toggleAllDay() {
try {
var isChecked = $("#customer-absence-time-allday-cb").is(":checked");
const checkbox = $("#customer-absence-time-allday-cb");
const isChecked = checkbox.is(":checked");
if(isChecked === true) {
$("#customer-absence-time-start-time, #customer-absence-time-end-time").val("");
$("#customer-absence-time-start-time-input, #customer-absence-time-end-time-input").val(null);
}
$("#customer-absence-time-start-time, #customer-absence-time-end-time").prop("disabled", isChecked);
$("#customer-absence-time-start-time-input, #customer-absence-time-end-time-input").prop("disabled", isChecked);
} catch(error) {
showErrorPopup(error);
}
@@ -98,10 +98,10 @@
function submitCustomerAbsenceTimesForm() {
try {
var validationMessage = validateAbsenceTimeForm();
const validationMessage = validateAbsenceTimeForm();
if(validationMessage !== undefined && validationMessage !== null && validationMessage.length > 0) {
$("#form-validation-result-column").removeClass("d-none");
$("#form-validation-result-row").removeClass("d-none");
$("#form-validation-result-container").html(validationMessage);
return;
@@ -132,8 +132,8 @@
var isAllDay = Model.SelectedAbsenceTime?.Start?.IsTimeZero() ?? false;
var allDay = isAllDay ? "checked" : "";
var isDisabled = isAllDay ? "disabled" : "";
var startDate = Model.SelectedAbsenceTime?.Start?.ToString("dd.MM.yyyy");
var endDate = Model.SelectedAbsenceTime?.End?.ToString("dd.MM.yyyy");
var startDate = Model.SelectedAbsenceTime?.Start?.ToString("yyyy-MM-dd");
var endDate = Model.SelectedAbsenceTime?.End?.ToString("yyyy-MM-dd");
var startTime = Model.SelectedAbsenceTime?.Start?.ToString("HH:mm");
var endTime = Model.SelectedAbsenceTime?.End?.ToString("HH:mm");
@@ -148,87 +148,63 @@
}
<input type="hidden" name="customer-absence-time-oid" value="@Model.SelectedAbsenceTime?.AbsenceTimeOid" />
<div class="form-row d-none" id="form-validation-result-row">
<div class="col-12">
<div class="alert alert-danger mb-0" role="alert" id="form-validation-result-container"></div>
</div>
</div>
@* Neue Datums- und Zeitinputs *@
<div class="form-row">
<div class="col-12 d-none" id="form-validation-result-column">
<div class="alert alert-danger" role="alert" id="form-validation-result-container"></div>
</div>
<div class="col-lg">
<div class="form-group my-2">
<div class="input-group date" id="customer-absence-time-start-date-picker" data-target-input="nearest">
<div class="input-group-prepend">
<div class="input-group-text customer-absence-time-prepend">
Startdatum
</div>
</div>
<input type="text" id="customer-absence-time-start-date" name="customer-absence-time-start-date" class="form-control datetimepicker-input" data-target="#customer-absence-time-start-date-picker" data-toggle="datetimepicker" value="@startDate" />
<div class="input-group-append" data-target="#customer-absence-time-start-date-picker" data-toggle="datetimepicker">
<div class="input-group-text px-2">
<i class="fas fa-calendar-alt"></i>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg">
<div class="form-group my-2">
<div class="input-group date" id="customer-absence-time-end-date-picker" data-target-input="nearest">
<div class="input-group-prepend">
<div class="input-group-text customer-absence-time-prepend">
Enddatum
</div>
</div>
<input type="text" id="customer-absence-time-end-date" name="customer-absence-time-end-date" class="form-control datetimepicker-input" data-target="#customer-absence-time-end-date-picker" data-toggle="datetimepicker" value="@endDate" />
<div class="input-group-append" data-target="#customer-absence-time-end-date-picker" data-toggle="datetimepicker">
<div class="input-group-text px-2">
<i class="fas fa-calendar-alt"></i>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6 mt-2">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">
Startdatum
</span>
</div>
<input type="date" value="@startDate" class="form-control" id="customer-absence-time-start-date-input" name="customer-absence-time-start-date" />
</div>
</div>
<div class="col-md-6 mt-2">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">
Enddatum
</span>
</div>
<input type="date" value="@endDate" class="form-control" id="customer-absence-time-end-date-input" name="customer-absence-time-end-date" />
</div>
</div>
</div>
<div class="form-row">
<div class="col-lg">
<div class="form-group my-2">
<div class="input-group date" id="customer-absence-time-start-time-picker" data-target-input="nearest">
<div class="input-group-prepend">
<div class="input-group-text customer-absence-time-prepend">
Von
</div>
</div>
<input type="text" autocomplete="on" @isDisabled id="customer-absence-time-start-time" name="customer-absence-time-start-time" class="form-control datetimepicker-input" data-target="#customer-absence-time-start-time-picker" value="@startTime" />
<div class="input-group-append" data-target="#customer-absence-time-start-time-picker" data-toggle="datetimepicker">
<div class="input-group-text px-2">
<i class="fas fa-clock"></i>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg">
<div class="form-group my-2">
<div class="input-group date" id="customer-absence-time-end-time-picker" data-target-input="nearest">
<div class="input-group-prepend">
<div class="input-group-text customer-absence-time-prepend">
Bis
</div>
</div>
<input type="text" autocomplete="on" @isDisabled id="customer-absence-time-end-time" name="customer-absence-time-end-time" class="form-control datetimepicker-input" data-target="#customer-absence-time-end-time-picker" value="@endTime" />
<div class="input-group-append" data-target="#customer-absence-time-end-time-picker" data-toggle="datetimepicker">
<div class="input-group-text px-2">
<i class="fas fa-clock"></i>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6 mt-2">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">
Von
</span>
</div>
<input type="time" class="form-control" id="customer-absence-time-start-time-input" name="customer-absence-time-start-time" @isDisabled value="@startTime" />
</div>
</div>
<div class="col-md-6 mt-2">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">
Bis
</span>
</div>
<input type="time" class="form-control" id="customer-absence-time-end-time-input" name="customer-absence-time-end-time" @isDisabled value="@endTime" />
</div>
</div>
</div>
@* /Neue Datums- und Zeitinputs *@
<div class="form-row">
<div class="col-md">
<div class="col-md py-1">
<div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" class="custom-control-input" name="customer-absence-time-allday-cb" id="customer-absence-time-allday-cb" onclick="toggleAllDay()" @allDay />
<label class="custom-control-label" for="customer-absence-time-allday-cb">Ganztäglich</label>
@@ -238,7 +214,7 @@
<div class="form-row">
<div class="col-md">
<div class="form-group my-2">
<div class="form-group mb-2 mt-0">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text customer-absence-time-prepend">

View File

@@ -28,6 +28,9 @@
{
var start = relation.StartDate.HasValue ? $"{relation.StartDate.Value:dd.MM.yyyy}" : "";
var end = relation.EndDate.HasValue ? $"{relation.EndDate.Value:dd.MM.yyyy}" : "";
var relationRole = relation.RelationRole?.DisplayName ?? string.Empty;
<div class="col mb-3">
<div class="card h-100">
<div class="card-body">
@@ -39,7 +42,7 @@
</tr>
<tr>
<td class="text-secondary align-text-top">Rolle:</td>
<td class="text-right align-text-top">@relation.RelationRole?.DisplayName</td>
<td class="text-right align-text-top">@relationRole</td>
</tr>
@if(!string.IsNullOrWhiteSpace(start))
{
@@ -93,7 +96,7 @@
@foreach(var teamRelation in Model.SelectedCustomer.RelatedTeams)
{
<div class="row row-cols-1 row-cols-md-2 row-cols-lg-3 row-cols-xl-4">
<div class="col mb-3">
<div class="col mb-0">
<div class="card h-100">
<div class="card-body">
<table class="w-100">

View File

@@ -223,7 +223,7 @@
<div class="col mt-2">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text prepend-input-group-text">
<span class="input-group-text">
Von
</span>
</div>

View File

@@ -1,5 +1,4 @@
@using BeWoPlanerMobil.Models;
@using BeWoPlanerMobil.Service
@using BeWoPlanerMobil.Util;
@model MainModel

View File

@@ -255,7 +255,7 @@
@if(Model.NumberOfDokuTypes == 0)
{
<div class="form-group mt-2">
<label for="mb-dokufeld">Dokumentation</label>
<label for="mb-dokufeld-textarea">Dokumentation</label>
<button type="button" class="btn btn-outline-bewo-dev btn-sm mb-restore-btn" onclick="restoreField('mb-dokufeld-textarea')">
<i class="fas fa-recycle"></i>
</button>

View File

@@ -291,7 +291,7 @@
}
@* Löschen-Button *@
@if(MainModel.IsAllowedToDeleteServiceRecord(serviceRecord))
@if(Model.IsAllowedToDeleteServiceRecord(serviceRecord))
{
<button type="button" class="btn btn-outline-danger" onclick="deleteServiceRecord(@serviceRecord.ServiceRecordOid)">
<span class="fas fa-trash-alt"></span>

View File

@@ -245,7 +245,7 @@
if(Model.IsCustomerAbsence)
{
<div class="container my-1 mb-0 mx-auto p-0 w-100 text-center bg-bewo-dev">
<div class="container my-1 mb-0 mx-auto p-0 w-100 text-center">
<span>
<i class="fas fa-exclamation-triangle text-warning"></i>
<div class="text-danger d-inline">Klient ist abwesend</div>
@@ -256,7 +256,7 @@
using(Html.BeginForm("CreateOrUpdateServiceRecord", "Main", FormMethod.Post, new { id = "singleBookingForm" }))
{
<div>
<div>
@* ----- Einzelbuchung: Mitarbeiter ----- *@
<div class="form-row">
<div class="col-md">
@@ -382,7 +382,7 @@
<div class="col mt-2">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text prepend-input-group-text">
<span class="input-group-text">
Von
</span>
</div>

View File

@@ -29,43 +29,55 @@
}
function textModuleOnClick(textModuleOid) {
var focusedDokuFeld;
let focusedDokuFeld;
let prefix = "sb";
var dokufeldId = "#dokufeld";
var dokuTextareaId = "#doku-textarea-";
var textareaContainerId = "#doku_";
if("@Model.IsInMultiBookingMode".toLocaleLowerCase() === "true") {
dokufeldId = "#mb-dokufeld";
dokuTextareaId = "#mb-doku-textarea-";
textareaContainerId = "#mb-doku_";
if("@Model.IsInGroupBookingMode".toLocaleLowerCase() === "true") {
prefix = "gb";
}
if ("@Model.IsInMultiBookingMode".toLocaleLowerCase() === "true") {
prefix = "mb";
}
const dokufeldId = `#${prefix}-dokufeld`;
const dokuTextareaId = `#${prefix}-doku-textarea-`;
const textareaContainerId = `#${prefix}-doku_`;
$.get("@Url.Action("LoadCompleteTextbausteinByOid")", { pTextbausteinOid: textModuleOid }).done(function(textModuleText) {
if($(dokufeldId).length > 0) {
focusedDokuFeld = $(dokufeldId);
} else {
const numberOfDokutypes = getNumberOfDokutypes();
if($(dokufeldId).length > 0) {
focusedDokuFeld = $(dokufeldId);
} else {
const numberOfDokutypes = getNumberOfDokutypes();
for(let i = 0; i < numberOfDokutypes; i++) {
const currentElement = $(`#doku_${i}`);
for(let i = 0; i < numberOfDokutypes; i++) {
const currentElement = $(`#${prefix}-doku_${i}`);
if(currentElement.css("display") !== "none") {
focusedDokuFeld = $(dokuTextareaId + i);
break;
}
}
}
if(currentElement.css("display") !== "none") {
focusedDokuFeld = $(dokuTextareaId + i);
break;
}
}
}
const cursorPosition = focusedDokuFeld.prop("selectionStart");
const v = focusedDokuFeld.val();
const textBefore = v.substring(0, cursorPosition);
const textAfter = v.substring(cursorPosition, v.length);
const cursorPosition = focusedDokuFeld.prop("selectionStart");
const v = focusedDokuFeld.val();
focusedDokuFeld.val(textBefore + textModuleText + textAfter);
focusedDokuFeld.trigger("change");
let wholeText = "";
$("#textbausteine-popup").modal("hide");
if(cursorPosition === undefined || v === undefined) {
wholeText = textModuleText;
} else {
const textBefore = v.substring(0, cursorPosition);
const textAfter = v.substring(cursorPosition, v.length);
wholeText = textBefore + textModuleText + textAfter;
}
focusedDokuFeld.val(wholeText);
focusedDokuFeld.trigger("change");
$("#textbausteine-popup").modal("hide");
});
}
</script>

View File

@@ -72,7 +72,7 @@
<script type="text/javascript" src="@Scripts.Url("~/Scripts/ownSoft-Scripts/utils/js-helper.js")"></script>
<script type="text/javascript" src="@Scripts.Url("~/Scripts/ownSoft-Scripts/utils/logging.js")"></script>
<script type="text/javascript" src="@Scripts.Url("~/Scripts/ownSoft-Scripts/utils/MoKPasswordSecurity.js")"></script>
<script type="text/javascript" src="@Scripts.Url("~/Scripts/bs-custom-file-input.min.js?v=1.1")"></script>
<script type="text/javascript" src="@Scripts.Url("~/Scripts/bs-custom-file-input.min.js?v=1.3")"></script>
<script type="text/javascript" src="@Scripts.Url("~/Scripts/ownSoft-Scripts/utils/dropdown-search.js")"></script>
<script type="text/javascript" src="@Scripts.Url("~/Scripts/devexpress-dependencies/devextreme/dx.all.js")"></script>
@@ -92,6 +92,12 @@
new Script { ExtensionSuite = ExtensionSuite.Icons },
new Script { ExtensionType = ExtensionType.WebDocumentViewer }
)
<style type="text/css">
input::-webkit-date-and-time-value {
text-align: left;
}
</style>
<script type="text/javascript">
class LocalBeWoStorage {

View File

@@ -16,6 +16,7 @@ namespace BeWo.Data.Entities
public virtual Customer Customer { get; set; }
public virtual string AktenzeichenGericht { get; set; }
public virtual string EigenesAktenzeichen { get; set; }
public virtual DateTime? Auftragseingang { get; set; }
public virtual ValueListEntry Auftragsherkunft { get; set; }

View File

@@ -12,8 +12,8 @@ namespace BeWo.Data.Entities
private string _Name;
private string _Beschreibung;
private byte[] _Data;
private string _Text;
private string _RTFText;
private byte[] _Text;
private byte[] _RTFText;
private long? _Parent;
private long _Tabellenzugehoerigkeit;
@@ -49,7 +49,7 @@ namespace BeWo.Data.Entities
_Data = value;
}
}
public virtual string Text
public virtual byte[] Text
{
get { return _Text; }
set
@@ -58,7 +58,7 @@ namespace BeWo.Data.Entities
_Text = value;
}
}
public virtual string RTFText
public virtual byte[] RTFText
{
get { return _RTFText; }
set

View File

@@ -14,6 +14,7 @@
<property name="SystemEntryID" type="BS.Shared.SystemEntryID, BS.Shared" />
<property name="Notice"/>
<many-to-one name="Customer" column="CustomerOid" class="BeWo.Data.Entities.Customer, BeWo.Data" cascade="none"/>
<property name="AktenzeichenGericht"/>
<property name="EigenesAktenzeichen"/>
<property name="Auftragseingang"/>
<many-to-one name="Auftragsherkunft" column="Auftragsherkunft" class="BeWo.Data.Entities.ValueListEntry, BeWo.Data" cascade="none" />

View File

@@ -18,8 +18,8 @@
<property column="Name" type="String" name="Name"/>
<property column="Beschreibung" type="String" name="Beschreibung"/>
<property column="Data" type="BinaryBlob" name="Data"/>
<property column="Text" type="String" name="Text"/>
<property column="RTFText" type="String" name="RTFText"/>
<property column="Text" type="BinaryBlob" name="Text"/>
<property column="RTFText" type="BinaryBlob" name="RTFText"/>
<property column="Parent" type="Int64" name="Parent"/>

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<NameOfLastUsedPublishProfile>BeWo2.0</NameOfLastUsedPublishProfile>

View File

@@ -0,0 +1,8 @@
ALTER TABLE `dokumentvorlage`
CHANGE COLUMN `Text` `Text` LONGBLOB NULL DEFAULT NULL ;
ALTER TABLE `dokumentvorlage`
CHANGE COLUMN `RTFText` `RTFText` LONGBLOB NULL DEFAULT NULL ;
ALTER TABLE `CustomerVermittlungArbeit` ADD COLUMN AktenzeichenGericht VARCHAR(256) NULL DEFAULT NULL;

View File

@@ -1524,3 +1524,40 @@ CREATE TABLE `AbsenceTimeHistory` (
`AbsenceTimeCustomerOid` bigint DEFAULT NULL,
PRIMARY KEY (`Oid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE `signaturehistory` (
`Oid` BIGINT AUTO_INCREMENT PRIMARY KEY,
`Tid` INT DEFAULT NULL,
`Version` BIGINT DEFAULT NULL,
`IsActive` TINYINT DEFAULT NULL,
`InsTs` DATETIME DEFAULT NULL,
`SystemEntryID` INT DEFAULT NULL,
`InsUser` VARCHAR(256) DEFAULT NULL,
`UdpUser` VARCHAR(256) DEFAULT NULL,
`Notice` VARCHAR(1024) DEFAULT NULL,
`SignatureOid` BIGINT DEFAULT NULL,
`SignatureType` INT DEFAULT NULL,
`SignatureInsTs` DATETIME DEFAULT NULL,
`CustomerOid` BIGINT DEFAULT NULL,
`EmployeeOid` BIGINT DEFAULT NULL,
`BargeldtransaktionsOid` BIGINT DEFAULT NULL,
`SignatureTimeSpanStart` DATETIME DEFAULT NULL,
`SignatureTimeSpanEnd` DATETIME DEFAULT NULL,
`SignatureEventType` INT DEFAULT NULL
) Engine=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE `servicerecord2signaturehistory` (
`Oid` BIGINT AUTO_INCREMENT PRIMARY KEY,
`SignatureHistoryOid` BIGINT DEFAULT NULL,
`ServiceRecordOid` BIGINT DEFAULT NULL,
FOREIGN KEY (`SignatureHistoryOid`) REFERENCES `signaturehistory`(`Oid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
ALTER TABLE `CustomerVermittlungArbeit` ADD COLUMN AktenzeichenGericht VARCHAR(256) NULL DEFAULT NULL;
ALTER TABLE `dokumentvorlage`
CHANGE COLUMN `Text` `Text` LONGBLOB NULL DEFAULT NULL ;
ALTER TABLE `dokumentvorlage`
CHANGE COLUMN `RTFText` `RTFText` LONGBLOB NULL DEFAULT NULL ;

View File

@@ -64,7 +64,7 @@ namespace FreundeskreisSuchthilfe.Service
}
}
public override bool AllowCustomerAnalysis(Customer customer, FLSAnalysisConfigDC config, IList<ServiceRecord> serviceRecords)
public override bool AllowCustomerAnalysis(Customer customer, FLSAnalysisConfigDC config, IList<IServiceRecord> serviceRecords)
{
if (config.EmployeeOid != null)
{

View File

@@ -163,7 +163,7 @@ namespace LebenshilfeBadKreuznachFUD.Invoicing
}
}
private object CreateHausbesuchspauschale(List<ServiceRecordDC> serviceRecordsInPeriod, DateTimeSpan invoicePeriod, SupportConceptApprovalPeriod scap)
private IList<InvoiceItem> CreateHausbesuchspauschale(List<ServiceRecordDC> serviceRecordsInPeriod, DateTimeSpan invoicePeriod, SupportConceptApprovalPeriod scap)
{
IList<InvoiceItem> items = new List<InvoiceItem>();
decimal wegepauschale = 7.45m;

View File

@@ -27,7 +27,7 @@ namespace LebenshilfeBadKreuznachFUD.Reporting.Reports
var sonderFerienDict = GetOrganisationFeiertage(org);
pRO.CreateDummyEntries(true);
pRO.CreateDummyEntries(false);
@@ -37,7 +37,8 @@ namespace LebenshilfeBadKreuznachFUD.Reporting.Reports
if (vs.IstFeiertag(item.StartDate))
{
//item.Notice = vs.GetFeiertage()
item.Notice = vs.GetFeiertag(item.StartDate).Name;
item.Notice = vs.GetFeiertag(item.StartDate.Date)?.Name;
}
else
{

View File

@@ -19,7 +19,7 @@ namespace PflegedienstWessel.Service
{
public class CustomStundenuebersichtAuswertung : StundenuebersichtAuswertung
{
protected override ServiceRecordFLSOverviewDC CreateServiceRecordFLSOverviewDC(ServiceRecord sr, bool useGroupInfo, bool useRoundedDuration, bool showGroupMinutes)
protected override ServiceRecordFLSOverviewDC CreateServiceRecordFLSOverviewDC(IServiceRecord sr, bool useGroupInfo, bool useRoundedDuration, bool showGroupMinutes)
{
var dc = base.CreateServiceRecordFLSOverviewDC(sr, useGroupInfo, useRoundedDuration, showGroupMinutes);

View File

@@ -64,7 +64,8 @@ namespace SPZLeverkusen.Service
}
}
public override bool AllowCustomerAnalysis(Customer customer, FLSAnalysisConfigDC config, IList<ServiceRecord> serviceRecords)
public override bool AllowCustomerAnalysis(Customer customer, FLSAnalysisConfigDC config, IList<IServiceRecord> serviceRecords)
{
if (config.EmployeeOid != null)
{

View File

@@ -18,6 +18,7 @@ namespace BeWo.Service.DCEntityMapper
pDataContract.Oid = pEntity.Oid;
pDataContract.Version = pEntity.Version;
pDataContract.Notice = pEntity.Notice;
pDataContract.AktenzeichenGericht = pEntity.AktenzeichenGericht;
pDataContract.EigenesAktenzeichen = pEntity.EigenesAktenzeichen;
pDataContract.Auftragseingang = pEntity.Auftragseingang;
pDataContract.Tagessatze = pEntity.Tagessatze;
@@ -69,6 +70,7 @@ namespace BeWo.Service.DCEntityMapper
pEntity.Oid = pDataContract.Oid;
pEntity.Version = pDataContract.Version;
pEntity.Notice = pDataContract.Notice;
pEntity.AktenzeichenGericht = pDataContract.AktenzeichenGericht;
pEntity.EigenesAktenzeichen = pDataContract.EigenesAktenzeichen;
pEntity.Auftragseingang = pDataContract.Auftragseingang;
pEntity.Tagessatze = pDataContract.Tagessatze;

View File

@@ -25,8 +25,14 @@ namespace BeWo.Service.DCEntityMapper
pDataContract.Data = pEntity.Data;
pDataContract.Parent = pEntity.Parent;
pDataContract.Tabellenzugehoerigkeit = pEntity.Tabellenzugehoerigkeit;
pDataContract.Text = pEntity.Text;
pDataContract.RTFText = pEntity.RTFText;
if (pEntity.Text != null)
{
pDataContract.Text = Encoding.Default.GetString(pEntity.Text);
}
if (pEntity.RTFText != null)
{
pDataContract.RTFText = Encoding.Default.GetString(pEntity.RTFText);
}
return pDataContract;
@@ -49,8 +55,15 @@ namespace BeWo.Service.DCEntityMapper
pEntity.Data = pDataContract.Data;
pEntity.Parent = pDataContract.Parent;
pEntity.Tabellenzugehoerigkeit = pDataContract.Tabellenzugehoerigkeit;
pEntity.Text = pDataContract.Text;
pEntity.RTFText = pDataContract.RTFText;
if (pDataContract.Text != null)
{
pEntity.Text = Encoding.Default.GetBytes(pDataContract.Text);
}
if (pDataContract.RTFText != null)
{
pEntity.RTFText = Encoding.Default.GetBytes(pDataContract.RTFText);
}
return pEntity;
}

View File

@@ -0,0 +1,330 @@
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Service.DCEntityMapper;
using BS.Shared;
using BS.Shared.DataContracts;
using DevExpress.XtraRichEdit;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media.Imaging;
namespace BeWo.Service.Dokumentverwaltung
{
public class CustomerPlaceholderManager : PlaceholderManager
{
public override List<PlatzhalterDC> GetPlatzhalter()
{
List<PlatzhalterDC> liste = new List<PlatzhalterDC>();
PlatzhalterDC personendaten = new PlatzhalterDC()
{
Bezeichnung = "Klient/in",
Children = new List<PlatzhalterDC>(),
IconType = "BoyAndGirl"
};
#region Children Personendaten
personendaten.Children.Add(new PlatzhalterDC { Bezeichnung = "Anrede", Platzhalter = "KlAnrede", IconType = "AB" });
personendaten.Children.Add(new PlatzhalterDC { Bezeichnung = "Briefanrede", Platzhalter = "KlBriefanrede", IconType = "AB" });
PlatzhalterDC vorname = new PlatzhalterDC() { Bezeichnung = "Vorname", Platzhalter = "KlVorname" , FieldName = "Person.FirstName", IconType = "AB" };
personendaten.Children.Add(vorname);
PlatzhalterDC nachname = new PlatzhalterDC() { Bezeichnung = "Nachname", Platzhalter = "KlNachname", FieldName = "Person.LastName", IconType = "AB" };
personendaten.Children.Add(nachname);
PlatzhalterDC alias = new PlatzhalterDC() { Bezeichnung = "Alias", Platzhalter = "KlAlias", FieldName = "CustomerAlias", IconType = "AB" };
personendaten.Children.Add(alias);
PlatzhalterDC gebDatum = new PlatzhalterDC() { Bezeichnung = "Geburtsdatum", Platzhalter = "KlGeburtsdatum", FieldName = "Person.DateOfBirth", IconType = "AB" };
personendaten.Children.Add(gebDatum);
PlatzhalterDC telefonnummer = new PlatzhalterDC() { Bezeichnung = "Telefon", Platzhalter = "KlTelefon", FieldName = "Person.Contacts", IconType = "AB" };
personendaten.Children.Add(telefonnummer);
PlatzhalterDC handynummer = new PlatzhalterDC() { Bezeichnung = "Handy", Platzhalter = "KlHandy", FieldName = "Person.Contacts", IconType = "AB" };
personendaten.Children.Add(handynummer);
PlatzhalterDC email = new PlatzhalterDC() { Bezeichnung = "E-Mail", Platzhalter = "KlEmail", FieldName = "Person.Contacts", IconType = "AB" };
personendaten.Children.Add(email);
PlatzhalterDC fax = new PlatzhalterDC() { Bezeichnung = "KlFax", Platzhalter = "KlFax", FieldName = "Person.Contacts", IconType = "AB" };
personendaten.Children.Add(fax);
PlatzhalterDC berufsbezeichnung = new PlatzhalterDC() { Bezeichnung = "Beruf", Platzhalter = "KlBeruf", FieldName = "Person.Profession", IconType = "AB" };
personendaten.Children.Add(berufsbezeichnung);
PlatzhalterDC debitor = new PlatzhalterDC() { Bezeichnung = "Debitorennumer", Platzhalter = "Debitorennumer", FieldName = "DebitorNumber", IconType = "AB" };
personendaten.Children.Add(debitor);
PlatzhalterDC kostenstelle = new PlatzhalterDC() { Bezeichnung = "Kostenstelle", Platzhalter = "Kostenstelle", FieldName = "CostCenter", IconType = "AB" };
personendaten.Children.Add(kostenstelle);
#endregion Children Personendaten
PlatzhalterDC adressdatenKlient = new PlatzhalterDC()
{
Bezeichnung = "Adressdaten Klient/-in",
Children = new List<PlatzhalterDC>(),
IconType = "Home"
};
#region Children Adressdaten Klient/-in
PlatzhalterDC strasse = new PlatzhalterDC() { Bezeichnung = "Straße", Platzhalter = "KlStrasse", IconType = "AB", FieldName = "Person.Address.Street" };
adressdatenKlient.Children.Add(strasse);
PlatzhalterDC plz = new PlatzhalterDC() { Bezeichnung = "PLZ", Platzhalter = "KlPLZ", IconType = "AB", FieldName = "Person.Address.PostalCode" };
adressdatenKlient.Children.Add(plz);
PlatzhalterDC ort = new PlatzhalterDC() { Bezeichnung = "Ort", Platzhalter = "KlOrt", IconType = "AB", FieldName = "Person.Address.Town" };
adressdatenKlient.Children.Add(ort);
#endregion
PlatzhalterDC vga = new PlatzhalterDC()
{
Bezeichnung = "Vermittlung gemeinnütziger Arbeit",
Children = new List<PlatzhalterDC>(),
IconType = "BoyAndGirl"
};
#region Children Vermittlung gemeinnütziger Arbeit
vga.Children.Add(new PlatzhalterDC() { Bezeichnung = "AZ der Staatsanwaltschaft/des Gerichts", Platzhalter = "AktenzeichenGericht", FieldName = "Person.CustomerVermittlungArbeit.AktenzeichenGericht", IconType = "AB"});
vga.Children.Add(new PlatzhalterDC() { Bezeichnung = "Eigenes Aktenzeichen", Platzhalter = "EigenesAktenzeichen", FieldName = "Person.CustomerVermittlungArbeit.EigenesAktenzeichen", IconType = "AB" });
vga.Children.Add(new PlatzhalterDC() { Bezeichnung = "Auftragseingang", Platzhalter = "Auftragseingang", FieldName = "Person.CustomerVermittlungArbeit.Auftragseingang", IconType = "AB" });
vga.Children.Add(new PlatzhalterDC() { Bezeichnung = "Auftragsherkunft", Platzhalter = "Auftragsherkunft", FieldName = "Person.CustomerVermittlungArbeit.Auftragsherkunft", IconType = "AB" });
vga.Children.Add(new PlatzhalterDC() { Bezeichnung = "Vermittlungsgrundlage", Platzhalter = "Vermittlungsgrundlage", FieldName = "Person.CustomerVermittlungArbeit.Vermittlungsgrundlage", IconType = "AB" });
vga.Children.Add(new PlatzhalterDC() { Bezeichnung = "Tagessätze", Platzhalter = "Tagessatze", FieldName = "Person.CustomerVermittlungArbeit.Tagessatze", IconType = "AB" });
vga.Children.Add(new PlatzhalterDC() { Bezeichnung = "Tagessatzhöhe", Platzhalter = "Tagessatzhohe", FieldName = "Person.CustomerVermittlungArbeit.Tagessatzhohe", IconType = "AB" });
vga.Children.Add(new PlatzhalterDC() { Bezeichnung = "Höhe der Geldstrafe", Platzhalter = "HoheDerGeldstrafe", FieldName = "Person.CustomerVermittlungArbeit.HoheDerGeldstrafe", IconType = "AB" });
vga.Children.Add(new PlatzhalterDC() { Bezeichnung = "Zu leistende Arbeitsstunden", Platzhalter = "ZuLeistendeArbeitsstunden", FieldName = "Person.CustomerVermittlungArbeit.ZuLeistendeArbeitsstunden", IconType = "AB" });
vga.Children.Add(new PlatzhalterDC() { Bezeichnung = "Hinweis", Platzhalter = "Hinweis", FieldName = "Person.CustomerVermittlungArbeit.Hinweis", IconType = "AB" });
vga.Children.Add(new PlatzhalterDC() { Bezeichnung = "Termin", Platzhalter = "Termin", FieldName = "Person.CustomerVermittlungArbeit.Termin", IconType = "AB" });
vga.Children.Add(new PlatzhalterDC() { Bezeichnung = "Bearbeitungsstatus", Platzhalter = "CustomerVermittlungBearbeitungsstatus", FieldName = "Person.CustomerVermittlungArbeit.CustomerVermittlungBearbeitungsstatus", IconType = "AB" });
vga.Children.Add(new PlatzhalterDC() { Bezeichnung = "Auftragsrückgabe", Platzhalter = "Auftragsruckgabe", FieldName = "Person.CustomerVermittlungArbeit.Auftragsruckgabe", IconType = "AB" });
vga.Children.Add(new PlatzhalterDC() { Bezeichnung = "Verlauf", Platzhalter = "Verlauf", FieldName = "Person.CustomerVermittlungArbeit.Verlauf", IconType = "AB" });
vga.Children.Add(new PlatzhalterDC() { Bezeichnung = "Abgeleistete Stunden", Platzhalter = "AbgeleisteteStunden", FieldName = "Person.CustomerVermittlungArbeit.AbgeleisteteStunden", IconType = "AB" });
vga.Children.Add(new PlatzhalterDC() { Bezeichnung = "Ersparte Hafttage", Platzhalter = "ErsparteHafttage", FieldName = "Person.CustomerVermittlungArbeit.ErsparteHafttage", IconType = "AB" });
vga.Children.Add(new PlatzhalterDC() { Bezeichnung = "Geleistete Ratenzahlung", Platzhalter = "GeleisteteRatenzahlung", FieldName = "Person.CustomerVermittlungArbeit.GeleisteteRatenzahlung", IconType = "AB" });
vga.Children.Add(new PlatzhalterDC() { Bezeichnung = "Geleistete Einmalzahlung", Platzhalter = "GeleisteteEinmalzahlung", FieldName = "Person.CustomerVermittlungArbeit.GeleisteteEinmalzahlung", IconType = "AB" });
vga.Children.Add(new PlatzhalterDC() { Bezeichnung = "Bemerkung", Platzhalter = "Bemerkung", FieldName = "Person.CustomerVermittlungArbeit.Bemerkung", IconType = "AB" });
#endregion
PlatzhalterDC betreuung = new PlatzhalterDC()
{
Bezeichnung = "Betreuung",
Children = new List<PlatzhalterDC>(),
IconType = "Paste"
};
#region Children Betreuung
PlatzhalterDC betreuungsbeginn = new PlatzhalterDC() { Bezeichnung = "Betreuungsbeginn", Platzhalter = "Betreuungsbeginn", FieldName = "AssistanceBegin", IconType = "AB" };
betreuung.Children.Add(betreuungsbeginn);
PlatzhalterDC betreuungsende = new PlatzhalterDC() { Bezeichnung = "Betreuungsende", Platzhalter = "Betreuungsende", FieldName = "TerminationDate", IconType = "AB" };
betreuung.Children.Add(betreuungsende);
PlatzhalterDC grundBetreuungsende = new PlatzhalterDC() { Bezeichnung = "Grund Betreuungsbeendung", Platzhalter = "GrundBetreuungsbeendung", FieldName = "TerminationReason", IconType = "AB" };
betreuung.Children.Add(grundBetreuungsende);
PlatzhalterDC behindertenausweis = new PlatzhalterDC()
{
Bezeichnung = "Schwerbehindertenausweis",
Children = new List<PlatzhalterDC>(),
IconType = "ContactCardWebDisabled"
};
#region Children Behindertenausweis
PlatzhalterDC amt = new PlatzhalterDC() { Bezeichnung = "Ausstellendes Amt", Platzhalter = "AusweisAmt", FieldName = "AusstVersAmt", IconType = "AB" };
behindertenausweis.Children.Add(amt);
PlatzhalterDC gueltigVon = new PlatzhalterDC() { Bezeichnung = "Gültig von", Platzhalter = "AusweisGueltigVon", FieldName = "AusweisGueltigVon", IconType = "AB" };
behindertenausweis.Children.Add(gueltigVon);
PlatzhalterDC gueltigbis = new PlatzhalterDC() { Bezeichnung = "Gültig bis", Platzhalter = "AusweisGueltigBis", FieldName = "AusweisGueltigBis", IconType = "AB" };
behindertenausweis.Children.Add(gueltigbis);
PlatzhalterDC ausweisAktenzeichen = new PlatzhalterDC() { Bezeichnung = "Aktenzeichen", Platzhalter = "AusweisAktenzeichen", FieldName = "AusweisAktenzeichen", IconType = "AB" };
behindertenausweis.Children.Add(ausweisAktenzeichen);
PlatzhalterDC beiblatt = new PlatzhalterDC() { Bezeichnung = "Beiblattgültigkeit", Platzhalter = "AusweisBeiblatt", FieldName = "BeiblattGueltigBis", IconType = "AB" };
behindertenausweis.Children.Add(beiblatt);
PlatzhalterDC gradDerBehinderung = new PlatzhalterDC() { Bezeichnung = "Grad der Behinderung", Platzhalter = "AusweisGradDerBehinderung", FieldName = "GradDerBehinderung", IconType = "AB" };
behindertenausweis.Children.Add(gradDerBehinderung);
betreuung.Children.Add(behindertenausweis);
#endregion
PlatzhalterDC pflegegrad = new PlatzhalterDC() { Bezeichnung = "Pflegegrad", Platzhalter = "Pflegegrad", FieldName = "Pflegegrad", IconType = "AB" };
betreuung.Children.Add(pflegegrad);
PlatzhalterDC versicherung = new PlatzhalterDC()
{
Bezeichnung = "Versicherungsdaten",
Children = new List<PlatzhalterDC>(),
IconType = "OfficeBulidingBlackDisabled"
};
#region Children Versicherung
PlatzhalterDC krankenkasse = new PlatzhalterDC() { Bezeichnung = "Krankenkasse", Platzhalter = "KlientKrankenkasse", IconType = "AB" };
versicherung.Children.Add(krankenkasse);
PlatzhalterDC versnummer = new PlatzhalterDC() { Bezeichnung = "Versichertennummer", Platzhalter = "KlientVersNummer", IconType = "AB" };
versicherung.Children.Add(krankenkasse);
PlatzhalterDC versStatus = new PlatzhalterDC() { Bezeichnung = "Versicherungsstatus", Platzhalter = "KlientVersicherungsstatus", IconType = "AB" };
versicherung.Children.Add(krankenkasse);
#endregion
#endregion
PlatzhalterDC sonstiges = new PlatzhalterDC()
{
Bezeichnung = "Sonstiges",
Children = new List<PlatzhalterDC>(),
IconType = "Add24"
};
#region Children Sonstiges
PlatzhalterDC datum = new PlatzhalterDC() { Bezeichnung = "Tagesdatum", Platzhalter = "Tagesdatum", IconType = "AB" };
sonstiges.Children.Add(datum);
#endregion
var em = new EmployeePlaceholderManager();
liste.AddRange(em.GetPlatzhalter());
liste.Add(personendaten);
liste.Add(adressdatenKlient);
liste.Add(vga);
//liste.Add(adressdatenOrganisation);
liste.Add(betreuung);
liste.Add(sonstiges);
return liste;
}
public override Object GetEntityObject(long oid)
{
return DAOFactory.GenericDAO.GetByID<Customer>(oid);
}
public override String GetPlaceholderValue(PlatzhalterDC ph, Object obj)
{
return GetPlaceholderValueForCustomer(ph, obj as Customer);
}
public String GetPlaceholderValueForCustomer(PlatzhalterDC ph, Customer customer)
{
if (customer == null)
{
return String.Empty;
}
if (ph.Platzhalter == "MaVorname" ||
ph.Platzhalter == "MaNachname" ||
ph.Platzhalter == "MaTelefon" ||
ph.Platzhalter == "MaFax" ||
ph.Platzhalter == "MaEmail" ||
ph.Platzhalter == "MaHandy")
{
var em = new EmployeePlaceholderManager();
return em.GetPlaceholderValueForEmployee(ph, Data.Security.UserRightHelper.GetLoggedInUser().Employee);
}
if (ph.Platzhalter == "KlBriefanrede")
{
if (customer.Person.Sex == Sex.Male)
return "Sehr geehrter Herr";
else if (customer.Person.Sex == Sex.Female)
return "Sehr geehrte Frau";
}
if (ph.Platzhalter == "KlAnrede")
{
if (customer.Person.Sex == Sex.Male)
return "Herr";
else if (customer.Person.Sex == Sex.Female)
return "Frau";
}
if (ph.Platzhalter == "KlVorname")
{
return base.GetPlaceholderValue(ph, customer);
//return customer.Person.FirstName;
}
if (ph.Platzhalter == "KlNachname")
{
return customer.Person.LastName;
}
if (ph.Platzhalter == "KlGeburtsdatum")
{
return String.Format("{0:dd.MM.yyyy}", customer.Person.DateOfBirth);
}
if (ph.Platzhalter == "KlTelefon")
{
foreach (Contact c in customer.Person.Contacts)
{
if (c.Type == ContactType.business_Phone)
{
return c.Value;
}
}
}
if (ph.Platzhalter == "KlHandy")
{
foreach (Contact c in customer.Person.Contacts)
{
if (c.Type == ContactType.business_MobilePhone)
{
return c.Value;
}
}
}
if (ph.Platzhalter == "KlEmail")
{
foreach (Contact c in customer.Person.Contacts)
{
if (c.Type == ContactType.business_Mail)
{
return c.Value;
}
}
}
if (ph.Platzhalter == "KlFax")
{
foreach (Contact c in customer.Person.Contacts)
{
if (c.Type == ContactType.business_Fax)
{
return c.Value;
}
}
}
if (ph.Platzhalter == "KlBeruf")
{
return customer.Person.Profession;
}
//Adressdaten
if (customer.Person.Address != null)
{
if (ph.Platzhalter == "KlStrasse")
{
return customer.Person.Address.Street;
}
if (ph.Platzhalter == "KlPLZ")
{
return customer.Person.Address.PostalCode;
}
if (ph.Platzhalter == "KlOrt")
{
return customer.Person.Address.Town;
}
}
//Betreuung
if (ph.Platzhalter == "KlAnsprechpartner")
{
string anrede = (customer.Ansprechpartner.Sex == 0) ? "Herr " : "Frau ";
return anrede + customer.Ansprechpartner.FirstNameLastName;
}
if (ph.Platzhalter == "Kostenstelle")
{
return customer.CostCenter;
}
//Sonstiges
if (ph.Platzhalter == "Tagesdatum")
{
return String.Format("{0:dd.MM.yyyy}", DateTime.Now);
}
return String.Empty;
}
}
}

View File

@@ -20,7 +20,7 @@ namespace BeWo.Service.Dokumentverwaltung
bool templateFolder = folder.Any(f => f.SystemEntryID.Equals(SystemEntryID.TemplateDirectory));
var folderDCList = new List<BeWoFolderDC>();
foreach (BeWoFolder item in SortiereOrdner(folder))
foreach (BeWoFolder item in SortiereOrdner(folder))
{
folderDCList.Add(MapperFactory.BeWoFolderDC_BeWoFolder.MapToNewDC(item));
}

View File

@@ -0,0 +1,121 @@
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Service.DCEntityMapper;
using BS.Shared;
using BS.Shared.DataContracts;
using DevExpress.XtraRichEdit;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media.Imaging;
namespace BeWo.Service.Dokumentverwaltung
{
public class EmployeePlaceholderManager : PlaceholderManager
{
public override List<PlatzhalterDC> GetPlatzhalter()
{
List<PlatzhalterDC> liste = new List<PlatzhalterDC>();
PlatzhalterDC employeedaten = new PlatzhalterDC()
{
Bezeichnung = "Mitarbeiter/in",
Children = new List<PlatzhalterDC>(),
IconType = "UserGroupHome24bw"
};
employeedaten.Children.Add(new PlatzhalterDC { Bezeichnung = "Vorname", Platzhalter = "MaVorname", FieldName = "Person.FirstName", IconType = "AB" });
employeedaten.Children.Add(new PlatzhalterDC { Bezeichnung = "Nachname", Platzhalter = "MaNachname", FieldName = "Person.LastName", IconType = "AB" });
employeedaten.Children.Add(new PlatzhalterDC { Bezeichnung = "Telefon", Platzhalter = "MaTelefon", FieldName = "Person.Phone", IconType = "AB" });
employeedaten.Children.Add(new PlatzhalterDC { Bezeichnung = "Fax", Platzhalter = "MaFax", FieldName = "Person.Fax", IconType = "AB" });
employeedaten.Children.Add(new PlatzhalterDC { Bezeichnung = "E-Mail", Platzhalter = "MaEmail", FieldName = "Person.Mail", IconType = "AB" });
employeedaten.Children.Add(new PlatzhalterDC { Bezeichnung = "Handy", Platzhalter = "MaHandy", FieldName = "Person.Mobile", IconType = "AB" });
liste.Add(employeedaten);
return liste;
}
public virtual Object GetEntityObject(long oid)
{
return DAOFactory.GenericDAO.GetByID<Employee>(oid);
}
public override String GetPlaceholderValue(PlatzhalterDC ph, Object obj)
{
return GetPlaceholderValueForEmployee(ph, obj as Employee);
}
public String GetPlaceholderValueForEmployee(PlatzhalterDC ph, Employee employee)
{
if (employee == null)
{
return String.Empty;
}
if (ph.Platzhalter == "MaVorname")
{
return base.GetPlaceholderValue(ph, employee);
//return customer.Person.FirstName;
}
if (ph.Platzhalter == "MaNachname")
{
return employee.Person.LastName;
}
if (ph.Platzhalter == "MaGeburtsdatum")
{
return String.Format("{0:dd.MM.yyyy}", employee.Person.DateOfBirth);
}
if (ph.Platzhalter == "MaTelefon")
{
foreach (Contact c in employee.Person.Contacts)
{
if (c.Type == ContactType.business_Phone)
{
return c.Value;
}
}
}
if (ph.Platzhalter == "MaHandy")
{
foreach (Contact c in employee.Person.Contacts)
{
if (c.Type == ContactType.business_MobilePhone)
{
return c.Value;
}
}
}
if (ph.Platzhalter == "MaEmail")
{
foreach (Contact c in employee.Person.Contacts)
{
if (c.Type == ContactType.business_Mail)
{
return c.Value;
}
}
}
if (ph.Platzhalter == "MaFax")
{
foreach (Contact c in employee.Person.Contacts)
{
if (c.Type == ContactType.business_Fax)
{
return c.Value;
}
}
}
return String.Empty;
}
}
}

View File

@@ -0,0 +1,122 @@
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Service.DCEntityMapper;
using BS.Shared;
using BS.Shared.DataContracts;
using DevExpress.XtraRichEdit;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media.Imaging;
namespace BeWo.Service.Dokumentverwaltung
{
public class PlaceholderManager
{
public virtual List<PlatzhalterDC> GetPlatzhalter()
{
return null;
}
public virtual string ReplacePlaceholdersInTemplate(DokumentvorlageDC template, long? objectOid, TableID tid)
{
//Nur für abgeleitete Klassen
return null;
}
public virtual void ReplacePlaceholderInText(RichEditDocumentServer rtfServer, PlatzhalterDC ph, Object obj)
{
if (!String.IsNullOrEmpty(ph.Platzhalter))
{
String platzhalter = String.Format("[{0}]", ph.Platzhalter);
String platzhalterWert = GetPlaceholderValue(ph, obj);
//var doc = rtfServer.Document as DevExpress.XtraRichEdit.API.Native.Implementation.NativeDocument;
//var list = rtfServer.Document.FindAll("blablubb", DevExpress.XtraRichEdit.API.Native.SearchOptions.None);
foreach (var shape in rtfServer.Document.Shapes)
{
var subdoc = shape.ShapeFormat?.TextBox?.Document;
if (subdoc != null)
{
subdoc.ReplaceAll(platzhalter, platzhalterWert, DevExpress.XtraRichEdit.API.Native.SearchOptions.CaseSensitive);
}
}
//var list = rtfServer.MailMerge( sd.FindAll(platzhalter1, DevExpress.XtraRichEdit.API.Native.SearchOptions.CaseSensitive);
rtfServer.Document.ReplaceAll(platzhalter, platzhalterWert, DevExpress.XtraRichEdit.API.Native.SearchOptions.CaseSensitive);
//sd.ReplaceAll(platzhalter1, GetPlaceholderValue(ph, obj), DevExpress.XtraRichEdit.API.Native.SearchOptions.CaseSensitive);
//if (text.Contains(platzhalter1))
//{
// int test = 0;
//}
//if (text.Contains(platzhalter1) || text.Contains(platzhalter2) || text.Contains(platzhalter3))
//{
// return text.Replace(ph.Platzhalter, GetPlaceholderValue(ph, obj));
//}
}
}
public virtual String GetPlaceholderValue(PlatzhalterDC ph, Object obj)
{
return GetPlaceholderValue(ph.FieldName, obj);
}
public virtual String GetPlaceholderValue(String fieldName, Object obj)
{
var names = fieldName.Split('.');
if (names.Length > 0)
{
var prop = obj.GetType().GetProperty(names[0]);
if (prop != null)
{
Object newObj = prop.GetValue(obj);
if (names.Length > 1 && newObj != null)
{
String newFieldname = "";
for (int i = 1; i < names.Length; i++)
{
if (newFieldname.Length > 0)
{
newFieldname += ".";
}
newFieldname += names[i];
}
return GetPlaceholderValue(newFieldname, newObj);
}
if (newObj != null)
{
return newObj.ToString();
}
}
}
return "";
}
public virtual Object GetEntityObject(long oid)
{
return null;
}
}
}

View File

@@ -3,15 +3,17 @@ using BeWo.Data.Entities;
using BeWo.Service.DCEntityMapper;
using BS.Shared;
using BS.Shared.DataContracts;
using DevExpress.XtraRichEdit;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media.Imaging;
namespace BeWo.Service.Vorlagen
namespace BeWo.Service.Dokumentverwaltung
{
public class VorlagenManager
{
@@ -60,11 +62,14 @@ namespace BeWo.Service.Vorlagen
public List<PlatzhalterDC> GetPlatzhalterForTemplate(VorlagentabelleDC vt)
{
PlaceholderManager pm = null;
var tid = (TableID)vt.VorlagentabelleObjectTid;
switch (tid)
{
case TableID.Customer:
return GetPlatzhalterForCustomer();
pm = new CustomerPlaceholderManager();
break;
case TableID.SupportConcept:
return GetPlatzhalterForSupportConcept();
case TableID.Employee:
@@ -72,154 +77,14 @@ namespace BeWo.Service.Vorlagen
default:
break;
}
if (pm != null)
{
return pm.GetPlatzhalter();
}
return null;
}
public List<PlatzhalterDC> GetPlatzhalterForCustomer()
{
List<PlatzhalterDC> liste = new List<PlatzhalterDC>();
PlatzhalterDC personendaten = new PlatzhalterDC()
{
Bezeichnung = "Personendaten",
Children = new List<PlatzhalterDC>(),
IconType = "BoyAndGirl"
};
#region Children Personendaten
PlatzhalterDC anrede = new PlatzhalterDC() { Bezeichnung = "Anrede", Platzhalter = "Anrede", IconType = "AB" };
personendaten.Children.Add(anrede);
PlatzhalterDC vorname = new PlatzhalterDC() { Bezeichnung = "Vorname", Platzhalter = "Vorname" , FieldName = "Person.FirstName", IconType = "AB" };
personendaten.Children.Add(vorname);
PlatzhalterDC nachname = new PlatzhalterDC() { Bezeichnung = "Nachname", Platzhalter = "Nachname", FieldName = "Person.LastName", IconType = "AB" };
personendaten.Children.Add(nachname);
PlatzhalterDC alias = new PlatzhalterDC() { Bezeichnung = "Alias", Platzhalter = "Alias", FieldName = "CustomerAlias", IconType = "AB" };
personendaten.Children.Add(alias);
PlatzhalterDC gebDatum = new PlatzhalterDC() { Bezeichnung = "Geburtsdatum", Platzhalter = "Geburtsdatum", FieldName = "Person.DateOfBirth", IconType = "AB" };
personendaten.Children.Add(gebDatum);
PlatzhalterDC telefonnummer = new PlatzhalterDC() { Bezeichnung = "Telefonnummer", Platzhalter = "Telefonnummer", FieldName = "Person.Contacts", IconType = "AB" };
personendaten.Children.Add(telefonnummer);
PlatzhalterDC handynummer = new PlatzhalterDC() { Bezeichnung = "Handynummer", Platzhalter = "Handynummer", FieldName = "Person.Contacts", IconType = "AB" };
personendaten.Children.Add(handynummer);
PlatzhalterDC email = new PlatzhalterDC() { Bezeichnung = "E-Mail-Adresse", Platzhalter = "Email", FieldName = "Person.Contacts", IconType = "AB" };
personendaten.Children.Add(email);
PlatzhalterDC fax = new PlatzhalterDC() { Bezeichnung = "Fax", Platzhalter = "Fax", FieldName = "Person.Contacts", IconType = "AB" };
personendaten.Children.Add(fax);
PlatzhalterDC berufsbezeichnung = new PlatzhalterDC() { Bezeichnung = "Berufsbezeichnung", Platzhalter = "Berufsbezeichnung", FieldName = "Person.Profession", IconType = "AB" };
personendaten.Children.Add(berufsbezeichnung);
PlatzhalterDC debitor = new PlatzhalterDC() { Bezeichnung = "Debitorennumer", Platzhalter = "Debitorennumer", FieldName = "DebitorNumber", IconType = "AB" };
personendaten.Children.Add(debitor);
PlatzhalterDC kostenstelle = new PlatzhalterDC() { Bezeichnung = "Kostenstelle", Platzhalter = "Kostenstelle", FieldName = "CostCenter", IconType = "AB" };
personendaten.Children.Add(kostenstelle);
#endregion Children Personendaten
PlatzhalterDC adressdatenKlient = new PlatzhalterDC()
{
Bezeichnung = "Adressdaten Klient/-in",
Children = new List<PlatzhalterDC>(),
IconType = "Home"
};
#region Children Adressdaten Klient/-in
PlatzhalterDC strasse = new PlatzhalterDC() { Bezeichnung = "Straße", Platzhalter = "KlientStrasse", IconType = "AB", FieldName = "Person.Address.Street" };
adressdatenKlient.Children.Add(strasse);
PlatzhalterDC plz = new PlatzhalterDC() { Bezeichnung = "PLZ", Platzhalter = "KlientPLZ", IconType = "AB", FieldName = "Person.Address.PostalCode" };
adressdatenKlient.Children.Add(plz);
PlatzhalterDC ort = new PlatzhalterDC() { Bezeichnung = "Ort", Platzhalter = "KlientOrt", IconType = "AB", FieldName = "Person.Address.Town" };
adressdatenKlient.Children.Add(ort);
#endregion
PlatzhalterDC vga = new PlatzhalterDC()
{
Bezeichnung = "Vermittlung gemeinnütziger Arbeit",
Children = new List<PlatzhalterDC>(),
IconType = "BoyAndGirl"
};
#region Children Vermittlung gemeinnütziger Arbeit
vga.Children.Add(new PlatzhalterDC() { Bezeichnung = "Straße", Platzhalter = "KlientStrasse", FieldName = "Person.Address.Street", IconType = "AB"});
vga.Children.Add(new PlatzhalterDC() { Bezeichnung = "PLZ", Platzhalter = "KlientPLZ", FieldName = "Person.Address.PostalCode", IconType = "AB" });
vga.Children.Add(new PlatzhalterDC() { Bezeichnung = "Ort", Platzhalter = "KlientOrt", FieldName = "Person.Address.Town", IconType = "AB" });
#endregion
PlatzhalterDC betreuung = new PlatzhalterDC()
{
Bezeichnung = "Betreuung",
Children = new List<PlatzhalterDC>(),
IconType = "Paste"
};
#region Children Betreuung
PlatzhalterDC betreuungsbeginn = new PlatzhalterDC() { Bezeichnung = "Betreuungsbeginn", Platzhalter = "Betreuungsbeginn", FieldName = "AssistanceBegin", IconType = "AB" };
betreuung.Children.Add(betreuungsbeginn);
PlatzhalterDC betreuungsende = new PlatzhalterDC() { Bezeichnung = "Betreuungsende", Platzhalter = "Betreuungsende", FieldName = "TerminationDate", IconType = "AB" };
betreuung.Children.Add(betreuungsende);
PlatzhalterDC grundBetreuungsende = new PlatzhalterDC() { Bezeichnung = "Grund Betreuungsbeendung", Platzhalter = "GrundBetreuungsbeendung", FieldName = "TerminationReason", IconType = "AB" };
betreuung.Children.Add(grundBetreuungsende);
PlatzhalterDC behindertenausweis = new PlatzhalterDC()
{
Bezeichnung = "Schwerbehindertenausweis",
Children = new List<PlatzhalterDC>(),
IconType = "ContactCardWebDisabled"
};
#region Children Behindertenausweis
PlatzhalterDC amt = new PlatzhalterDC() { Bezeichnung = "Ausstellendes Amt", Platzhalter = "AusweisAmt", FieldName = "AusstVersAmt", IconType = "AB" };
behindertenausweis.Children.Add(amt);
PlatzhalterDC gueltigVon = new PlatzhalterDC() { Bezeichnung = "Gültig von", Platzhalter = "AusweisGueltigVon", FieldName = "AusweisGueltigVon", IconType = "AB" };
behindertenausweis.Children.Add(gueltigVon);
PlatzhalterDC gueltigbis = new PlatzhalterDC() { Bezeichnung = "Gültig bis", Platzhalter = "AusweisGueltigBis", FieldName = "AusweisGueltigBis", IconType = "AB" };
behindertenausweis.Children.Add(gueltigbis);
PlatzhalterDC ausweisAktenzeichen = new PlatzhalterDC() { Bezeichnung = "Aktenzeichen", Platzhalter = "AusweisAktenzeichen", FieldName = "AusweisAktenzeichen", IconType = "AB" };
behindertenausweis.Children.Add(ausweisAktenzeichen);
PlatzhalterDC beiblatt = new PlatzhalterDC() { Bezeichnung = "Beiblattgültigkeit", Platzhalter = "AusweisBeiblatt", FieldName = "BeiblattGueltigBis", IconType = "AB" };
behindertenausweis.Children.Add(beiblatt);
PlatzhalterDC gradDerBehinderung = new PlatzhalterDC() { Bezeichnung = "Grad der Behinderung", Platzhalter = "AusweisGradDerBehinderung", FieldName = "GradDerBehinderung", IconType = "AB" };
behindertenausweis.Children.Add(gradDerBehinderung);
betreuung.Children.Add(behindertenausweis);
#endregion
PlatzhalterDC pflegegrad = new PlatzhalterDC() { Bezeichnung = "Pflegegrad", Platzhalter = "Pflegegrad", FieldName = "Pflegegrad", IconType = "AB" };
betreuung.Children.Add(pflegegrad);
PlatzhalterDC versicherung = new PlatzhalterDC()
{
Bezeichnung = "Versicherungsdaten",
Children = new List<PlatzhalterDC>(),
IconType = "OfficeBulidingBlackDisabled"
};
#region Children Versicherung
PlatzhalterDC krankenkasse = new PlatzhalterDC() { Bezeichnung = "Krankenkasse", Platzhalter = "KlientKrankenkasse", IconType = "AB" };
versicherung.Children.Add(krankenkasse);
PlatzhalterDC versnummer = new PlatzhalterDC() { Bezeichnung = "Versichertennummer", Platzhalter = "KlientVersNummer", IconType = "AB" };
versicherung.Children.Add(krankenkasse);
PlatzhalterDC versStatus = new PlatzhalterDC() { Bezeichnung = "Versicherungsstatus", Platzhalter = "KlientVersicherungsstatus", IconType = "AB" };
versicherung.Children.Add(krankenkasse);
#endregion
#endregion
PlatzhalterDC sonstiges = new PlatzhalterDC()
{
Bezeichnung = "Sonstiges",
Children = new List<PlatzhalterDC>(),
IconType = "Add24"
};
#region Children Sonstiges
PlatzhalterDC datum = new PlatzhalterDC() { Bezeichnung = "Datum", Platzhalter = "Datum", IconType = "AB" };
sonstiges.Children.Add(datum);
#endregion
liste.Add(personendaten);
liste.Add(adressdatenKlient);
liste.Add(vga);
//liste.Add(adressdatenOrganisation);
liste.Add(betreuung);
liste.Add(sonstiges);
return liste;
}
public List<PlatzhalterDC> GetPlatzhalterForSupportConcept()
{
List<PlatzhalterDC> liste = new List<PlatzhalterDC>();
@@ -439,28 +304,55 @@ namespace BeWo.Service.Vorlagen
DAOFactory.GenericDAO.Delete(origTemplate);
}
}
public string ReplacePlaceholdersInTemplate(DokumentvorlageDC template, long? objectOid, long? tableOid)
{
string adaptedRTF = "";
if (!String.IsNullOrEmpty(template.RTFText))
public void ReplacePlaceholdersInTemplate(RichEditDocumentServer rtfServer, long objectOid, TableID tid)
{
PlaceholderManager pm = null;
switch (tid)
{
switch (tableOid)
case TableID.Employee:
break;
case TableID.Customer:
pm = new CustomerPlaceholderManager();
break;
case TableID.SupportConcept:
break;
}
if (pm != null)
{
var obj = pm.GetEntityObject(objectOid);
var phList = pm.GetPlatzhalter();
ReplacePlaceholdersInTemplate(pm, rtfServer, phList, obj);
}
}
private void ReplacePlaceholdersInTemplate(PlaceholderManager pm, RichEditDocumentServer rtfServer, List<PlatzhalterDC> phList, object obj)
{
foreach (var ph in phList)
{
pm.ReplacePlaceholderInText(rtfServer, ph, obj);
if (ph.Children != null && ph.Children.Count > 0)
{
case 2: adaptedRTF = EmployeeTemplate(objectOid, template.RTFText); break;
case 8: adaptedRTF = CustomerTemplate(objectOid, template.RTFText); break;
case 15: adaptedRTF = SupportConceptTemplate(objectOid, template.RTFText); break;
ReplacePlaceholdersInTemplate(pm, rtfServer, ph.Children, obj);
}
}
return adaptedRTF;
}
private string EmployeeTemplate(long? objectOid, string RTFWithPlaceholders)
private string EmployeeTemplate(long objectOid, string RTFWithPlaceholders)
{
bool allSet = true;
List<string> attributeList = new List<string>();
string attributeString = "";
var employee = DAOFactory.GenericDAO.GetByID<Employee>((long)objectOid);
var employee = DAOFactory.GenericDAO.GetByID<Employee>(objectOid);
var contacts = employee.Person.Contacts;
@@ -621,241 +513,6 @@ namespace BeWo.Service.Vorlagen
}
}
private string CustomerTemplate(long? objectOid, string RTFWithPlaceholders)
{
bool allSet = true;
List<string> attributeList = new List<string>();
string attributeString = "";
var customer = DAOFactory.GenericDAO.GetByID<Customer>((long)objectOid);
var contacts = customer.Person.Contacts;
string RTFText = RTFWithPlaceholders;
#region Auf verschiedene Platzhalter prüfen
if (RTFText.Contains("[Anrede]") || RTFText.Contains("[Anrede") || RTFText.Contains("Anrede]"))
{
if (customer.Person.Sex == Sex.Male)
RTFText = RTFText.Replace("Anrede", "Sehr geehrter Herr");
else if (customer.Person.Sex == Sex.Female)
RTFText = RTFText.Replace("Anrede", "Sehr geehrte Frau");
//else
//{
// attributeList.Add("Geschlecht");
// allSet = false;
//}
}
if (RTFText.Contains("[Vorname]") || RTFText.Contains("[Vorname") || RTFText.Contains("Vorname]"))
{
//if(customer.Person.FirstName.IsNullOrEmpty())
//{
// attributeList.Add("Vorname");
// allSet = false;
//}
//else
RTFText = RTFText.Replace("Vorname", customer.Person.FirstName);
}
if (RTFText.Contains("[Nachname]") || RTFText.Contains("[Nachname") || RTFText.Contains("Nachname]"))
{
//if (customer.Person.LastName.IsNullOrEmpty())
//{
// attributeList.Add("Nachname");
// allSet = false;
//}
//else
RTFText = RTFText.Replace("Nachname", customer.Person.LastName);
}
if (RTFText.Contains("[Geburtsdatum]") || RTFText.Contains("[Geburtsdatum") || RTFText.Contains("Geburtsdatum]"))
{
string[] dateAndTime = customer.Person.DateOfBirth.ToString().Split(' ');
//if(dateAndTime[0].IsNullOrEmpty())
//{
// allSet = false;
// attributeList.Add("Geburtsdatum");
//}
//else
RTFText = RTFText.Replace("Geburtsdatum", dateAndTime[0]);
}
if (RTFText.Contains("[Telefonnummer]") || RTFText.Contains("[Telefonnummer") || RTFText.Contains("Telefonnummer]"))
{
string phone = "";
foreach (Contact c in contacts)
{
if (c.Type == ContactType.business_Phone)
{
phone = c.Value;
break;
}
}
//if (phone.IsNullOrEmpty())
//{
// attributeList.Add("Telefonnummer");
// allSet = false;
//}
//else
RTFText = RTFText.Replace("Telefonnummer", phone);
}
if (RTFText.Contains("[Handynummer]") || RTFText.Contains("[Handynummer") || RTFText.Contains("Handynummer]"))
{
string mobile = "";
foreach (Contact c in contacts)
{
if (c.Type == ContactType.business_MobilePhone)
{
mobile = c.Value;
break;
}
}
//if (mobile.IsNullOrEmpty())
//{
// attributeList.Add("Handynummer");
// allSet = false;
//}
//else
RTFText = RTFText.Replace("Handynummer", mobile);
}
if (RTFText.Contains("[Email]") || RTFText.Contains("[Email") || RTFText.Contains("Email]"))
{
string email = "";
foreach (Contact c in contacts)
{
if (c.Type == ContactType.business_Mail)
{
email = c.Value;
break;
}
}
//if (email.IsNullOrEmpty())
//{
// attributeList.Add("Email-Adresse");
// allSet = false;
//}
//else
RTFText = RTFText.Replace("Email", email);
}
if (RTFText.Contains("[Fax]") || RTFText.Contains("[Fax") || RTFText.Contains("Fax]"))
{
string fax = "";
foreach (Contact c in contacts)
{
if (c.Type == ContactType.business_Fax)
{
fax = c.Value;
break;
}
}
//if (fax.IsNullOrEmpty())
//{
// attributeList.Add("Fax");
// allSet = false;
//}
//else
RTFText = RTFText.Replace("Fax", fax);
}
if (RTFText.Contains("[Berufsbezeichnung]") || RTFText.Contains("[Berufsbezeichnung") || RTFText.Contains("Berufsbezeichnung]"))
{
//if(customer.Person.Profession.IsNullOrEmpty())
//{
// attributeList.Add("Berufsbezeichnung");
// allSet = false;
//}
//else
RTFText = RTFText.Replace("Berufsbezeichnung", customer.Person.Profession);
}
//Adressdaten
if (customer.Person.Address != null)
{
if (RTFText.Contains("[KlientStrasse]") || RTFText.Contains("[KlientStrasse") || RTFText.Contains("KlientStrasse]"))
{
//if (customer.Person.Address.Street.IsNullOrEmpty())
//{
// attributeList.Add("Straße");
// allSet = false;
//}
//else
RTFText = RTFText.Replace("KlientStrasse", customer.Person.Address.Street);
}
if (RTFText.Contains("[KlientPLZ]") || RTFText.Contains("[KlientPLZ") || RTFText.Contains("KlientPLZ]"))
{
//if (customer.Person.Address.PostalCode.IsNullOrEmpty())
//{
// attributeList.Add("Postleitzahl");
// allSet = false;
//}
//else
RTFText = RTFText.Replace("KlientPLZ", customer.Person.Address.PostalCode);
}
if (RTFText.Contains("[KlientOrt]") || RTFText.Contains("[KlientOrt") || RTFText.Contains("KlientOrt]"))
{
//if (customer.Person.Address.Town.IsNullOrEmpty())
//{
// attributeList.Add("Ort");
// allSet = false;
//}
//else
RTFText = RTFText.Replace("KlientOrt", customer.Person.Address.Town);
}
}
//Betreuung
if (RTFText.Contains("[Ansprechpartner/-in]") || RTFText.Contains("[Ansprechpartner/-in") || RTFText.Contains("Ansprechpartner/-in]"))
{
//if (customer.Ansprechpartner == null)
//{
// attributeList.Add("Ansprechpartner");
// allSet = false;
//}
//else
//{
string anrede = (customer.Ansprechpartner.Sex == 0) ? "Herr " : "Frau ";
RTFText = RTFText.Replace("Ansprechpartner/-in", anrede + customer.Ansprechpartner.FirstNameLastName);
//}
}
if (RTFText.Contains("[Kostenstelle]") || RTFText.Contains("[Kostenstelle") || RTFText.Contains("Kostenstelle]"))
{
//if(customer.CostCenter.IsNullOrEmpty())
//{
// attributeList.Add("Kostenstelle");
// allSet = false;
//}
//else
RTFText = RTFText.Replace("Kostenstelle", customer.CostCenter);
}
//Sonstiges
if (RTFText.Contains("[Datum]") || RTFText.Contains("[Datum") || RTFText.Contains("Datum]"))
{
string[] datum = DateTime.Now.ToString().Split(' ');
RTFText = RTFText.Replace("Datum", datum[0]);
}
RTFText = RTFText.Replace("[", "");
RTFText = RTFText.Replace("]", "");
#endregion
if (allSet)
return RTFText;
else
{
foreach (var s in attributeList)
{
attributeString += (s != attributeList.Last()) ? s + ", " : s;
}
MessageBox.Show("Seite für " + customer.Person.FirstNameLastName + " kann nicht erstellt werden, da folgende Attribute des Klienten nicht gesetzt sind:\n" +
attributeString + "\nSetzen Sie die Attribute und erstellen Sie die Druckvorscheu für den Klienten erneut.", "BeWoPlaner", MessageBoxButton.OK, MessageBoxImage.Warning);
return "";
}
}
//private static string ErsetzePlatzhalter(Object objekt, PlatzhalterDC pdc)
//{
@@ -1095,5 +752,52 @@ namespace BeWo.Service.Vorlagen
}
}
public String CreateRtfDocumentFromTemplate(long vorlageOid, TableID objectTid, List<long> objectOids)
{
string rtf = "";
var templateDC = MapperFactory.DokumentvorlageDC_Dokumentvorlage.MapToNewDC(DAOFactory.GenericDAO.GetByID<Dokumentvorlage>(vorlageOid));
if (!String.IsNullOrEmpty(templateDC.RTFText))
{
RichEditDocumentServer server = new RichEditDocumentServer();
using (var stream = new MemoryStream(Encoding.Default.GetBytes(templateDC.RTFText)))
{
server.LoadDocument(stream);
}
foreach (var oid in objectOids)
{
ReplacePlaceholdersInTemplate(server, oid, objectTid);
rtf = server.Document.RtfText;
//var server = new RichEditDocumentServer();
//using (var stream = new MemoryStream(Encoding.Default.GetBytes(text)))
//{
// server.LoadDocument(stream);
//}
//var ranges = server.Document.FindAll(DevExpress.Office.Characters.PageBreak.ToString(), DevExpress.XtraRichEdit.API.Native.SearchOptions.None);
//var dp = server.Document.Paragraphs[0].Range.Start;
//List<VorlageRO> collection = new List<VorlageRO>();
//foreach (var dr in ranges)
//{
// var tmpRange = server.Document.CreateRange(dp, dr.Start.ToInt() - dp.ToInt());
// collection.Add(new VorlageRO { RTFText = server.Document.GetRtfText(tmpRange) });
// dp = dr.End;
//}
//var tmpRange2 = server.Document.CreateRange(dp, server.Document.Paragraphs[server.Document.Paragraphs.Count - 1].Range.End.ToInt() - dp.ToInt());
//collection.Add(new VorlageRO { RTFText = server.Document.GetRtfText(tmpRange2) });
}
}
return rtf;
}
}
}

View File

@@ -202,7 +202,7 @@ namespace BeWo.Service.Plugins
//t = "2279593936"; // Diakonie Mülheim
//t = "3623837005"; // Betreuwo Wesel
//t = "8407321888"; // AWO Wesel
t = "8454426692"; // Mit-Menschen Wuppertal
//t = "8454426692"; // Mit-Menschen Wuppertal
//t = "0629004412"; // BeWo-Colonia Basaran (Projekt
//t = "7668701607"; // Wohnstätten Essen
//t = "3833058951"; // Aids Hilfe Duisburg (Self)
@@ -226,7 +226,7 @@ namespace BeWo.Service.Plugins
//t = "7817461089"; // FAB e.V. (Familienarbeit und Beratung e.V.)
//t = "5207911843"; // Pro Balance
//t = "8619663355"; // HSH Cologne
//t = "1652658918"; // LH Frankfurt Oder
t = "1652658918"; // LH Frankfurt Oder
//t = "7696927868"; // Kuhring Betreuung
//t = "6251348980"; // BeWo Gün
//t = "6782533512"; // LH Dorsten

View File

@@ -403,7 +403,10 @@
<Compile Include="Dienstplanung\DienstplanungsManager.cs" />
<Compile Include="Dienstplanung\MitarbeiterstundenkontoBerechnung.cs" />
<Compile Include="Dienstplanung\Mitarbeiterstundenkonto.cs" />
<Compile Include="Dokumentverwaltung\EmployeePlaceholderManager.cs" />
<Compile Include="Dokumentverwaltung\PlaceholderManager.cs" />
<Compile Include="Dokumentverwaltung\DokumentManager.cs" />
<Compile Include="Dokumentverwaltung\CustomerPlaceholderManager.cs" />
<Compile Include="Import\AvisImport\AvisImportResult.cs" />
<Compile Include="Import\AvisImport\LvrAviseImporter.cs" />
<Compile Include="Import\AvisImport\AviseImporter.cs" />
@@ -563,7 +566,7 @@
<Compile Include="UnitOfWork\HibernateSessionContextInitializer.cs" />
<Compile Include="Urlaubsplanung\UrlaubsplanungsManager.cs" />
<Compile Include="ServiceUtils\History\HistoryCreator.cs" />
<Compile Include="Vorlagen\VorlagenManager.cs" />
<Compile Include="Dokumentverwaltung\VorlagenManager.cs" />
<Compile Include="XAMLInformation\InfoViaXAMLManager.cs" />
</ItemGroup>
<ItemGroup>

View File

@@ -1411,5 +1411,9 @@ namespace BeWo.Service.ServiceContracts
[FaultContract(typeof(BeWoFault))]
[OperationContract]
bool HasConfirmationReceiptSignatureByDateAndEmployeeAndCustomer(long customerOid, long employeeOid, DateTime start, DateTime end, long costBearer2SupportConceptOid, out List<ConfirmationReceiptSignatureDC> confirmationReceiptSignatures);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
String CreateRtfDocumentFromTemplate(long vorlageOid, TableID objectTid, List<long> objectOids);
}
}

View File

@@ -3,6 +3,7 @@ using BeWo.Service.ServiceContracts;
using BS.Shared.Core;
using BS.Shared.DataContracts.AdminService;
using DevExpress.Pdf.Native.BouncyCastle.Ocsp;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -44,7 +45,9 @@ namespace BeWo.Service.ServiceImplementations
var sum = DAOFactory.ScriptDAO.GetGkvSumByDateRange(start, end);
return sum?.ToString("0.00");
var json = JsonUtils.ToSimpleJson("sum", sum);
return json;
}
}
}

View File

@@ -15,7 +15,6 @@ using BeWo.Service.Plugins;
using BeWo.Service.SBD;
using BeWo.Service.Security;
using BeWo.Service.ServiceContracts;
using BeWo.Service.Vorlagen;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
@@ -7711,8 +7710,8 @@ namespace BeWo.Service.ServiceImplementations
{
try
{
var vm = PluginLoader.FindClass<VorlagenManager>();
return vm.GetPlatzhalterForCustomer();
var pm = PluginLoader.FindClass<CustomerPlaceholderManager>();
return pm.GetPlatzhalter();
}
catch (Exception ex)
{
@@ -7743,6 +7742,20 @@ namespace BeWo.Service.ServiceImplementations
throw Utils.CreateBeWoFaultException(ex);
}
}
public String CreateRtfDocumentFromTemplate(long vorlageOid, TableID objectTid, List<long> objectOids)
{
try
{
var vm = PluginLoader.FindClass<VorlagenManager>();
return vm.CreateRtfDocumentFromTemplate(vorlageOid, objectTid, objectOids);
}
catch (Exception e)
{
throw Utils.CreateBeWoFaultException(e);
}
}
public BeWoFolderDC GetFolderById(long oid)
{
try
@@ -7837,7 +7850,8 @@ namespace BeWo.Service.ServiceImplementations
try
{
var vm = PluginLoader.FindClass<VorlagenManager>();
return vm.ReplacePlaceholdersInTemplate(template, objectOid, tableOid);
//Methode wird nicht mehr benutzt
return null; // vm.ReplacePlaceholdersInTemplate(template, objectOid.Value, (TableID)tableOid.Value);
}
catch (Exception e)
{

29
Shared/Core/JsonUtils.cs Normal file
View File

@@ -0,0 +1,29 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BS.Shared.Core
{
public static class JsonUtils
{
public static string ToSimpleJson(string key, object value)
{
var dict = new Dictionary<string, object>()
{
{key, value }
};
return JsonConvert.SerializeObject(dict);
}
public static string ToJson(Dictionary<string, object> dict)
{
var json = JsonConvert.SerializeObject(dict);
return json;
}
}
}

View File

@@ -6,6 +6,7 @@ namespace BS.Shared.DataContracts
[DataContract]
public class CustomerVermittlungArbeitDC : BeWoDataContract
{
[DataMember] public string AktenzeichenGericht { get; set; }
[DataMember] public string EigenesAktenzeichen { get; set; }
[DataMember] public DateTime? Auftragseingang { get; set; }
[DataMember] public ValueListEntryDC Auftragsherkunft { get; set; }

View File

@@ -140,6 +140,7 @@
<Compile Include="Core\AppSettingReader.cs" />
<Compile Include="Core\ComplexWohnheimbuchungsRelationHelper.cs" />
<Compile Include="Core\AbstractIDSpecificDefaultClass.cs" />
<Compile Include="Core\JsonUtils.cs" />
<Compile Include="Core\MailUtils.cs" />
<Compile Include="Core\Validator.cs" />
<Compile Include="Core\DebugUtils.cs" />