Konflikte gelöst
This commit is contained in:
54
.cr/server/Editor/Code Cleanup.xml
Normal file
54
.cr/server/Editor/Code Cleanup.xml
Normal file
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Root Type="DevExpress.CodeAnalysis.CodeCleanUp.CodeCleanUpOptions">
|
||||
<Options Language="C#">
|
||||
<Providers>
|
||||
<Item Id="{53ccb10f-f7af-40a6-9472-d05054672052}" />
|
||||
<Item Id="{bb96a982-bed0-4d8f-93a7-1e1ce7493e96}" />
|
||||
<Item Id="{12f6d456-d2ec-407e-aa44-2b74d7c56e9c}" />
|
||||
<Item Id="{ffa114f4-9122-46e4-96c8-655d54c904e6}" />
|
||||
<Item Id="{0e6b7b2c-84e6-4eee-83d1-6149282c8501}">
|
||||
<ApplyOnSave>True</ApplyOnSave>
|
||||
</Item>
|
||||
<Item Id="{03781427-dea7-45b0-9eef-81abe2961a61}" />
|
||||
<Item Id="{ab07124b-0893-4a2d-b6f5-39bfa9f10148}" />
|
||||
<Item Id="{5d712912-91ed-4728-ba16-ac1821b702ca}">
|
||||
<ApplyOnSave>True</ApplyOnSave>
|
||||
</Item>
|
||||
<Item Id="{c47b114f-eeae-46fc-9562-454e8f9196c0}" />
|
||||
<Item Id="{4216ef39-52bd-4e7f-92a7-673406f92bc8}" />
|
||||
<Item Id="{f410df1e-6e44-4854-a3f0-14bb756113f9}">
|
||||
<ApplyOnSave>True</ApplyOnSave>
|
||||
</Item>
|
||||
<Item Id="{d2f76d4e-97a9-4031-a7a2-23f192201426}" />
|
||||
<Item Id="{3824f6f0-fee1-4847-94ff-1efa133ba199}" />
|
||||
<Item Id="{d24bd9c7-7686-4101-9ec1-f61c19af8d2e}" />
|
||||
<Item Id="{f804e36e-414f-409c-9b90-63b7727745a7}">
|
||||
<ApplyOnSave>True</ApplyOnSave>
|
||||
</Item>
|
||||
<Item Id="{163af547-186c-4fa1-9a3e-b9b0a1ceec32}" />
|
||||
<Item Id="{00bb41b3-3de9-458a-93c1-1f126253eab0}" />
|
||||
<Item Id="{8e24f031-d25c-4ddb-86a5-c28f8fc354eb}" />
|
||||
<Item Id="{e950f01e-2b15-4da5-8176-cafe3cc883d9}" />
|
||||
<Item Id="{37bde68f-a39d-4791-adba-8ad7b2952ab0}" />
|
||||
<Item Id="{ef51c8cb-e48a-498f-98b2-eadda592c4c7}" />
|
||||
<Item Id="{20943A7B-2B32-4727-8E9D-61CB5B5F2A0D}" />
|
||||
<Item Id="{528bdd86-5882-4b4c-b717-e0ec33958bd7}" />
|
||||
<Item Id="{40c971cf-ebeb-419d-a559-6183d8d0d6a4}" />
|
||||
<Item Id="{4B42E272-EE39-4E83-924C-B2458D827DE3}" />
|
||||
<Item Id="{73a73e0e-5575-4c34-a97b-a942c6da1f90}" />
|
||||
<Item Id="{f7752b2b-7ba5-43ec-b0f7-7f45c21c1c23}" />
|
||||
<Item Id="{9dab2827-57cc-40e9-a330-a0626261453e}" />
|
||||
<Item Id="{6bf7cfc1-1332-4bec-982e-c2d0968237cd}" />
|
||||
<Item Id="{7e640eab-b585-47a5-afdc-0f110357cebb}" />
|
||||
<Item Id="{44ac74a7-dba7-45aa-b2ca-8094b85cb9c9}" />
|
||||
<Item Id="{2cd1441b-9e0f-4e39-bd8c-8aaa6e2a1728}" />
|
||||
<Item Id="{41388575-074b-49f2-b3bc-9d28b212bd1a}" />
|
||||
<Item Id="{4fa0bfa3-0a7e-471b-9933-3a379bdd5bd7}" />
|
||||
<Item Id="{1f88209e-45e2-40b9-a235-1df251df05dd}" />
|
||||
<Item Id="{086b0e70-893d-4b97-a6cf-d366ddbae573}" />
|
||||
<Item Id="{4771fd98-4357-4780-b479-a7a875fec011}" />
|
||||
<Item Id="{174C98E6-48C4-42D0-BC30-35EDE6377C9B}" />
|
||||
</Providers>
|
||||
<IsNewVersion>True</IsNewVersion>
|
||||
</Options>
|
||||
</Root>
|
||||
15
.cr/server/Editor/Formatting/Other.CSharp.xml
Normal file
15
.cr/server/Editor/Formatting/Other.CSharp.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Root Type="DevExpress.CodeRush.Formatting.UI.Options.OtherOptionsContainer">
|
||||
<Options Language="C#">
|
||||
<Options>
|
||||
<Item Id="{7b13bb67-6fc9-44dd-87a1-ea1dc649d561}" Type="DevExpress.CodeRush.Formatting.UI.Options.Conversion.PlaceOnNewLineOtherOption">
|
||||
<ElseOnNewLine>True</ElseOnNewLine>
|
||||
<WhileOnNewLine>True</WhileOnNewLine>
|
||||
<CatchOnNewLine>True</CatchOnNewLine>
|
||||
<FinallyOnNewLine>True</FinallyOnNewLine>
|
||||
</Item>
|
||||
<Item Id="{84e7d791-613d-4018-bf31-9a9f43264480}" Type="DevExpress.CodeRush.Formatting.UI.Options.Conversion.XmlDocCommentsOtherOption" />
|
||||
<Item Id="{8921dd1e-bb6c-4fa8-b4d5-58e6edcea04f}" Type="DevExpress.CodeRush.Formatting.UI.Options.Conversion.OtherIndentOption" />
|
||||
</Options>
|
||||
</Options>
|
||||
</Root>
|
||||
32
.cr/server/Editor/Formatting/Wrapping.CSharp.xml
Normal file
32
.cr/server/Editor/Formatting/Wrapping.CSharp.xml
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Root Type="DevExpress.CodeRush.Formatting.UI.Options.WrappingOptionsContainer">
|
||||
<Options Language="C#">
|
||||
<Options>
|
||||
<Item Id="{48f3f6c0-b3c2-4567-b071-33af7480c9a3}" Type="DevExpress.CodeRush.Formatting.UI.Options.Conversion.QueryExpressionFormattingOption" />
|
||||
<Item Id="{a2c75ad7-ba6a-49ca-8070-6d9e3c52e3c6}" Type="DevExpress.CodeRush.Formatting.UI.Options.Conversion.BinaryExpressionFormattingOption" />
|
||||
<Item Id="{0e2d0391-24ba-4ed8-aeb4-1b3e9f26be55}" Type="DevExpress.CodeRush.Formatting.UI.Options.Conversion.RelationalExpressionFormattingOption" />
|
||||
<Item Id="{fea50ebc-99c9-4599-9b55-bf2961b9cc95}" Type="DevExpress.CodeRush.Formatting.UI.Options.Conversion.BitwiseExpressionFormattingOption" />
|
||||
<Item Id="{4246b900-cbb3-44f4-b59e-b3055fb4f7bc}" Type="DevExpress.CodeRush.Formatting.UI.Options.Conversion.LogicalExpressionFormattingOption" />
|
||||
<Item Id="{cd721fc1-23fb-4d88-a9f0-42d6b318a32b}" Type="DevExpress.CodeRush.Formatting.UI.Options.Conversion.TernaryExpressionFormattingOption" />
|
||||
<Item Id="{10e904ea-f51d-4c32-9320-1b93fa557564}" Type="DevExpress.CodeRush.Formatting.UI.Options.Conversion.AssignmentExpressionFormattingOption">
|
||||
<WrapAssignment>
|
||||
<Kind>WrapBefore</Kind>
|
||||
</WrapAssignment>
|
||||
</Item>
|
||||
<Item Id="{25746bdc-0a43-4741-a740-20784691314b}" Type="DevExpress.CodeRush.Formatting.UI.Options.Conversion.InvocationArgumentListFormattingOption" />
|
||||
<Item Id="{D5EE2ECB-9FA6-47F7-A11F-007FC45E872D}" Type="DevExpress.CodeRush.Formatting.UI.Options.Conversion.AttributeArgumentsFormattingOption" />
|
||||
<Item Id="{5A186AB9-03A5-4BFE-83B1-B99B3B8408BC}" Type="DevExpress.CodeRush.Formatting.UI.Options.Conversion.DeclarationParameterListFormattingOption" />
|
||||
<Item Id="{8739877d-3674-40ae-90c4-38b2b160e92b}" Type="DevExpress.CodeRush.Formatting.UI.Options.Conversion.ArrayInitializerFormattingOption" />
|
||||
<Item Id="{a940ae15-f98a-4b7d-8357-2214eb421250}" Type="DevExpress.CodeRush.Formatting.UI.Options.Conversion.CollectionInitializerFormattingOption" />
|
||||
<Item Id="{0414181a-3915-4d0c-81d3-3bc7718da90f}" Type="DevExpress.CodeRush.Formatting.UI.Options.Conversion.ObjectInitializerFormattingOption" />
|
||||
<Item Id="{ea60e2ab-d67a-45e8-ab42-36d747c494c}" Type="DevExpress.CodeRush.Formatting.UI.Options.Conversion.ChainedMethodCallsFormattingOption" />
|
||||
<Item Id="{5f4ed422-88b9-4e95-8401-cef404d645d6}" Type="DevExpress.CodeRush.Formatting.UI.Options.Conversion.LambdaExpressionFormattingOption" />
|
||||
<Item Id="{0531de5e-ff20-4043-a67c-eeef76a8f3c3}" Type="DevExpress.CodeRush.Formatting.UI.Options.Conversion.ArrowExpressionFormattingOption" />
|
||||
<Item Id="{08fa5953-cc71-4ded-bd41-ef5d5b690585}" Type="DevExpress.CodeRush.Formatting.UI.Options.Conversion.TypeParameterListFormattingOption" />
|
||||
<Item Id="{dc060d33-cfc0-411e-9508-8d27b84934e8}" Type="DevExpress.CodeRush.Formatting.UI.Options.Conversion.CoalesceExpressionFormattingOption" />
|
||||
<Item Id="{b25d25a0-dd92-45ed-88ef-51953e28222c}" Type="DevExpress.CodeRush.Formatting.UI.Options.Conversion.BaseListWrappingFormattingOption" />
|
||||
<Item Id="{4db5e14f-8f4c-416f-9b59-7e9239f2150e}" Type="DevExpress.CodeRush.Formatting.UI.Options.Conversion.CtorInitWrappingFormattingOption" />
|
||||
<Item Id="{be0c2117-5732-40fd-9b4a-0fe749356e87}" Type="DevExpress.CodeRush.Formatting.UI.Options.Conversion.SwitchExpressionWrappingFormattingOption" />
|
||||
</Options>
|
||||
</Options>
|
||||
</Root>
|
||||
6
.cr/server/Editor/NamingSuggestions.xml
Normal file
6
.cr/server/Editor/NamingSuggestions.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Root Type="DevExpress.CodeRush.CodeCompletion.NamingSuggestions.Options.NamingSuggestionsOptions">
|
||||
<Options Language="C#">
|
||||
<Enabled>True</Enabled>
|
||||
</Options>
|
||||
</Root>
|
||||
165
.cr/server/Editor/Organize Members.xml
Normal file
165
.cr/server/Editor/Organize Members.xml
Normal file
@@ -0,0 +1,165 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Root Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersOptions">
|
||||
<Options Language="Neutral">
|
||||
<Schemes>
|
||||
<Item Id="{537ce5d1-771a-4e99-9f4a-c409ebd5e213}">
|
||||
<IsActive>False</IsActive>
|
||||
<Rules>
|
||||
<Item Id="{a1310165-0385-4fbf-92d3-71402b646318}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule">
|
||||
<GroupRule Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.AndRule">
|
||||
<Rules>
|
||||
<Item Id="{2ebbe39b-ad28-42e6-b6fe-58cbbe1366ea}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.GroupByParentTypeAttributesRule">
|
||||
<AttributeName>InterfaceType</AttributeName>
|
||||
</Item>
|
||||
<Item Id="{e7428898-429e-46c7-84f8-a4eeffbf1bc7}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.GroupByKindRule" />
|
||||
</Rules>
|
||||
</GroupRule>
|
||||
<RuleName>Members in type with InterfaceType</RuleName>
|
||||
</Item>
|
||||
<Item Id="{ebd30c1d-59b5-4a03-9f33-8813a996b952}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule" />
|
||||
<Item Id="{02fdb982-e0dd-4b47-84c3-f44926013188}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule" />
|
||||
<Item Id="{f5649b7d-32eb-4a64-88b4-5de14ed335e4}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule" />
|
||||
<Item Id="{b72b1c09-252f-4d4f-881c-1a4832911d5f}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule" />
|
||||
<Item Id="{eae9a2ed-5135-45c6-9cd1-e75ee9e9ac68}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule" />
|
||||
<Item Id="{7e2e2ef2-8ef3-4f28-825d-ce10da1931e6}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule">
|
||||
<SortingRule Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.MultipleSortingsRule">
|
||||
<Sortings>
|
||||
<Item Id="{0430f49d-5690-49a2-b2ef-154bfbf64cd7}" />
|
||||
</Sortings>
|
||||
</SortingRule>
|
||||
</Item>
|
||||
<Item Id="{907fc4a7-efee-4337-af73-d71b996b3923}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule">
|
||||
<SortingRule Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.MultipleSortingsRule">
|
||||
<Sortings>
|
||||
<Item Id="{724ebc08-3b98-4c52-91c5-158b7a759d95}" />
|
||||
</Sortings>
|
||||
</SortingRule>
|
||||
</Item>
|
||||
<Item Id="{bcbd84af-ad2b-4353-a834-ece7b6e41d92}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule">
|
||||
<SortingRule Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.MultipleSortingsRule">
|
||||
<Sortings>
|
||||
<Item Id="{c49c00d2-9626-428d-8818-e71e68bf07f9}" />
|
||||
</Sortings>
|
||||
</SortingRule>
|
||||
</Item>
|
||||
<Item Id="{335094b6-641c-4832-bfdc-84087f8c7b24}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule">
|
||||
<SortingRule Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.MultipleSortingsRule">
|
||||
<Sortings>
|
||||
<Item Id="{1136a603-d516-4f42-a80b-c2bc7baf163b}" />
|
||||
</Sortings>
|
||||
</SortingRule>
|
||||
</Item>
|
||||
<Item Id="{89215376-ecad-435a-a6bf-137f09a41f0d}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule">
|
||||
<SortingRule Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.MultipleSortingsRule">
|
||||
<Sortings>
|
||||
<Item Id="{380049a0-9dbf-4d84-9612-20fc0c34dca2}" />
|
||||
</Sortings>
|
||||
</SortingRule>
|
||||
</Item>
|
||||
<Item Id="{36cc0c47-d29c-4e7a-a29b-d73ec1b3910b}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule" />
|
||||
<Item Id="{c87a250e-ef05-4000-9e2c-e5c078ce51ae}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule" />
|
||||
<Item Id="{0fcd1a59-0fc8-4bde-9db7-2d73508b918d}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule">
|
||||
<SortingRule Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.MultipleSortingsRule">
|
||||
<Sortings>
|
||||
<Item Id="{050f50d0-7ec6-4610-a820-08f54f1d4c3c}" />
|
||||
</Sortings>
|
||||
</SortingRule>
|
||||
</Item>
|
||||
<Item Id="{6b6953c9-dcb7-4d34-a123-7f390fd24e1e}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule" />
|
||||
<Item Id="{b8f8c881-e919-48b1-8655-602c75ddbfec}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule">
|
||||
<SortingRule Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.MultipleSortingsRule">
|
||||
<Sortings>
|
||||
<Item Id="{f591aeca-b50c-47e2-ab24-84fb3a7327c2}" />
|
||||
</Sortings>
|
||||
</SortingRule>
|
||||
</Item>
|
||||
<Item Id="{c9b4252f-60a9-48d3-869e-2c3c23c20aae}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule" />
|
||||
<Item Id="{d6d0a5a4-c770-47f3-8cda-c699e76101d1}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule">
|
||||
<SortingRule Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.MultipleSortingsRule">
|
||||
<Sortings>
|
||||
<Item Id="{9b31a53f-4bae-4b97-8356-39a48bd91e9c}" />
|
||||
</Sortings>
|
||||
</SortingRule>
|
||||
</Item>
|
||||
<Item Id="{45e128f7-55bf-4186-b09c-760d2a6477cb}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule" />
|
||||
<Item Id="{1c54e8e0-33dd-4a95-8899-42ba94669156}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule">
|
||||
<SortingRule Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.MultipleSortingsRule">
|
||||
<Sortings>
|
||||
<Item Id="{b76710ac-780e-4cad-bd0c-02f7f676db0f}" />
|
||||
</Sortings>
|
||||
</SortingRule>
|
||||
</Item>
|
||||
<Item Id="{48b47296-0fd0-4056-bdc1-b09ae6266d06}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule" />
|
||||
<Item Id="{9d6898f1-002e-4c71-a281-1ec6e78a3003}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule">
|
||||
<SortingRule Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.MultipleSortingsRule">
|
||||
<Sortings>
|
||||
<Item Id="{f1959e1c-1062-4a5f-a26d-b66a530b56dc}" />
|
||||
</Sortings>
|
||||
</SortingRule>
|
||||
</Item>
|
||||
<Item Id="{4651e354-b408-4df4-bb8c-0490daddccaa}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule" />
|
||||
<Item Id="{6653a3b6-576e-4f5e-9c6a-a440ee257399}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule">
|
||||
<SortingRule Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.MultipleSortingsRule">
|
||||
<Sortings>
|
||||
<Item Id="{dc81be48-841a-48c0-bb6a-e70cb3c26341}" />
|
||||
</Sortings>
|
||||
</SortingRule>
|
||||
</Item>
|
||||
<Item Id="{b8475833-a96e-4e5a-825c-bf3266fcf330}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule" />
|
||||
<DeletedItem Id="{1eb07ab2-16f0-4bf2-a2a6-33b899b861b8}" />
|
||||
</Rules>
|
||||
</Item>
|
||||
<Item Id="{fb41924a-35f9-47ee-8f8c-74cc34c4bf63}">
|
||||
<IsActive>True</IsActive>
|
||||
<Rules>
|
||||
<Item Id="{b98b9ab7-3a4c-4b50-8c32-771f758e4507}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule" />
|
||||
<Item Id="{175afa49-1b02-4335-8697-426564eb966b}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule" />
|
||||
<Item Id="{793c3efa-da34-4af7-9338-b079461a74c8}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule" />
|
||||
<Item Id="{2a66d808-4878-480c-b9b8-8ae03700c1e8}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule" />
|
||||
<Item Id="{3f3676c5-45dd-45df-888a-0f07b1b3707d}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule" />
|
||||
<Item Id="{1b549ff5-3ce2-43ff-93bc-f4da46903b6a}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule" />
|
||||
<Item Id="{761299d1-70d4-44bf-b06b-ccd7c409e448}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule" />
|
||||
<Item Id="{b0120844-0819-42f0-a49b-62c4c7497a99}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule" />
|
||||
<Item Id="{00b09b98-ac03-48d2-b2a0-9c6e1b7ba907}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule" />
|
||||
<Item Id="{612527cd-1b3e-41be-8a3c-fce9731c5798}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule" />
|
||||
<Item Id="{9766d442-e0fb-427f-99b0-405fc57f6d4f}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule">
|
||||
<SortingRule Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.MultipleSortingsRule">
|
||||
<Sortings>
|
||||
<Item Id="{f82b02cb-b317-44af-ab65-2a3c90761afe}" />
|
||||
</Sortings>
|
||||
</SortingRule>
|
||||
</Item>
|
||||
<Item Id="{f2379393-c0e5-4bee-a551-6383d0c1f843}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule" />
|
||||
<Item Id="{7c815ce6-5ac8-4c71-a1a9-b7fc8adea37c}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule" />
|
||||
<Item Id="{300ff320-0e96-446c-8de9-3f808dafce55}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule">
|
||||
<SortingRule Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.MultipleSortingsRule">
|
||||
<Sortings>
|
||||
<Item Id="{78216f10-5d1c-41eb-a048-bd50ff4224fd}" />
|
||||
</Sortings>
|
||||
</SortingRule>
|
||||
</Item>
|
||||
<Item Id="{f0d58f97-1bb4-4762-95e4-fb7f7b1e184f}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule">
|
||||
<SortingRule Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.MultipleSortingsRule">
|
||||
<Sortings>
|
||||
<Item Id="{c17095aa-afa2-4136-8771-c2a7ac591d15}" />
|
||||
</Sortings>
|
||||
</SortingRule>
|
||||
</Item>
|
||||
<Item Id="{b1d169c2-df12-4479-8c61-2af5bbee8a06}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule">
|
||||
<SortingRule Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.MultipleSortingsRule">
|
||||
<Sortings>
|
||||
<Item Id="{c2c647e5-108d-4154-ad61-de7692259d35}" />
|
||||
</Sortings>
|
||||
</SortingRule>
|
||||
</Item>
|
||||
<Item Id="{b02e42bb-4a64-4196-8d23-aca15029a893}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule" />
|
||||
<Item Id="{096ce198-34f5-4265-8a4a-4a4b00c711ac}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule" />
|
||||
<Item Id="{eddf6fb8-a51b-4632-b8fd-20965a20efe2}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule" />
|
||||
<Item Id="{0aa19952-807c-40eb-ab92-6c7a5f3f79b2}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule" />
|
||||
<Item Id="{e7160382-ae65-4f07-aaac-72e124360b1d}" Type="DevExpress.CodeAnalysis.CodeCleanUp.OrganizeMembers.OrganizeMembersGroupAndSortRule" />
|
||||
</Rules>
|
||||
</Item>
|
||||
</Schemes>
|
||||
<UseMemberSections>False</UseMemberSections>
|
||||
</Options>
|
||||
</Root>
|
||||
@@ -39,16 +39,16 @@
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>true</UpdateRequired>
|
||||
<MapFileExtensions>false</MapFileExtensions>
|
||||
<InstallUrl>https://app.ownsoft.de/</InstallUrl>
|
||||
<InstallUrl>https://app.ownsoft.de/test/</InstallUrl>
|
||||
<TargetCulture>de-DE</TargetCulture>
|
||||
<ProductName>BeWoPlaner</ProductName>
|
||||
<PublisherName>ownSoft GmbH</PublisherName>
|
||||
<MinimumRequiredVersion>2.0.1.263</MinimumRequiredVersion>
|
||||
<MinimumRequiredVersion>2.0.1.266</MinimumRequiredVersion>
|
||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||
<WebPage>publish.htm</WebPage>
|
||||
<OpenBrowserOnPublish>false</OpenBrowserOnPublish>
|
||||
<TrustUrlParameters>true</TrustUrlParameters>
|
||||
<ApplicationRevision>264</ApplicationRevision>
|
||||
<ApplicationRevision>267</ApplicationRevision>
|
||||
<ApplicationVersion>2.0.1.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||
@@ -67,6 +67,7 @@
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<UseVSHostingProcess>true</UseVSHostingProcess>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<NoWarn>CS0659, CS0162, CS0168, CS0649, CS0219, CS0169, CS0414, CS0067, CS0618</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
@@ -94,8 +95,10 @@
|
||||
</StartupObject>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Converter\AddressToStringConverter.cs" />
|
||||
<Compile Include="Converter\Features\AiConversationMessageSystemConverter.cs" />
|
||||
<Compile Include="Converter\NewlineConverter.cs" />
|
||||
<Compile Include="Core\Commands\CommandFactory.cs" />
|
||||
<Compile Include="ServiceProxy\GeneratedAiEnhancedService.cs" />
|
||||
<Compile Include="Services\BeWoControlFactory.cs" />
|
||||
<Compile Include="Services\BeWoWindowFactory.cs" />
|
||||
@@ -103,13 +106,11 @@
|
||||
<Compile Include="Services\IControlFactory.cs" />
|
||||
<Compile Include="Services\IWindowFactory.cs" />
|
||||
<Compile Include="Services\IWindowService.cs" />
|
||||
<Compile Include="ViewModel\AddressVM.cs" />
|
||||
<Compile Include="ViewModel\AiConfigVM.cs" />
|
||||
<Compile Include="View\Detail\AI\AiConfigView.xaml.cs">
|
||||
<DependentUpon>AiConfigView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Detail\AI\AiConversationChatModalPopup.xaml.cs">
|
||||
<DependentUpon>AiConversationChatModalPopup.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Document\RtfEditView.xaml.cs">
|
||||
<DependentUpon>RtfEditView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -121,10 +122,6 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="View\Detail\AI\AiConversationChatModalPopup.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\Document\RtfEditView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
@@ -1183,6 +1180,7 @@
|
||||
<Compile Include="SchulbegleitenderDienst\WochenansichtVM.cs" />
|
||||
<Compile Include="SchulbegleitenderDienst\WochenVertretung.cs" />
|
||||
<Compile Include="Security\EncryptionUtils.cs" />
|
||||
<Compile Include="ServiceProxy\ServiceFacadeExtension.cs" />
|
||||
<Compile Include="ServiceProxy\GeneratedOperationsEnhancedService.cs" />
|
||||
<Compile Include="UploadDialog.xaml.cs">
|
||||
<DependentUpon>UploadDialog.xaml</DependentUpon>
|
||||
@@ -1262,10 +1260,13 @@
|
||||
<Compile Include="ViewModel\AiConversationVM.cs" />
|
||||
<Compile Include="ViewModel\BaseVM.cs" />
|
||||
<Compile Include="ViewModel\CustomerVermittlungArbeitVM.cs" />
|
||||
<Compile Include="ViewModel\Light\GkvAbrechnungLightVM.cs" />
|
||||
<Compile Include="ViewModel\Light\InvoiceBaseLightVM.cs" />
|
||||
<Compile Include="ViewModel\ListViewModel\AbstractListVM.cs" />
|
||||
<Compile Include="ViewModel\ListViewModel\AiConversationMessageListVM.cs" />
|
||||
<Compile Include="ViewModel\ListViewModel\AiConversationListVM.cs" />
|
||||
<Compile Include="ViewModel\ListViewModel\CustomerVermittlungArbeitListVM.cs" />
|
||||
<Compile Include="ViewModel\ListViewModel\Light\GkvAbrechnungLightListVM.cs" />
|
||||
<Compile Include="ViewModel\Wohnhilfe\CustomerWohnhilfeBereichBundVM.cs" />
|
||||
<Compile Include="ViewModel\Wohnhilfe\CustomerWohnhilfeBereichEinkommenUndArbeitVM.cs" />
|
||||
<Compile Include="ViewModel\Wohnhilfe\CustomerWohnhilfeBereichSozialeKontakteVM.cs" />
|
||||
@@ -1283,7 +1284,6 @@
|
||||
<Compile Include="ViewModel\DocumentTreeItemVM.cs" />
|
||||
<Compile Include="ViewModel\DokumentvorlageVM.cs" />
|
||||
<Compile Include="ViewModel\GeschenkterUrlaubstagVM.cs" />
|
||||
<Compile Include="ViewModel\ListViewModel\GkvAbrechnungListVM.cs" />
|
||||
<Compile Include="ViewModel\ListViewModel\PreisListVM.cs" />
|
||||
<Compile Include="ViewModel\GkvAbrechnungVM.cs" />
|
||||
<Compile Include="ViewModel\PlatzhalterVM.cs" />
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<PublishUrlHistory>D:\Projects\beyondsoft\BeWoPlaner\Publish\|publish\|D:\Projects\beyondsoft\BeWoPlaner\PublishTest\|D:\Projects\beyondsoft\BeWoPlaner\PublishDev\|D:\Projects\beyondsoft\BeWoPlaner\Publish45\</PublishUrlHistory>
|
||||
<InstallUrlHistory>https://app.ownsoft.de/|https://app.ownsoft.de/test/|https://app.ownsoft.de/dev/|http://app.ownsoft.de/dev/|http://app.beyondsoft.de/dev/</InstallUrlHistory>
|
||||
<InstallUrlHistory>https://app.ownsoft.de/test/|https://app.ownsoft.de/|https://app.ownsoft.de/dev/|http://app.ownsoft.de/dev/|http://app.beyondsoft.de/dev/</InstallUrlHistory>
|
||||
<SupportUrlHistory />
|
||||
<UpdateUrlHistory>https://app.ownsoft.de/|https://app.ownsoft.de/bewoplaner.application/</UpdateUrlHistory>
|
||||
<BootstrapperUrlHistory />
|
||||
|
||||
@@ -83,6 +83,7 @@
|
||||
<conv:EnumTranslationConverter x:Key="EnumTranslationConverter" />
|
||||
<conv:TooltipTextConverter x:Key="TooltipTextConverter" />
|
||||
<conv:NewlineConverter x:Key="NewlineConverter" />
|
||||
<conv:AddressToStringConverter x:Key="AddressToStringConverter" />
|
||||
|
||||
<conv:ValidationConverter x:Key="ValidationConverter" />
|
||||
<conv:ValueConverterGroup x:Key="Validation2BrushConverter">
|
||||
|
||||
@@ -56,9 +56,9 @@ namespace BeWo
|
||||
public static LoginControl LoginControl;
|
||||
public static MainControl MainControl;
|
||||
|
||||
public static string ShortVersion = "3.25";
|
||||
public static string ShortVersion = "3.26";
|
||||
|
||||
public static string Version = "Version 3.25";
|
||||
public static string Version = "Version 3.26 Test";
|
||||
|
||||
public static int RenderTier = 0;
|
||||
public static bool IsInDesignMode = DesignerProperties.GetIsInDesignMode(new DependencyObject());
|
||||
@@ -631,10 +631,11 @@ namespace BeWo
|
||||
//AppSettings.AllowGkvAbrechnung = true;
|
||||
//AppSettings.AllowGkvAbrechnung = false;
|
||||
//showInfoButtonInCalender = true;
|
||||
IsInDeveloperMode = true;
|
||||
//IsInDeveloperMode = true;
|
||||
//IsInDeveloperMode = false;
|
||||
AppSettings.ModuleAiEnabled = true;
|
||||
AppSettings.ModuleAiSettingsEnabled = false;
|
||||
AppSettings.IsSchedulerAllowed = true;
|
||||
#endif
|
||||
|
||||
AppSettings.ShowDatevFields = showDatevFields;
|
||||
|
||||
29
BeWo/Converter/AddressToStringConverter.cs
Normal file
29
BeWo/Converter/AddressToStringConverter.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using BeWo.ViewModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace BeWo.Converter
|
||||
{
|
||||
public class AddressToStringConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
var vm = value as AddressVM;
|
||||
|
||||
if (vm is null)
|
||||
return null;
|
||||
|
||||
return vm.ToSingleLine();
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
40
BeWo/Core/Commands/CommandFactory.cs
Normal file
40
BeWo/Core/Commands/CommandFactory.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
using BS.Shared;
|
||||
using DevExpress.Mvvm;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static DevExpress.Mvvm.Native.Either;
|
||||
|
||||
namespace BeWo.Core.Commands
|
||||
{
|
||||
public static class CommandFactory
|
||||
{
|
||||
public static DelegateCommand GetAiViewCommand(Action openView, UserRightType userRightType, Func<bool> additionalCheckup = null)
|
||||
{
|
||||
bool canExecute() =>
|
||||
BeWoApp.AppSettings.ModuleAiEnabled &&
|
||||
BeWoApp.HasLoggedOnUserRight(userRightType) &&
|
||||
(additionalCheckup is null || additionalCheckup());
|
||||
|
||||
return GetTestClientCommand(openView, canExecute, false);
|
||||
}
|
||||
|
||||
public static DelegateCommand GetTestClientCommand(Action action, Func<bool> canExecute = null, bool? useCommandManager = null)
|
||||
{
|
||||
bool canExecute2() =>
|
||||
CheckupTestVersion() &&
|
||||
(canExecute is null || canExecute());
|
||||
|
||||
return new DelegateCommand(action, canExecute2, useCommandManager);
|
||||
}
|
||||
|
||||
private static bool CheckupTestVersion()
|
||||
{
|
||||
var version = BeWoApp.Version.Split(' ');
|
||||
var test_string = version[version.Length - 1].ToLower();
|
||||
return test_string == "test";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,8 @@ using System.Diagnostics;
|
||||
|
||||
namespace BeWo.Core
|
||||
{
|
||||
[DebuggerDisplay("{GoalEntryVM.Abbreviation}: {GoalEntryVM.Description}")]
|
||||
#pragma warning disable CS0108 // Rethrow to preserve stack details
|
||||
[DebuggerDisplay("{GoalEntryVM.Abbreviation}: {GoalEntryVM.Description}")]
|
||||
public class SupportConceptGoalTreeItem : SupportConceptGoalDC
|
||||
{
|
||||
private ValueListEntryVM _GoalEntryVM;
|
||||
@@ -97,5 +98,6 @@ namespace BeWo.Core
|
||||
}
|
||||
|
||||
public ValueListEntryType GoalType => GoalEntryDC?.Type ?? GoalEntryVM.Type;
|
||||
}
|
||||
}
|
||||
#pragma warning restore CS0108 // Rethrow to preserve stack details
|
||||
}
|
||||
@@ -720,7 +720,6 @@
|
||||
<localView:ImageButton
|
||||
x:Name="button_Dokumente"
|
||||
Width="90"
|
||||
r:DemandUserRight.VisibleDemands="ViewAll, TeamView_ViewAll, TeamView_ViewMyTeams"
|
||||
Background="{StaticResource DokumenteContentBrush}"
|
||||
Click="button_Dokumente_Click"
|
||||
Content="{t:Translate DokumenteMenuItem}"
|
||||
|
||||
@@ -176,7 +176,16 @@ namespace BeWo
|
||||
{
|
||||
this.button_SchulbegleitenderDienst.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
this.button_Dokumente.Visibility = Visibility.Collapsed;
|
||||
|
||||
|
||||
if (BeWoApp.LoggedOnUser != null && BeWoApp.LoggedOnUser.HasRight(UserRightType.DocumentsAllowViewAll))
|
||||
{
|
||||
this.button_Dokumente.Visibility = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.button_Dokumente.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if DEBUG
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -301,47 +301,14 @@ namespace BeWo.ServiceProxy
|
||||
#endregion
|
||||
|
||||
#region GkvAccounting
|
||||
public static void DoGkvAccountingServiceAsync<T>(Func<IGkvAccountingService, T> pFunc, Action<T> pCallBack, bool showWaitDialog)
|
||||
{
|
||||
DoAsync<GkvAccountingServiceClient, IGkvAccountingService, T>(pFunc, pCallBack, showWaitDialog);
|
||||
}
|
||||
public static void DoGkvAccountingServiceAsync<T>(Func<IGkvAccountingService, T> pFunc, Action<T> pCallBack)
|
||||
{
|
||||
DoAsync<GkvAccountingServiceClient, IGkvAccountingService, T>(pFunc, pCallBack, true);
|
||||
}
|
||||
public static void DoGkvAccountingServiceAsyncGUI<T>(Func<IGkvAccountingService, T> pFunc, Action<T> pCallBack, Dispatcher dispatcher)
|
||||
{
|
||||
DoAsync<GkvAccountingServiceClient, IGkvAccountingService, T>(pFunc, pCallBack, null, true, dispatcher);
|
||||
}
|
||||
|
||||
public static void DoGkvAccountingServiceAsync(Action<IGkvAccountingService> pAction)
|
||||
{
|
||||
DoAsync<GkvAccountingServiceClient, IGkvAccountingService>(pAction, true);
|
||||
}
|
||||
public static void DoGkvAccountingServiceSync(Action<IGkvAccountingService> pAction)
|
||||
{
|
||||
try
|
||||
{
|
||||
pAction.Invoke(GetInstance<GkvAccountingServiceClient, IGkvAccountingService>());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
ShowErrorMessage(e);
|
||||
}
|
||||
}
|
||||
=> DoSync<GkvAccountingServiceClient, IGkvAccountingService>(pAction);
|
||||
public static T DoGkvAccountingServiceSync<T>(Func<IGkvAccountingService, T> pFunc)
|
||||
{
|
||||
try
|
||||
{
|
||||
return pFunc.Invoke(GetInstance<GkvAccountingServiceClient, IGkvAccountingService>());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
ShowErrorMessage(e);
|
||||
}
|
||||
|
||||
return default(T);
|
||||
}
|
||||
=> DoSync<GkvAccountingServiceClient, IGkvAccountingService, T>(pFunc);
|
||||
public static void DoGkvAccountingServiceAsync(Action<IGkvAccountingService> pAction, Action pCallback = null, Action<Exception> pErrorCallback = null, bool showWaitDialog = true, UserControl caller = null)
|
||||
=> DoAsync<GkvAccountingServiceClient, IGkvAccountingService>(pAction, pCallback, pErrorCallback, showWaitDialog, caller?.Dispatcher);
|
||||
public static void DoGkvAccountingServiceAsync<T>(Func<IGkvAccountingService, T> pFunc, Action<T> pCallback = null, Action<Exception> pErrorCallback = null, bool showWaitDialog = true, UserControl caller = null)
|
||||
=> DoAsync<GkvAccountingServiceClient, IGkvAccountingService, T>(pFunc, pCallback, pErrorCallback, showWaitDialog, caller?.Dispatcher);
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
48
BeWo/ServiceProxy/ServiceFacadeExtension.cs
Normal file
48
BeWo/ServiceProxy/ServiceFacadeExtension.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
using DevExpress.Export.Xl;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Threading;
|
||||
|
||||
namespace BeWo.ServiceProxy
|
||||
{
|
||||
internal static class ServiceFacadeExtension
|
||||
{
|
||||
public static void DoGkvAccountingServiceAsync<T>(this UserControl uc, Func<IGkvAccountingService, T> pFunc, Action<T> pCallBack = null, bool showWaitDialog = true)
|
||||
{
|
||||
Action<T> lCallBack = null;
|
||||
|
||||
if (pCallBack != null)
|
||||
{
|
||||
lCallBack = (t) => uc.Dispatcher.BeginInvoke(
|
||||
DispatcherPriority.Normal,
|
||||
(Action)delegate
|
||||
{
|
||||
pCallBack(t);
|
||||
});
|
||||
}
|
||||
|
||||
ServiceFacade.DoGkvAccountingServiceAsync<T>(pFunc, lCallBack);
|
||||
}
|
||||
|
||||
public static void DoGkvAccountingServiceAsync(this UserControl uc, Action<IGkvAccountingService> pAction, Action pCallBack = null, bool showWaitDialog = true)
|
||||
{
|
||||
Action lCallBack = null;
|
||||
|
||||
if (pCallBack != null)
|
||||
{
|
||||
lCallBack = () => uc.Dispatcher.BeginInvoke(
|
||||
DispatcherPriority.Normal,
|
||||
(Action)delegate
|
||||
{
|
||||
pCallBack();
|
||||
});
|
||||
}
|
||||
|
||||
ServiceFacade.DoGkvAccountingServiceAsync(pAction, lCallBack);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,10 +24,10 @@ namespace BeWo.Services
|
||||
|
||||
public void ShowAiConversationWindow(UIContext uIContext, Dictionary<TableID, long[]> bewoObjects, long? reference_oid = null)
|
||||
{
|
||||
#if !DEBUG
|
||||
BeWoApp.ShowInfoMessage("Diese Funktion befindet sich in der Testphase.");
|
||||
return;
|
||||
#endif
|
||||
//#if !DEBUG
|
||||
// BeWoApp.ShowInfoMessage("Diese Funktion befindet sich in der Testphase.");
|
||||
// return;
|
||||
//#endif
|
||||
|
||||
ShowWindowDialog(
|
||||
cf => cf.GetAiConversationControl(uIContext, bewoObjects, reference_oid),
|
||||
@@ -35,10 +35,10 @@ namespace BeWo.Services
|
||||
}
|
||||
public void ShowAiConversationModalViewWindow(UIContext uIContext, Dictionary<TableID, long[]> bewoObjects, long? reference_oid = null)
|
||||
{
|
||||
#if !DEBUG
|
||||
BeWoApp.ShowInfoMessage("Diese Funktion befindet sich in der Testphase.");
|
||||
return;
|
||||
#endif
|
||||
//#if !DEBUG
|
||||
// BeWoApp.ShowInfoMessage("Diese Funktion befindet sich in der Testphase.");
|
||||
// return;
|
||||
//#endif
|
||||
|
||||
ShowModalViewWindow(cf => cf.GetAiConversationControl(uIContext, bewoObjects, reference_oid),
|
||||
(wf, ctrl) => wf.GetAiModalViewWindow(uIContext, ctrl));
|
||||
|
||||
@@ -63,24 +63,22 @@ namespace BeWo.View.Controls
|
||||
{
|
||||
var protokoll = datagrid_transfer.GetCurrentValue<GkvTransferProtokollDC>();
|
||||
|
||||
var oid = protokoll.GkvTransferProtokollOid.Value;
|
||||
var oid = protokoll.Oid.Value;
|
||||
|
||||
ServiceFacade.DoGkvAccountingServiceAsyncGUI(
|
||||
this.DoGkvAccountingServiceAsync(
|
||||
service => service.GetProtokollRawDataString(oid, BS.Shared.GkvRawDataType.Auftragsdatei),
|
||||
callback => ShowTextViewer("Auftragsdatei", callback),
|
||||
Dispatcher);
|
||||
callback => ShowTextViewer("Auftragsdatei", callback));
|
||||
}
|
||||
|
||||
private void btn_nutzdatendatei_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var protokoll = datagrid_transfer.GetCurrentValue<GkvTransferProtokollDC>();
|
||||
|
||||
var oid = protokoll.GkvTransferProtokollOid.Value;
|
||||
var oid = protokoll.Oid.Value;
|
||||
|
||||
ServiceFacade.DoGkvAccountingServiceAsyncGUI(
|
||||
this.DoGkvAccountingServiceAsync(
|
||||
service => service.GetProtokollRawDataString(oid, BS.Shared.GkvRawDataType.Nutzdatendatei),
|
||||
callback => ShowTextViewer("Nutzdatendatei", callback),
|
||||
Dispatcher);
|
||||
callback => ShowTextViewer("Nutzdatendatei", callback));
|
||||
}
|
||||
|
||||
private void ShowTextViewer(string title, string text)
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
<localView:BeWoView
|
||||
x:Class="BeWo.View.Detail.AI.AiConversationChatModalPopup"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:ai="clr-namespace:BeWo.View.Detail.AI"
|
||||
xmlns:core="clr-namespace:BS.Shared.Core;assembly=BS.Shared"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxa="http://schemas.devexpress.com/winfx/2008/xaml/accordion"
|
||||
xmlns:dxwui="http://schemas.devexpress.com/winfx/2008/xaml/windowsui"
|
||||
xmlns:listviewmodel="clr-namespace:BeWo.ViewModel.ListViewModel"
|
||||
xmlns:localView="clr-namespace:BeWo.View"
|
||||
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:t="clr-namespace:BeWo.MultiLanguage.Markup"
|
||||
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
|
||||
xmlns:viewmodel="clr-namespace:BeWo.ViewModel"
|
||||
Width="1200"
|
||||
Height="800"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Focusable="True"
|
||||
mc:Ignorable="d">
|
||||
<localView:BeWoView.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="..\..\..\Styles\ModernOrangeBlack.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</localView:BeWoView.Resources>
|
||||
<localView:BeWoView.DataContext>
|
||||
<listviewmodel:AiConversationListVM />
|
||||
</localView:BeWoView.DataContext>
|
||||
<Grid>
|
||||
<GroupBox Style="{StaticResource PopUpWindowStyle}">
|
||||
<GroupBox.Header>
|
||||
<StackPanel
|
||||
Margin="0"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="4,4,0,0"
|
||||
Padding="0,0,0,0"
|
||||
VerticalAlignment="Stretch"
|
||||
Background="{x:Null}"
|
||||
FontSize="20"
|
||||
Foreground="#FFFFFFFF"
|
||||
Text="Zeiterfassung KI Chat" />
|
||||
</StackPanel>
|
||||
</GroupBox.Header>
|
||||
<ai:AiConversationChatView DataContext="{Binding}" />
|
||||
</GroupBox>
|
||||
</Grid>
|
||||
</localView:BeWoView>
|
||||
@@ -1,39 +0,0 @@
|
||||
using BeWo.ServiceProxy;
|
||||
using BeWo.ViewModel.ListViewModel;
|
||||
using BS.Shared.Extensions;
|
||||
using DevExpress.Mvvm;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace BeWo.View.Detail.AI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für AiConversationChatView.xaml
|
||||
/// </summary>
|
||||
public partial class AiConversationChatModalPopup : BeWoView
|
||||
{
|
||||
public AiConversationChatModalPopup()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public AiConversationListVM ViewModel
|
||||
{
|
||||
get => DataContext as AiConversationListVM;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ using System.Activities.Statements;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
@@ -15,170 +16,173 @@ using BeWo.ServiceProxy;
|
||||
using BeWo.View.Controls;
|
||||
using BeWo.View.Windows;
|
||||
using BeWo.ViewModel;
|
||||
using BeWo.ViewModel.Light;
|
||||
using BeWo.ViewModel.ListViewModel;
|
||||
|
||||
using BeWo.ViewModel.ListViewModel.Light;
|
||||
using BS.Shared;
|
||||
using BS.Shared.AppSender;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.GkvAbrechnung;
|
||||
using BS.Shared.DataContracts.Light;
|
||||
using BS.Shared.Extensions;
|
||||
using DevExpress.Data.Filtering;
|
||||
using DevExpress.Mvvm;
|
||||
using DevExpress.Utils.Extensions;
|
||||
using DevExpress.Xpf.Editors;
|
||||
using DevExpress.Xpf.Grid;
|
||||
using Microsoft.Win32;
|
||||
|
||||
namespace BeWo.View.Detail.Accounting
|
||||
{
|
||||
public partial class GkvAbrechnungOverview : BeWoView
|
||||
{
|
||||
private bool _IsRequesting = false;
|
||||
public partial class GkvAbrechnungOverview : BeWoView
|
||||
{
|
||||
private bool _IsRequesting = false;
|
||||
|
||||
private readonly NewGkvAbrechnungPopUpView _NewGkvAbrechnungPopUpView;
|
||||
private readonly GkvAbrechnungListVM _Viewmodel;
|
||||
private readonly NewGkvAbrechnungPopUpView _NewGkvAbrechnungPopUpView;
|
||||
private readonly GkvAbrechnungLightListVM _Viewmodel;
|
||||
|
||||
public GkvAbrechnungOverview()
|
||||
{
|
||||
UpdateDataGridFilterCommand = new DelegateCommand(UpdateDataGridFilter);
|
||||
public GkvAbrechnungOverview()
|
||||
{
|
||||
UpdateDataGridFilterCommand = new DelegateCommand(UpdateDataGridFilter);
|
||||
|
||||
InitializeComponent();
|
||||
InitializeComponent();
|
||||
|
||||
DownloadLinkEngine = new DownloadLinkEngine();
|
||||
DownloadLinkEngine = new DownloadLinkEngine();
|
||||
|
||||
_Viewmodel = new GkvAbrechnungListVM();
|
||||
_Viewmodel.VMList.ListChanged += (s, e) => gridView.BestFitColumns();
|
||||
_Viewmodel = new GkvAbrechnungLightListVM();
|
||||
_Viewmodel.VMList.ListChanged += (s, e) => gridView.BestFitColumns();
|
||||
|
||||
DataContext = _Viewmodel;
|
||||
DataContext = _Viewmodel;
|
||||
|
||||
//datagrid_gkvAbrechnungen.FixedFilter = new BinaryOperator("Datenaustauschreferenz", 1);
|
||||
//datagrid_gkvAbrechnungen.FixedFilter = new BinaryOperator("Datenaustauschreferenz", 1);
|
||||
|
||||
_NewGkvAbrechnungPopUpView = new NewGkvAbrechnungPopUpView();
|
||||
_NewGkvAbrechnungPopUpView.CancelButtonClicked += NewGkvAbrechnungPopUpViewCancelButtonClicked;
|
||||
_NewGkvAbrechnungPopUpView.CreateButtonClicked += NewGkvAbrechnungPopUpViewCreateButtonClicked;
|
||||
_NewGkvAbrechnungPopUpView = new NewGkvAbrechnungPopUpView();
|
||||
_NewGkvAbrechnungPopUpView.CancelButtonClicked += NewGkvAbrechnungPopUpViewCancelButtonClicked;
|
||||
_NewGkvAbrechnungPopUpView.CreateButtonClicked += NewGkvAbrechnungPopUpViewCreateButtonClicked;
|
||||
|
||||
_Viewmodel.DateTimeSpanFilter = yearMonthFilter.FilterSpan;
|
||||
}
|
||||
_Viewmodel.DateTimeSpanFilter = yearMonthFilter.FilterSpan;
|
||||
}
|
||||
|
||||
public DownloadLinkEngine DownloadLinkEngine { get; set; }
|
||||
public DelegateCommand UpdateDataGridFilterCommand { get; set; }
|
||||
public DownloadLinkEngine DownloadLinkEngine { get; set; }
|
||||
public DelegateCommand UpdateDataGridFilterCommand { get; set; }
|
||||
|
||||
private bool ShowAllInvoices => _Viewmodel.DateTimeSpanFilter is null;
|
||||
private bool ShowAllInvoices => _Viewmodel.DateTimeSpanFilter is null;
|
||||
|
||||
private void RefreshGkvAbrechnungenList()
|
||||
{
|
||||
if (_IsRequesting && ServiceFacade.IsWaiting())
|
||||
return;
|
||||
private void RefreshGkvAbrechnungenList()
|
||||
{
|
||||
if (_IsRequesting && ServiceFacade.IsWaiting())
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
_IsRequesting = true;
|
||||
_IsRequesting = true;
|
||||
|
||||
ServiceFacade.DoGkvAccountingServiceAsync(s => s.GetFilteredGkvAbrechnungen(null), UpdateGkvAbrechnungList);
|
||||
}
|
||||
catch(Exception e)
|
||||
ServiceFacade.DoGkvAccountingServiceAsync(s => s.GetFilteredGkvAbrechnungen(null), UpdateGkvAbrechnungList);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_IsRequesting = false;
|
||||
_IsRequesting = false;
|
||||
|
||||
throw e;
|
||||
throw e;
|
||||
}
|
||||
|
||||
_IsRequesting = false;
|
||||
}
|
||||
|
||||
private void UpdateGkvAbrechnungList(IList<GkvAbrechnungDC> dcList)
|
||||
{
|
||||
this.Dispatcher.BeginInvoke(
|
||||
DispatcherPriority.Normal,
|
||||
(Action)delegate
|
||||
{
|
||||
_Viewmodel.UpdateList(dcList);
|
||||
_IsRequesting = false;
|
||||
}
|
||||
|
||||
if (datagrid_gkvAbrechnungen.Visibility != Visibility.Visible)
|
||||
datagrid_gkvAbrechnungen.Visibility = Visibility.Visible;
|
||||
private void UpdateGkvAbrechnungList(IList<GkvAbrechnungLightDC> dcList)
|
||||
{
|
||||
this.Dispatcher.BeginInvoke(
|
||||
DispatcherPriority.Normal,
|
||||
(Action)delegate
|
||||
{
|
||||
_Viewmodel.UpdateList(dcList);
|
||||
|
||||
UpdateDataGridFilter();
|
||||
});
|
||||
}
|
||||
if (datagrid_gkvAbrechnungen.Visibility != Visibility.Visible)
|
||||
datagrid_gkvAbrechnungen.Visibility = Visibility.Visible;
|
||||
|
||||
private void UpdateDataGridFilter()
|
||||
{
|
||||
datagrid_gkvAbrechnungen.FixedFilter = null;
|
||||
UpdateDataGridFilter();
|
||||
});
|
||||
}
|
||||
|
||||
if (ShowAllInvoices)
|
||||
{
|
||||
datagrid_gkvAbrechnungen.FixedFilter = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
var filterByInvoiceDate = radioFilterByInvoiceDate.IsChecked.Value;
|
||||
private void UpdateDataGridFilter()
|
||||
{
|
||||
datagrid_gkvAbrechnungen.FixedFilter = null;
|
||||
|
||||
var filter_start = _Viewmodel.DateTimeSpanFilter.StartDate;
|
||||
var filter_ende = _Viewmodel.DateTimeSpanFilter.EndDate.AddDays(1).AddMilliseconds(-1);
|
||||
|
||||
if (filterByInvoiceDate)
|
||||
{
|
||||
datagrid_gkvAbrechnungen.FixedFilter = CriteriaOperator.And(
|
||||
CriteriaOperator.FromLambda<GkvAbrechnungDC>(gkv => gkv.ErstelltAm >= filter_start),
|
||||
CriteriaOperator.FromLambda<GkvAbrechnungDC>(gkv => gkv.ErstelltAm <= filter_ende));
|
||||
}
|
||||
else
|
||||
{
|
||||
datagrid_gkvAbrechnungen.FixedFilter = CriteriaOperator.Or(
|
||||
CriteriaOperator.FromLambda<GkvAbrechnungDC>(gkv => filter_start <= gkv.AbrechnungsZeitraumStart && gkv.AbrechnungsZeitraumStart <= filter_ende),
|
||||
CriteriaOperator.FromLambda<GkvAbrechnungDC>(gkv => filter_start <= gkv.AbrechnungsZeitraumEnde && gkv.AbrechnungsZeitraumEnde <= filter_ende),
|
||||
CriteriaOperator.FromLambda<GkvAbrechnungDC>(gkv => gkv.AbrechnungsZeitraumStart <= filter_start && filter_ende <= gkv.AbrechnungsZeitraumEnde));
|
||||
}
|
||||
}
|
||||
|
||||
gridView.BestFitColumns();
|
||||
gridView.BestFitColumn(ColumnButtons);
|
||||
}
|
||||
|
||||
private void NewGkvAbrechnungPopUpViewCancelButtonClicked(object sender, EventArgs e)
|
||||
{
|
||||
MainControl.CloseCurrentPopUp();
|
||||
}
|
||||
private void NewGkvAbrechnungPopUpViewCreateButtonClicked(object sender, EventArgs<GkvAbrechnungDC> e)
|
||||
{
|
||||
var gkv_abrechnung = e.Data;
|
||||
|
||||
var checked_invoice_bases = _NewGkvAbrechnungPopUpView.ViewModel.InvoiceBases.Where(x => x.IsChecked);
|
||||
|
||||
if (!checked_invoice_bases.Any())
|
||||
return;
|
||||
|
||||
var success = ValidatorExtended.TryValidateGkvAbrechnung(gkv_abrechnung, checked_invoice_bases, false);
|
||||
if (!success)
|
||||
{
|
||||
var txt = "Sie haben Rechnungen mit verschiedenen Rechnungsadressen ausgewählt.";
|
||||
var result = MessageBox.Show(txt, "Hinweis", MessageBoxButton.OK);
|
||||
return;
|
||||
}
|
||||
|
||||
var already_used_invoices = checked_invoice_bases.Where(x => x.IsAlreadyInActiveGkvAbrechnung.Value);
|
||||
if (already_used_invoices.Any())
|
||||
if (ShowAllInvoices)
|
||||
{
|
||||
var txt = "Sie haben eine oder mehrere Rechnungen ausgewählt, welche bereits in einer " +
|
||||
"anderen aktiven GKV-Abrechnung enthalten sind. Möchten Sie fortfahren?";
|
||||
var result = MessageBox.Show(txt, "Hinweis", MessageBoxButton.OKCancel);
|
||||
datagrid_gkvAbrechnungen.FixedFilter = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
var filterByInvoiceDate = radioFilterByInvoiceDate.IsChecked.Value;
|
||||
|
||||
if (result != MessageBoxResult.OK)
|
||||
return;
|
||||
var filter_start = _Viewmodel.DateTimeSpanFilter.StartDate;
|
||||
var filter_ende = _Viewmodel.DateTimeSpanFilter.EndDate.AddDays(1).AddMilliseconds(-1);
|
||||
|
||||
if (filterByInvoiceDate)
|
||||
{
|
||||
datagrid_gkvAbrechnungen.FixedFilter = CriteriaOperator.And(
|
||||
CriteriaOperator.FromLambda<GkvAbrechnungDC>(gkv => gkv.ErstelltAm >= filter_start),
|
||||
CriteriaOperator.FromLambda<GkvAbrechnungDC>(gkv => gkv.ErstelltAm <= filter_ende));
|
||||
}
|
||||
else
|
||||
{
|
||||
datagrid_gkvAbrechnungen.FixedFilter = CriteriaOperator.Or(
|
||||
CriteriaOperator.FromLambda<GkvAbrechnungDC>(gkv => filter_start <= gkv.AbrechnungsZeitraumStart && gkv.AbrechnungsZeitraumStart <= filter_ende),
|
||||
CriteriaOperator.FromLambda<GkvAbrechnungDC>(gkv => filter_start <= gkv.AbrechnungsZeitraumEnde && gkv.AbrechnungsZeitraumEnde <= filter_ende),
|
||||
CriteriaOperator.FromLambda<GkvAbrechnungDC>(gkv => gkv.AbrechnungsZeitraumStart <= filter_start && filter_ende <= gkv.AbrechnungsZeitraumEnde));
|
||||
}
|
||||
}
|
||||
|
||||
var bereits_bezahlt = checked_invoice_bases.Where(x => x.IsPaid);
|
||||
if (bereits_bezahlt.Any())
|
||||
{
|
||||
var txt = "Sie haben eine oder mehrere Rechnungen ausgewählt, welche bereits als 'Bezahlt' " +
|
||||
"markiert sind. Möchten Sie fortfahren?";
|
||||
var result = MessageBox.Show(txt, "Hinweis", MessageBoxButton.OKCancel);
|
||||
gridView.BestFitColumns();
|
||||
gridView.BestFitColumn(ColumnButtons);
|
||||
}
|
||||
|
||||
if (result != MessageBoxResult.OK)
|
||||
return;
|
||||
}
|
||||
private void NewGkvAbrechnungPopUpViewCancelButtonClicked(object sender, EventArgs e)
|
||||
{
|
||||
MainControl.CloseCurrentPopUp();
|
||||
}
|
||||
private void NewGkvAbrechnungPopUpViewCreateButtonClicked(object sender, EventArgs<GkvAbrechnungDC> e)
|
||||
{
|
||||
var gkv_abrechnung = e.Data;
|
||||
|
||||
MainControl.CloseCurrentPopUp();
|
||||
var checked_invoice_bases = _NewGkvAbrechnungPopUpView.ViewModel.InvoiceBases.Where(x => x.IsChecked);
|
||||
|
||||
if (!checked_invoice_bases.Any())
|
||||
return;
|
||||
|
||||
var success = ValidatorExtended.TryValidateGkvAbrechnung(gkv_abrechnung, checked_invoice_bases, false);
|
||||
if (!success)
|
||||
{
|
||||
var txt = "Sie haben Rechnungen mit verschiedenen Rechnungsadressen ausgewählt.";
|
||||
var result = MessageBox.Show(txt, "Hinweis", MessageBoxButton.OK);
|
||||
return;
|
||||
}
|
||||
|
||||
var already_used_invoices = checked_invoice_bases.Where(x => x.IsAlreadyInActiveGkvAbrechnung.Value);
|
||||
if (already_used_invoices.Any())
|
||||
{
|
||||
var txt = "Sie haben eine oder mehrere Rechnungen ausgewählt, welche bereits in einer " +
|
||||
"anderen aktiven GKV-Abrechnung enthalten sind. Möchten Sie fortfahren?";
|
||||
var result = MessageBox.Show(txt, "Hinweis", MessageBoxButton.OKCancel);
|
||||
|
||||
if (result != MessageBoxResult.OK)
|
||||
return;
|
||||
}
|
||||
|
||||
var bereits_bezahlt = checked_invoice_bases.Where(x => x.IsPaid);
|
||||
if (bereits_bezahlt.Any())
|
||||
{
|
||||
var txt = "Sie haben eine oder mehrere Rechnungen ausgewählt, welche bereits als 'Bezahlt' " +
|
||||
"markiert sind. Möchten Sie fortfahren?";
|
||||
var result = MessageBox.Show(txt, "Hinweis", MessageBoxButton.OKCancel);
|
||||
|
||||
if (result != MessageBoxResult.OK)
|
||||
return;
|
||||
}
|
||||
|
||||
MainControl.CloseCurrentPopUp();
|
||||
|
||||
var gkv_filter = new GkvAbrechnungCreateRequestDC
|
||||
{
|
||||
@@ -187,264 +191,245 @@ namespace BeWo.View.Detail.Accounting
|
||||
};
|
||||
|
||||
ServiceFacade.DoGkvAccountingServiceAsync(x => x.CreateNewGkvAbrechnung(gkv_filter),
|
||||
cb => Dispatcher.BeginInvoke(DispatcherPriority.Normal,
|
||||
(Action)delegate
|
||||
{
|
||||
if (cb.Success)
|
||||
{
|
||||
RefreshGkvAbrechnungenList();
|
||||
}
|
||||
else
|
||||
{
|
||||
BeWoWindowBuilder.ShowTitleErrorMessageBox(cb.Message, cb.TitleMessage);
|
||||
}
|
||||
}));
|
||||
}
|
||||
cb => Dispatcher.BeginInvoke(DispatcherPriority.Normal,
|
||||
(Action)delegate
|
||||
{
|
||||
if (cb.Success)
|
||||
{
|
||||
RefreshGkvAbrechnungenList();
|
||||
}
|
||||
else
|
||||
{
|
||||
BeWoWindowBuilder.ShowTitleErrorMessageBox(cb.Message, cb.TitleMessage);
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
private void YearMonthFilter_FilterSpanChanged(object sender, EventArgs<DateTimeSpan> e)
|
||||
{
|
||||
_Viewmodel.DateTimeSpanFilter = e.Data;
|
||||
UpdateDataGridFilter();
|
||||
}
|
||||
private void YearMonthFilter_FilterSpanChanged(object sender, EventArgs<DateTimeSpan> e)
|
||||
{
|
||||
_Viewmodel.DateTimeSpanFilter = e.Data;
|
||||
UpdateDataGridFilter();
|
||||
}
|
||||
|
||||
private void btn_details_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var vm = this.datagrid_gkvAbrechnungen.GetCurrentValue<GkvAbrechnungVM>();
|
||||
private void btn_details_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var vm = this.datagrid_gkvAbrechnungen.GetCurrentValue<GkvAbrechnungVM>();
|
||||
|
||||
var window = BeWoWindowBuilder.GetGkvAbrechnungDetailWindow(vm);
|
||||
var window = BeWoWindowBuilder.GetGkvAbrechnungDetailWindow(vm);
|
||||
|
||||
window.Closing += Detail_Window_Closing;
|
||||
window.Closing += Detail_Window_Closing;
|
||||
|
||||
window.ShowDialog();
|
||||
}
|
||||
window.ShowDialog();
|
||||
}
|
||||
|
||||
private void Detail_Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
|
||||
{
|
||||
var bewo_window = sender as BeWoWindow;
|
||||
var detail_control = bewo_window.GroupBoxContent as GkvAbrechnungDetailControl;
|
||||
private void Detail_Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
|
||||
{
|
||||
var bewo_window = sender as BeWoWindow;
|
||||
var detail_control = bewo_window.GroupBoxContent as GkvAbrechnungDetailControl;
|
||||
|
||||
var vm = detail_control.DataContext as GkvAbrechnungVM;
|
||||
var vm = detail_control.DataContext as GkvAbrechnungLightVM;
|
||||
|
||||
vm.CheckAllInvoiceBases();
|
||||
vm.CheckAllInvoiceBases();
|
||||
|
||||
var checkbox_checked = detail_control.Checkbox_Bezahlt.IsChecked;
|
||||
var textbox_text = detail_control.txt_Notice.Text;
|
||||
var checkbox_checked = detail_control.Checkbox_Bezahlt.IsChecked;
|
||||
var textbox_text = detail_control.txt_Notice.Text;
|
||||
|
||||
vm.Notice = textbox_text;
|
||||
vm.Notice = textbox_text;
|
||||
|
||||
if (vm.IsDirty)
|
||||
{
|
||||
var dc_in = vm.CommitToDataContract();
|
||||
if (vm.IsDirty)
|
||||
{
|
||||
var dc_in = vm.CommitToDataContract();
|
||||
|
||||
ServiceFacade.DoGkvAccountingServiceAsync(x => x.UpdateGkvAbrechnung(dc_in), dc_out =>
|
||||
{
|
||||
Dispatcher.Invoke(() => {
|
||||
vm.UpdateByDataContract(dc_out);
|
||||
});
|
||||
}, false);
|
||||
}
|
||||
}
|
||||
this.DoGkvAccountingServiceAsync(x => x.UpdateGkvAbrechnung(dc_in), vm.UpdateByDataContract, false);
|
||||
}
|
||||
}
|
||||
|
||||
private void btn_send_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var vm = datagrid_gkvAbrechnungen.GetCurrentValue<GkvAbrechnungVM>();
|
||||
private void btn_send_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var vm = datagrid_gkvAbrechnungen.GetCurrentValue<GkvAbrechnungLightVM>();
|
||||
|
||||
var state = vm.GetState();
|
||||
var state = vm.GetState();
|
||||
|
||||
string text = "Sind Sie sicher, dass Sie die gewählte GKV-Abrechnung senden möchten?";
|
||||
string text = "Sind Sie sicher, dass Sie die gewählte GKV-Abrechnung senden möchten?";
|
||||
|
||||
if (state == GkvState.ErrorSoft)
|
||||
text = "Die gewählte GKV-Abrechnung wurde nicht erfolgreich an die Krankenkasse übertragen. Möchten Sie sie erneut senden?";
|
||||
|
||||
if (MessageBox.Show(text, "GKV-Abrechnung senden", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.Yes)
|
||||
{
|
||||
vm.SendGkvAbrechnung();
|
||||
}
|
||||
}
|
||||
private void btn_delete_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var vm = datagrid_gkvAbrechnungen.GetCurrentValue<GkvAbrechnungVM>();
|
||||
if (state == GkvState.ErrorSoft)
|
||||
text = "Die gewählte GKV-Abrechnung wurde nicht erfolgreich an die Krankenkasse übertragen. Möchten Sie sie erneut senden?";
|
||||
|
||||
if (MessageBox.Show("Sind Sie sicher, dass Sie die gewählte GKV-Abrechnung löschen möchten?", "GKV-Abrechnung löschen", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.Yes)
|
||||
{
|
||||
_Viewmodel.VMList.Remove(vm);
|
||||
if (MessageBox.Show(text, "GKV-Abrechnung senden", MessageBoxButton.YesNo, MessageBoxImage.Warning) != MessageBoxResult.Yes)
|
||||
return;
|
||||
|
||||
ServiceFacade.DoGkvAccountingServiceAsync(s => s.DeleteGkvAbrechnung(vm.CommitToDataContract()));
|
||||
}
|
||||
}
|
||||
private void NewButton_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
GkvAbrechnungDC gkvAbrechnungDC = new GkvAbrechnungDC();
|
||||
var req = new GkvAbrechnungSendRequestDC();
|
||||
req.GkvAbrechnungOid = vm.Oid;
|
||||
|
||||
var start = DateTime.Today.AddMonths(-1);
|
||||
var first = new DateTime(start.Year, start.Month, 1);
|
||||
var last = first.AddMonths(1).AddDays(-1);
|
||||
this.DoGkvAccountingServiceAsync(s => s.SendNewGkvAbrechnung(req), vm.UpdateBySendResponse);
|
||||
}
|
||||
private void btn_delete_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var vm = datagrid_gkvAbrechnungen.GetCurrentValue<GkvAbrechnungLightVM>();
|
||||
|
||||
gkvAbrechnungDC.AbrechnungsZeitraumStart = first;
|
||||
gkvAbrechnungDC.AbrechnungsZeitraumEnde = last;
|
||||
if (MessageBox.Show("Sind Sie sicher, dass Sie die gewählte GKV-Abrechnung löschen möchten?", "GKV-Abrechnung löschen", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.Yes)
|
||||
{
|
||||
this.DoGkvAccountingServiceAsync(s => s.DeleteGkvAbrechnung(vm.Oid, vm.Version), () => _Viewmodel.VMList.Remove(vm));
|
||||
}
|
||||
}
|
||||
private void NewButton_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
GkvAbrechnungDC gkvAbrechnungDC = new GkvAbrechnungDC();
|
||||
|
||||
GkvAbrechnungVM gkvAbrechnungVM = new GkvAbrechnungVM(gkvAbrechnungDC);
|
||||
_NewGkvAbrechnungPopUpView.Clear();
|
||||
_NewGkvAbrechnungPopUpView.ViewModel = gkvAbrechnungVM;
|
||||
this.MainControl.ShowControlAsModalPopup(this._NewGkvAbrechnungPopUpView);
|
||||
}
|
||||
private void ReloadButton_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
RefreshGkvAbrechnungenList();
|
||||
}
|
||||
var start = DateTime.Today.AddMonths(-1);
|
||||
var first = new DateTime(start.Year, start.Month, 1);
|
||||
var last = first.AddMonths(1).AddDays(-1);
|
||||
|
||||
private void gridView_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.gridView.BestFitColumns();
|
||||
}
|
||||
private void gridView_ShownEditor(object sender, EditorEventArgs e)
|
||||
{
|
||||
if (e.Editor is CheckEdit)
|
||||
{
|
||||
var ed = (CheckEdit)e.Editor;
|
||||
ed.Tag = e.Row;
|
||||
}
|
||||
else if (int.TryParse(datagrid_gkvAbrechnungen.CurrentColumn.Tag?.ToString(), out int tag) && gridView.ActiveEditor is TextEdit)
|
||||
{
|
||||
((TextEdit)gridView.ActiveEditor).SetPropertyValue("MaxLength", tag);
|
||||
}
|
||||
}
|
||||
private void gridView_CellValueChanging(object sender, CellValueChangedEventArgs e)
|
||||
{
|
||||
if (e.Column is null)
|
||||
return;
|
||||
gkvAbrechnungDC.AbrechnungsZeitraumStart = first;
|
||||
gkvAbrechnungDC.AbrechnungsZeitraumEnde = last;
|
||||
|
||||
if (e.Column.FieldName == nameof(GkvAbrechnungVM.Bezahlt))
|
||||
{
|
||||
if (e.Value is bool b && e.Row is GkvAbrechnungVM vm)
|
||||
{
|
||||
SaveBezahltChange(vm, b);
|
||||
}
|
||||
}
|
||||
else if (e.Column.FieldName == nameof(GkvAbrechnungVM.UrbelegeGesendet))
|
||||
{
|
||||
if (e.Value is bool b && e.Row is GkvAbrechnungVM vm)
|
||||
{
|
||||
SaveUrbelegeGesendetChange(vm, b);
|
||||
}
|
||||
}
|
||||
}
|
||||
private void TableView_OnCustomRowAppearance(object sender, CustomRowAppearanceEventArgs e)
|
||||
{
|
||||
if (e.Property != null && e.Property.Name == "Background")
|
||||
{
|
||||
var gkvAbrechnungVM = datagrid_gkvAbrechnungen.GetRow(e.RowHandle) as GkvAbrechnungVM;
|
||||
GkvAbrechnungVM gkvAbrechnungVM = new GkvAbrechnungVM(gkvAbrechnungDC);
|
||||
_NewGkvAbrechnungPopUpView.Clear();
|
||||
_NewGkvAbrechnungPopUpView.ViewModel = gkvAbrechnungVM;
|
||||
this.MainControl.ShowControlAsModalPopup(this._NewGkvAbrechnungPopUpView);
|
||||
}
|
||||
private void ReloadButton_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
RefreshGkvAbrechnungenList();
|
||||
}
|
||||
|
||||
if (gkvAbrechnungVM is null)
|
||||
return;
|
||||
private void gridView_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.gridView.BestFitColumns();
|
||||
}
|
||||
private void gridView_ShownEditor(object sender, EditorEventArgs e)
|
||||
{
|
||||
if (e.Editor is CheckEdit)
|
||||
{
|
||||
var ed = (CheckEdit)e.Editor;
|
||||
ed.Tag = e.Row;
|
||||
}
|
||||
else if (int.TryParse(datagrid_gkvAbrechnungen.CurrentColumn.Tag?.ToString(), out int tag) && gridView.ActiveEditor is TextEdit)
|
||||
{
|
||||
((TextEdit)gridView.ActiveEditor).SetPropertyValue("MaxLength", tag);
|
||||
}
|
||||
}
|
||||
private void gridView_CellValueChanging(object sender, CellValueChangedEventArgs e)
|
||||
{
|
||||
if (e.Column is null)
|
||||
return;
|
||||
|
||||
if (gkvAbrechnungVM.GkvState == GkvState.WaitingForKrankenkasseTooLong && BeWoApp.Mandator.ColorWaitTooLong is string colorWaiting)
|
||||
{
|
||||
e.Result = ColorExtensions.ParseSolidColorBrush(colorWaiting);
|
||||
e.Handled = true;
|
||||
}
|
||||
else if (gkvAbrechnungVM.GkvState == GkvState.WaitingForUrbelege && BeWoApp.Mandator.ColorSendUrbelege is string colorSend)
|
||||
{
|
||||
e.Result = ColorExtensions.ParseSolidColorBrush(colorSend);
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (e.Column.FieldName == nameof(GkvAbrechnungLightVM.Bezahlt))
|
||||
{
|
||||
if (e.Value is bool b && e.Row is GkvAbrechnungLightVM vm)
|
||||
{
|
||||
SaveBezahltChange(vm, b);
|
||||
}
|
||||
}
|
||||
else if (e.Column.FieldName == nameof(GkvAbrechnungLightVM.UrbelegeGesendet))
|
||||
{
|
||||
if (e.Value is bool b && e.Row is GkvAbrechnungLightVM vm)
|
||||
{
|
||||
SaveUrbelegeGesendetChange(vm, b);
|
||||
}
|
||||
}
|
||||
}
|
||||
private void TableView_OnCustomRowAppearance(object sender, CustomRowAppearanceEventArgs e)
|
||||
{
|
||||
if (e.Property != null && e.Property.Name == "Background")
|
||||
{
|
||||
var gkvAbrechnungVM = datagrid_gkvAbrechnungen.GetRow(e.RowHandle) as GkvAbrechnungLightVM;
|
||||
|
||||
private void radioFilterByInvoiceDate_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
UpdateDataGridFilter();
|
||||
}
|
||||
if (gkvAbrechnungVM is null)
|
||||
return;
|
||||
|
||||
private void SaveBezahltChange(GkvAbrechnungVM vm, bool b)
|
||||
{
|
||||
var dc_in = vm.CommitToDataContract();
|
||||
if (gkvAbrechnungVM.GkvState == GkvState.WaitingForKrankenkasseTooLong && BeWoApp.Mandator.ColorWaitTooLong is string colorWaiting)
|
||||
{
|
||||
e.Result = ColorExtensions.ParseSolidColorBrush(colorWaiting);
|
||||
e.Handled = true;
|
||||
}
|
||||
else if (gkvAbrechnungVM.GkvState == GkvState.WaitingForUrbelege && BeWoApp.Mandator.ColorSendUrbelege is string colorSend)
|
||||
{
|
||||
e.Result = ColorExtensions.ParseSolidColorBrush(colorSend);
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dc_in.Bezahlt = b;
|
||||
private void radioFilterByInvoiceDate_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
UpdateDataGridFilter();
|
||||
}
|
||||
|
||||
ServiceFacade.DoGkvAccountingServiceAsync(x => x.UpdateGkvAbrechnung(dc_in), dc_out =>
|
||||
{
|
||||
Dispatcher.Invoke(() => {
|
||||
vm.UpdateByDataContract(dc_out);
|
||||
});
|
||||
}, false);
|
||||
}
|
||||
private void SaveBezahltChange(GkvAbrechnungLightVM vm, bool b)
|
||||
{
|
||||
var dc_in = vm.CommitToDataContract();
|
||||
|
||||
private void SaveUrbelegeGesendetChange(GkvAbrechnungVM vm, bool b)
|
||||
{
|
||||
var dc_in = vm.CommitToDataContract();
|
||||
dc_in.Bezahlt = b;
|
||||
|
||||
dc_in.UrbelegeGesendet = b;
|
||||
this.DoGkvAccountingServiceAsync(x => x.UpdateGkvAbrechnung(dc_in), vm.UpdateByDataContract, false);
|
||||
}
|
||||
|
||||
ServiceFacade.DoGkvAccountingServiceAsync(x => x.UpdateGkvAbrechnung(dc_in), dc_out =>
|
||||
{
|
||||
Dispatcher.Invoke(() => {
|
||||
vm.UpdateByDataContract(dc_out);
|
||||
});
|
||||
}, false);
|
||||
}
|
||||
private void SaveUrbelegeGesendetChange(GkvAbrechnungLightVM vm, bool b)
|
||||
{
|
||||
var dc_in = vm.CommitToDataContract();
|
||||
|
||||
private void SaveNoticeChange(GkvAbrechnungVM vm, string notice)
|
||||
{
|
||||
var dc_in = vm.CommitToDataContract();
|
||||
dc_in.UrbelegeGesendet = b;
|
||||
|
||||
ServiceFacade.DoGkvAccountingServiceAsync(x => x.UpdateGkvAbrechnung(dc_in), dc_out =>
|
||||
{
|
||||
Dispatcher.Invoke(() => {
|
||||
vm.UpdateByDataContract(dc_out);
|
||||
});
|
||||
}, false);
|
||||
}
|
||||
this.DoGkvAccountingServiceAsync(x => x.UpdateGkvAbrechnung(dc_in), vm.UpdateByDataContract, false);
|
||||
}
|
||||
|
||||
private void gridView_CellValueChanged_1(object sender, CellValueChangedEventArgs e)
|
||||
{
|
||||
if (e.Column != null && e.Column.FieldName == "Notice")
|
||||
{
|
||||
if (e.Value is string s && e.Row is GkvAbrechnungVM vm)
|
||||
{
|
||||
SaveNoticeChange(vm, s);
|
||||
}
|
||||
}
|
||||
}
|
||||
private void SaveNoticeChange(GkvAbrechnungLightVM vm, string notice)
|
||||
{
|
||||
var dc_in = vm.CommitToDataContract();
|
||||
|
||||
this.DoGkvAccountingServiceAsync(x => x.UpdateGkvAbrechnung(dc_in), vm.UpdateByDataContract, false);
|
||||
}
|
||||
|
||||
private void gridView_CellValueChanged_1(object sender, CellValueChangedEventArgs e)
|
||||
{
|
||||
if (e.Column != null && e.Column.FieldName == "Notice")
|
||||
{
|
||||
if (e.Value is string s && e.Row is GkvAbrechnungLightVM vm)
|
||||
{
|
||||
SaveNoticeChange(vm, s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void BeWoView_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
_Viewmodel.FirePropertyChangedItself();
|
||||
_Viewmodel.FirePropertyChangedItself();
|
||||
|
||||
if (_NewGkvAbrechnungPopUpView.PopupObjectList is object)
|
||||
_NewGkvAbrechnungPopUpView.PopupObjectList = null;
|
||||
if (_NewGkvAbrechnungPopUpView.PopupObjectList is object)
|
||||
_NewGkvAbrechnungPopUpView.PopupObjectList = null;
|
||||
|
||||
RefreshGkvAbrechnungenList();
|
||||
}
|
||||
RefreshGkvAbrechnungenList();
|
||||
}
|
||||
|
||||
private void Hyperlink_OnRequestNavigate(object sender, RequestNavigateEventArgs e)
|
||||
{
|
||||
var vm = datagrid_gkvAbrechnungen.GetCurrentValue<GkvAbrechnungVM>();
|
||||
private void Hyperlink_OnRequestNavigate(object sender, RequestNavigateEventArgs e)
|
||||
{
|
||||
var vm = datagrid_gkvAbrechnungen.GetCurrentValue<GkvAbrechnungLightVM>();
|
||||
|
||||
string what2send = "unterschriebene Leistungsnachweise";
|
||||
string what2send = "unterschriebene Leistungsnachweise";
|
||||
|
||||
if (vm.Verfahrensstufe != GkvVerfahrensstufe.Echt)
|
||||
what2send += " und Rechnungen";
|
||||
if (vm.Verfahrensstufe != GkvVerfahrensstufe.Echt)
|
||||
what2send += " und Rechnungen";
|
||||
|
||||
BeWoApp.ShowInfoMessage($"Begleitzettel bitte inklusive der enthaltenen Urbelege ({what2send}) ausdrucken, " +
|
||||
$"Anzahl der Urbelege noch eintragen und alles zusammen versenden.");
|
||||
BeWoApp.ShowInfoMessage($"Begleitzettel bitte inklusive der enthaltenen Urbelege ({what2send}) ausdrucken, " +
|
||||
$"Anzahl der Urbelege noch eintragen und alles zusammen versenden.");
|
||||
|
||||
BeWoUtils.NavigateToReportUri(vm.ReportLink, "Druckvorschau");
|
||||
}
|
||||
BeWoUtils.NavigateToReportUri(vm.ReportLink, "Druckvorschau");
|
||||
}
|
||||
|
||||
private void Hyperlink_OnRequestNavigate2(object sender, RequestNavigateEventArgs e)
|
||||
{
|
||||
var vm = datagrid_gkvAbrechnungen.GetCurrentValue<GkvAbrechnungVM>();
|
||||
var vm = datagrid_gkvAbrechnungen.GetCurrentValue<GkvAbrechnungLightVM>();
|
||||
|
||||
string what2send = "Leistungsnachweise";
|
||||
string what2send = "Leistungsnachweise";
|
||||
|
||||
if (vm.Verfahrensstufe != GkvVerfahrensstufe.Echt)
|
||||
what2send += " und Rechnungen";
|
||||
if (vm.Verfahrensstufe != GkvVerfahrensstufe.Echt)
|
||||
what2send += " und Rechnungen";
|
||||
|
||||
BeWoApp.ShowInfoMessage($"Begleitzettel bitte inklusive der enthaltenen Urbelege ({what2send}) ausdrucken, " +
|
||||
$"Anzahl der Urbelege noch eintragen und alles zusammen versenden.");
|
||||
BeWoApp.ShowInfoMessage($"Begleitzettel bitte inklusive der enthaltenen Urbelege ({what2send}) ausdrucken, " +
|
||||
$"Anzahl der Urbelege noch eintragen und alles zusammen versenden.");
|
||||
|
||||
BeWoUtils.NavigateToReportUri(vm.ReportLink2, "Druckvorschau");
|
||||
}
|
||||
BeWoUtils.NavigateToReportUri(vm.ReportLink2, "Druckvorschau");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2618,7 +2618,10 @@
|
||||
</TabItem>
|
||||
<TabItem r:DemandUserRight.VisibleDemands="Customer_ViewAbsenceTimes" Header="Abwesenheiten">
|
||||
<Grid>
|
||||
<detail:AbsenceTimesView x:Name="AbsenceTimesView" CheckEnddate="False" AbsenceTimes="{Binding ViewModel.AbsenceTimes, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay, ElementName=CustomerBeWoView}" />
|
||||
<detail:AbsenceTimesView
|
||||
x:Name="AbsenceTimesView"
|
||||
AbsenceTimes="{Binding ViewModel.AbsenceTimes, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay, ElementName=CustomerBeWoView}"
|
||||
CheckEnddate="False" />
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="Umfeld" Selector.Selected="TabItemPersons_Selected">
|
||||
|
||||
@@ -54,6 +54,7 @@ using BeWo.AI;
|
||||
using BeWo.View.Navigation;
|
||||
using DevExpress.Mvvm;
|
||||
using System.Collections;
|
||||
using BeWo.Core.Commands;
|
||||
|
||||
namespace BeWo.View.Detail
|
||||
{
|
||||
@@ -101,8 +102,8 @@ namespace BeWo.View.Detail
|
||||
InitializeComponent();
|
||||
DataContext = ViewModel;
|
||||
|
||||
OpenAiWindowCommand = new DelegateCommand(OpenAiWindow, () => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleView) && !ViewModel.IsNew);
|
||||
OpenAiPopupCommand = new DelegateCommand(OpenAiPopup, () => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleView2) && !ViewModel.IsNew);
|
||||
OpenAiWindowCommand = CommandFactory.GetAiViewCommand(OpenAiWindow, UserRightType.AiModuleView, () => !ViewModel.IsNew);
|
||||
OpenAiPopupCommand = CommandFactory.GetAiViewCommand(OpenAiPopup, UserRightType.AiModuleView2, () => !ViewModel.IsNew);
|
||||
|
||||
BehinderungsartenSelection.CommandBindings.Add(new CommandBinding(ApplicationCommands.Close, (s, e) => this.Dispatch(() => { PopupBehinderungsarten.IsOpen = false; })));
|
||||
MerkzeichenSelection.CommandBindings.Add(new CommandBinding(ApplicationCommands.Close, (s, e) => this.Dispatch(() => { PopupMerkzeichen.IsOpen = false; })));
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:core="clr-namespace:BS.Shared.Core;assembly=BS.Shared"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:localView="clr-namespace:BeWo.View"
|
||||
@@ -11,6 +12,7 @@
|
||||
xmlns:shared="clr-namespace:BS.Shared;assembly=BS.Shared"
|
||||
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
|
||||
xmlns:val="clr-namespace:BeWo.Validation"
|
||||
xmlns:viewmodel="clr-namespace:BeWo.ViewModel"
|
||||
Width="Auto"
|
||||
Height="Auto"
|
||||
HorizontalAlignment="Stretch"
|
||||
@@ -560,9 +562,7 @@
|
||||
Grid.Row="2"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="3"
|
||||
Width="360"
|
||||
Margin="0,8,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
Header="GKV-Abrechnung"
|
||||
Style="{StaticResource ObjectEditGroupBox}">
|
||||
<GroupBox.Resources>
|
||||
@@ -587,9 +587,16 @@
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition
|
||||
Width="*"
|
||||
Width="10*"
|
||||
MinWidth="50"
|
||||
MaxWidth="200" />
|
||||
<ColumnDefinition Width="*" MinWidth="100" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition
|
||||
Width="10*"
|
||||
MinWidth="50"
|
||||
MaxWidth="200" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label
|
||||
Grid.Row="0"
|
||||
@@ -608,6 +615,7 @@
|
||||
ToolTip="{Binding Path=IKKrankenkasse, Converter={StaticResource Validation2TooltipConverter}, ConverterParameter={x:Static shared:ValidationType.OrganisationIKNumber}}"
|
||||
ToolTipService.ShowOnDisabled="True" />
|
||||
</DockPanel>
|
||||
|
||||
<Label
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
@@ -622,79 +630,42 @@
|
||||
Text="{Binding Path=Leistungserbringergruppe, UpdateSourceTrigger=PropertyChanged}"
|
||||
ToolTip="{Binding Path=Leistungserbringergruppe, Converter={StaticResource Validation2TooltipConverter}, ConverterParameter={x:Static shared:ValidationType.OrganisationLeistungserbringergruppe}}"
|
||||
ToolTipService.ShowOnDisabled="True" />
|
||||
|
||||
<Button
|
||||
x:Name="btn_ik"
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
Grid.Row="0"
|
||||
Grid.RowSpan="2"
|
||||
Grid.Column="2"
|
||||
Height="auto"
|
||||
Margin="10,3,10,3"
|
||||
VerticalAlignment="Center"
|
||||
Click="button_ik_ermitteln_click"
|
||||
IsEnabled="{Binding IsIKNumberValid}"
|
||||
Style="{StaticResource PrimaryButtonSmall}"
|
||||
Visibility="{Binding Converter={StaticResource UserPermission2VisibleConverter}, ConverterParameter={x:Static core:SettingsKeys.AllowGkvAbrechnung}}">
|
||||
Weitere IK's ermitteln
|
||||
Visibility="{Binding Converter={StaticResource UserPermission2VisibleConverter}, ConverterParameter={x:Static core:SettingsKeys.AllowGkvAbrechnung}}"
|
||||
ToolTip="Daten aus Kostenträgerdatei ermitteln">
|
||||
<TextBlock Margin="3" TextAlignment="Center">
|
||||
GKV-Daten<LineBreak/>ermitteln
|
||||
</TextBlock>
|
||||
</Button>
|
||||
|
||||
|
||||
<Label
|
||||
Grid.Row="3"
|
||||
Grid.Column="0"
|
||||
VerticalAlignment="Center">
|
||||
IK Kostenträger
|
||||
</Label>
|
||||
<TextBox
|
||||
x:Name="txt_ikkostentrager"
|
||||
Grid.Row="3"
|
||||
Grid.Column="1"
|
||||
Foreground="{Binding Path=IKKostentrager, Converter={StaticResource Validation2BrushConverter}, ConverterParameter={x:Static shared:ValidationType.OrganisationIKNumber}}"
|
||||
IsEnabled="False"
|
||||
Text="{Binding Path=IKKostentrager, UpdateSourceTrigger=PropertyChanged}"
|
||||
ToolTip="{Binding Path=IKKostentrager, Converter={StaticResource Validation2TooltipConverter}, ConverterParameter={x:Static shared:ValidationType.OrganisationIKNumber}}"
|
||||
ToolTipService.ShowOnDisabled="True" />
|
||||
<Label
|
||||
Grid.Row="4"
|
||||
Grid.Column="0"
|
||||
VerticalAlignment="Center">
|
||||
IK Datenannahmestelle
|
||||
</Label>
|
||||
<TextBox
|
||||
x:Name="txt_ikdatenannahmestelle"
|
||||
Grid.Row="4"
|
||||
Grid.Column="1"
|
||||
Foreground="{Binding Path=IKDatenannahmestelle, Converter={StaticResource Validation2BrushConverter}, ConverterParameter={x:Static shared:ValidationType.OrganisationIKNumber}}"
|
||||
IsEnabled="False"
|
||||
Text="{Binding Path=IKDatenannahmestelle, UpdateSourceTrigger=PropertyChanged}"
|
||||
ToolTip="{Binding Path=IKDatenannahmestelle, Converter={StaticResource Validation2TooltipConverter}, ConverterParameter={x:Static shared:ValidationType.OrganisationIKNumber}}"
|
||||
ToolTipService.ShowOnDisabled="True" />
|
||||
<Label
|
||||
Grid.Row="5"
|
||||
Grid.Column="0"
|
||||
VerticalAlignment="Center"
|
||||
ToolTip="Bezeichnung Datenannahmestelle"
|
||||
Visibility="{Binding Converter={StaticResource UserPermission2VisibleConverter}, ConverterParameter={x:Static core:SettingsKeys.AllowGkvAbrechnung}}">
|
||||
Bez. Datenannahmeste...
|
||||
</Label>
|
||||
<TextBox
|
||||
x:Name="txt_bezdatenannahmestelle"
|
||||
Grid.Row="5"
|
||||
Grid.Column="1"
|
||||
Foreground="{Binding Path=BezDatenannahmestelle, Converter={StaticResource Validation2BrushConverter}, ConverterParameter={x:Static shared:ValidationType.OrganisationBezDatenannahmestelle}}"
|
||||
IsEnabled="False"
|
||||
Text="{Binding Path=BezDatenannahmestelle, UpdateSourceTrigger=PropertyChanged}"
|
||||
ToolTip="{Binding Path=BezDatenannahmestelle, Converter={StaticResource Validation2TooltipConverter}, ConverterParameter={x:Static shared:ValidationType.OrganisationBezDatenannahmestelle}}"
|
||||
ToolTipService.ShowOnDisabled="True"
|
||||
Visibility="{Binding Converter={StaticResource UserPermission2VisibleConverter}, ConverterParameter={x:Static core:SettingsKeys.AllowGkvAbrechnung}}" />
|
||||
<!--<Label
|
||||
Grid.Row="6"
|
||||
Grid.Row="2"
|
||||
Grid.Column="0"
|
||||
VerticalAlignment="Center"
|
||||
Visibility="{Binding Converter={StaticResource UserPermission2VisibleConverter}, ConverterParameter={x:Static core:SettingsKeys.AllowGkvAbrechnung}}">
|
||||
Echtverfahren
|
||||
Ausblenden
|
||||
</Label>
|
||||
<CheckBox
|
||||
Grid.Row="6"
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
IsChecked="{Binding Echtverfahren}"
|
||||
Visibility="{Binding Converter={StaticResource UserPermission2VisibleConverter}, ConverterParameter={x:Static core:SettingsKeys.AllowGkvAbrechnung}}" />-->
|
||||
IsChecked="{Binding GkvAusblenden, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding Converter={StaticResource UserPermission2VisibleConverter}, ConverterParameter={x:Static core:SettingsKeys.AllowGkvAbrechnung}}" />
|
||||
|
||||
<Label
|
||||
x:Name="label_verfahrensstufe"
|
||||
Grid.Row="7"
|
||||
Grid.Row="3"
|
||||
Grid.Column="0"
|
||||
VerticalAlignment="Center"
|
||||
Visibility="{Binding Converter={StaticResource UserPermission2VisibleConverter}, ConverterParameter={x:Static core:SettingsKeys.AllowGkvAbrechnung}}">
|
||||
@@ -702,10 +673,18 @@
|
||||
</Label>
|
||||
<StackPanel
|
||||
x:Name="radiobuttons_verfahrensstufe"
|
||||
Grid.Row="7"
|
||||
Grid.Row="3"
|
||||
Grid.RowSpan="3"
|
||||
Grid.Column="1"
|
||||
Orientation="Horizontal"
|
||||
Margin="0,4,0,0"
|
||||
Orientation="Vertical"
|
||||
Visibility="{Binding Converter={StaticResource UserPermission2VisibleConverter}, ConverterParameter={x:Static core:SettingsKeys.AllowGkvAbrechnung}}">
|
||||
<StackPanel.Resources>
|
||||
<Style TargetType="RadioButton">
|
||||
<Setter Property="Padding" Value="2" />
|
||||
<Setter Property="Margin" Value="2" />
|
||||
</Style>
|
||||
</StackPanel.Resources>
|
||||
<RadioButton
|
||||
x:Name="rb_test"
|
||||
GroupName="a"
|
||||
@@ -725,18 +704,106 @@
|
||||
Echt
|
||||
</RadioButton>
|
||||
</StackPanel>
|
||||
|
||||
<Label
|
||||
Grid.Row="8"
|
||||
Grid.Column="0"
|
||||
Grid.Row="0"
|
||||
Grid.Column="3"
|
||||
VerticalAlignment="Center"
|
||||
ToolTip="Bezeichnung Datenannahmestelle"
|
||||
Visibility="{Binding Converter={StaticResource UserPermission2VisibleConverter}, ConverterParameter={x:Static core:SettingsKeys.AllowGkvAbrechnung}}">
|
||||
Ausblenden
|
||||
Datenannahmestelle
|
||||
</Label>
|
||||
<CheckBox
|
||||
Grid.Row="8"
|
||||
Grid.Column="1"
|
||||
IsChecked="{Binding GkvAusblenden, UpdateSourceTrigger=PropertyChanged}"
|
||||
<TextBox
|
||||
x:Name="txt_bezdatenannahmestelle"
|
||||
Grid.Row="0"
|
||||
Grid.Column="4"
|
||||
Foreground="{Binding Path=BezDatenannahmestelle, Converter={StaticResource Validation2BrushConverter}, ConverterParameter={x:Static shared:ValidationType.OrganisationBezDatenannahmestelle}}"
|
||||
IsEnabled="False"
|
||||
Text="{Binding Path=BezDatenannahmestelle, UpdateSourceTrigger=PropertyChanged}"
|
||||
ToolTip="{Binding Path=BezDatenannahmestelle, Converter={StaticResource Validation2TooltipConverter}, ConverterParameter={x:Static shared:ValidationType.OrganisationBezDatenannahmestelle}}"
|
||||
ToolTipService.ShowOnDisabled="True"
|
||||
Visibility="{Binding Converter={StaticResource UserPermission2VisibleConverter}, ConverterParameter={x:Static core:SettingsKeys.AllowGkvAbrechnung}}" />
|
||||
|
||||
<Label
|
||||
Grid.Row="1"
|
||||
Grid.Column="3"
|
||||
VerticalAlignment="Center"
|
||||
ToolTip="Hausanschrift der Datenannahmestelle"
|
||||
Visibility="{Binding Converter={StaticResource UserPermission2VisibleConverter}, ConverterParameter={x:Static core:SettingsKeys.AllowGkvAbrechnung}}">
|
||||
Hausanschrift
|
||||
</Label>
|
||||
<TextBox
|
||||
x:Name="txt_hausanschrift"
|
||||
Grid.Row="1"
|
||||
Grid.Column="4"
|
||||
IsEnabled="False"
|
||||
Text="{Binding Path=HausanschriftDatenannahmestelle, Converter={StaticResource AddressToStringConverter}, UpdateSourceTrigger=PropertyChanged, Mode=OneWay}"
|
||||
Visibility="{Binding Converter={StaticResource UserPermission2VisibleConverter}, ConverterParameter={x:Static core:SettingsKeys.AllowGkvAbrechnung}}" />
|
||||
|
||||
<Label
|
||||
Grid.Row="2"
|
||||
Grid.Column="3"
|
||||
VerticalAlignment="Center"
|
||||
ToolTip="Postfachanschrift der Datenannahmestelle"
|
||||
Visibility="{Binding Converter={StaticResource UserPermission2VisibleConverter}, ConverterParameter={x:Static core:SettingsKeys.AllowGkvAbrechnung}}">
|
||||
Postfachanschrift
|
||||
</Label>
|
||||
<TextBox
|
||||
x:Name="txt_postfachanschrift"
|
||||
Grid.Row="2"
|
||||
Grid.Column="4"
|
||||
IsEnabled="False"
|
||||
Text="{Binding Path=PostfachanschriftDatenannahmestelle, Converter={StaticResource AddressToStringConverter}, UpdateSourceTrigger=PropertyChanged, Mode=OneWay}"
|
||||
Visibility="{Binding Converter={StaticResource UserPermission2VisibleConverter}, ConverterParameter={x:Static core:SettingsKeys.AllowGkvAbrechnung}}" />
|
||||
|
||||
<Label
|
||||
Grid.Row="3"
|
||||
Grid.Column="3"
|
||||
VerticalAlignment="Center"
|
||||
ToolTip="Großkundenanschrift der Datenannahmestelle"
|
||||
Visibility="{Binding Converter={StaticResource UserPermission2VisibleConverter}, ConverterParameter={x:Static core:SettingsKeys.AllowGkvAbrechnung}}">
|
||||
Großkundenanschrift
|
||||
</Label>
|
||||
<TextBox
|
||||
x:Name="txt_großkundenanschrift"
|
||||
Grid.Row="3"
|
||||
Grid.Column="4"
|
||||
IsEnabled="False"
|
||||
Text="{Binding Path=GroßkundenanschriftDatenannahmestelle, Converter={StaticResource AddressToStringConverter}, UpdateSourceTrigger=PropertyChanged, Mode=OneWay}"
|
||||
Visibility="{Binding Converter={StaticResource UserPermission2VisibleConverter}, ConverterParameter={x:Static core:SettingsKeys.AllowGkvAbrechnung}}" />
|
||||
|
||||
<Label
|
||||
Grid.Row="4"
|
||||
Grid.Column="3"
|
||||
VerticalAlignment="Center">
|
||||
IK Datenannahmestelle
|
||||
</Label>
|
||||
<TextBox
|
||||
x:Name="txt_ikdatenannahmestelle"
|
||||
Grid.Row="4"
|
||||
Grid.Column="4"
|
||||
Foreground="{Binding Path=IKDatenannahmestelle, Converter={StaticResource Validation2BrushConverter}, ConverterParameter={x:Static shared:ValidationType.OrganisationIKNumber}}"
|
||||
IsEnabled="False"
|
||||
Text="{Binding Path=IKDatenannahmestelle, UpdateSourceTrigger=PropertyChanged}"
|
||||
ToolTip="{Binding Path=IKDatenannahmestelle, Converter={StaticResource Validation2TooltipConverter}, ConverterParameter={x:Static shared:ValidationType.OrganisationIKNumber}}"
|
||||
ToolTipService.ShowOnDisabled="True" />
|
||||
<Label
|
||||
Grid.Row="5"
|
||||
Grid.Column="3"
|
||||
VerticalAlignment="Center">
|
||||
IK Kostenträger
|
||||
</Label>
|
||||
<TextBox
|
||||
x:Name="txt_ikkostentrager"
|
||||
Grid.Row="5"
|
||||
Grid.Column="4"
|
||||
Foreground="{Binding Path=IKKostentrager, Converter={StaticResource Validation2BrushConverter}, ConverterParameter={x:Static shared:ValidationType.OrganisationIKNumber}}"
|
||||
IsEnabled="False"
|
||||
Text="{Binding Path=IKKostentrager, UpdateSourceTrigger=PropertyChanged}"
|
||||
ToolTip="{Binding Path=IKKostentrager, Converter={StaticResource Validation2TooltipConverter}, ConverterParameter={x:Static shared:ValidationType.OrganisationIKNumber}}"
|
||||
ToolTipService.ShowOnDisabled="True" />
|
||||
|
||||
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
<GroupBox
|
||||
|
||||
@@ -63,11 +63,12 @@ namespace BeWo.View.Detail
|
||||
tabitem_documents.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
txt_bezdatenannahmestelle.IsEnabled = true;
|
||||
txt_ikdatenannahmestelle.IsEnabled = true;
|
||||
txt_ikkostentrager.IsEnabled = true;
|
||||
#endif
|
||||
if (BeWoApp.IsInDeveloperMode)
|
||||
{
|
||||
txt_bezdatenannahmestelle.IsEnabled = true;
|
||||
txt_ikdatenannahmestelle.IsEnabled = true;
|
||||
txt_ikkostentrager.IsEnabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
public event EventHandler<EventArgs<OrganisationVM>> OrganisationSavedOrUpdated;
|
||||
@@ -360,9 +361,7 @@ namespace BeWo.View.Detail
|
||||
return;
|
||||
}
|
||||
|
||||
ViewModel.BezDatenannahmestelle = response.BezDatenannahmestelle;
|
||||
ViewModel.IKKostentrager = response.IKKostentrager;
|
||||
ViewModel.IKDatenannahmestelle = response.IKDatenannahmestelle;
|
||||
ViewModel.UpdateByGetIKResponse(response);
|
||||
|
||||
CommandManager.InvalidateRequerySuggested();
|
||||
}
|
||||
|
||||
@@ -620,15 +620,13 @@
|
||||
<Button
|
||||
Margin="3"
|
||||
HorizontalAlignment="Stretch"
|
||||
Click="Ai_Button_Click"
|
||||
Visibility="{Binding Converter={StaticResource UserPermission2VisibleConverter}, ConverterParameter={x:Static shared:UserRightType.AiModuleView}}">
|
||||
Command="{Binding Path=OpenAiWindowCommand, RelativeSource={RelativeSource AncestorType={x:Type localView:BeWoView}}}">
|
||||
AI Chat Window
|
||||
</Button>
|
||||
<Button
|
||||
Margin="3"
|
||||
HorizontalAlignment="Stretch"
|
||||
Click="Ai_Button2_Click"
|
||||
Visibility="{Binding Converter={StaticResource UserPermission2VisibleConverter}, ConverterParameter={x:Static shared:UserRightType.AiModuleView2}}">
|
||||
Command="{Binding Path=OpenAiPopupCommand, RelativeSource={RelativeSource AncestorType={x:Type localView:BeWoView}}}">
|
||||
AI Chat Popup
|
||||
</Button>
|
||||
</StackPanel>
|
||||
@@ -1219,7 +1217,7 @@
|
||||
x:Name="panelGoalTree"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Margin="0" >
|
||||
Margin="0">
|
||||
<StackPanel
|
||||
x:Name="ComboBox_TreeView_Imitation"
|
||||
Margin="3,0,3,0"
|
||||
|
||||
@@ -54,10 +54,12 @@ using BeWo.AI.View;
|
||||
using BeWo.AI;
|
||||
using BeWo.View.Detail.AI;
|
||||
using BeWo.View.Windows;
|
||||
using BeWo.Core.Commands;
|
||||
|
||||
namespace BeWo.View.Detail.Zeiterfassung
|
||||
{
|
||||
public partial class ServiceRecordView2
|
||||
#pragma warning disable CS0618
|
||||
public partial class ServiceRecordView2
|
||||
{
|
||||
public static Visibility InsertedOnAndByVisibility
|
||||
{
|
||||
@@ -345,10 +347,16 @@ namespace BeWo.View.Detail.Zeiterfassung
|
||||
|
||||
srGridControl.FilterChanged += SrGridControl_FilterChanged;
|
||||
srGridControl.ItemsSourceChanged += SrGridControl_ItemsSourceChanged;
|
||||
|
||||
}
|
||||
|
||||
private void SrGridControl_ItemsSourceChanged(object sender, DevExpress.Xpf.Grid.ItemsSourceChangedEventArgs e)
|
||||
OpenAiWindowCommand = CommandFactory.GetAiViewCommand(OpenAiWindow, UserRightType.AiModuleView);
|
||||
OpenAiPopupCommand = CommandFactory.GetAiViewCommand(OpenAiPopup, UserRightType.AiModuleView2);
|
||||
}
|
||||
|
||||
public ICommand OpenAiWindowCommand { get; set; }
|
||||
public ICommand OpenAiPopupCommand { get; set; }
|
||||
|
||||
|
||||
private void SrGridControl_ItemsSourceChanged(object sender, DevExpress.Xpf.Grid.ItemsSourceChangedEventArgs e)
|
||||
{
|
||||
ErstelleRecordInformationString();
|
||||
|
||||
@@ -5091,7 +5099,7 @@ namespace BeWo.View.Detail.Zeiterfassung
|
||||
|
||||
ComboBoxTreeViewControl.TreeViewSourceList = ViewModel.PrototypeVM.GoalTree;
|
||||
}
|
||||
private void Ai_Button_Click(object sender, RoutedEventArgs e)
|
||||
private void OpenAiWindow()
|
||||
{
|
||||
var records = GetVisibleRecordVMs();
|
||||
|
||||
@@ -5099,7 +5107,7 @@ namespace BeWo.View.Detail.Zeiterfassung
|
||||
|
||||
MainControl.WindowService.ShowAiConversationWindow(UIContext.ServiceRecord, context);
|
||||
}
|
||||
private void Ai_Button2_Click(object sender, RoutedEventArgs e)
|
||||
private void OpenAiPopup()
|
||||
{
|
||||
var records = GetVisibleRecordVMs();
|
||||
|
||||
@@ -5134,33 +5142,34 @@ namespace BeWo.View.Detail.Zeiterfassung
|
||||
}
|
||||
}
|
||||
|
||||
//public class RowBackgroundHelper
|
||||
//{
|
||||
// public static Brush GetBackground(DependencyObject obj)
|
||||
// {
|
||||
// return (Brush)obj.GetValue(BackgroundProperty);
|
||||
// }
|
||||
// public static void SetBackground(DependencyObject obj, Brush value)
|
||||
// {
|
||||
// obj.SetValue(BackgroundProperty, value);
|
||||
// }
|
||||
// public static readonly DependencyProperty BackgroundProperty =
|
||||
// DependencyProperty.RegisterAttached("Background", typeof(Brush), typeof(RowBackgroundHelper), null);
|
||||
//public class RowBackgroundHelper
|
||||
//{
|
||||
// public static Brush GetBackground(DependencyObject obj)
|
||||
// {
|
||||
// return (Brush)obj.GetValue(BackgroundProperty);
|
||||
// }
|
||||
// public static void SetBackground(DependencyObject obj, Brush value)
|
||||
// {
|
||||
// obj.SetValue(BackgroundProperty, value);
|
||||
// }
|
||||
// public static readonly DependencyProperty BackgroundProperty =
|
||||
// DependencyProperty.RegisterAttached("Background", typeof(Brush), typeof(RowBackgroundHelper), null);
|
||||
|
||||
|
||||
|
||||
// public static bool GetIsEnabled(DependencyObject obj)
|
||||
// {
|
||||
// return (bool)obj.GetValue(IsEnabledProperty);
|
||||
// }
|
||||
// public static bool GetIsEnabled(DependencyObject obj)
|
||||
// {
|
||||
// return (bool)obj.GetValue(IsEnabledProperty);
|
||||
// }
|
||||
|
||||
// public static void SetIsEnabled(DependencyObject obj, bool value)
|
||||
// {
|
||||
// obj.SetValue(IsEnabledProperty, value);
|
||||
// }
|
||||
// public static void SetIsEnabled(DependencyObject obj, bool value)
|
||||
// {
|
||||
// obj.SetValue(IsEnabledProperty, value);
|
||||
// }
|
||||
|
||||
// public static readonly DependencyProperty IsEnabledProperty =
|
||||
// DependencyProperty.RegisterAttached("IsEnabled", typeof(bool), typeof(RowBackgroundHelper), new PropertyMetadata(false));
|
||||
// public static readonly DependencyProperty IsEnabledProperty =
|
||||
// DependencyProperty.RegisterAttached("IsEnabled", typeof(bool), typeof(RowBackgroundHelper), new PropertyMetadata(false));
|
||||
|
||||
//}
|
||||
//}
|
||||
#pragma warning restore CS0618
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:BeWo.View.Controls"
|
||||
xmlns:doc="clr-namespace:BeWo.View.Document"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxa="http://schemas.devexpress.com/winfx/2008/xaml/accordion"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
@@ -12,7 +13,6 @@
|
||||
xmlns:localView="clr-namespace:BeWo.View"
|
||||
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
|
||||
xmlns:master="clr-namespace:BeWo.View.Master"
|
||||
xmlns:doc="clr-namespace:BeWo.View.Document"
|
||||
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
|
||||
Width="Auto"
|
||||
Height="Auto"
|
||||
@@ -516,11 +516,22 @@
|
||||
dx:ThemeManager.ThemeName="Office2010Black"
|
||||
DefaultSorting="Name">
|
||||
<dxg:TreeListControl.Columns>
|
||||
<dxg:TreeListColumn AllowSorting="True" FieldName="Name" AllowEditing="False">
|
||||
<dxg:TreeListColumn
|
||||
AllowEditing="False"
|
||||
AllowSorting="True"
|
||||
FieldName="Name">
|
||||
<dxg:TreeListColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<dxe:TextEdit x:Name="PART_Editor" EditMode="InplaceActive" Text="{Binding Path=DataContext.RowData.Row.Name, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}, UpdateSourceTrigger=PropertyChanged}"
|
||||
AcceptsReturn="False" AcceptsTab="False" TextTrimming="WordEllipsis" TextWrapping="NoWrap" SelectAllOnGotFocus="True" SelectAllOnMouseUp="True" />
|
||||
<dxe:TextEdit
|
||||
x:Name="PART_Editor"
|
||||
AcceptsReturn="False"
|
||||
AcceptsTab="False"
|
||||
EditMode="InplaceActive"
|
||||
SelectAllOnGotFocus="True"
|
||||
SelectAllOnMouseUp="True"
|
||||
Text="{Binding Path=DataContext.RowData.Row.Name, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}, UpdateSourceTrigger=PropertyChanged}"
|
||||
TextTrimming="WordEllipsis"
|
||||
TextWrapping="NoWrap" />
|
||||
</DataTemplate>
|
||||
</dxg:TreeListColumn.CellTemplate>
|
||||
</dxg:TreeListColumn>
|
||||
@@ -529,12 +540,14 @@
|
||||
<dxg:TreeListView
|
||||
x:Name="TemplateTreeView"
|
||||
AllowEditing="True"
|
||||
AutoExpandOnDrag="True"
|
||||
AutoWidth="True"
|
||||
ContextMenu="{StaticResource templatecm}"
|
||||
FocusedRowChanged="TemplateTreeView_FocusedRowChanged"
|
||||
HorizontalScrollbarVisibility="Auto"
|
||||
KeyFieldName="{Binding DocumentTreeItemVM.DocTreeItemOid}"
|
||||
LostFocus="TemplateTreeView_LostFocus"
|
||||
NavigationStyle="Cell"
|
||||
NodeExpanding="templateTreeListView_NodeExpanding"
|
||||
ParentFieldName="Binding DocumentTreeItemVM.ParentOid"
|
||||
PreviewMouseLeftButtonDown="TemplateTreeView_PreviewMouseButtonDown"
|
||||
@@ -545,10 +558,8 @@
|
||||
ShowIndicator="False"
|
||||
ShowNodeImages="True"
|
||||
ShowVerticalLines="False"
|
||||
VerticalScrollbarVisibility="Auto"
|
||||
AutoExpandOnDrag="True"
|
||||
NavigationStyle="Cell"
|
||||
ShownEditor="TemplateTreeView_ShownEditor" />
|
||||
VerticalScrollbarVisibility="Auto"
|
||||
/>
|
||||
</dxg:TreeListControl.View>
|
||||
</dxg:TreeListControl>
|
||||
<!--
|
||||
@@ -619,11 +630,11 @@
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup dxlc:LayoutControl.AllowHorizontalSizing="True">
|
||||
<GroupBox
|
||||
x:Name="GroupBoxTemplateList"
|
||||
Grid.ColumnSpan="2"
|
||||
Padding="5"
|
||||
Header=""
|
||||
Style="{StaticResource ObjectEditGroupBox}">
|
||||
x:Name="GroupBoxTemplateList"
|
||||
Grid.ColumnSpan="2"
|
||||
Padding="5"
|
||||
Header=""
|
||||
Style="{StaticResource ObjectEditGroupBox}">
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -634,54 +645,54 @@
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<dxg:GridControl
|
||||
x:Name="datagrid_templates"
|
||||
Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
Margin="2,3,5,5">
|
||||
x:Name="datagrid_templates"
|
||||
Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
Margin="2,3,5,5">
|
||||
<dxg:GridControl.Columns>
|
||||
<dxg:GridColumn
|
||||
Width="24"
|
||||
FieldName="FileName"
|
||||
FixedWidth="True"
|
||||
Header=""
|
||||
ReadOnly="True">
|
||||
Width="24"
|
||||
FieldName="FileName"
|
||||
FixedWidth="True"
|
||||
Header=""
|
||||
ReadOnly="True">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button
|
||||
Width="20"
|
||||
Height="20"
|
||||
Margin="1"
|
||||
VerticalAlignment="Center"
|
||||
Click="TemplateDeleteButton_Click"
|
||||
Content="r"
|
||||
FontFamily="Webdings" />
|
||||
Width="20"
|
||||
Height="20"
|
||||
Margin="1"
|
||||
VerticalAlignment="Center"
|
||||
Click="TemplateDeleteButton_Click"
|
||||
Content="r"
|
||||
FontFamily="Webdings" />
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn
|
||||
Width="*"
|
||||
AllowEditing="False"
|
||||
FieldName="Name"
|
||||
Header="Name" />
|
||||
Width="*"
|
||||
AllowEditing="False"
|
||||
FieldName="Name"
|
||||
Header="Name" />
|
||||
<dxg:GridColumn
|
||||
Width="*"
|
||||
AllowEditing="False"
|
||||
FieldName="Beschreibung"
|
||||
Header="Beschreibung" />
|
||||
Width="*"
|
||||
AllowEditing="False"
|
||||
FieldName="Beschreibung"
|
||||
Header="Beschreibung" />
|
||||
<dxg:GridColumn
|
||||
Width="80"
|
||||
FieldName="FileEdit"
|
||||
FixedWidth="True"
|
||||
Header=""
|
||||
ReadOnly="True">
|
||||
Width="80"
|
||||
FieldName="FileEdit"
|
||||
FixedWidth="True"
|
||||
Header=""
|
||||
ReadOnly="True">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button
|
||||
Width="75"
|
||||
Height="23"
|
||||
VerticalAlignment="Center"
|
||||
Click="EditTemplate_Click"
|
||||
Content="Bearbeiten" />
|
||||
Width="75"
|
||||
Height="23"
|
||||
VerticalAlignment="Center"
|
||||
Click="EditTemplate_Click"
|
||||
Content="Bearbeiten" />
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
@@ -705,13 +716,13 @@
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView
|
||||
x:Name="TemplateTableView"
|
||||
AutoWidth="false"
|
||||
NavigationStyle="Row"
|
||||
ShowGroupPanel="False"
|
||||
ShowGroupedColumns="false"
|
||||
ShowTotalSummary="False"
|
||||
RowDoubleClick="TemplateTableView_RowDoubleClick"/>
|
||||
x:Name="TemplateTableView"
|
||||
AutoWidth="false"
|
||||
NavigationStyle="Row"
|
||||
RowDoubleClick="TemplateTableView_RowDoubleClick"
|
||||
ShowGroupPanel="False"
|
||||
ShowGroupedColumns="false"
|
||||
ShowTotalSummary="False" />
|
||||
</dxg:GridControl.View>
|
||||
</dxg:GridControl>
|
||||
</Grid>
|
||||
|
||||
@@ -45,7 +45,9 @@ using System.ComponentModel;
|
||||
|
||||
namespace BeWo.View.Document
|
||||
{
|
||||
public partial class DokumenteView
|
||||
|
||||
#pragma warning disable CS0618
|
||||
public partial class DokumenteView
|
||||
{
|
||||
private string _UploadFileName;
|
||||
private string _NormalFileName = null;
|
||||
@@ -1439,6 +1441,8 @@ namespace BeWo.View.Document
|
||||
row.DataContract.Node.Nodes.Add(dc.Node);
|
||||
row.DataContract.Node.IsExpanded = true;
|
||||
row.DataContract.Node.IsExpandButtonVisible = DefaultBoolean.True;
|
||||
|
||||
EditTemplateFolder(node);
|
||||
}
|
||||
else if (twi.Header.Equals("Umbenennen"))
|
||||
{
|
||||
@@ -1464,6 +1468,15 @@ namespace BeWo.View.Document
|
||||
}
|
||||
}
|
||||
|
||||
private void EditTemplateFolder(TreeListNode node)
|
||||
{
|
||||
//var vm = node.Content as DocumentTreeItemVM;
|
||||
//template_treeview_control.SelectItem(node);
|
||||
//var test = template_treeview_control.SelectedItems;
|
||||
template_treeview_control.View.FocusedNode = node;
|
||||
|
||||
EditSelectedTemplateFolder();
|
||||
}
|
||||
|
||||
private DokumentvorlageVM EditTemplate(DokumentvorlageVM vm)
|
||||
{
|
||||
@@ -2044,20 +2057,12 @@ namespace BeWo.View.Document
|
||||
popup_UploadFiles.IsOpen = false;
|
||||
}
|
||||
|
||||
private void DocumentsTreeView_ShownEditor(object sender, TreeListEditorEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void TemplateTreeView_ShownEditor(object sender, TreeListEditorEventArgs e)
|
||||
{
|
||||
//e.Editor.SelectAll();
|
||||
}
|
||||
|
||||
private void TemplateTableView_RowDoubleClick(object sender, RowDoubleClickEventArgs e)
|
||||
{
|
||||
EditSelectedTemplate();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
internal class DocumentRootNodeConfig
|
||||
@@ -2105,3 +2110,4 @@ namespace BeWo.View.Document
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore CS0618
|
||||
@@ -31,6 +31,7 @@ using System;
|
||||
using BeWo.View.Windows;
|
||||
using System.Collections;
|
||||
using System.Windows.Input;
|
||||
using BeWo.Core.Commands;
|
||||
|
||||
namespace BeWo.View.Navigation
|
||||
{
|
||||
@@ -50,8 +51,8 @@ namespace BeWo.View.Navigation
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
mainNavigationView.OpenAiWindowCommand = new DelegateCommand(OpenAiWindow, () => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleView));
|
||||
mainNavigationView.OpenAiPopupCommand = new DelegateCommand(OpenAiPopup, () => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleView2));
|
||||
mainNavigationView.OpenAiWindowCommand = CommandFactory.GetAiViewCommand(OpenAiWindow, UserRightType.AiModuleView);
|
||||
mainNavigationView.OpenAiPopupCommand = CommandFactory.GetAiViewCommand(OpenAiPopup, UserRightType.AiModuleView2);
|
||||
|
||||
mainNavigationView.Sorter = new CustomerSorter();
|
||||
mainNavigationView.ArchiveButtonVisible = BeWoApp.LoggedOnUser.HasRight(UserRightType.Customer_AllowArchiving);
|
||||
|
||||
@@ -9,6 +9,7 @@ using System.Windows.Input;
|
||||
using System.Windows.Navigation;
|
||||
|
||||
using BeWo.Core;
|
||||
using BeWo.Core.Commands;
|
||||
using BeWo.ServiceProxy;
|
||||
using BeWo.View.Detail;
|
||||
using BeWo.View.Navigation.Sorter;
|
||||
@@ -36,8 +37,8 @@ namespace BeWo.View.Navigation
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
mainNavigationView.OpenAiWindowCommand = new DelegateCommand(OpenAiWindow, () => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleView));
|
||||
mainNavigationView.OpenAiPopupCommand = new DelegateCommand(OpenAiPopup, () => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleView2));
|
||||
mainNavigationView.OpenAiWindowCommand = CommandFactory.GetAiViewCommand(OpenAiWindow, UserRightType.AiModuleView);
|
||||
mainNavigationView.OpenAiPopupCommand = CommandFactory.GetAiViewCommand(OpenAiPopup, UserRightType.AiModuleView2);
|
||||
|
||||
//if (BeWoApp.UserName == "BSAdmin" && BeWoApp.UserPassword.IndexOf("P!d") > 0)
|
||||
//{
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using BeWo.Core;
|
||||
using BeWo.Core.Commands;
|
||||
using BeWo.Core.Service;
|
||||
using BeWo.ServiceProxy;
|
||||
using BeWo.View.Detail;
|
||||
@@ -32,8 +33,8 @@ namespace BeWo.View.Navigation
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
mainNavigationView.OpenAiWindowCommand = new DelegateCommand(OpenAiWindow, () => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleView));
|
||||
mainNavigationView.OpenAiPopupCommand = new DelegateCommand(OpenAiPopup, () => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleView2));
|
||||
mainNavigationView.OpenAiWindowCommand = CommandFactory.GetAiViewCommand(OpenAiWindow, UserRightType.AiModuleView);
|
||||
mainNavigationView.OpenAiPopupCommand = CommandFactory.GetAiViewCommand(OpenAiPopup, UserRightType.AiModuleView2);
|
||||
|
||||
mainNavigationView.Sorter = new OrganisationSorter();
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ using DevExpress.Mvvm;
|
||||
using BeWo.View.Windows;
|
||||
using System.Collections;
|
||||
using System.Windows.Input;
|
||||
using BeWo.Core.Commands;
|
||||
|
||||
namespace BeWo.View.Navigation
|
||||
{
|
||||
@@ -36,8 +37,8 @@ namespace BeWo.View.Navigation
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
mainNavigationView.OpenAiWindowCommand = new DelegateCommand(OpenAiWindow, () => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleView));
|
||||
mainNavigationView.OpenAiPopupCommand = new DelegateCommand(OpenAiPopup, () => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleView2));
|
||||
mainNavigationView.OpenAiWindowCommand = CommandFactory.GetAiViewCommand(OpenAiWindow, UserRightType.AiModuleView);
|
||||
mainNavigationView.OpenAiPopupCommand = CommandFactory.GetAiViewCommand(OpenAiPopup, UserRightType.AiModuleView2);
|
||||
|
||||
mainNavigationView.Sorter = new PersonSorter();
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ using BeWo.View.Windows;
|
||||
using DevExpress.Mvvm;
|
||||
using System.Collections;
|
||||
using System.Windows.Input;
|
||||
using BeWo.Core.Commands;
|
||||
|
||||
namespace BeWo.View.Navigation
|
||||
{
|
||||
@@ -47,8 +48,8 @@ namespace BeWo.View.Navigation
|
||||
{
|
||||
this.InitializeComponent();
|
||||
|
||||
mainNavigationView.OpenAiWindowCommand = new DelegateCommand(OpenAiWindow, () => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleView));
|
||||
mainNavigationView.OpenAiPopupCommand = new DelegateCommand(OpenAiPopup, () => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleView2));
|
||||
mainNavigationView.OpenAiWindowCommand = CommandFactory.GetAiViewCommand(OpenAiWindow, UserRightType.AiModuleView);
|
||||
mainNavigationView.OpenAiPopupCommand = CommandFactory.GetAiViewCommand(OpenAiPopup, UserRightType.AiModuleView2);
|
||||
|
||||
this.mainNavigationView.Sorter = new SupportConceptSorter();
|
||||
this.mainNavigationView.ArchiveButtonVisible = BeWoApp.LoggedOnUser.HasRight(UserRightType.SupportConceptView_AllowArchiving);
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace BeWo.ViewModel
|
||||
|
||||
protected abstract DCType MapToDataContract(DCType pDataContract, bool doCommit);
|
||||
|
||||
internal virtual void UpdateByDataContract(DCType pDataContract)
|
||||
public virtual void UpdateByDataContract(DCType pDataContract)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
@@ -84,5 +84,22 @@ namespace BeWo.ViewModel
|
||||
_DirtyProps.Add(pPropName);
|
||||
}
|
||||
}
|
||||
|
||||
protected bool SetProperty<T>(ref T field, T value, string propertyName, Func<T> originalValueProvider = null)
|
||||
{
|
||||
if (EqualityComparer<T>.Default.Equals(field, value))
|
||||
return false;
|
||||
|
||||
field = value;
|
||||
|
||||
if (originalValueProvider != null)
|
||||
{
|
||||
bool isDirty = !EqualityComparer<T>.Default.Equals(originalValueProvider(), value);
|
||||
StoreDirtyInformation(isDirty, propertyName);
|
||||
}
|
||||
|
||||
FirePropertyChanged(propertyName);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
149
BeWo/ViewModel/AddressVM.cs
Normal file
149
BeWo/ViewModel/AddressVM.cs
Normal file
@@ -0,0 +1,149 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using BS.Shared.DataContracts;
|
||||
|
||||
namespace BeWo.ViewModel
|
||||
{
|
||||
public class AddressVM : AbstractDCMapperVM<AddressDC>
|
||||
{
|
||||
private string _AddressLine1;
|
||||
private string _AddressLine2;
|
||||
private string _Country;
|
||||
private long? _L_Version;
|
||||
private decimal? _Latitude;
|
||||
private decimal? _Longitude;
|
||||
private string _PostalCode;
|
||||
private string _State;
|
||||
private string _Street;
|
||||
private string _Town;
|
||||
|
||||
public AddressVM() : this(new AddressDC()) { }
|
||||
public AddressVM(AddressDC dc) : base(dc, dc.Oid)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public string AddressLine1
|
||||
{
|
||||
get => _AddressLine1;
|
||||
set => SetProperty(ref _AddressLine1, value, nameof(AddressLine1), () => DataContract.AddressLine1);
|
||||
}
|
||||
|
||||
public string AddressLine2
|
||||
{
|
||||
get => _AddressLine2;
|
||||
set => SetProperty(ref _AddressLine2, value, nameof(AddressLine2), () => DataContract.AddressLine2);
|
||||
}
|
||||
|
||||
public string Country
|
||||
{
|
||||
get => _Country;
|
||||
set => SetProperty(ref _Country, value, nameof(Country), () => DataContract.Country);
|
||||
}
|
||||
|
||||
public long? L_Version
|
||||
{
|
||||
get => _L_Version;
|
||||
set => SetProperty(ref _L_Version, value, nameof(L_Version), () => DataContract.L_Version);
|
||||
}
|
||||
|
||||
public decimal? Latitude
|
||||
{
|
||||
get => _Latitude;
|
||||
set => SetProperty(ref _Latitude, value, nameof(Latitude), () => DataContract.Latitude);
|
||||
}
|
||||
|
||||
public decimal? Longitude
|
||||
{
|
||||
get => _Longitude;
|
||||
set => SetProperty(ref _Longitude, value, nameof(Longitude), () => DataContract.Longitude);
|
||||
}
|
||||
|
||||
public string PostalCode
|
||||
{
|
||||
get => _PostalCode;
|
||||
set => SetProperty(ref _PostalCode, value, nameof(PostalCode), () => DataContract.PostalCode);
|
||||
}
|
||||
|
||||
public string State
|
||||
{
|
||||
get => _State;
|
||||
set => SetProperty(ref _State, value, nameof(State), () => DataContract.State);
|
||||
}
|
||||
|
||||
public string Street
|
||||
{
|
||||
get => _Street;
|
||||
set => SetProperty(ref _Street, value, nameof(Street), () => DataContract.Street);
|
||||
}
|
||||
|
||||
public string Town
|
||||
{
|
||||
get => _Town;
|
||||
set => SetProperty(ref _Town, value, nameof(Town), () => DataContract.Town);
|
||||
}
|
||||
|
||||
protected override void InitByDataContract(AddressDC pDataContract)
|
||||
{
|
||||
_AddressLine1 = pDataContract.AddressLine1;
|
||||
_AddressLine2 = pDataContract.AddressLine2;
|
||||
_Country = pDataContract.Country;
|
||||
_L_Version = pDataContract.L_Version;
|
||||
_Latitude = pDataContract.Latitude;
|
||||
_Longitude = pDataContract.Longitude;
|
||||
_PostalCode = pDataContract.PostalCode;
|
||||
_State = pDataContract.State;
|
||||
_Street = pDataContract.Street;
|
||||
_Town = pDataContract.Town;
|
||||
}
|
||||
|
||||
protected override AddressDC MapToDataContract(AddressDC pDataContract, bool doCommit)
|
||||
{
|
||||
pDataContract.AddressLine1 = _AddressLine1;
|
||||
pDataContract.AddressLine2 = _AddressLine2;
|
||||
pDataContract.Country = _Country;
|
||||
pDataContract.L_Version = _L_Version;
|
||||
pDataContract.Latitude = _Latitude;
|
||||
pDataContract.Longitude = _Longitude;
|
||||
pDataContract.PostalCode = _PostalCode;
|
||||
pDataContract.State = _State;
|
||||
pDataContract.Street = _Street;
|
||||
pDataContract.Town = _Town;
|
||||
|
||||
return pDataContract;
|
||||
}
|
||||
|
||||
public string ToSingleLine()
|
||||
{
|
||||
var parts = new List<string>
|
||||
{
|
||||
AddressLine1,
|
||||
AddressLine2,
|
||||
Street,
|
||||
PostalCode,
|
||||
Town,
|
||||
State,
|
||||
Country
|
||||
};
|
||||
|
||||
return string.Join(", ", parts.Where(p => !string.IsNullOrWhiteSpace(p)));
|
||||
}
|
||||
|
||||
public override void UpdateByDataContract(AddressDC pDataContract)
|
||||
{
|
||||
AddressLine1 = pDataContract.AddressLine1;
|
||||
AddressLine2 = pDataContract.AddressLine2;
|
||||
Country = pDataContract.Country;
|
||||
L_Version = pDataContract.L_Version;
|
||||
Latitude = pDataContract.Latitude;
|
||||
Longitude = pDataContract.Longitude;
|
||||
PostalCode = pDataContract.PostalCode;
|
||||
State = pDataContract.State;
|
||||
Street = pDataContract.Street;
|
||||
Town = pDataContract.Town;
|
||||
|
||||
FirePropertyChangedItself();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -99,7 +99,7 @@ namespace BeWo.ViewModel
|
||||
return pDataContract;
|
||||
}
|
||||
|
||||
internal override void UpdateByDataContract(AiConversationDC pDataContract)
|
||||
public override void UpdateByDataContract(AiConversationDC pDataContract)
|
||||
{
|
||||
DataContract = pDataContract;
|
||||
|
||||
|
||||
@@ -50,21 +50,12 @@ namespace BeWo.ViewModel
|
||||
private BindingList<InvoiceBaseVM> _InvoiceBases;
|
||||
private OrganisationDC _Organisation;
|
||||
|
||||
private List<GkvTransferProtokollDC> _TransferProtokolle;
|
||||
private List<GkvTransferProtokollDC> _Protokolle;
|
||||
|
||||
public GkvAbrechnungVM(GkvAbrechnungDC pDC) : base(pDC, !pDC.GkvAbrechnungOid.HasValue)
|
||||
public GkvAbrechnungVM(GkvAbrechnungDC pDC) : base(pDC, !pDC.Oid.HasValue)
|
||||
{
|
||||
_InvoiceBases = new BindingList<InvoiceBaseVM>();
|
||||
|
||||
CheckAllInvoiceBasesCommand = new DelegateCommand(CheckAllInvoiceBases, HasAnyInvoiceBases);
|
||||
UncheckAllInvoiceBasesCommand = new DelegateCommand(UncheckAllInvoicesBases, HasAnyInvoiceBases);
|
||||
PrintSelectedInvoiceBasesCommand = new DelegateCommand(PrintSelectedInvoiceBases, HasAnySelectedInvoiceBases);
|
||||
}
|
||||
|
||||
public DelegateCommand CheckAllInvoiceBasesCommand { get; set; }
|
||||
public DelegateCommand UncheckAllInvoiceBasesCommand { get; set; }
|
||||
public DelegateCommand PrintSelectedInvoiceBasesCommand { get; set; }
|
||||
|
||||
#region
|
||||
|
||||
public string AbrechnungsZeitraum => $"{AbrechnungsZeitraumStart.Value.ToShortDateString()} - {AbrechnungsZeitraumEnde.Value.ToShortDateString()}";
|
||||
@@ -126,7 +117,7 @@ namespace BeWo.ViewModel
|
||||
if (this.AreDifferent(this._GkvAbrechnungOid, value))
|
||||
{
|
||||
this._GkvAbrechnungOid = value;
|
||||
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.GkvAbrechnungOid, value), nameof(GkvAbrechnungOid));
|
||||
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.Oid, value), nameof(GkvAbrechnungOid));
|
||||
this.FirePropertyChanged(nameof(GkvAbrechnungOid));
|
||||
}
|
||||
}
|
||||
@@ -140,7 +131,7 @@ namespace BeWo.ViewModel
|
||||
if (this.AreDifferent(this._GkvAbrechnungVersion, value))
|
||||
{
|
||||
this._GkvAbrechnungVersion = value;
|
||||
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.GkvAbrechnungVersion, value), nameof(GkvAbrechnungVersion));
|
||||
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.Version, value), nameof(GkvAbrechnungVersion));
|
||||
this.FirePropertyChanged(nameof(GkvAbrechnungVersion));
|
||||
}
|
||||
}
|
||||
@@ -233,13 +224,13 @@ namespace BeWo.ViewModel
|
||||
get { return _InvoiceBases; }
|
||||
set { _InvoiceBases = value; }
|
||||
}
|
||||
public List<GkvTransferProtokollDC> TransferProtokolle
|
||||
public List<GkvTransferProtokollDC> Protokolle
|
||||
{
|
||||
get { return _TransferProtokolle; }
|
||||
get { return _Protokolle; }
|
||||
set
|
||||
{
|
||||
_TransferProtokolle = value;
|
||||
FirePropertyChanged(nameof(TransferProtokolle));
|
||||
_Protokolle = value;
|
||||
FirePropertyChanged(nameof(Protokolle));
|
||||
FirePropertyChanged(nameof(GkvState));
|
||||
FirePropertyChanged(nameof(Fehlermeldung));
|
||||
FirePropertyChanged(nameof(LastTransferDateTime));
|
||||
@@ -287,7 +278,6 @@ namespace BeWo.ViewModel
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
public IGkvTransferProtokoll LastTransferProtokoll => TransferProtokolle?.LastOrDefault();
|
||||
|
||||
public string RecipientString
|
||||
{
|
||||
@@ -352,17 +342,20 @@ namespace BeWo.ViewModel
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<IGkvTransferProtokoll> TransferProtokolle => Protokolle;
|
||||
public IGkvTransferProtokoll LastTransferProtokoll => Protokolle?.LastOrDefault();
|
||||
|
||||
public bool IsFormularEnabled => LastTransferProtokoll is object ;
|
||||
public bool IsUrbelegeEditEnabled => LastTransferProtokoll is object;
|
||||
public bool IsBezahltEditEnabled => UrbelegeGesendet;
|
||||
|
||||
public GkvAbrechnungReportRequest ReportRequest
|
||||
=> new GkvAbrechnungReportRequest(DataContract.GkvAbrechnungOid.Value, false);
|
||||
=> new GkvAbrechnungReportRequest(DataContract.Oid.Value, false);
|
||||
public string ReportLink
|
||||
=> BeWoApp.SiteOfOrigin + "/ReportView.aspx" + ReportRequest.GetUrlPathString();
|
||||
|
||||
public GkvAbrechnungReportRequest ReportRequest2
|
||||
=> new GkvAbrechnungReportRequest(DataContract.GkvAbrechnungOid.Value, true);
|
||||
=> new GkvAbrechnungReportRequest(DataContract.Oid.Value, true);
|
||||
public string ReportLink2
|
||||
=> BeWoApp.SiteOfOrigin + "/ReportView.aspx" + ReportRequest2.GetUrlPathString();
|
||||
|
||||
@@ -371,9 +364,9 @@ namespace BeWo.ViewModel
|
||||
public bool IsReady2Create
|
||||
=> InvoiceBases?.Where(x => x.IsChecked).Any() ?? false;
|
||||
|
||||
public void UpdateByDataContract(GkvAbrechnungDC pDataContract)
|
||||
public override void UpdateByDataContract(GkvAbrechnungDC pDataContract)
|
||||
{
|
||||
GkvAbrechnungVersion = pDataContract.GkvAbrechnungVersion;
|
||||
GkvAbrechnungVersion = pDataContract.Version;
|
||||
|
||||
Notice = pDataContract.Notice;
|
||||
|
||||
@@ -393,8 +386,8 @@ namespace BeWo.ViewModel
|
||||
|
||||
_ErstelltAm = pDataContract.ErstelltAm;
|
||||
|
||||
_GkvAbrechnungOid = pDataContract.GkvAbrechnungOid;
|
||||
_GkvAbrechnungVersion = pDataContract.GkvAbrechnungVersion;
|
||||
_GkvAbrechnungOid = pDataContract.Oid;
|
||||
_GkvAbrechnungVersion = pDataContract.Version;
|
||||
|
||||
_Notice = pDataContract.Notice;
|
||||
|
||||
@@ -411,7 +404,7 @@ namespace BeWo.ViewModel
|
||||
|
||||
if (pDataContract.TransferProtokolle != null)
|
||||
{
|
||||
_TransferProtokolle = new List<GkvTransferProtokollDC>(pDataContract.TransferProtokolle);
|
||||
_Protokolle = new List<GkvTransferProtokollDC>(pDataContract.Protokolle);
|
||||
}
|
||||
|
||||
_Organisation = pDataContract.Organisation;
|
||||
@@ -426,8 +419,8 @@ namespace BeWo.ViewModel
|
||||
|
||||
pDataContract.ErstelltAm = _ErstelltAm;
|
||||
|
||||
pDataContract.GkvAbrechnungOid = _GkvAbrechnungOid;
|
||||
pDataContract.GkvAbrechnungVersion = _GkvAbrechnungVersion;
|
||||
pDataContract.Oid = _GkvAbrechnungOid;
|
||||
pDataContract.Version = _GkvAbrechnungVersion;
|
||||
|
||||
pDataContract.Notice = _Notice;
|
||||
pDataContract.Betrag = _Betrag;
|
||||
@@ -441,97 +434,9 @@ namespace BeWo.ViewModel
|
||||
pDataContract.InvoiceBases = _InvoiceBases2.Where(x => x.IsChecked).Select(vm => vm.CommitToDataContract()).ToList();
|
||||
|
||||
pDataContract.Organisation = _Organisation;
|
||||
pDataContract.TransferProtokolle = _TransferProtokolle?.ToList();
|
||||
pDataContract.Protokolle = _Protokolle?.ToList();
|
||||
|
||||
return pDataContract;
|
||||
}
|
||||
|
||||
public void SendGkvAbrechnung()
|
||||
{
|
||||
var req = new GkvAbrechnungSendRequestDC();
|
||||
|
||||
req.GkvAbrechnungOid = GkvAbrechnungOid.Value;
|
||||
|
||||
ServiceFacade.DoGkvAccountingServiceAsync(s => s.SendNewGkvAbrechnung(req),
|
||||
cb => Application.Current.Dispatch(() => UpdateBySendResponse(cb)), true);
|
||||
}
|
||||
public void UpdateBySendResponse(GkvAbrechnungSendResponseDC cb)
|
||||
{
|
||||
var dc = cb.GkvAbrechnungDC;
|
||||
|
||||
if (dc is null)
|
||||
{
|
||||
MessageBox.Show(Application.Current.MainWindow, cb.Message);
|
||||
return;
|
||||
}
|
||||
|
||||
GkvAbrechnungVersion = dc.GkvAbrechnungVersion;
|
||||
TransferProtokolle = dc.TransferProtokolle.ToList();
|
||||
|
||||
IsReady2Send = dc.IsReady2Send;
|
||||
SendTooltip = dc.SendTooltip;
|
||||
|
||||
var protokoll = cb.TransferProtokoll;
|
||||
|
||||
if (protokoll.ResultType == GkvTransferResultType.FailSoft)
|
||||
{
|
||||
MessageBox.Show(Application.Current.MainWindow, protokoll.Fehlernachricht, protokoll.Fehlertitel);
|
||||
}
|
||||
else if (protokoll.ResultType == GkvTransferResultType.FailFatal)
|
||||
{
|
||||
BeWoApp.ShowError(protokoll.Fehlertitel + ": " + protokoll.Fehlernachricht, null, false, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show(Application.Current.MainWindow, "Ihre Sendung wurde korrekt übertragen");
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasAnyInvoiceBases()
|
||||
{
|
||||
return InvoiceBases2 is object && InvoiceBases2.Any();
|
||||
}
|
||||
|
||||
public void CheckAllInvoiceBases()
|
||||
{
|
||||
if (!HasAnyInvoiceBases())
|
||||
return;
|
||||
|
||||
foreach (var invoice_base in InvoiceBases2)
|
||||
{
|
||||
invoice_base.IsChecked = true;
|
||||
}
|
||||
}
|
||||
|
||||
internal void UncheckAllInvoicesBases()
|
||||
{
|
||||
if (!HasAnyInvoiceBases())
|
||||
return;
|
||||
|
||||
foreach (var invoice_base in InvoiceBases2)
|
||||
{
|
||||
invoice_base.IsChecked = false;
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasAnySelectedInvoiceBases()
|
||||
{
|
||||
return HasAnyInvoiceBases() && getSelectedInvoiceBases().Any();
|
||||
}
|
||||
|
||||
internal void PrintSelectedInvoiceBases()
|
||||
{
|
||||
var selected = new List<long>(getSelectedInvoiceBases());
|
||||
|
||||
if (!selected.Any())
|
||||
return;
|
||||
|
||||
ServiceFacade.DoReportServiceAsync(s => s.CreateInvoiceListReport(selected), ms => BeWoApp.MainControl.Dispatch(() => BeWoUtils.ShowReportWindow(ms, "Rechnungen")));
|
||||
}
|
||||
|
||||
private IEnumerable<long> getSelectedInvoiceBases()
|
||||
{
|
||||
return InvoiceBases2.Where(x => x.IsChecked).Select(x => x.DataContract.InvoiceBaseOid.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
521
BeWo/ViewModel/Light/GkvAbrechnungLightVM.cs
Normal file
521
BeWo/ViewModel/Light/GkvAbrechnungLightVM.cs
Normal file
@@ -0,0 +1,521 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Threading;
|
||||
using BeWo.Core;
|
||||
using BeWo.ServiceProxy;
|
||||
using BeWo.Validation;
|
||||
using BS.Shared;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using BS.Shared.DataContracts.GkvAbrechnung;
|
||||
using BS.Shared.DataContracts.Light;
|
||||
using BS.Shared.Extensions;
|
||||
using BS.Shared.Interface;
|
||||
using BS.Shared.ReportRequests;
|
||||
using DevExpress.Mvvm;
|
||||
using DevExpress.Xpf.Core;
|
||||
|
||||
namespace BeWo.ViewModel.Light
|
||||
{
|
||||
public class GkvAbrechnungLightVM : AbstractDCMapperVM<GkvAbrechnungLightDC>, IGkvAbrechnung
|
||||
{
|
||||
public static string PropertyName_AbrechnungsZeitraumStart = "AbrechnungsZeitraumStart";
|
||||
public static string PropertyName_AbrechnungsZeitraumEnde = "AbrechnungsZeitraumEnde";
|
||||
|
||||
public static string PropertyName_ErstelltAm = "ErstelltAm";
|
||||
|
||||
private long _Oid;
|
||||
private long _Version;
|
||||
private string _Notice;
|
||||
|
||||
private long _OrganisationOid;
|
||||
private string _OrganisationName;
|
||||
|
||||
private DateTime? _AbrechnungsZeitraumStart;
|
||||
private DateTime? _AbrechnungsZeitraumEnde;
|
||||
|
||||
private DateTime _ErstelltAm;
|
||||
|
||||
private decimal _Betrag;
|
||||
private bool _Bezahlt;
|
||||
private bool _UrbelegeGesendet;
|
||||
private GkvVerfahrensstufe _Verfahrensstufe;
|
||||
|
||||
internal bool _IsChecked;
|
||||
|
||||
private bool _IsReady2Send;
|
||||
private string _SendTooltip;
|
||||
|
||||
private List<GkvTransferProtokollLightDC> _Protokolle;
|
||||
|
||||
public GkvAbrechnungLightVM(GkvAbrechnungLightDC pDC) : base(pDC, false)
|
||||
{
|
||||
InvoiceBases = new BindingList<InvoiceBaseLightVM>();
|
||||
|
||||
CheckAllInvoiceBasesCommand = new DelegateCommand(CheckAllInvoiceBases, HasAnyInvoiceBases);
|
||||
UncheckAllInvoiceBasesCommand = new DelegateCommand(UncheckAllInvoicesBases, HasAnyInvoiceBases);
|
||||
PrintSelectedInvoiceBasesCommand = new DelegateCommand(PrintSelectedInvoiceBases, HasAnySelectedInvoiceBases);
|
||||
}
|
||||
|
||||
public DelegateCommand CheckAllInvoiceBasesCommand { get; set; }
|
||||
public DelegateCommand UncheckAllInvoiceBasesCommand { get; set; }
|
||||
public DelegateCommand PrintSelectedInvoiceBasesCommand { get; set; }
|
||||
|
||||
#region
|
||||
|
||||
public string AbrechnungsZeitraum => $"{AbrechnungsZeitraumStart.Value.ToShortDateString()} - {AbrechnungsZeitraumEnde.Value.ToShortDateString()}";
|
||||
|
||||
public DateTime? AbrechnungsZeitraumStart
|
||||
{
|
||||
get { return this._AbrechnungsZeitraumStart; }
|
||||
|
||||
set
|
||||
{
|
||||
if (this.AreDifferent(this._AbrechnungsZeitraumStart, value))
|
||||
{
|
||||
this._AbrechnungsZeitraumStart = value;
|
||||
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.AbrechnungsZeitraumStart, value), PropertyName_AbrechnungsZeitraumStart);
|
||||
this.FirePropertyChanged(PropertyName_AbrechnungsZeitraumStart);
|
||||
|
||||
// RE893748923
|
||||
// var day = value.Value.Day;
|
||||
// AbrechnungsZeitraumEnde = value.Value.AddDays(1 - day).AddMonths(1).AddDays(-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
public DateTime? AbrechnungsZeitraumEnde
|
||||
{
|
||||
get { return this._AbrechnungsZeitraumEnde; }
|
||||
|
||||
set
|
||||
{
|
||||
if (this.AreDifferent(this._AbrechnungsZeitraumEnde, value))
|
||||
{
|
||||
this._AbrechnungsZeitraumEnde = value;
|
||||
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.AbrechnungsZeitraumEnde, value), PropertyName_AbrechnungsZeitraumEnde);
|
||||
this.FirePropertyChanged(PropertyName_AbrechnungsZeitraumEnde);
|
||||
}
|
||||
}
|
||||
}
|
||||
public DateTime ErstelltAm
|
||||
{
|
||||
get { return this._ErstelltAm; }
|
||||
|
||||
set
|
||||
{
|
||||
if (AreDifferent(_ErstelltAm, value))
|
||||
{
|
||||
_ErstelltAm = value;
|
||||
StoreDirtyInformation(AreDifferent(DataContract.ErstelltAm, value), nameof(ErstelltAm));
|
||||
FirePropertyChanged(nameof(ErstelltAm));
|
||||
FirePropertyChanged(nameof(ErstelltAmDate));
|
||||
}
|
||||
}
|
||||
}
|
||||
public DateTime ErstelltAmDate => ErstelltAm.Date;
|
||||
public long Oid
|
||||
{
|
||||
get { return this._Oid; }
|
||||
|
||||
set
|
||||
{
|
||||
if (this.AreDifferent(this._Oid, value))
|
||||
{
|
||||
this._Oid = value;
|
||||
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.Oid, value), nameof(Oid));
|
||||
this.FirePropertyChanged(nameof(Oid));
|
||||
}
|
||||
}
|
||||
}
|
||||
public long Version
|
||||
{
|
||||
get { return this._Oid; }
|
||||
|
||||
set
|
||||
{
|
||||
if (this.AreDifferent(this._Version, value))
|
||||
{
|
||||
this._Version = value;
|
||||
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.Version, value), nameof(Version));
|
||||
this.FirePropertyChanged(nameof(Version));
|
||||
}
|
||||
}
|
||||
}
|
||||
public string Notice
|
||||
{
|
||||
get { return this._Notice; }
|
||||
|
||||
set
|
||||
{
|
||||
if (this.AreDifferent(this._Notice, value))
|
||||
{
|
||||
this._Notice = value;
|
||||
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.Notice, value), nameof(Notice));
|
||||
this.FirePropertyChanged(nameof(Notice));
|
||||
}
|
||||
}
|
||||
}
|
||||
public decimal Betrag
|
||||
{
|
||||
get { return this._Betrag; }
|
||||
|
||||
set
|
||||
{
|
||||
if (this.AreDifferent(this._Betrag, value))
|
||||
{
|
||||
this._Betrag = value;
|
||||
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.Betrag, value), nameof(Betrag));
|
||||
this.FirePropertyChanged(nameof(Betrag));
|
||||
}
|
||||
}
|
||||
}
|
||||
public bool Bezahlt
|
||||
{
|
||||
get { return _Bezahlt; }
|
||||
|
||||
set
|
||||
{
|
||||
if (AreDifferent(this._Bezahlt, value))
|
||||
{
|
||||
_Bezahlt = value;
|
||||
StoreDirtyInformation(AreDifferent(DataContract.Bezahlt, value), nameof(Bezahlt));
|
||||
FirePropertyChanged(nameof(Bezahlt));
|
||||
FirePropertyChanged(nameof(GkvState));
|
||||
FirePropertyChanged(nameof(Fehlermeldung));
|
||||
}
|
||||
}
|
||||
}
|
||||
public bool UrbelegeGesendet
|
||||
{
|
||||
get { return _UrbelegeGesendet; }
|
||||
|
||||
set
|
||||
{
|
||||
if (!AreDifferent(_UrbelegeGesendet, value))
|
||||
return;
|
||||
_UrbelegeGesendet = value;
|
||||
StoreDirtyInformation(AreDifferent(DataContract.UrbelegeGesendet, value), nameof(UrbelegeGesendet));
|
||||
FirePropertyChanged(nameof(UrbelegeGesendet));
|
||||
FirePropertyChanged(nameof(GkvState));
|
||||
FirePropertyChanged(nameof(IsBezahltEditEnabled));
|
||||
}
|
||||
}
|
||||
public GkvState GkvState
|
||||
{
|
||||
get { return this.GetState(); }
|
||||
}
|
||||
|
||||
public bool IsChecked
|
||||
{
|
||||
get { return _IsChecked; }
|
||||
|
||||
set
|
||||
{
|
||||
if (AreDifferent(_IsChecked, value))
|
||||
{
|
||||
_IsChecked = value;
|
||||
FirePropertyChanged(nameof(IsChecked));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public BindingList<InvoiceBaseLightVM> InvoiceBases { get; set; }
|
||||
|
||||
public List<GkvTransferProtokollLightDC> Protokolle
|
||||
{
|
||||
get { return _Protokolle; }
|
||||
set
|
||||
{
|
||||
_Protokolle = value;
|
||||
FirePropertyChanged(nameof(Protokolle));
|
||||
FirePropertyChanged(nameof(GkvState));
|
||||
FirePropertyChanged(nameof(Fehlermeldung));
|
||||
FirePropertyChanged(nameof(LastTransferDateTime));
|
||||
}
|
||||
}
|
||||
public long OrganisationOid
|
||||
{
|
||||
get { return _OrganisationOid; }
|
||||
|
||||
set
|
||||
{
|
||||
if (!AreDifferent(_OrganisationOid, value))
|
||||
return;
|
||||
|
||||
_OrganisationOid = value;
|
||||
StoreDirtyInformation(this.AreDifferent(this.DataContract.OrganisationOid, value), nameof(OrganisationOid));
|
||||
FirePropertyChanged(nameof(OrganisationOid));
|
||||
}
|
||||
}
|
||||
public string OrganisationName
|
||||
{
|
||||
get { return _OrganisationName; }
|
||||
|
||||
set
|
||||
{
|
||||
if (!AreDifferent(_OrganisationName, value))
|
||||
return;
|
||||
|
||||
_OrganisationName = value;
|
||||
StoreDirtyInformation(this.AreDifferent(this.DataContract.OrganisationName, value), nameof(OrganisationName));
|
||||
FirePropertyChanged(nameof(OrganisationName));
|
||||
}
|
||||
}
|
||||
public GkvVerfahrensstufe Verfahrensstufe
|
||||
{
|
||||
get { return this._Verfahrensstufe; }
|
||||
|
||||
set
|
||||
{
|
||||
if (this.AreDifferent(this._Verfahrensstufe, value))
|
||||
{
|
||||
this._Verfahrensstufe = value;
|
||||
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.Verfahrensstufe, value), nameof(Verfahrensstufe));
|
||||
this.FirePropertyChanged(nameof(Verfahrensstufe));
|
||||
}
|
||||
}
|
||||
}
|
||||
public int VerfahrensstufeInt
|
||||
{
|
||||
get { return (int)Verfahrensstufe; }
|
||||
|
||||
set
|
||||
{
|
||||
if (!AreDifferent(this.VerfahrensstufeInt, value))
|
||||
return;
|
||||
|
||||
Verfahrensstufe = (GkvVerfahrensstufe)value;
|
||||
//FirePropertyChanged(nameof(VerfahrensstufeInt));
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
public string RecipientString
|
||||
{
|
||||
get
|
||||
{
|
||||
if (InvoiceBases != null && InvoiceBases.Any())
|
||||
{
|
||||
return InvoiceBases.First().RecipientOrganisation;
|
||||
}
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
public string Fehlermeldung
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!(LastTransferProtokoll is GkvTransferProtokollDC last))
|
||||
return null;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(last.Fehlernachricht))
|
||||
return null;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(last.Fehlertitel))
|
||||
return last.Fehlernachricht;
|
||||
|
||||
return $"{last.Fehlertitel}: {last.Fehlernachricht}";
|
||||
}
|
||||
}
|
||||
public DateTime? LastTransferDateTime
|
||||
{
|
||||
get
|
||||
{
|
||||
if (LastTransferProtokoll is GkvTransferProtokollDC last)
|
||||
return last.ErstelltAm?.Date;
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
public bool IsReady2Send
|
||||
{
|
||||
get { return _IsReady2Send; }
|
||||
set
|
||||
{
|
||||
if (!AreDifferent(IsReady2Send, value))
|
||||
return;
|
||||
|
||||
_IsReady2Send = value;
|
||||
FirePropertyChanged(nameof(IsReady2Send));
|
||||
}
|
||||
}
|
||||
public string SendTooltip
|
||||
{
|
||||
get { return _SendTooltip; }
|
||||
set
|
||||
{
|
||||
if (!AreDifferent(SendTooltip, value))
|
||||
return;
|
||||
|
||||
_SendTooltip = value;
|
||||
FirePropertyChanged(nameof(SendTooltip));
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<IGkvTransferProtokoll> TransferProtokolle => Protokolle;
|
||||
public IGkvTransferProtokoll LastTransferProtokoll => Protokolle?.LastOrDefault();
|
||||
|
||||
public bool IsFormularEnabled => LastTransferProtokoll is object ;
|
||||
public bool IsUrbelegeEditEnabled => LastTransferProtokoll is object;
|
||||
public bool IsBezahltEditEnabled => UrbelegeGesendet;
|
||||
|
||||
public GkvAbrechnungReportRequest ReportRequest
|
||||
=> new GkvAbrechnungReportRequest(DataContract.Oid, false);
|
||||
public string ReportLink
|
||||
=> BeWoApp.SiteOfOrigin + "/ReportView.aspx" + ReportRequest.GetUrlPathString();
|
||||
|
||||
public GkvAbrechnungReportRequest ReportRequest2
|
||||
=> new GkvAbrechnungReportRequest(DataContract.Oid, true);
|
||||
public string ReportLink2
|
||||
=> BeWoApp.SiteOfOrigin + "/ReportView.aspx" + ReportRequest2.GetUrlPathString();
|
||||
|
||||
public void FirePropertyIsReady2CreateChanged()
|
||||
=> FirePropertyChanged(nameof(IsReady2Create));
|
||||
public bool IsReady2Create
|
||||
=> InvoiceBases?.Where(x => x.IsChecked).Any() ?? false;
|
||||
|
||||
public override void UpdateByDataContract(GkvAbrechnungLightDC pDataContract)
|
||||
{
|
||||
Version = pDataContract.Version;
|
||||
|
||||
Notice = pDataContract.Notice;
|
||||
|
||||
Betrag = pDataContract.Betrag;
|
||||
Bezahlt = pDataContract.Bezahlt;
|
||||
|
||||
if (pDataContract.InvoiceBases != null)
|
||||
{
|
||||
var l = pDataContract.InvoiceBases.Select(x => new InvoiceBaseLightVM(x, true)).ToList();
|
||||
InvoiceBases = new BindingList<InvoiceBaseLightVM>(l);
|
||||
}
|
||||
}
|
||||
protected override void InitByDataContract(GkvAbrechnungLightDC pDataContract)
|
||||
{
|
||||
_AbrechnungsZeitraumStart = pDataContract.AbrechnungsZeitraumStart;
|
||||
_AbrechnungsZeitraumEnde = pDataContract.AbrechnungsZeitraumEnde;
|
||||
|
||||
_ErstelltAm = pDataContract.ErstelltAm;
|
||||
|
||||
_Oid = pDataContract.Oid;
|
||||
_Version = pDataContract.Version;
|
||||
|
||||
_Notice = pDataContract.Notice;
|
||||
|
||||
_Betrag = pDataContract.Betrag;
|
||||
_Bezahlt = pDataContract.Bezahlt;
|
||||
_UrbelegeGesendet = pDataContract.UrbelegeGesendet;
|
||||
_Verfahrensstufe = pDataContract.Verfahrensstufe;
|
||||
|
||||
if (pDataContract.InvoiceBases != null)
|
||||
{
|
||||
var l = pDataContract.InvoiceBases.Select(x => new InvoiceBaseLightVM(x, true)).ToList();
|
||||
InvoiceBases = new BindingList<InvoiceBaseLightVM>(l);
|
||||
}
|
||||
|
||||
if (pDataContract.Protokolle != null)
|
||||
{
|
||||
_Protokolle = new List<GkvTransferProtokollLightDC>(pDataContract.Protokolle);
|
||||
}
|
||||
|
||||
_OrganisationOid = pDataContract.OrganisationOid;
|
||||
_OrganisationName = pDataContract.OrganisationName;
|
||||
|
||||
_IsReady2Send = pDataContract.IsReady2Send;
|
||||
_SendTooltip = pDataContract.SendTooltip;
|
||||
}
|
||||
protected override GkvAbrechnungLightDC MapToDataContract(GkvAbrechnungLightDC pDataContract, bool doCommit)
|
||||
{
|
||||
pDataContract.Version = _Version;
|
||||
|
||||
pDataContract.Notice = _Notice;
|
||||
pDataContract.Betrag = _Betrag;
|
||||
pDataContract.Bezahlt = _Bezahlt;
|
||||
|
||||
return pDataContract;
|
||||
}
|
||||
|
||||
public void UpdateBySendResponse(GkvAbrechnungSendResponseDC cb)
|
||||
{
|
||||
var dc = cb.GkvAbrechnungDC;
|
||||
|
||||
if (dc is null)
|
||||
{
|
||||
MessageBox.Show(Application.Current.MainWindow, cb.Message);
|
||||
return;
|
||||
}
|
||||
|
||||
Version = dc.Version;
|
||||
Protokolle = dc.Protokolle.ToList();
|
||||
|
||||
IsReady2Send = dc.IsReady2Send;
|
||||
SendTooltip = dc.SendTooltip;
|
||||
|
||||
var protokoll = cb.TransferProtokoll;
|
||||
|
||||
if (protokoll.ResultType == GkvTransferResultType.FailSoft)
|
||||
{
|
||||
MessageBox.Show(Application.Current.MainWindow, protokoll.Fehlernachricht, protokoll.Fehlertitel);
|
||||
}
|
||||
else if (protokoll.ResultType == GkvTransferResultType.FailFatal)
|
||||
{
|
||||
BeWoApp.ShowError(protokoll.Fehlertitel + ": " + protokoll.Fehlernachricht, null, false, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show(Application.Current.MainWindow, "Ihre Sendung wurde korrekt übertragen");
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasAnyInvoiceBases()
|
||||
{
|
||||
return InvoiceBases is object && InvoiceBases.Any();
|
||||
}
|
||||
|
||||
public void CheckAllInvoiceBases()
|
||||
{
|
||||
if (!HasAnyInvoiceBases())
|
||||
return;
|
||||
|
||||
foreach (var invoice_base in InvoiceBases)
|
||||
{
|
||||
invoice_base.IsChecked = true;
|
||||
}
|
||||
}
|
||||
|
||||
internal void UncheckAllInvoicesBases()
|
||||
{
|
||||
if (!HasAnyInvoiceBases())
|
||||
return;
|
||||
|
||||
foreach (var invoice_base in InvoiceBases)
|
||||
{
|
||||
invoice_base.IsChecked = false;
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasAnySelectedInvoiceBases()
|
||||
{
|
||||
return HasAnyInvoiceBases() && getSelectedInvoiceBases().Any();
|
||||
}
|
||||
|
||||
internal void PrintSelectedInvoiceBases()
|
||||
{
|
||||
var selected = new List<long>(getSelectedInvoiceBases());
|
||||
|
||||
if (!selected.Any())
|
||||
return;
|
||||
|
||||
ServiceFacade.DoReportServiceAsync(s => s.CreateInvoiceListReport(selected), ms => BeWoApp.MainControl.Dispatch(() => BeWoUtils.ShowReportWindow(ms, "Rechnungen")));
|
||||
}
|
||||
|
||||
private IEnumerable<long> getSelectedInvoiceBases()
|
||||
{
|
||||
return InvoiceBases.Where(x => x.IsChecked).Select(x => x.DataContract.Oid.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
312
BeWo/ViewModel/Light/InvoiceBaseLightVM.cs
Normal file
312
BeWo/ViewModel/Light/InvoiceBaseLightVM.cs
Normal file
@@ -0,0 +1,312 @@
|
||||
using BeWo.Validation;
|
||||
using BeWo.ViewModel.ListViewModel;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts.Light;
|
||||
using BS.Shared.Interface;
|
||||
using BS.Shared.Translation;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using BS.Shared.Core;
|
||||
|
||||
namespace BeWo.ViewModel.Light
|
||||
{
|
||||
public class InvoiceBaseLightVM : AbstractDCMapperVM<InvoiceBaseLightDC>
|
||||
{
|
||||
private readonly Dictionary<InvoiceType, string> _TypeTranslation = new Dictionary<InvoiceType, string>
|
||||
{
|
||||
{
|
||||
InvoiceType.CustomerEquity, Translator.Translate("Eigenanteil")
|
||||
},
|
||||
{
|
||||
InvoiceType.General, Translator.Translate("Allgemein")
|
||||
},
|
||||
{
|
||||
InvoiceType.Settlement, Translator.Translate("Spitzabrechnung")
|
||||
},
|
||||
{
|
||||
InvoiceType.Service, Translator.Translate("Rechnung")
|
||||
}
|
||||
};
|
||||
|
||||
private DateTime? _AccountingPeriodEnd;
|
||||
private DateTime? _AccountingPeriodStart;
|
||||
private string _CustomerName = string.Empty;
|
||||
private string _RecipientOrganisation = string.Empty;
|
||||
private DateTime? _InvoiceDate;
|
||||
private string _InvoiceNumber = string.Empty;
|
||||
private string _InvoiceTypeText = string.Empty;
|
||||
private decimal? _TotalAmount;
|
||||
internal bool _IsPaid;
|
||||
internal bool _IsChecked;
|
||||
private string _Notice = string.Empty;
|
||||
|
||||
public InvoiceBaseLightVM(InvoiceBaseLightDC pDC, bool isChecked = false)
|
||||
: base(pDC, false)
|
||||
{
|
||||
_IsChecked = isChecked;
|
||||
}
|
||||
|
||||
public bool IsGkvValid { get; private set; }
|
||||
public string IsGkvValidError { get; private set; }
|
||||
public bool? IsAlreadyInActiveGkvAbrechnung { get; private set; }
|
||||
|
||||
public bool IsChecked
|
||||
{
|
||||
get { return _IsChecked; }
|
||||
|
||||
set
|
||||
{
|
||||
if (AreDifferent(_IsChecked, value))
|
||||
{
|
||||
_IsChecked = value;
|
||||
FirePropertyChanged("IsChecked");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Validation(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
|
||||
public DateTime? AccountingPeriodEnd
|
||||
{
|
||||
get { return _AccountingPeriodEnd; }
|
||||
|
||||
set
|
||||
{
|
||||
if (AreDifferent(_AccountingPeriodEnd, value))
|
||||
{
|
||||
_AccountingPeriodEnd = value;
|
||||
StoreDirtyInformation(AreDifferent(DataContract.AccountingPeriodEnd, value), nameof(AccountingPeriodEnd));
|
||||
FirePropertyChanged(nameof(AccountingPeriodEnd));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Validation(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
|
||||
public DateTime? AccountingPeriodStart
|
||||
{
|
||||
get { return _AccountingPeriodStart; }
|
||||
|
||||
set
|
||||
{
|
||||
if (AreDifferent(_AccountingPeriodStart, value))
|
||||
{
|
||||
_AccountingPeriodStart = value;
|
||||
StoreDirtyInformation(AreDifferent(DataContract.AccountingPeriodStart, value), nameof(AccountingPeriodStart));
|
||||
FirePropertyChanged(nameof(AccountingPeriodStart));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string AccountingPeriodString
|
||||
{
|
||||
get
|
||||
{
|
||||
return _AccountingPeriodEnd.HasValue && _AccountingPeriodStart.HasValue
|
||||
? _AccountingPeriodStart.Value.ToShortDateString() + " - " + _AccountingPeriodEnd.Value.ToShortDateString()
|
||||
: string.Empty;
|
||||
}
|
||||
|
||||
set { }
|
||||
}
|
||||
|
||||
public string CustomerName
|
||||
{
|
||||
get { return _CustomerName; }
|
||||
|
||||
set
|
||||
{
|
||||
if (AreDifferent(_CustomerName, value))
|
||||
{
|
||||
_CustomerName = value;
|
||||
StoreDirtyInformation(AreDifferent(DataContract.CustomerName, value), nameof(CustomerName));
|
||||
FirePropertyChanged(nameof(CustomerName));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Validation(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
|
||||
public DateTime? InvoiceDate
|
||||
{
|
||||
get { return _InvoiceDate; }
|
||||
|
||||
set
|
||||
{
|
||||
if (AreDifferent(_InvoiceDate, value))
|
||||
{
|
||||
_InvoiceDate = value;
|
||||
StoreDirtyInformation(AreDifferent(DataContract.InvoiceDate, value), nameof(InvoiceDate));
|
||||
FirePropertyChanged(nameof(InvoiceDate));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string InvoiceNumber
|
||||
{
|
||||
get { return _InvoiceNumber; }
|
||||
|
||||
set
|
||||
{
|
||||
if (AreDifferent(_InvoiceNumber, value))
|
||||
{
|
||||
_InvoiceNumber = value;
|
||||
StoreDirtyInformation(AreDifferent(DataContract.InvoiceNumber, value), nameof(InvoiceNumber));
|
||||
FirePropertyChanged(nameof(InvoiceNumber));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string InvoiceTypeText
|
||||
{
|
||||
get { return _InvoiceTypeText; }
|
||||
|
||||
set
|
||||
{
|
||||
if (AreDifferent(InvoiceTypeText, value))
|
||||
{
|
||||
_InvoiceTypeText = value;
|
||||
StoreDirtyInformation(AreDifferent(DataContract.InvoiceTypeText, value), nameof(InvoiceTypeText));
|
||||
FirePropertyChanged(nameof(InvoiceTypeText));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsPaid
|
||||
{
|
||||
get { return _IsPaid; }
|
||||
|
||||
set
|
||||
{
|
||||
if (AreDifferent(_IsPaid, value))
|
||||
{
|
||||
_IsPaid = value;
|
||||
StoreDirtyInformation(AreDifferent(DataContract.IsPaid, value), nameof(IsPaid));
|
||||
FirePropertyChanged(nameof(IsPaid));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string Notice
|
||||
{
|
||||
get { return _Notice; }
|
||||
|
||||
set
|
||||
{
|
||||
if (AreDifferent(_Notice, value))
|
||||
{
|
||||
_Notice = value;
|
||||
StoreDirtyInformation(AreDifferent(DataContract.Notice, value), nameof(Notice));
|
||||
FirePropertyChanged(nameof(Notice));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string RecipientOrganisation
|
||||
{
|
||||
get { return _RecipientOrganisation; }
|
||||
|
||||
set
|
||||
{
|
||||
if (AreDifferent(_RecipientOrganisation, value))
|
||||
{
|
||||
_RecipientOrganisation = value;
|
||||
StoreDirtyInformation(AreDifferent(DataContract.RecipientOrganisation, value), nameof(RecipientOrganisation));
|
||||
FirePropertyChanged(nameof(RecipientOrganisation));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string ReportLink
|
||||
{
|
||||
get
|
||||
{
|
||||
string url = string.Empty;
|
||||
|
||||
switch (DataContract.Type)
|
||||
{
|
||||
case InvoiceType.CustomerEquity:
|
||||
url = BeWoApp.SiteOfOrigin + "/ReportView.aspx?ioid=" + DataContract.Oid + "&type=CustomerInvoice";
|
||||
break;
|
||||
case InvoiceType.General:
|
||||
url = BeWoApp.SiteOfOrigin + "/ReportView.aspx?ioid=" + DataContract.Oid + "&type=CustomerInvoice";
|
||||
break;
|
||||
case InvoiceType.Settlement:
|
||||
url = BeWoApp.SiteOfOrigin + "/ReportView.aspx?ibid=" + DataContract.Oid + "&type=" + Utils.EnumName(ReportTypes.Settlement);
|
||||
break;
|
||||
case InvoiceType.Service:
|
||||
url = BeWoApp.SiteOfOrigin + "/ReportView.aspx?ibid=" + DataContract.Oid + "&type=" + Utils.EnumName(ReportTypes.ServiceInvoice);
|
||||
break;
|
||||
default:
|
||||
url = string.Empty;
|
||||
break;
|
||||
}
|
||||
|
||||
return url;
|
||||
}
|
||||
}
|
||||
|
||||
public decimal? TotalAmount
|
||||
{
|
||||
get { return _TotalAmount; }
|
||||
|
||||
set
|
||||
{
|
||||
if (AreDifferent(_TotalAmount, value))
|
||||
{
|
||||
_TotalAmount = value;
|
||||
StoreDirtyInformation(AreDifferent(DataContract.TotalAmount, value), nameof(TotalAmount));
|
||||
FirePropertyChanged(nameof(TotalAmount));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string TypeString
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!String.IsNullOrEmpty(DataContract.InvoiceTypeText))
|
||||
{
|
||||
return DataContract.InvoiceTypeText;
|
||||
}
|
||||
return _TypeTranslation[DataContract.Type];
|
||||
}
|
||||
}
|
||||
|
||||
public String BackgroundColor
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
protected override void InitByDataContract(InvoiceBaseLightDC pDataContract)
|
||||
{
|
||||
// private DateTime? _AccountingPeriodEnd;
|
||||
//private DateTime? _AccountingPeriodStart;
|
||||
//private string _CustomerName = string.Empty;
|
||||
//private string _RecipientOrganisation = string.Empty;
|
||||
//private string InvoiceTypeText = string.Empty;
|
||||
//private DateTime _InvoiceDate;
|
||||
_AccountingPeriodStart = pDataContract.AccountingPeriodStart;
|
||||
_AccountingPeriodEnd = pDataContract.AccountingPeriodEnd;
|
||||
_CustomerName = pDataContract.CustomerName;
|
||||
_RecipientOrganisation = pDataContract.RecipientOrganisation;
|
||||
_IsPaid = pDataContract.IsPaid;
|
||||
_InvoiceTypeText = pDataContract.InvoiceTypeText;
|
||||
_InvoiceNumber = pDataContract.InvoiceNumber;
|
||||
_InvoiceDate = pDataContract.InvoiceDate;
|
||||
_AccountingPeriodEnd = pDataContract.AccountingPeriodEnd;
|
||||
_AccountingPeriodStart = pDataContract.AccountingPeriodStart;
|
||||
_Notice = pDataContract.Notice;
|
||||
_TotalAmount = pDataContract.TotalAmount;
|
||||
}
|
||||
|
||||
protected override InvoiceBaseLightDC MapToDataContract(InvoiceBaseLightDC pDataContract, bool doCommit)
|
||||
{
|
||||
pDataContract.IsPaid = _IsPaid;
|
||||
pDataContract.Notice = _Notice;
|
||||
|
||||
return pDataContract;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using BeWo.Core;
|
||||
using BeWo.Core.Commands;
|
||||
using BeWo.ServiceProxy;
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
@@ -47,15 +48,18 @@ namespace BeWo.ViewModel.ListViewModel
|
||||
{
|
||||
Models = new ObservableSortCollection<AiModelDC>();
|
||||
|
||||
SendNewMessageCommand = new DelegateCommand(SendNewMessage, () => SelectedVM is object && !string.IsNullOrWhiteSpace(MessageInput) && !IsSending);
|
||||
bool sendCanExecute() => SelectedVM is object && !string.IsNullOrWhiteSpace(MessageInput) && !IsSending;
|
||||
SendNewMessageCommand = new DelegateCommand(SendNewMessage, sendCanExecute);
|
||||
OpenNewConversationCommand = new DelegateCommand(OpenNewConversation, () => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleChatAdd));
|
||||
StartConversationWithMessageCommand = new DelegateCommand(StartConversationWithMessage, () => !string.IsNullOrWhiteSpace(MessageInput) && !IsSending);
|
||||
bool startconvCanExecute() => !string.IsNullOrWhiteSpace(MessageInput) && !IsSending;
|
||||
StartConversationWithMessageCommand = new DelegateCommand(StartConversationWithMessage, startconvCanExecute);
|
||||
|
||||
ReloadConfigCommand = new DelegateCommand(ReloadConfig);
|
||||
ReloadConversationsCommand = new DelegateCommand(ReloadConversations);
|
||||
ReloadModelsCommand = new DelegateCommand(ReloadModels);
|
||||
|
||||
OpenSettingCommand = new DelegateCommand(OpenSetting, () => (BeWoApp.AppSettings?.ModuleAiSettingsEnabled ?? true) && BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleViewSetting));
|
||||
bool openCanExecute() => (BeWoApp.AppSettings?.ModuleAiSettingsEnabled ?? true) && BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleViewSetting);
|
||||
OpenSettingCommand = new DelegateCommand(OpenSetting, openCanExecute, false);
|
||||
OpenCloneCommand = new DelegateCommand(OpenClone, () => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleChatClone) && SelectedVM is object);
|
||||
CloneCommand = new DelegateCommand(Clone);
|
||||
|
||||
@@ -69,8 +73,8 @@ namespace BeWo.ViewModel.ListViewModel
|
||||
public DelegateCommand SendNewMessageCommand { get; set; }
|
||||
public DelegateCommand OpenNewConversationCommand { get; set; }
|
||||
public DelegateCommand StartConversationWithMessageCommand { get; set; }
|
||||
public DelegateCommand RequestNewConversationCommand { get; set; }
|
||||
public DelegateCommand TestCommand { get; set; }
|
||||
//public DelegateCommand RequestNewConversationCommand { get; set; }
|
||||
//public DelegateCommand TestCommand { get; set; }
|
||||
public DelegateCommand AskDeleteCommand { get; set; }
|
||||
public DelegateCommand ReloadConfigCommand { get; set; }
|
||||
public DelegateCommand ReloadConversationsCommand { get; set; }
|
||||
|
||||
@@ -1,60 +1,62 @@
|
||||
using System.Collections.Generic;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.GkvAbrechnung;
|
||||
|
||||
namespace BeWo.ViewModel.ListViewModel
|
||||
{
|
||||
public class GkvAbrechnungListVM : AbstractDCListMapperVM<GkvAbrechnungDC, GkvAbrechnungVM>
|
||||
{
|
||||
public static string PropertyName_DateTimeSpanFilter = "DateTimeSpanFilter";
|
||||
|
||||
public static string PropertyName_FilterResultAmountSum = "FilterResultAmountSum";
|
||||
public static string PropertyName_FilterResultAmountNotPaidSum = "FilterResultAmountNotPaidSum";
|
||||
|
||||
private DateTimeSpan _DateTimeSpanFilter;
|
||||
|
||||
public GkvAbrechnungListVM(List<GkvAbrechnungDC> pDCList) : base(pDCList)
|
||||
{
|
||||
this.VMList.ListChanged += (s, e) => this.FirePropertyChanged(PropertyName_FilterResultAmountSum);
|
||||
this.VMList.ListChanged += (s, e) => this.FirePropertyChanged(PropertyName_FilterResultAmountNotPaidSum);
|
||||
}
|
||||
public GkvAbrechnungListVM() : this(null)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public DateTimeSpan DateTimeSpanFilter
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._DateTimeSpanFilter;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (this.AreDifferent(this._DateTimeSpanFilter, value))
|
||||
{
|
||||
this._DateTimeSpanFilter = value;
|
||||
this.FirePropertyChanged(PropertyName_DateTimeSpanFilter);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal void UpdateList(IList<GkvAbrechnungDC> dcList)
|
||||
{
|
||||
VMList.Clear();
|
||||
|
||||
if (dcList is object)
|
||||
foreach (var dc in dcList)
|
||||
{
|
||||
VMList.Add(CreateVM(dc));
|
||||
}
|
||||
|
||||
FirePropertyChanged(PropertyName_FilterResultAmountSum);
|
||||
FirePropertyChanged(PropertyName_FilterResultAmountNotPaidSum);
|
||||
}
|
||||
|
||||
internal void ClearList() => UpdateList(null);
|
||||
}
|
||||
using System.Collections.Generic;
|
||||
using BeWo.ViewModel.Light;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.GkvAbrechnung;
|
||||
using BS.Shared.DataContracts.Light;
|
||||
|
||||
namespace BeWo.ViewModel.ListViewModel.Light
|
||||
{
|
||||
public class GkvAbrechnungLightListVM : AbstractDCListMapperVM<GkvAbrechnungLightDC, GkvAbrechnungLightVM>
|
||||
{
|
||||
public static string PropertyName_DateTimeSpanFilter = "DateTimeSpanFilter";
|
||||
|
||||
public static string PropertyName_FilterResultAmountSum = "FilterResultAmountSum";
|
||||
public static string PropertyName_FilterResultAmountNotPaidSum = "FilterResultAmountNotPaidSum";
|
||||
|
||||
private DateTimeSpan _DateTimeSpanFilter;
|
||||
|
||||
public GkvAbrechnungLightListVM(List<GkvAbrechnungLightDC> pDCList) : base(pDCList)
|
||||
{
|
||||
this.VMList.ListChanged += (s, e) => this.FirePropertyChanged(PropertyName_FilterResultAmountSum);
|
||||
this.VMList.ListChanged += (s, e) => this.FirePropertyChanged(PropertyName_FilterResultAmountNotPaidSum);
|
||||
}
|
||||
public GkvAbrechnungLightListVM() : this(null)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public DateTimeSpan DateTimeSpanFilter
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._DateTimeSpanFilter;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (this.AreDifferent(this._DateTimeSpanFilter, value))
|
||||
{
|
||||
this._DateTimeSpanFilter = value;
|
||||
this.FirePropertyChanged(PropertyName_DateTimeSpanFilter);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal void UpdateList(IList<GkvAbrechnungLightDC> dcList)
|
||||
{
|
||||
VMList.Clear();
|
||||
|
||||
if (dcList is object)
|
||||
foreach (var dc in dcList)
|
||||
{
|
||||
VMList.Add(CreateVM(dc));
|
||||
}
|
||||
|
||||
FirePropertyChanged(PropertyName_FilterResultAmountSum);
|
||||
FirePropertyChanged(PropertyName_FilterResultAmountNotPaidSum);
|
||||
}
|
||||
|
||||
internal void ClearList() => UpdateList(null);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
@@ -10,6 +11,7 @@ using BeWo.ViewModel.ListViewModel;
|
||||
using BS.Shared;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.GkvAbrechnung;
|
||||
|
||||
namespace BeWo.ViewModel
|
||||
{
|
||||
@@ -96,6 +98,17 @@ namespace BeWo.ViewModel
|
||||
private GkvVerfahrensstufe? _Verfahrensstufe;
|
||||
private bool _GkvAusblenden;
|
||||
|
||||
private AddressVM _HausanschriftDatenannahmestelle;
|
||||
private AddressVM _PostfachanschriftDatenannahmestelle;
|
||||
private AddressVM _GroßkundenanschriftDatenannahmestelle;
|
||||
|
||||
public OrganisationVM()
|
||||
{
|
||||
if (!BeWoApp.IsInDesignMode)
|
||||
throw new NotImplementedException();
|
||||
|
||||
Name = "Designername";
|
||||
}
|
||||
public OrganisationVM(OrganisationDC pDataContract, List<ValueListEntryDC> pAllQualifications, List<ValueListEntryDC> pPossibleFunctions, List<ValueListEntryDC> pPossibleRoleInOrganisations)
|
||||
: base(pDataContract, pDataContract.OrganisationOid == null)
|
||||
{
|
||||
@@ -403,10 +416,15 @@ namespace BeWo.ViewModel
|
||||
return false;
|
||||
}
|
||||
|
||||
return base.IsDirty || this._CostRatePeriods.IsDirty || this._VarFields.IsDirty || (_ArbeitszeitListe != null && _ArbeitszeitListe.IsDirty) || (_Feiertage != null && _Feiertage.IsDirty);
|
||||
return base.IsDirty
|
||||
|| this._CostRatePeriods.IsDirty
|
||||
|| this._VarFields.IsDirty
|
||||
|| (_ArbeitszeitListe != null && _ArbeitszeitListe.IsDirty)
|
||||
|| (_Feiertage != null && _Feiertage.IsDirty)
|
||||
|| (HausanschriftDatenannahmestelle?.IsDirty ?? false)
|
||||
|| (PostfachanschriftDatenannahmestelle?.IsDirty ?? false)
|
||||
|| (GroßkundenanschriftDatenannahmestelle?.IsDirty ?? false);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public bool IsSingleInvoicePerCustomer
|
||||
@@ -677,8 +695,6 @@ namespace BeWo.ViewModel
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public ValueListEntryDC Function
|
||||
{
|
||||
get { return this._Function; }
|
||||
@@ -836,6 +852,34 @@ namespace BeWo.ViewModel
|
||||
}
|
||||
}
|
||||
|
||||
public AddressVM HausanschriftDatenannahmestelle
|
||||
{
|
||||
get => _HausanschriftDatenannahmestelle;
|
||||
set
|
||||
{
|
||||
_HausanschriftDatenannahmestelle = value;
|
||||
FirePropertyChanged(nameof(HausanschriftDatenannahmestelle));
|
||||
}
|
||||
}
|
||||
public AddressVM PostfachanschriftDatenannahmestelle
|
||||
{
|
||||
get => _PostfachanschriftDatenannahmestelle;
|
||||
set
|
||||
{
|
||||
_PostfachanschriftDatenannahmestelle = value;
|
||||
FirePropertyChanged(nameof(PostfachanschriftDatenannahmestelle));
|
||||
}
|
||||
}
|
||||
public AddressVM GroßkundenanschriftDatenannahmestelle
|
||||
{
|
||||
get => _GroßkundenanschriftDatenannahmestelle;
|
||||
set
|
||||
{
|
||||
_GroßkundenanschriftDatenannahmestelle = value;
|
||||
FirePropertyChanged(nameof(GroßkundenanschriftDatenannahmestelle));
|
||||
}
|
||||
}
|
||||
|
||||
protected void CommitContact(string pValue, ContactType pContactType)
|
||||
{
|
||||
List<ContactDC> lOldContactDCs;
|
||||
@@ -875,7 +919,7 @@ namespace BeWo.ViewModel
|
||||
{
|
||||
this._VarFields = new VarFieldListVM(pDataContract.VarFields);
|
||||
|
||||
if (!this.IsNew)
|
||||
if (!IsNew)
|
||||
{
|
||||
_AccountNumber = pDataContract.AccountNumber;
|
||||
_BankCode = pDataContract.BankCode;
|
||||
@@ -952,6 +996,18 @@ namespace BeWo.ViewModel
|
||||
}
|
||||
}
|
||||
|
||||
HausanschriftDatenannahmestelle = pDataContract.HausanschriftDatenannahmestelle is AddressDC dc
|
||||
? new AddressVM(dc)
|
||||
: new AddressVM();
|
||||
|
||||
PostfachanschriftDatenannahmestelle = pDataContract.PostfachanschriftDatenannahmestelle is AddressDC dc2
|
||||
? new AddressVM(dc2)
|
||||
: new AddressVM();
|
||||
|
||||
GroßkundenanschriftDatenannahmestelle = pDataContract.GroßkundenanschriftDatenannahmestelle is AddressDC dc3
|
||||
? new AddressVM(dc3)
|
||||
: new AddressVM();
|
||||
|
||||
VMFactory.CreateOrganisationPersonRelationListVMAsync(
|
||||
pDataContract.RelatedPersons ?? (pDataContract.RelatedPersons = new List<OrganisationPersonRelationDC>()), cb => PersonRelations = cb);
|
||||
|
||||
@@ -1025,7 +1081,6 @@ namespace BeWo.ViewModel
|
||||
CommitContact(_POBox, ContactType.business_POBox);
|
||||
CommitContact(_InvoiceAddressPOBox, ContactType.private_POBox);
|
||||
|
||||
|
||||
pDataContract.CostRatePeriods = this._CostRatePeriods.CopyToDCList(doCommit);
|
||||
|
||||
if (this._VarFields != null)
|
||||
@@ -1043,7 +1098,39 @@ namespace BeWo.ViewModel
|
||||
pDataContract.Feiertage = _Feiertage.CopyToDCList(doCommit);
|
||||
}
|
||||
|
||||
if (HausanschriftDatenannahmestelle is object)
|
||||
pDataContract.HausanschriftDatenannahmestelle = HausanschriftDatenannahmestelle.CommitToDataContract();
|
||||
else
|
||||
pDataContract.HausanschriftDatenannahmestelle = null;
|
||||
|
||||
if (PostfachanschriftDatenannahmestelle is object)
|
||||
pDataContract.PostfachanschriftDatenannahmestelle = PostfachanschriftDatenannahmestelle.CommitToDataContract();
|
||||
else
|
||||
pDataContract.PostfachanschriftDatenannahmestelle = null;
|
||||
|
||||
if (GroßkundenanschriftDatenannahmestelle is object)
|
||||
pDataContract.GroßkundenanschriftDatenannahmestelle = GroßkundenanschriftDatenannahmestelle.CommitToDataContract();
|
||||
else
|
||||
pDataContract.GroßkundenanschriftDatenannahmestelle = null;
|
||||
|
||||
return pDataContract;
|
||||
}
|
||||
|
||||
public override void UpdateByDataContract(OrganisationDC pDataContract)
|
||||
{
|
||||
base.UpdateByDataContract(pDataContract);
|
||||
}
|
||||
|
||||
public void UpdateByGetIKResponse(GkvAbrechnungGetIKResponseDC response)
|
||||
{
|
||||
BezDatenannahmestelle = response.BezDatenannahmestelle;
|
||||
IKKostentrager = response.IKKostentrager;
|
||||
IKDatenannahmestelle = response.IKDatenannahmestelle;
|
||||
|
||||
HausanschriftDatenannahmestelle.UpdateByDataContract(response.Hausanschrift);
|
||||
FirePropertyChanged(nameof(HausanschriftDatenannahmestelle));
|
||||
PostfachanschriftDatenannahmestelle.UpdateByDataContract(response.Postfachanschrift);
|
||||
GroßkundenanschriftDatenannahmestelle.UpdateByDataContract(response.Großkundenanschrift);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -246,8 +246,6 @@ namespace BeWo.ViewModel
|
||||
_Category2Services = pCategory2Services;
|
||||
|
||||
ChangeGoalTree(pAllGoalCategories, pAllGoals);
|
||||
if (_Duration == null)
|
||||
_Duration = 0;
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -284,12 +282,12 @@ namespace BeWo.ViewModel
|
||||
return RoundedDuration;
|
||||
}
|
||||
|
||||
if (_Duration != null)
|
||||
{
|
||||
//if (_Duration != null)
|
||||
//{
|
||||
return Duration;
|
||||
}
|
||||
//}
|
||||
|
||||
return 0;
|
||||
//return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -102,6 +102,7 @@ namespace BeWo.ViewModel
|
||||
{(r) => r == UserRightType.SupportConcept_ImportData, BeWoApp.AppSettings.ShowPersehImport},
|
||||
{(r) => r == UserRightType.AiChatInZeiterfassung, BeWoApp.AppSettings.ShowAI},
|
||||
{IsAiModuleRight, BeWoApp.AppSettings.ModuleAiEnabled},
|
||||
{IsAiModuleSettingRight, BeWoApp.AppSettings.ModuleAiSettingsEnabled},
|
||||
};
|
||||
|
||||
public List<UserRightType> PossibleRights
|
||||
@@ -291,7 +292,9 @@ namespace BeWo.ViewModel
|
||||
return false;
|
||||
}
|
||||
private static bool IsAiModuleRight(UserRightType right) =>
|
||||
ContainsRight(right, UserRightType.AiModuleView, UserRightType.AiModuleView2, UserRightType.AiModuleChatAdd, UserRightType.AiModuleChatDelete, UserRightType.AiModuleChatEdit, UserRightType.AiModuleViewSetting, UserRightType.AiModuleChatClone);
|
||||
ContainsRight(right, UserRightType.AiModuleView, UserRightType.AiModuleView2, UserRightType.AiModuleChatAdd, UserRightType.AiModuleChatDelete, UserRightType.AiModuleChatEdit, UserRightType.AiModuleChatClone);
|
||||
private static bool IsAiModuleSettingRight(UserRightType right) =>
|
||||
ContainsRight(right, UserRightType.AiModuleViewSetting);
|
||||
|
||||
private static bool ContainsRight(UserRightType right, params UserRightType[] rightTypes)
|
||||
{
|
||||
|
||||
@@ -917,6 +917,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LebenshilfeRemscheidFF", "R
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DiakoniewerkGelsenkirchenWattenscheid", "ReportImp\DiakoniewerkGelsenkirchenWattenscheid\DiakoniewerkGelsenkirchenWattenscheid.csproj", "{8EE716B0-19BE-4AC0-BC5D-47504195AD30}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoewenzahnBetreutesWohnen", "ReportImp\LoewenzahnBetreutesWohnen\LoewenzahnBetreutesWohnen.csproj", "{6FF7C735-AA4B-4ED9-937D-E573220C05E9}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|.NET = Debug|.NET
|
||||
@@ -11296,6 +11298,30 @@ Global
|
||||
{8EE716B0-19BE-4AC0-BC5D-47504195AD30}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{8EE716B0-19BE-4AC0-BC5D-47504195AD30}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{8EE716B0-19BE-4AC0-BC5D-47504195AD30}.Release|x86.Build.0 = Release|Any CPU
|
||||
{6FF7C735-AA4B-4ED9-937D-E573220C05E9}.Debug|.NET.ActiveCfg = Debug|Any CPU
|
||||
{6FF7C735-AA4B-4ED9-937D-E573220C05E9}.Debug|.NET.Build.0 = Debug|Any CPU
|
||||
{6FF7C735-AA4B-4ED9-937D-E573220C05E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6FF7C735-AA4B-4ED9-937D-E573220C05E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6FF7C735-AA4B-4ED9-937D-E573220C05E9}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{6FF7C735-AA4B-4ED9-937D-E573220C05E9}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{6FF7C735-AA4B-4ED9-937D-E573220C05E9}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{6FF7C735-AA4B-4ED9-937D-E573220C05E9}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{6FF7C735-AA4B-4ED9-937D-E573220C05E9}.DebugRemote|.NET.ActiveCfg = Debug|Any CPU
|
||||
{6FF7C735-AA4B-4ED9-937D-E573220C05E9}.DebugRemote|.NET.Build.0 = Debug|Any CPU
|
||||
{6FF7C735-AA4B-4ED9-937D-E573220C05E9}.DebugRemote|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6FF7C735-AA4B-4ED9-937D-E573220C05E9}.DebugRemote|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6FF7C735-AA4B-4ED9-937D-E573220C05E9}.DebugRemote|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{6FF7C735-AA4B-4ED9-937D-E573220C05E9}.DebugRemote|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{6FF7C735-AA4B-4ED9-937D-E573220C05E9}.DebugRemote|x86.ActiveCfg = Debug|Any CPU
|
||||
{6FF7C735-AA4B-4ED9-937D-E573220C05E9}.DebugRemote|x86.Build.0 = Debug|Any CPU
|
||||
{6FF7C735-AA4B-4ED9-937D-E573220C05E9}.Release|.NET.ActiveCfg = Release|Any CPU
|
||||
{6FF7C735-AA4B-4ED9-937D-E573220C05E9}.Release|.NET.Build.0 = Release|Any CPU
|
||||
{6FF7C735-AA4B-4ED9-937D-E573220C05E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6FF7C735-AA4B-4ED9-937D-E573220C05E9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{6FF7C735-AA4B-4ED9-937D-E573220C05E9}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{6FF7C735-AA4B-4ED9-937D-E573220C05E9}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{6FF7C735-AA4B-4ED9-937D-E573220C05E9}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{6FF7C735-AA4B-4ED9-937D-E573220C05E9}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -11752,6 +11778,7 @@ Global
|
||||
{5A3315F2-4976-4C88-B95E-D897BF61EF1C} = {D8A691C5-146D-4613-86CC-438F02FE9106}
|
||||
{7398111F-8F04-438A-A2A5-AF046C39E3F7} = {D8A691C5-146D-4613-86CC-438F02FE9106}
|
||||
{8EE716B0-19BE-4AC0-BC5D-47504195AD30} = {D8A691C5-146D-4613-86CC-438F02FE9106}
|
||||
{6FF7C735-AA4B-4ED9-937D-E573220C05E9} = {D8A691C5-146D-4613-86CC-438F02FE9106}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {FBE985BB-9F0F-4DBB-8F94-ABC37A803FF9}
|
||||
|
||||
@@ -1,19 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||
</startup>
|
||||
<appSettings>
|
||||
<add key="ServerName" value="app3.bewoplaner.de"/>
|
||||
<add key="ConnectionStringServer" value="127.0.0.1"/>
|
||||
<add key="ConnectionStringUserId" value="root"/>
|
||||
<add key="ConnectionStringPassword" value="root"/>
|
||||
<add key="ConnectionStringPort" value="2206"/>
|
||||
<add key="MultitenancyPath" value="..\Multitenancy\Configs"/>
|
||||
<add key="CreateScriptsFolderPath" value="CreateScripts\"/>
|
||||
<add key="InsertScriptName" value="inserts.sql"/>
|
||||
<add key="CreateScriptName" value="create_Empty_MySQL.sql"/>
|
||||
<add key="ChangesScriptName" value="Changes_alle_fuer_neue_db.sql"/>
|
||||
<add key="LogFilePath" value="Logs\"/>
|
||||
<add key="ServerName" value="app7.bewoplaner.de" />
|
||||
<add key="ConnectionStringServer" value="127.0.0.1" />
|
||||
<add key="ConnectionStringUserId" value="root" />
|
||||
<add key="ConnectionStringPassword" value="root" />
|
||||
<add key="ConnectionStringPort" value="2206" />
|
||||
<add key="MultitenancyPath" value="..\Multitenancy\Configs" />
|
||||
<add key="CreateScriptsFolderPath" value="CreateScripts\" />
|
||||
<add key="InsertScriptName" value="inserts.sql" />
|
||||
<add key="CreateScriptName" value="create_Empty_MySQL.sql" />
|
||||
<add key="ChangesScriptName" value="Changes_alle_fuer_neue_db.sql" />
|
||||
<add key="LogFilePath" value="Logs\" />
|
||||
</appSettings>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
|
||||
@@ -37,16 +37,45 @@
|
||||
<ApplicationIcon>bdt.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="MySql.Data">
|
||||
<HintPath>..\..\Lib\MySql.Data.dll</HintPath>
|
||||
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=8.0.0.2, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.8.0.2\lib\net462\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=8.0.0.2, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Logging.Abstractions.8.0.2\lib\net462\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MySqlConnector, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d33d3e53aa5f8c92, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MySqlConnector.2.4.0\lib\net471\MySqlConnector.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Diagnostics.DiagnosticSource, Version=8.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Diagnostics.DiagnosticSource.8.0.1\lib\net462\System.Diagnostics.DiagnosticSource.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net" />
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Transactions" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.Data;
|
||||
using System.IO;
|
||||
using BeWoDatabaseTerminator.Security;
|
||||
using BeWoDatabaseTerminator.Utils;
|
||||
using MySql.Data.MySqlClient;
|
||||
using MySqlConnector;
|
||||
|
||||
namespace BeWoDatabaseTerminator.MySql
|
||||
{
|
||||
@@ -118,6 +118,7 @@ namespace BeWoDatabaseTerminator.MySql
|
||||
{
|
||||
try
|
||||
{
|
||||
return;
|
||||
_Connection.Open();
|
||||
|
||||
var command = new MySqlCommand($"DROP SCHEMA IF EXISTS `{schemaName}`;", _Connection);
|
||||
|
||||
@@ -96,6 +96,7 @@ namespace BeWoDatabaseTerminator
|
||||
|
||||
private static async Task Main(string[] args)
|
||||
{
|
||||
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
|
||||
|
||||
PinCertificate();
|
||||
@@ -281,9 +282,9 @@ namespace BeWoDatabaseTerminator
|
||||
private static async Task ActivateDatabase(string tenant, ContractStatus contractStatus)
|
||||
{
|
||||
var connectionString = $"Server={_ConnectionStringServer};Password={_ConnectionStringPassword};User ID={_ConnectionStringUserID};Port={_ConnectionStringPort}";
|
||||
|
||||
//connectionString += ";Charset=utf8mb4";
|
||||
var isExisting = new MySqlHelper(connectionString).CheckForDatabase(tenant);
|
||||
|
||||
|
||||
var configFilePath = Path.Combine(_MultitenancyPath, $"{tenant}.config");
|
||||
|
||||
// Config-Datei existiert bereits
|
||||
|
||||
@@ -1,4 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Microsoft.Bcl.AsyncInterfaces" version="8.0.0" targetFramework="net472" />
|
||||
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="8.0.2" targetFramework="net472" />
|
||||
<package id="Microsoft.Extensions.Logging.Abstractions" version="8.0.2" targetFramework="net472" />
|
||||
<package id="MySqlConnector" version="2.4.0" targetFramework="net472" />
|
||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net481" />
|
||||
<package id="System.Buffers" version="4.5.1" targetFramework="net472" />
|
||||
<package id="System.Diagnostics.DiagnosticSource" version="8.0.1" targetFramework="net472" />
|
||||
<package id="System.Memory" version="4.5.5" targetFramework="net472" />
|
||||
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net472" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net472" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net472" />
|
||||
</packages>
|
||||
@@ -313,13 +313,22 @@
|
||||
<Compile Include="Controllers\ReportViewerController.cs" />
|
||||
<Compile Include="Controllers\SchedulerController.cs" />
|
||||
<Compile Include="Models\AbstractModel.cs" />
|
||||
<Compile Include="Models\SchedulerSessionModel.cs" />
|
||||
<Compile Include="Models\MainSessionModel.cs" />
|
||||
<Compile Include="Models\ReportSessionModel .cs" />
|
||||
<Compile Include="Models\ReportViewerSessionModel.cs" />
|
||||
<Compile Include="Models\CustomerSessionModel.cs" />
|
||||
<Compile Include="Models\CustomerModel.cs" />
|
||||
<Compile Include="Models\DebuggingToolsModel.cs" />
|
||||
<Compile Include="Models\DevExpressSchedulerModel.cs" />
|
||||
<Compile Include="Models\ExternalSignatureModel.cs" />
|
||||
<Compile Include="Models\ISessionModel.cs" />
|
||||
<Compile Include="Models\ReportModel.cs" />
|
||||
<Compile Include="Models\ReportViewerModel.cs" />
|
||||
<Compile Include="Models\SchedulerModel.cs" />
|
||||
<Compile Include="Util\DcToMokMapper.cs" />
|
||||
<Compile Include="Util\MokMandator.cs" />
|
||||
<Compile Include="Util\MokSettings.cs" />
|
||||
<Compile Include="Util\AppointmentListItem.cs" />
|
||||
<Compile Include="Util\BeWoLoginState.cs" />
|
||||
<Compile Include="Util\BootstrapTreeViewItem.cs" />
|
||||
@@ -360,6 +369,7 @@
|
||||
<Compile Include="Util\ReferenceNumberWithNotice.cs" />
|
||||
<Compile Include="Util\ReportUtils\ConfirmationReceiptObject.cs" />
|
||||
<Compile Include="Util\ReportUtils\Quittierungsbelegsunterschriftenobjekt.cs" />
|
||||
<Compile Include="Util\ReportUtils\QuittierungsbelegsReportSettings.cs" />
|
||||
<Compile Include="Util\ReportUtils\ReportTimeFrame.cs" />
|
||||
<Compile Include="Util\ServiceRecord2Validation.cs" />
|
||||
<Compile Include="Util\SignatureUtils.cs" />
|
||||
@@ -752,7 +762,7 @@
|
||||
<VisualStudio>
|
||||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
||||
<WebProjectProperties>
|
||||
<UseIIS>True</UseIIS>
|
||||
<UseIIS>False</UseIIS>
|
||||
<AutoAssignPort>False</AutoAssignPort>
|
||||
<DevelopmentServerPort>8808</DevelopmentServerPort>
|
||||
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<UseIISExpress>false</UseIISExpress>
|
||||
@@ -9,7 +9,7 @@
|
||||
<IISExpressUseClassicPipelineMode />
|
||||
<UseGlobalApplicationHostFile />
|
||||
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||
<ProjectView>ShowAllFiles</ProjectView>
|
||||
<ProjectView>ProjectFiles</ProjectView>
|
||||
<WebStackScaffolding_ViewDialogWidth>600</WebStackScaffolding_ViewDialogWidth>
|
||||
<Controller_SelectedScaffolderID>MvcControllerEmptyScaffolder</Controller_SelectedScaffolderID>
|
||||
<Controller_SelectedScaffolderCategoryPath>root/Common/MVC/Controller</Controller_SelectedScaffolderCategoryPath>
|
||||
|
||||
@@ -2,9 +2,13 @@
|
||||
using System.Diagnostics;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Security;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Service.DCEntityMapper;
|
||||
using BeWo.Service.ServiceContracts;
|
||||
using BeWoPlanerMobil.Models;
|
||||
using BeWoPlanerMobil.Service;
|
||||
using BeWoPlanerMobil.Util;
|
||||
using BS.Shared;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
@@ -30,6 +34,8 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
public static readonly string IsSessionTimedOut = "isSessionTimedOut";
|
||||
|
||||
private UserDC loggedInUserDc = null;
|
||||
private EmployeeDC loggedInEmployeeDC = null;
|
||||
|
||||
protected ActionResult Logout()
|
||||
{
|
||||
@@ -45,9 +51,60 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return RedirectToActionPermanent("Index", "Login", new {tenant = MobileSessionFacade.Tenant});
|
||||
}
|
||||
|
||||
protected UserDC GetUser()
|
||||
protected virtual void InitModel(AbstractModel model)
|
||||
{
|
||||
return UserService.LoadUser(MobileSessionFacade.LoggedInUser.Oid.Value);
|
||||
model.LoggedInUser = LoggedInUser;
|
||||
model.LoggedInEmployee = LoggedInEmployee;
|
||||
model.Mandator = Mandator;
|
||||
|
||||
if (model.SessionModel != null)
|
||||
{
|
||||
String sessionkey = model.GetType().Name;
|
||||
|
||||
if (Session[sessionkey] is null)
|
||||
{
|
||||
Session[sessionkey] = model.SessionModel;
|
||||
}
|
||||
else
|
||||
{
|
||||
model.SessionModel = (ISessionModel)Session[sessionkey];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected UserDC LoggedInUser
|
||||
{
|
||||
get
|
||||
{
|
||||
if (loggedInUserDc == null)
|
||||
{
|
||||
var user = DAOFactory.GenericDAO.LoadByID<ApplicationUser>(MobileSessionFacade.LoggedInUserOid.Value);
|
||||
loggedInUserDc = MapperFactory.UserDC_User.MapToNewDC(user);
|
||||
loggedInEmployeeDC = MapperFactory.EmployeeDC_Employee.MapToNewDC(user.Employee);
|
||||
}
|
||||
return loggedInUserDc;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected EmployeeDC LoggedInEmployee
|
||||
{
|
||||
get
|
||||
{
|
||||
if(loggedInEmployeeDC == null)
|
||||
{
|
||||
var tmp = LoggedInUser; //Sets employee
|
||||
}
|
||||
return loggedInEmployeeDC;
|
||||
}
|
||||
}
|
||||
|
||||
protected MokMandator Mandator
|
||||
{
|
||||
get
|
||||
{
|
||||
return MobileSessionFacade.Mandator;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnActionExecuting(ActionExecutingContext filterContext)
|
||||
@@ -63,15 +120,14 @@ namespace BeWoPlanerMobil.Controllers
|
||||
[Authorize]
|
||||
public ActionResult UpdateApplicationSettings(string pKey, string pValue)
|
||||
{
|
||||
var userSettings = GetUser().Settings;
|
||||
|
||||
var userSettings = LoggedInUser.Settings;
|
||||
|
||||
UserSettingsUtils.SetSettingValue(SettingsType.ApplicationSettings, pKey, pValue, userSettings);
|
||||
|
||||
var loggedInUser = GetUser();
|
||||
|
||||
if(loggedInUser?.UserOid.HasValue ?? false)
|
||||
if(LoggedInUser?.UserOid.HasValue ?? false)
|
||||
{
|
||||
UserService.UpdateUserSettings(loggedInUser.UserOid.Value, userSettings);
|
||||
UserService.UpdateUserSettings(LoggedInUser.UserOid.Value, userSettings);
|
||||
}
|
||||
|
||||
return RedirectToAction("Main");
|
||||
@@ -80,11 +136,11 @@ namespace BeWoPlanerMobil.Controllers
|
||||
[Authorize]
|
||||
public void UpdateUserSettingsWithoutReload(string key, string value)
|
||||
{
|
||||
var userSettings = GetUser().Settings;
|
||||
var userSettings = LoggedInUser.Settings;
|
||||
|
||||
UserSettingsUtils.SetSettingValue(SettingsType.ApplicationSettings, key, value, userSettings);
|
||||
|
||||
var loggedInUser = GetUser();
|
||||
var loggedInUser = LoggedInUser;
|
||||
|
||||
if(loggedInUser?.UserOid.HasValue ?? false)
|
||||
{
|
||||
|
||||
@@ -20,6 +20,10 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
public class CustomerController : ReportBaseController
|
||||
{
|
||||
public CustomerController()
|
||||
{
|
||||
|
||||
}
|
||||
private CustomerModel _Model;
|
||||
public CustomerModel Model
|
||||
{
|
||||
@@ -31,20 +35,33 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return null;
|
||||
}
|
||||
|
||||
if (((CustomerModel) Session[ModelSessionConstants.CustomerModelKey])?.Employee is null)
|
||||
if (_Model == null)
|
||||
{
|
||||
_Model = new CustomerModel{Employee = MobileSessionFacade.LoggedInEmployee};
|
||||
Session[ModelSessionConstants.CustomerModelKey] = _Model;
|
||||
}
|
||||
else
|
||||
{
|
||||
_Model = (CustomerModel)Session[ModelSessionConstants.CustomerModelKey];
|
||||
_Model = new CustomerModel();
|
||||
|
||||
InitModel(_Model);
|
||||
InitViewModel();
|
||||
|
||||
}
|
||||
|
||||
//if (((CustomerModel) Session[ModelSessionConstants.CustomerModelKey])?.LoggedInEmployee is null)
|
||||
//{
|
||||
// _Model = new CustomerModel();
|
||||
|
||||
// InitModel(_Model);
|
||||
|
||||
// Session[ModelSessionConstants.CustomerModelKey] = _Model;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// _Model = (CustomerModel)Session[ModelSessionConstants.CustomerModelKey];
|
||||
//}
|
||||
|
||||
return _Model;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[Authorize]
|
||||
public ActionResult Customer(long? id)
|
||||
{
|
||||
@@ -55,12 +72,6 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return Logout();
|
||||
}
|
||||
|
||||
var customerFilter = MobileUserSettingsUtils.GetSettingValueAsEnum(AbstractModel.UserSettings, SettingsKeys.CustomerFilterCustomers, CustomerFilterEnum.MyCustomer);
|
||||
|
||||
Model.SelectedCustomerFilter = customerFilter;
|
||||
|
||||
InitViewModel();
|
||||
|
||||
if(id.HasValue)
|
||||
{
|
||||
LoadCustomerToModel(id);
|
||||
@@ -82,27 +93,70 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
private void InitViewModel()
|
||||
{
|
||||
if(Model is null || !MobileSessionFacade.IsUserLoggedIn() || Request.Browser.Browser.Equals("InternetExplorer"))
|
||||
if(!MobileSessionFacade.IsUserLoggedIn() || Request.Browser.Browser.Equals("InternetExplorer"))
|
||||
{
|
||||
Logout();
|
||||
return;
|
||||
}
|
||||
|
||||
if(Model.Employee?.EmployeeOid.HasValue ?? false)
|
||||
|
||||
|
||||
if (Model.LoggedInEmployee?.EmployeeOid.HasValue ?? false)
|
||||
{
|
||||
Model.Customers = EmployeeService.GetActiveCustomersForEmployee(Model.Employee.EmployeeOid.Value, Model.SelectedCustomerFilter).OrderBy(customer => customer.LastName).ToList();
|
||||
Model.Customers = EmployeeService.GetActiveCustomersForEmployee(Model.LoggedInEmployee.EmployeeOid.Value, Model.SelectedCustomerFilter).OrderBy(customer => customer.LastName).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Customers = new List<CompactCustomerDC>();
|
||||
}
|
||||
|
||||
if(AbstractModel.IsAllowedToSeeMedikamentenliste)
|
||||
if (Model.CustomerSessionModel.SelectedCustomerOid.HasValue)
|
||||
{
|
||||
Model.SelectedCustomer = CustomerService.LoadCustomer(Model.CustomerSessionModel.SelectedCustomerOid.Value);
|
||||
}
|
||||
|
||||
if (Model.IsAllowedToSeeMedikamentenliste)
|
||||
{
|
||||
Model.ReportTypes = new List<CustomerReportType> { CustomerReportType.Medikamentenliste, CustomerReportType.Bedarfsmedikation, CustomerReportType.Historie };
|
||||
}
|
||||
|
||||
Model.AllAbsenceReasons = AbstractModel.HasRightToViewCustomerAbsenceTimes ? CustomerService.GetAllAbsenceReasons() : new List<AbsenceReasonDC>();
|
||||
Model.AllAbsenceReasons = Model.HasRightToViewCustomerAbsenceTimes ? CustomerService.GetAllAbsenceReasons() : new List<AbsenceReasonDC>();
|
||||
|
||||
|
||||
|
||||
if (Model.CustomerSessionModel.SelectedAbsenceTimeOid.HasValue && Model.SelectedCustomer != null)
|
||||
{
|
||||
Model.SelectedAbsenceTime = Model.SelectedCustomer.AbsenceTimes.FirstOrDefault(absenceTime => absenceTime.AbsenceTimeOid.HasValue && absenceTime.AbsenceTimeOid.Value.Equals(Model.CustomerSessionModel.SelectedAbsenceTimeOid.Value));
|
||||
}
|
||||
|
||||
ReloadBargeldkassen();
|
||||
|
||||
|
||||
if (Model.CustomerSessionModel.SelectedBargeldkasseOid.HasValue && Model.Bargeldkassen != null)
|
||||
{
|
||||
Model.SelectedBargeldkasse = Model.Bargeldkassen.FirstOrDefault(bargeldkasse => bargeldkasse.BargeldkassenOid.HasValue && bargeldkasse.BargeldkassenOid.Value.Equals(Model.CustomerSessionModel.SelectedBargeldkasseOid.Value));
|
||||
}
|
||||
|
||||
if (Model.CustomerSessionModel.SelectedBargeldtransaktionOid.HasValue)
|
||||
{
|
||||
var kassenbuch = GetBargeldkasseByTransaktionsOid(Model.CustomerSessionModel.SelectedBargeldtransaktionOid.Value);
|
||||
|
||||
var zahlung = kassenbuch?.Bargeldtransaktionen.FirstOrDefault(bargeldtransaktion => bargeldtransaktion.BargeldtransaktionOid.Equals(Model.CustomerSessionModel.SelectedBargeldtransaktionOid.Value));
|
||||
|
||||
Model.SelectedBargeldtransaktion = zahlung;
|
||||
}
|
||||
|
||||
|
||||
if (Model.SelectedCustomer != null)
|
||||
{
|
||||
Model.FolderTree = OperationsService.GetFolderTree(TableID.Customer, Model.SelectedCustomer.CustomerOid.Value);
|
||||
Model.ICD10Diagnosen = OperationsService.GetDiagiosisStringsForICD10Codes(Model.SelectedCustomer.ICD10DiagnosisCodes);
|
||||
}
|
||||
|
||||
|
||||
var customerFilter = MobileUserSettingsUtils.GetSettingValueAsEnum(Model.UserSettings, SettingsKeys.CustomerFilterCustomers, CustomerFilterEnum.MyCustomer);
|
||||
|
||||
Model.SelectedCustomerFilter = customerFilter;
|
||||
}
|
||||
|
||||
private void LoadCustomerToModel(long? customerOid)
|
||||
@@ -112,31 +166,30 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return;
|
||||
}
|
||||
|
||||
if(customerOid == -1)
|
||||
|
||||
|
||||
if (customerOid == -1)
|
||||
{
|
||||
Model.SelectedCustomer = null;
|
||||
Model.SelectedCustomerOid = null;
|
||||
Model.FolderTree = null;
|
||||
Model.ICD10Diagnosen = null;
|
||||
Model.Bargeldkassen = new List<BargeldkassenDC>();
|
||||
Model.BargeldtransaktionshistoryEntries = new List<BargeldtransaktionshistoryDC>();
|
||||
Model.TransaktionsOid2HasHistoryEntries = new Dictionary<long, bool>();
|
||||
Model.SelectedBargeldtransaktion = null;
|
||||
|
||||
Model.CustomerSessionModel.ResetValues();
|
||||
//Model.SelectedCustomer = null;
|
||||
//Model.SelectedCustomerOid = null;
|
||||
//Model.SelectedAbsenceTimeOid = null;
|
||||
//Model.SelectedAbsenceReason = null;
|
||||
//Model.FolderTree = null;
|
||||
//Model.ICD10Diagnosen = null;
|
||||
//Model.Bargeldkassen = new List<BargeldkassenDC>();
|
||||
//Model.BargeldtransaktionshistoryEntries = new List<BargeldtransaktionshistoryDC>();
|
||||
//Model.TransaktionsOid2HasHistoryEntries = new Dictionary<long, bool>();
|
||||
//Model.SelectedBargeldtransaktion = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.FolderTree = OperationsService.GetFolderTree(TableID.Customer, customerOid.Value);
|
||||
Model.SelectedCustomerOid = customerOid;
|
||||
var customer = CustomerService.LoadCustomer(customerOid.Value);
|
||||
|
||||
if(!(customer is null))
|
||||
if (Model.SelectedCustomerOid.HasValue && Model.SelectedCustomerOid != customerOid)
|
||||
{
|
||||
Model.ICD10Diagnosen = OperationsService.GetDiagiosisStringsForICD10Codes(customer.ICD10DiagnosisCodes);
|
||||
Model.CustomerSessionModel.ResetValues();
|
||||
}
|
||||
|
||||
Model.SelectedCustomer = customer;
|
||||
|
||||
ReloadBargeldkassen();
|
||||
Model.SelectedCustomerOid = customerOid;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,7 +199,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
try
|
||||
{
|
||||
if(Model is null || !MobileSessionFacade.IsUserLoggedIn() || Request.Browser.Browser.Equals("InternetExplorer"))
|
||||
if(!MobileSessionFacade.IsUserLoggedIn() || Request.Browser.Browser.Equals("InternetExplorer"))
|
||||
{
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
return Logout();
|
||||
@@ -295,7 +348,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
ObjectOid = Model.SelectedCustomerOid,
|
||||
BinaryData = fileData,
|
||||
FileAttachmentType = FileAttachmentType.NotSpecified,
|
||||
InsertedBy = $"{Model.Employee.FirstName} {Model.Employee.LastName}",
|
||||
InsertedBy = $"{Model.LoggedInEmployee.FirstName} {Model.LoggedInEmployee.LastName}",
|
||||
InsertedOn = DateTime.Now
|
||||
};
|
||||
|
||||
@@ -409,7 +462,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
var isAllowedToEdit = MobileSessionFacade.LoggedInUser.CheckForAtLeastOneRight(new List<UserRightType> { UserRightType.CustomerView_Edit, UserRightType.EditAll });
|
||||
var isAllowedToEdit = LoggedInUser.CheckForAtLeastOneRight(new List<UserRightType> { UserRightType.CustomerView_Edit, UserRightType.EditAll });
|
||||
|
||||
if(isAllowedToEdit && Model.SelectedCustomer != null)
|
||||
{
|
||||
@@ -557,7 +610,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
[Authorize]
|
||||
public ActionResult ShowMedList(int reportType)
|
||||
{
|
||||
if(Model is null || !MobileSessionFacade.IsUserLoggedIn() || Request.Browser.Browser.Equals("InternetExplorer") || !AbstractModel.IsAllowedToSeeMedikamentenliste)
|
||||
if(Model is null || !MobileSessionFacade.IsUserLoggedIn() || Request.Browser.Browser.Equals("InternetExplorer") || !Model.IsAllowedToSeeMedikamentenliste)
|
||||
{
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
return PartialView("BeWoReportPartial", Model);
|
||||
@@ -573,7 +626,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
[Authorize]
|
||||
public ActionResult ShowHistoricalMedList(long medListOid)
|
||||
{
|
||||
if(Model is null || !MobileSessionFacade.IsUserLoggedIn() || Request.Browser.Browser.Equals("InternetExplorer") || !AbstractModel.IsAllowedToSeeMedikamentenliste)
|
||||
if(Model is null || !MobileSessionFacade.IsUserLoggedIn() || Request.Browser.Browser.Equals("InternetExplorer") || !Model.IsAllowedToSeeMedikamentenliste)
|
||||
{
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
return PartialView("BeWoReportPartial", Model);
|
||||
@@ -589,7 +642,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
[Authorize]
|
||||
public ActionResult DeleteHistoricalMedList(long medListOid)
|
||||
{
|
||||
if(Model is null || !MobileSessionFacade.IsUserLoggedIn() || Request.Browser.Browser.Equals("InternetExplorer") || !AbstractModel.IsAllowedToSeeMedikamentenliste)
|
||||
if(Model is null || !MobileSessionFacade.IsUserLoggedIn() || Request.Browser.Browser.Equals("InternetExplorer") || !Model.IsAllowedToSeeMedikamentenliste)
|
||||
{
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
return PartialView("CustomerMedListPartial", Model);
|
||||
@@ -703,9 +756,10 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
var selectedBargeldkasse = Model.Bargeldkassen.FirstOrDefault(bargeldkasse => bargeldkasse.BargeldkassenOid.HasValue && bargeldkasse.BargeldkassenOid.Value.Equals(oid));
|
||||
//var selectedBargeldkasse = Model.Bargeldkassen.FirstOrDefault(bargeldkasse => bargeldkasse.BargeldkassenOid.HasValue && bargeldkasse.BargeldkassenOid.Value.Equals(oid));
|
||||
|
||||
Model.SelectedBargeldkasse = selectedBargeldkasse;
|
||||
//Model.SelectedBargeldkasse = selectedBargeldkasse;
|
||||
Model.SelectedBargeldkasseOid = oid;
|
||||
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
@@ -719,7 +773,8 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
Model.SelectedBargeldkasse = null;
|
||||
//Model.SelectedBargeldkasse = null;
|
||||
Model.SelectedBargeldkasseOid = null;
|
||||
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
@@ -733,7 +788,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return PartialView("CustomerBargeldkassenFormPartial", Model);
|
||||
}
|
||||
|
||||
Model.SelectedBargeldkasse = null;
|
||||
Model.SelectedBargeldkasseOid = null;
|
||||
Model.SelectedAuszahlungsintervall = 0;
|
||||
|
||||
return PartialView("CustomerBargeldkassenFormPartial", Model);
|
||||
@@ -748,6 +803,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return PartialView("CustomerBargeldkassenFormPartial", Model);
|
||||
}
|
||||
|
||||
Model.SelectedBargeldkasseOid = bargeldkassenOid;
|
||||
Model.SelectedBargeldkasse = Model.Bargeldkassen.FirstOrDefault(bargeldkasse => bargeldkasse.BargeldkassenOid.HasValue && bargeldkasse.BargeldkassenOid.Value.Equals(bargeldkassenOid));
|
||||
|
||||
if(Model.SelectedBargeldkasse != null)
|
||||
@@ -779,7 +835,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
OperationsService.DeactivateBargeldkasse(bargeldkassenOid, bargeldkassenVersion);
|
||||
|
||||
ReloadBargeldkassen();
|
||||
//ReloadBargeldkassen();
|
||||
|
||||
return RedirectToActionPermanent("Customer");
|
||||
}
|
||||
@@ -797,7 +853,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
var name = formCollection["bargeldkassenname"];
|
||||
var rawAnfangsbestand = formCollection["bargeldkassenanfangsbestand"];
|
||||
|
||||
decimal.TryParse(rawAnfangsbestand, out var anfangsbestand);
|
||||
decimal.TryParse(rawAnfangsbestand.Replace(".", ","), out var anfangsbestand);
|
||||
|
||||
var auszahlungsintervall = (Auszahlungsintervall) Model.SelectedAuszahlungsintervall;
|
||||
|
||||
@@ -814,7 +870,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
OperationsService.InsertNewBargeldkasse(newBargeldkasse);
|
||||
|
||||
LoadCustomerToModel(Model.SelectedCustomerOid);
|
||||
//LoadCustomerToModel(Model.SelectedCustomerOid);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -831,10 +887,11 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
OperationsService.UpdateBargeldkasse(bargeldkasse);
|
||||
|
||||
LoadCustomerToModel(Model.SelectedCustomerOid);
|
||||
//LoadCustomerToModel(Model.SelectedCustomerOid);
|
||||
}
|
||||
|
||||
Model.SelectedBargeldkasse = null;
|
||||
//Model.SelectedBargeldkasse = null;
|
||||
Model.SelectedBargeldkasseOid = null;
|
||||
|
||||
return RedirectToActionPermanent("Customer");
|
||||
}
|
||||
@@ -931,8 +988,9 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
Model.SelectedTransaktionsart = (int) zahlung.Zahlungstyp;
|
||||
}
|
||||
|
||||
Model.SelectedBargeldkasse = kassenbuch;
|
||||
|
||||
//Model.SelectedBargeldkasse = kassenbuch;
|
||||
Model.SelectedBargeldkasseOid = kassenbuch.BargeldkassenOid;
|
||||
|
||||
return PartialView("CustomerBargeldtransaktionenFormPartial", Model);
|
||||
}
|
||||
@@ -962,7 +1020,8 @@ namespace BeWoPlanerMobil.Controllers
|
||||
Model.SelectedBargeldtransaktion = null;
|
||||
Model.SelectedTransaktionsart = 0;
|
||||
|
||||
Model.SelectedBargeldkasse = Model.Bargeldkassen.FirstOrDefault(bk => bk.BargeldkassenOid.HasValue && bk.BargeldkassenOid.Equals(bargeldkassenOid));
|
||||
Model.SelectedBargeldkasseOid = bargeldkassenOid;
|
||||
//Model.SelectedBargeldkasse = Model.Bargeldkassen.FirstOrDefault(bk => bk.BargeldkassenOid.HasValue && bk.BargeldkassenOid.Equals(bargeldkassenOid));
|
||||
|
||||
return PartialView("CustomerBargeldtransaktionenFormPartial", Model);
|
||||
}
|
||||
@@ -1028,7 +1087,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
OperationsService.UpdateBargeldkasse(bargeldkasse);
|
||||
|
||||
Model.SelectedBargeldkasse = null;
|
||||
Model.SelectedBargeldkasseOid = null;
|
||||
|
||||
ReloadBargeldkassen();
|
||||
|
||||
@@ -1070,7 +1129,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return PartialView("CustomerBargeldkassen", Model);
|
||||
}
|
||||
|
||||
ReloadBargeldkassen();
|
||||
// ReloadBargeldkassen();
|
||||
|
||||
return PartialView("CustomerBargeldkassen", Model);
|
||||
}
|
||||
@@ -1126,7 +1185,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
OperationsService.UpdateBargeldkasse(bargeldkasse);
|
||||
}
|
||||
|
||||
ReloadBargeldkassen();
|
||||
//ReloadBargeldkassen();
|
||||
|
||||
return PartialView("CustomerBargeldkassen", Model);
|
||||
}
|
||||
@@ -1171,7 +1230,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
OperationsService.DeleteBargeldtransaktionSignature(signatureOid.Value);
|
||||
OperationsService.UpdateBargeldkasse(bargeldkasse);
|
||||
|
||||
ReloadBargeldkassen();
|
||||
//ReloadBargeldkassen();
|
||||
}
|
||||
|
||||
return PartialView("CustomerBargeldkassen", Model);
|
||||
@@ -1277,7 +1336,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
LoadCustomerToModel(customer.CustomerOid);
|
||||
|
||||
Model.SelectedAbsenceTime = null;
|
||||
Model.SelectedAbsenceReason = -1;
|
||||
Model.SelectedAbsenceReasonOid = -1;
|
||||
|
||||
return RedirectToActionPermanent("Customer", new { id = customer.CustomerOid });
|
||||
}
|
||||
@@ -1306,8 +1365,8 @@ namespace BeWoPlanerMobil.Controllers
|
||||
//return "Es ist ein Fehler bei der Auswahl der zu bearbeitenden Abwesenheit aufgetreten.<br />Bitte wenden Sie sich an Ihren Systemadministrator.";
|
||||
}
|
||||
|
||||
Model.SelectedAbsenceTime = selectedAbsenceTime;
|
||||
Model.SelectedAbsenceReason = selectedAbsenceTime.Reason.AbsenceReasonOid;
|
||||
Model.SelectedAbsenceTimeOid = absenceTimeOid;
|
||||
Model.SelectedAbsenceReasonOid = selectedAbsenceTime.Reason.AbsenceReasonOid;
|
||||
|
||||
//return LeerzeichenFuerGetMethoden;
|
||||
return RedirectToActionPermanent("Customer", Model);
|
||||
@@ -1323,8 +1382,8 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return "Es ist ein Fehler bei der Auswahl der zu bearbeitenden Abwesenheit aufgetreten.<br />Bitte wenden Sie sich an Ihren Systemadministrator.";
|
||||
}
|
||||
|
||||
Model.SelectedAbsenceTime = selectedAbsenceTime;
|
||||
Model.SelectedAbsenceReason = selectedAbsenceTime.Reason.AbsenceReasonOid;
|
||||
Model.SelectedAbsenceTimeOid = absenceTimeOid;
|
||||
Model.SelectedAbsenceReasonOid = selectedAbsenceTime.Reason.AbsenceReasonOid;
|
||||
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
@@ -1343,8 +1402,8 @@ namespace BeWoPlanerMobil.Controllers
|
||||
[Authorize]
|
||||
public string DeselectAbsenceTime()
|
||||
{
|
||||
Model.SelectedAbsenceTime = null;
|
||||
Model.SelectedAbsenceReason = -1;
|
||||
Model.SelectedAbsenceTimeOid = null;
|
||||
Model.SelectedAbsenceReasonOid = -1;
|
||||
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
@@ -21,16 +21,23 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return null;
|
||||
}
|
||||
|
||||
if(((DebuggingToolsModel)Session[ModelSessionConstants.DebuggingToolsModelKey])?.Employee == null)
|
||||
if (_Model == null)
|
||||
{
|
||||
_Model = new DebuggingToolsModel { Employee = MobileSessionFacade.LoggedInEmployee };
|
||||
Session[ModelSessionConstants.DebuggingToolsModelKey] = _Model;
|
||||
}
|
||||
else
|
||||
{
|
||||
_Model = (DebuggingToolsModel) Session[ModelSessionConstants.DebuggingToolsModelKey];
|
||||
_Model = new DebuggingToolsModel();
|
||||
InitModel(_Model);
|
||||
}
|
||||
|
||||
//if (((DebuggingToolsModel)Session[ModelSessionConstants.DebuggingToolsModelKey])?.LoggedInEmployee is null)
|
||||
//{
|
||||
// _Model = new DebuggingToolsModel();
|
||||
// InitModel(_Model);
|
||||
// Session[ModelSessionConstants.DebuggingToolsModelKey] = _Model;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// _Model = (DebuggingToolsModel) Session[ModelSessionConstants.DebuggingToolsModelKey];
|
||||
//}
|
||||
|
||||
return _Model;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,15 +22,21 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return null;
|
||||
}
|
||||
|
||||
if (((DevExpressSchedulerModel)Session["DevExpressSchedulerModel"])?.Employee == null)
|
||||
if (_Model == null)
|
||||
{
|
||||
_Model = new DevExpressSchedulerModel { Employee = MobileSessionFacade.LoggedInEmployee };
|
||||
Session["DevExpressSchedulerModel"] = _Model;
|
||||
}
|
||||
else
|
||||
{
|
||||
_Model = (DevExpressSchedulerModel)Session["DevExpressSchedulerModel"];
|
||||
_Model = new DevExpressSchedulerModel();
|
||||
InitModel(_Model);
|
||||
}
|
||||
//if (((DevExpressSchedulerModel)Session["DevExpressSchedulerModel"])?.LoggedInEmployee is null)
|
||||
//{
|
||||
// _Model = new DevExpressSchedulerModel();
|
||||
// InitModel(_Model);
|
||||
// Session["DevExpressSchedulerModel"] = _Model;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// _Model = (DevExpressSchedulerModel)Session["DevExpressSchedulerModel"];
|
||||
//}
|
||||
|
||||
return _Model;
|
||||
}
|
||||
@@ -46,7 +52,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
var appointments = KalenderService.LoadFilteredAppointments(
|
||||
true,
|
||||
Model?.Employee?.EmployeeOid ?? 1,
|
||||
Model?.LoggedInEmployee?.EmployeeOid ?? 1,
|
||||
DateTime.Today.AddDays(-60),
|
||||
DateTime.Today.AddDays(60),
|
||||
new List<long>(),
|
||||
|
||||
@@ -31,16 +31,22 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
get
|
||||
{
|
||||
if((ExternalSignatureModel) Session["ExternalSignatureModel"] is null)
|
||||
if (_Model == null)
|
||||
{
|
||||
_Model = new ExternalSignatureModel();
|
||||
Session["ExternalSignatureModel"] = _Model;
|
||||
}
|
||||
else
|
||||
{
|
||||
_Model = (ExternalSignatureModel) Session["ExternalSignatureModel"];
|
||||
}
|
||||
|
||||
|
||||
//if((ExternalSignatureModel) Session["ExternalSignatureModel"] is null)
|
||||
//{
|
||||
// _Model = new ExternalSignatureModel();
|
||||
// Session["ExternalSignatureModel"] = _Model;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// _Model = (ExternalSignatureModel) Session["ExternalSignatureModel"];
|
||||
//}
|
||||
|
||||
return _Model ?? new ExternalSignatureModel();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,16 +52,16 @@ namespace BeWoPlanerMobil.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
Log.Info($"LoginController.Index(): Loggedin User: {MobileSessionFacade.LoggedInUser.LoginName}");
|
||||
var user = LoggedInUser;
|
||||
|
||||
Log.Info($"LoginController.Index(): Loggedin User: {user.LoginName}");
|
||||
|
||||
MobileSessionFacade.Mandator = OperationsService.GetMandator();
|
||||
MobileSessionFacade.Mandator = DcToMokMapper.CreateMandator(OperationsService.GetMandator());
|
||||
|
||||
var viewServiceRecords = AbstractModel.HasRightToSeeServiceRecords;//AbstractModel.CheckRight(UserRightType.ServiceRecordView_View);
|
||||
var viewAll = AbstractModel.CheckRight(UserRightType.ViewAll);
|
||||
|
||||
var user = UserService.LoadUser(MobileSessionFacade.LoggedInUser.Oid.Value);
|
||||
var userGroups = user.UserGroups;
|
||||
var viewServiceRecords = user.HasRight(UserRightType.ServiceRecordView_View) && user.HasRight(UserRightType.ServiceRecordView_Create);
|
||||
var viewAll = user.HasRight(UserRightType.ViewAll);
|
||||
|
||||
|
||||
//if(!MobileSessionFacade.LoggedInUser.UserGroups.Any(a => a.Rights.Any(f => f.RightType.Equals(UserRightType.ServiceRecordView_View))) &&
|
||||
// !MobileSessionFacade.LoggedInUser.UserGroups.Any(a => a.Rights.Any(f => f.RightType.Equals(UserRightType.ViewAll))))
|
||||
if(!viewServiceRecords && !viewAll)
|
||||
@@ -72,7 +72,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return View("Index");
|
||||
}
|
||||
|
||||
FormsAuthentication.SetAuthCookie(MobileSessionFacade.LoggedInUser.LoginName, true);
|
||||
FormsAuthentication.SetAuthCookie(LoggedInUser.LoginName, true);
|
||||
ViewData[LoginErrorIndex] = string.Empty;
|
||||
|
||||
var keks = new HttpCookie(MobileSessionFacade.CookieName) { Value = MobileSessionFacade.Tenant, Expires = DateTime.Now.AddDays(1) };
|
||||
@@ -124,11 +124,11 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
Log.Info($"LoginController.Index(): Login failed! Tenant = {MobileSessionFacade.Tenant}");
|
||||
|
||||
ViewData[LoginErrorIndex] = Request.Browser.Browser.Equals("InternetExplorer") ?
|
||||
"Dieser Browser ist nicht mit dem mobilen BeWoPlaner kompatibel. Bitte benutzen Sie einen anderen Browser als den Internet Explorer." :
|
||||
"Die Anmeldung ist fehlgeschlagen. Bitte überprüfen Sie Benutzername und Passwort.";
|
||||
ViewData[LoginErrorIndex] = Request.Browser.Browser.Equals("InternetExplorer") ?
|
||||
"Dieser Browser ist nicht mit dem mobilen BeWoPlaner kompatibel. Bitte benutzen Sie einen anderen Browser als den Internet Explorer." :
|
||||
"Die Anmeldung ist fehlgeschlagen. Bitte überprüfen Sie Benutzername und Passwort.";
|
||||
|
||||
return View("Index");
|
||||
return View("Index");
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -14,6 +14,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web.Mvc;
|
||||
using BeWo.Service.Plugins;
|
||||
using DevExpress.XtraReports.UI;
|
||||
|
||||
// Controller des Quittierungsbelegsmoduls
|
||||
|
||||
@@ -33,20 +34,83 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return null;
|
||||
}
|
||||
|
||||
if(((ReportModel) Session[ModelSessionConstants.ReportModelKey])?.Employee is null)
|
||||
if (_Model == null)
|
||||
{
|
||||
_Model = new ReportModel {Employee = MobileSessionFacade.LoggedInEmployee, ReportCreator = GetReportCreator()};
|
||||
Session[ModelSessionConstants.ReportModelKey] = _Model;
|
||||
}
|
||||
else
|
||||
{
|
||||
_Model = (ReportModel) Session[ModelSessionConstants.ReportModelKey];
|
||||
_Model = new ReportModel { ReportCreator = GetReportCreator() };
|
||||
InitModel(_Model);
|
||||
InitViewModel();
|
||||
}
|
||||
//if (((ReportModel) Session[ModelSessionConstants.ReportModelKey])?.LoggedInEmployee is null)
|
||||
//{
|
||||
// _Model = new ReportModel {ReportCreator = GetReportCreator()};
|
||||
// InitModel(_Model);
|
||||
// Session[ModelSessionConstants.ReportModelKey] = _Model;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// _Model = (ReportModel) Session[ModelSessionConstants.ReportModelKey];
|
||||
//}
|
||||
|
||||
return _Model;
|
||||
}
|
||||
}
|
||||
|
||||
private void InitViewModel()
|
||||
{
|
||||
var month = DateTime.Today.Month;
|
||||
var year = DateTime.Today.Year;
|
||||
var first = new DateTime(year, month, 1).AddMonths(-1);
|
||||
var last = first.AddMonths(1).AddDays(-1);
|
||||
|
||||
Model.SelectedYear = Model.SelectedYear ?? first.Year;
|
||||
Model.SelectedMonth = Model.SelectedMonth ?? first.Month;
|
||||
Model.SelectedStartDay = Model.SelectedStartDay ?? first.Day;
|
||||
Model.SelectedEndDay = Model.SelectedEndDay ?? last.Day;
|
||||
|
||||
InitFilterCombo();
|
||||
|
||||
Model.Customers.Clear();
|
||||
|
||||
Model.Customers = CustomerService.GetAllActiveCustomersForEmployee();
|
||||
|
||||
Model.Employees = EmployeeService.GetActiveCompactEmployeesForEmployee(LoggedInEmployee.EmployeeOid.Value);
|
||||
|
||||
Model.ServiceCategories = OperationsService.GetAllServiceCategories();
|
||||
|
||||
Model.Organisations = CustomerService.GetAllCostBearerCompact();
|
||||
Model.Organisations.Sort((x, y) => string.Compare(x.Name, y.Name, StringComparison.CurrentCulture));
|
||||
|
||||
Model.AllTeams = EmployeeService.GetAllActiveCompactTeamsForEmployee(LoggedInEmployee.EmployeeOid.Value);
|
||||
|
||||
Model.Dokutypes = ValueListService.GetAllValueListEntrysByType(ValueListEntryType.DocumentType);
|
||||
if (Model.Dokutypes != null)
|
||||
{
|
||||
Model.Dokutypes = Model.Dokutypes.OrderBy(s => s.ValueListEntryOid).ToArray();
|
||||
}
|
||||
|
||||
if (Model.SelectedCustomerOid.HasValue)
|
||||
{
|
||||
Model.SelectedCustomer = Model.Customers.FirstOrDefault(customer => customer.CustomerOid == Model.SelectedCustomerOid.Value);
|
||||
}
|
||||
|
||||
if (Model.SelectedEmployeeOid.HasValue)
|
||||
{
|
||||
Model.SelectedEmployee = Model.Employees.FirstOrDefault(employee => employee.EmployeeOid.Equals(Model.SelectedEmployeeOid.Value));
|
||||
}
|
||||
if (Model.SelectedTeamOid.HasValue)
|
||||
{
|
||||
Model.SelectedTeam = Model.AllTeams.FirstOrDefault(team => team.TeamOid == Model.SelectedTeamOid.Value);
|
||||
}
|
||||
if (Model.SelectedOrganisationOid.HasValue)
|
||||
{
|
||||
Model.SelectedOrganisation= Model.Organisations.FirstOrDefault(organisation => organisation.OrganisationOid.Equals(Model.SelectedOrganisationOid.Value));
|
||||
}
|
||||
if (Model.SelectedServiceCategoryOid.HasValue)
|
||||
{
|
||||
Model.SelectedServiceCategory = Model.ServiceCategories.FirstOrDefault(serviceCategory => serviceCategory.ServiceCategoryOid == Model.SelectedServiceCategoryOid.Value);
|
||||
}
|
||||
}
|
||||
|
||||
private static AbstractReportCreator GetReportCreator()
|
||||
{
|
||||
var creator = PluginLoader.FindClass<DefaultReportCreator>();
|
||||
@@ -68,7 +132,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return Logout();
|
||||
}
|
||||
|
||||
if(!AbstractModel.HasRightToViewQuittierungsbelege)
|
||||
if(!_Model.HasRightToViewQuittierungsbelege)
|
||||
{
|
||||
return RedirectToActionPermanent("Main", "Main");
|
||||
}
|
||||
@@ -82,12 +146,12 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
try
|
||||
{
|
||||
if(!MobileSessionFacade.IsUserLoggedIn() || Request.Browser.Browser.Equals("InternetExplorer") || Model?.Employee?.EmployeeOid is null)
|
||||
if(!MobileSessionFacade.IsUserLoggedIn() || Request.Browser.Browser.Equals("InternetExplorer") || Model?.LoggedInEmployee?.EmployeeOid is null)
|
||||
{
|
||||
return Logout();
|
||||
}
|
||||
|
||||
if(!AbstractModel.HasRightToViewQuittierungsbelege)
|
||||
if(!Model.HasRightToViewQuittierungsbelege)
|
||||
{
|
||||
return RedirectToActionPermanent("Main", "Main");
|
||||
}
|
||||
@@ -98,36 +162,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return Logout();
|
||||
}
|
||||
|
||||
var month = DateTime.Today.Month;
|
||||
var year = DateTime.Today.Year;
|
||||
var first = new DateTime(year, month, 1).AddMonths(-1);
|
||||
var last = first.AddMonths(1).AddDays(-1);
|
||||
|
||||
Model.SelectedYear = Model.SelectedYear ?? first.Year;
|
||||
Model.SelectedMonth = Model.SelectedMonth ?? first.Month;
|
||||
Model.SelectedStartDay = Model.SelectedStartDay ?? first.Day;
|
||||
Model.SelectedEndDay = Model.SelectedEndDay ?? last.Day;
|
||||
|
||||
InitFilterCombo();
|
||||
|
||||
Model.Customers.Clear();
|
||||
|
||||
Model.Customers = CustomerService.GetAllActiveCustomersForEmployee();
|
||||
|
||||
Model.Employees = EmployeeService.GetActiveCompactEmployeesForEmployee(MobileSessionFacade.LoggedInCompactEmployee.EmployeeOid);
|
||||
|
||||
Model.ServiceCategories = OperationsService.GetAllServiceCategories();
|
||||
|
||||
Model.Organisations = CustomerService.GetAllCostBearerCompact();
|
||||
Model.Organisations.Sort((x, y) => string.Compare(x.Name, y.Name, StringComparison.CurrentCulture));
|
||||
|
||||
Model.AllTeams = EmployeeService.GetAllActiveCompactTeamsForEmployee(MobileSessionFacade.LoggedInEmployee.EmployeeOid);
|
||||
|
||||
Model.Dokutypes = ValueListService.GetAllValueListEntrysByType(ValueListEntryType.DocumentType);
|
||||
if(Model.Dokutypes != null)
|
||||
{
|
||||
Model.Dokutypes = Model.Dokutypes.OrderBy(s => s.ValueListEntryOid).ToArray();
|
||||
}
|
||||
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
@@ -143,9 +178,9 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
var filterList = new List<QbFilterItem>();
|
||||
|
||||
var hasRightToViewCustomers = AbstractModel.CheckForAtLeastOneRight(new[] { UserRightType.CustomerView_View, UserRightType.ViewAll });
|
||||
var hasRightToViewCustomers = Model.CheckForAtLeastOneRight(new[] { UserRightType.CustomerView_View, UserRightType.ViewAll });
|
||||
|
||||
var hasRightToViewMyTeams = AbstractModel.CheckForAtLeastOneRight(new[] { UserRightType.Customer_ViewMyTeams, UserRightType.ViewAll });
|
||||
var hasRightToViewMyTeams = Model.CheckForAtLeastOneRight(new[] { UserRightType.Customer_ViewMyTeams, UserRightType.ViewAll });
|
||||
|
||||
if(hasRightToViewCustomers)
|
||||
{
|
||||
@@ -160,14 +195,14 @@ namespace BeWoPlanerMobil.Controllers
|
||||
filterList.Add(new QbFilterItem(QBFilterEnum.MeineKlienten));
|
||||
filterList.Add(new QbFilterItem(QBFilterEnum.KlientenAuswahl));
|
||||
|
||||
if(AbstractModel.CheckRight(UserRightType.TeamView_ViewMyTeams) && false == AbstractModel.CheckRight(UserRightType.TeamView_ViewAll))
|
||||
if(Model.CheckRight(UserRightType.TeamView_ViewMyTeams) && false == Model.CheckRight(UserRightType.TeamView_ViewAll))
|
||||
{
|
||||
if(hasRightToViewMyTeams)
|
||||
{
|
||||
filterList.Add(new QbFilterItem(QBFilterEnum.TeamAuswahl));
|
||||
}
|
||||
}
|
||||
else if(AbstractModel.CheckRight(UserRightType.TeamView_ViewAll))
|
||||
else if(Model.CheckRight(UserRightType.TeamView_ViewAll))
|
||||
{
|
||||
if(hasRightToViewCustomers)
|
||||
{
|
||||
@@ -286,9 +321,9 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
if(Model.SelectedEmployee is null && (Model.Employee?.EmployeeOid.HasValue ?? false))
|
||||
if(Model.SelectedEmployee is null && (Model.LoggedInEmployee?.EmployeeOid.HasValue ?? false))
|
||||
{
|
||||
return $"{Model.Employee.LastNameFirstName}_{Model.Employee.EmployeeOid.Value}";
|
||||
return $"{Model.LoggedInEmployee.LastNameFirstName}_{Model.LoggedInEmployee.EmployeeOid.Value}";
|
||||
}
|
||||
|
||||
return $"{Model.SelectedEmployee.DetailDescription}_{Model.SelectedEmployee.EmployeeOid}";
|
||||
@@ -303,6 +338,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
}
|
||||
|
||||
Model.SelectedCustomer = Model.Customers.FirstOrDefault(customer => customer.CustomerOid == customerOid);
|
||||
Model.SelectedCustomerOid = customerOid;
|
||||
|
||||
return Model.SelectedCustomer?.DetailDescription ?? LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
@@ -316,7 +352,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
}
|
||||
|
||||
Model.SelectedTeam = Model.AllTeams.FirstOrDefault(team => team.TeamOid == teamOid);
|
||||
|
||||
Model.SelectedTeamOid = teamOid;
|
||||
return Model.SelectedTeam?.DetailDescription ?? string.Empty;
|
||||
}
|
||||
|
||||
@@ -386,12 +422,24 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
var isParsingSuccessful2 = long.TryParse(organisationOidStr, out var organisationOid);
|
||||
var isParsingSuccessful3 = long.TryParse(categoryOidStr, out var categoryOid);
|
||||
Model.SelectedOrganisationOid = null;
|
||||
Model.SelectedServiceCategoryOid = null;
|
||||
|
||||
Model.SelectedOrganisation = isParsingSuccessful2 ? Model.Organisations.FirstOrDefault(organisation => organisation.OrganisationOid.Equals(organisationOid)) : null;
|
||||
if (long.TryParse(organisationOidStr, out var organisationOid))
|
||||
{
|
||||
Model.SelectedOrganisationOid = organisationOid;
|
||||
}
|
||||
|
||||
if (long.TryParse(categoryOidStr, out var categoryOid))
|
||||
{
|
||||
Model.SelectedServiceCategoryOid = categoryOid;
|
||||
}
|
||||
|
||||
|
||||
Model.SelectedServiceCategory = isParsingSuccessful3 ? OperationsService.LoadServiceCategory(categoryOid) : null;
|
||||
//Model.SelectedOrganisation = isParsingSuccessful2 ? Model.Organisations.FirstOrDefault(organisation => organisation.OrganisationOid.Equals(organisationOid)) : null;
|
||||
|
||||
//Model.SelectedServiceCategory = isParsingSuccessful3 ? OperationsService.LoadServiceCategory(categoryOid) : null;
|
||||
|
||||
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
@@ -407,6 +455,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
Model.IsForSelectedEmployeesOnly = isForSelectedEmployeeOnly ?? false;
|
||||
Model.SelectedEmployee = employeeOid.HasValue ? Model.Employees.FirstOrDefault(employee => employee.EmployeeOid.Equals(employeeOid.Value)) : null;
|
||||
Model.SelectedEmployeeOid = employeeOid;
|
||||
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
@@ -421,6 +470,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
}
|
||||
|
||||
Model.SelectedEmployee = employeeOid.HasValue ? Model.Employees.FirstOrDefault(employee => employee.EmployeeOid.Equals(employeeOid)) : null;
|
||||
Model.SelectedEmployeeOid = employeeOid;
|
||||
|
||||
return Model.SelectedEmployee?.DetailDescription ?? LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
@@ -438,6 +488,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
Model.SelectedOrganisation = organisationOid.HasValue && Model.IsForSelectedCostbearersOnly ?
|
||||
Model.Organisations.FirstOrDefault(organisation => organisation.OrganisationOid.Equals(organisationOid)) :
|
||||
null;
|
||||
Model.SelectedOrganisationOid = organisationOid;
|
||||
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
@@ -452,6 +503,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
}
|
||||
|
||||
Model.SelectedOrganisation = organisationOid.HasValue ? Model.Organisations.FirstOrDefault(organisation => organisation.OrganisationOid.Equals(organisationOid)) : null;
|
||||
Model.SelectedOrganisationOid = organisationOid;
|
||||
|
||||
return Model.SelectedOrganisation?.DetailDescription ?? LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
@@ -468,6 +520,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
Model.IsForSelectedCategoryOnly = isForSelectedServiceCategoryOnly ?? false;
|
||||
|
||||
Model.SelectedServiceCategory = serviceCategoryOid.HasValue && Model.IsForSelectedCategoryOnly ? Model.ServiceCategories.FirstOrDefault(serviceCategory => serviceCategory.ServiceCategoryOid == serviceCategoryOid) : null;
|
||||
Model.SelectedServiceCategoryOid = serviceCategoryOid;
|
||||
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
@@ -485,6 +538,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
Model.SelectedServiceCategory = Model.ServiceCategories.FirstOrDefault(serviceCategory => serviceCategory.ServiceCategoryOid == serviceCategoryOid);
|
||||
}
|
||||
Model.SelectedServiceCategoryOid = serviceCategoryOid;
|
||||
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
@@ -512,7 +566,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
var selectedFilterEnum = (QBFilterEnum) filterEnumValue;
|
||||
|
||||
Model.SelectedFilterItem = new QbFilterItem(selectedFilterEnum);
|
||||
Model.SelectedFilterItemId = selectedFilterEnum;
|
||||
|
||||
if(selectedFilterEnum != QBFilterEnum.KlientenAuswahl || Model.SelectedCustomer != null)
|
||||
{
|
||||
@@ -523,7 +577,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
if(!(customer is null))
|
||||
{
|
||||
Model.SelectedCustomer = customer;
|
||||
Model.SelectedCustomerOid = customer.CustomerOid;
|
||||
}
|
||||
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
@@ -582,9 +636,9 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
var temp = csr.ServiceRecords.Where(sr => sr.ServiceRecordOid.HasValue && !serviceRecordOidsWithSignature.Contains(sr.ServiceRecordOid.Value));
|
||||
|
||||
if(!AbstractModel.HasRightToProvideEmployeeSignatureForOthers)
|
||||
if(!Model.HasRightToProvideEmployeeSignatureForOthers)
|
||||
{
|
||||
temp = temp.Where(sr => sr.Employee.Equals(MobileSessionFacade.LoggedInCompactEmployee));
|
||||
temp = temp.Where(sr => sr.Employee.Equals(LoggedInUser.Employee));
|
||||
}
|
||||
|
||||
csr.ServiceRecords.Clear();
|
||||
@@ -613,9 +667,9 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
var filteredServiceRecords = new List<ServiceRecordDC>();
|
||||
|
||||
if(!isCustomerSig && !AbstractModel.HasRightToProvideEmployeeSignatureForOthers)
|
||||
if(!isCustomerSig && !Model.HasRightToProvideEmployeeSignatureForOthers)
|
||||
{
|
||||
filteredServiceRecords = serviceRecords.Where(sr => sr.Employee.Equals(MobileSessionFacade.LoggedInCompactEmployee)).ToList();
|
||||
filteredServiceRecords = serviceRecords.Where(sr => sr.Employee.Equals(LoggedInUser.Employee)).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -626,7 +680,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
ServiceRecords = filteredServiceRecords,
|
||||
CustomerOid = isCustomerSig ? (long?) customerOid : null,
|
||||
Employee = isCustomerSig ? null : MobileSessionFacade.LoggedInCompactEmployee,
|
||||
Employee = isCustomerSig ? null : LoggedInUser.Employee,
|
||||
SignatureImage = base64SignatureString,
|
||||
SignatureType = signatureType,
|
||||
TimeSpanString = timeSpanString
|
||||
@@ -751,14 +805,14 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
var info = formCollection["deleteCustomerSignaturesInfo"];
|
||||
|
||||
if(AbstractModel.HasRightToDeleteReceiptSignatures)
|
||||
if(Model.HasRightToDeleteReceiptSignatures)
|
||||
{
|
||||
DeleteSignatures(info, true);
|
||||
}
|
||||
|
||||
LoadPaginatedQbEntries(Model.CurrentQbEntryPage);
|
||||
|
||||
return RedirectToActionPermanent("InitReports");
|
||||
return RedirectToAction("InitReports");
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
@@ -773,20 +827,20 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
var info = formCollection["deleteEmployeeSignatureInfo"];
|
||||
|
||||
if(AbstractModel.HasRightToDeleteReceiptSignatures)
|
||||
if(Model.HasRightToDeleteReceiptSignatures)
|
||||
{
|
||||
DeleteSignatures(info, false);
|
||||
}
|
||||
|
||||
LoadPaginatedQbEntries(Model.CurrentQbEntryPage);
|
||||
|
||||
return RedirectToActionPermanent("InitReports");
|
||||
return RedirectToAction("InitReports");
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
private void DeleteSignatures(string guid, bool isCustomerSignature)
|
||||
{
|
||||
if(Model is null || !AbstractModel.HasRightToDeleteReceiptSignatures)
|
||||
if(Model is null || !Model.HasRightToDeleteReceiptSignatures)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -843,13 +897,13 @@ namespace BeWoPlanerMobil.Controllers
|
||||
Model.SelectedConfirmationReceiptSignatures = ConvertSignatureDCsToSignatureObjects(signatures);
|
||||
|
||||
var customerName = obj.CustomerName;
|
||||
var employeeName = MobileSessionFacade.LoggedInCompactEmployee.SimpleDescription;
|
||||
var employeeName = LoggedInUser.Employee.SimpleDescription;
|
||||
|
||||
var serviceRecordCount = 0;
|
||||
|
||||
if(isEmployee)
|
||||
{
|
||||
serviceRecordCount = AbstractModel.HasRightToProvideEmployeeSignatureForOthers ? obj.Items.Count : obj.Items.Count(x => x.EmployeeOid.Equals(Model.Employee.EmployeeOid));
|
||||
serviceRecordCount = Model.HasRightToProvideEmployeeSignatureForOthers ? obj.Items.Count : obj.Items.Count(x => x.EmployeeOid.Equals(LoggedInEmployee.EmployeeOid));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -863,38 +917,39 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return PartialView("ConfirmationReceiptSignaturePartial", Model);
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
public ActionResult LoadReportToModel()
|
||||
{
|
||||
if(Model is null)
|
||||
{
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
return PartialView("QuittierungsbelegsPreviewPartial");
|
||||
}
|
||||
//[Authorize]
|
||||
//public ActionResult LoadReportToModel()
|
||||
//{
|
||||
// if(Model is null)
|
||||
// {
|
||||
// TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
// return PartialView("QuittierungsbelegsPreviewPartial");
|
||||
// }
|
||||
|
||||
var month = Model.SelectedMonth ?? DateTime.Now.AddMonths(-1).Month;
|
||||
var year = Model.SelectedYear ?? DateTime.Now.Year;
|
||||
var customerOid = Model.SelectedCustomerOid;
|
||||
var teamOid = Model.SelectedTeamOid;
|
||||
var employeeOid = Model.SelectedEmployeeOid;
|
||||
var organisationOid = Model.SelectedOrganisationOid;
|
||||
var serviceCategoryOid = Model.SelectedServiceCategoryOid;
|
||||
var startDate = Model.SelectedStartDay ?? 1;
|
||||
// var month = Model.SelectedMonth ?? DateTime.Now.AddMonths(-1).Month;
|
||||
// var year = Model.SelectedYear ?? DateTime.Now.Year;
|
||||
// var customerOid = Model.SelectedCustomerOid;
|
||||
// var teamOid = Model.SelectedTeamOid;
|
||||
// var employeeOid = Model.SelectedEmployeeOid;
|
||||
// var organisationOid = Model.SelectedOrganisationOid;
|
||||
// var serviceCategoryOid = Model.SelectedServiceCategoryOid;
|
||||
// var startDate = Model.SelectedStartDay ?? 1;
|
||||
|
||||
var date = new DateTime(year, month, startDate);
|
||||
// var date = new DateTime(year, month, startDate);
|
||||
|
||||
var endDate = Model.SelectedEndDay ?? date.GetLastOfMonth().Day;
|
||||
var filterType = Model.SelectedFilterItem;
|
||||
// var endDate = Model.SelectedEndDay ?? date.GetLastOfMonth().Day;
|
||||
// var filterType = Model.SelectedFilterItem;
|
||||
|
||||
Model.QuittierungsbelegsReportObject = Model.ReportCreator.CreateServiceOverviewReportNew(month, year, filterType.FilterEnum, customerOid, teamOid, employeeOid, organisationOid, serviceCategoryOid, startDate, endDate, false);
|
||||
// Model.QuittierungsbelegsReportObject = Model.ReportCreator.CreateServiceOverviewReportNew(month, year, filterType.FilterEnum, customerOid, teamOid, employeeOid, organisationOid, serviceCategoryOid, startDate, endDate, false);
|
||||
|
||||
return PartialView("QuittierungsbelegsPreviewPartial", Model);
|
||||
}
|
||||
// return PartialView("QuittierungsbelegsPreviewPartial", Model);
|
||||
//}
|
||||
|
||||
[Authorize]
|
||||
public string ResetQuittierungsbeleg()
|
||||
{
|
||||
Model.QuittierungsbelegsReportObject = null;
|
||||
Model.QuittierungsbelegsReportSettings = null;
|
||||
Model.QuittierungsbelegsReport = null;
|
||||
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
@@ -909,28 +964,61 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return Logout();
|
||||
}
|
||||
|
||||
var month = Model.SelectedMonth ?? DateTime.Now.AddMonths(-1).Month;
|
||||
var year = Model.SelectedYear ?? DateTime.Now.Year;
|
||||
var customerOid = Model.SelectedCustomerOid;
|
||||
var teamOid = Model.SelectedTeamOid;
|
||||
var employeeOid = Model.SelectedEmployeeOid;
|
||||
var organisationOid = Model.SelectedOrganisationOid;
|
||||
var serviceCategoryOid = Model.SelectedServiceCategoryOid;
|
||||
var startDate = Model.SelectedStartDay ?? 1;
|
||||
var reportSettings = new QuittierungsbelegsReportSettings();
|
||||
|
||||
var date = new DateTime(year, month, startDate);
|
||||
reportSettings.Month = Model.SelectedMonth ?? DateTime.Now.AddMonths(-1).Month;
|
||||
reportSettings.Year = Model.SelectedYear ?? DateTime.Now.Year;
|
||||
reportSettings.CustomerOid = Model.SelectedCustomerOid;
|
||||
reportSettings.TeamOid = Model.SelectedTeamOid;
|
||||
reportSettings.EmployeeOid = Model.SelectedEmployeeOid;
|
||||
reportSettings.OrganisationOid = Model.SelectedOrganisationOid;
|
||||
reportSettings.ServiceCategoryOid = Model.SelectedServiceCategoryOid;
|
||||
reportSettings.StartDay = Model.SelectedStartDay ?? 1;
|
||||
|
||||
var endDate = Model.SelectedEndDay ?? date.GetLastOfMonth().Day;
|
||||
var filterType = Model.SelectedFilterItem;
|
||||
var date = new DateTime(reportSettings.Year, reportSettings.Month, reportSettings.StartDay);
|
||||
|
||||
var report = Model.ReportCreator.CreateServiceOverviewReportNew(month, year, filterType.FilterEnum, customerOid, teamOid, employeeOid, organisationOid, serviceCategoryOid, startDate, endDate, false);
|
||||
reportSettings.EndDay = Model.SelectedEndDay ?? date.GetLastOfMonth().Day;
|
||||
reportSettings.FilterEnum = Model.SelectedFilterItem.FilterEnum;
|
||||
|
||||
|
||||
Model.QuittierungsbelegsReportSettings = reportSettings;
|
||||
|
||||
//var report = Model.ReportCreator.CreateServiceOverviewReportNew(month, year, filterType.FilterEnum, customerOid, teamOid, employeeOid, organisationOid, serviceCategoryOid, startDate, endDate, false);
|
||||
|
||||
//report.ExportOptions.PrintPreview.DefaultFileName = CreateFileName();
|
||||
//report.DisplayName = CreateFileName();
|
||||
|
||||
|
||||
return RedirectToAction("InitReports");
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
public ActionResult CreateQuittierungsbelegsReport()
|
||||
{
|
||||
if (Model is null)
|
||||
{
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
return PartialView("QuittierungsbelegsPreviewPartial");
|
||||
}
|
||||
Model.QuittierungsbelegsReport = CreateQuittierungsbelegsReportFromSettings();
|
||||
|
||||
return PartialView("QuittierungsbelegsPreviewPartial", Model);
|
||||
}
|
||||
|
||||
private XtraReport CreateQuittierungsbelegsReportFromSettings()
|
||||
{
|
||||
if (Model.QuittierungsbelegsReportSettings == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
var s = Model.QuittierungsbelegsReportSettings;
|
||||
|
||||
var report = Model.ReportCreator.CreateServiceOverviewReportNew(s.Month, s.Year, s.FilterEnum, s.CustomerOid, s.TeamOid, s.EmployeeOid, s.OrganisationOid, s.ServiceCategoryOid, s.StartDay, s.EndDay, false);
|
||||
|
||||
report.ExportOptions.PrintPreview.DefaultFileName = CreateFileName();
|
||||
report.DisplayName = CreateFileName();
|
||||
|
||||
Model.QuittierungsbelegsReportObject = report;
|
||||
|
||||
return RedirectToActionPermanent("InitReports");
|
||||
return report;
|
||||
}
|
||||
|
||||
private string CreateFileName()
|
||||
@@ -1040,6 +1128,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
else
|
||||
{
|
||||
Model.SelectedCustomer = null;
|
||||
Model.SelectedCustomerOid = null;
|
||||
}
|
||||
|
||||
if(Model.SelectedFilterItem.FilterEnum == QBFilterEnum.TeamAuswahl)
|
||||
@@ -1058,6 +1147,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
else
|
||||
{
|
||||
Model.SelectedTeam = null;
|
||||
Model.SelectedTeamOid = null;
|
||||
}
|
||||
|
||||
var reportTimeFrame = GetReportTimeFrame();
|
||||
@@ -1154,15 +1244,15 @@ namespace BeWoPlanerMobil.Controllers
|
||||
employeeSignatureState = SignatureState.All;
|
||||
}
|
||||
|
||||
if(!AbstractModel.HasRightToProvideEmployeeSignatureForOthers)
|
||||
if(!Model.HasRightToProvideEmployeeSignatureForOthers)
|
||||
{
|
||||
// Prüfen, ob alle eigenen ServiceRecords unterschrieben sind
|
||||
var ownServiceRecordOids = new List<long>();
|
||||
reportObjects.DoForEach(reportObject => ownServiceRecordOids.AddRangeIfElementsNotIn(reportObject.Services.Where(serviceDetail => serviceDetail.EmployeeOid.Equals(Model.Employee.EmployeeOid)).Select(serviceDetail => serviceDetail.ServiceRecordOid)));
|
||||
reportObjects.DoForEach(reportObject => ownServiceRecordOids.AddRangeIfElementsNotIn(reportObject.Services.Where(serviceDetail => serviceDetail.EmployeeOid.Equals(LoggedInEmployee.EmployeeOid)).Select(serviceDetail => serviceDetail.ServiceRecordOid)));
|
||||
|
||||
// Prüfen, ob Einträge von anderen Mitarbeitern existieren
|
||||
var serviceRecordOidsFromOtherEmployees = new List<long>();
|
||||
reportObjects.DoForEach(reportObject => serviceRecordOidsFromOtherEmployees.AddRangeIfElementsNotIn(reportObject.Services.Where(serviceDetail => !serviceDetail.EmployeeOid.Equals(Model.Employee.EmployeeOid)).Select(serviceDetail => serviceDetail.ServiceRecordOid)));
|
||||
reportObjects.DoForEach(reportObject => serviceRecordOidsFromOtherEmployees.AddRangeIfElementsNotIn(reportObject.Services.Where(serviceDetail => !serviceDetail.EmployeeOid.Equals(LoggedInEmployee.EmployeeOid)).Select(serviceDetail => serviceDetail.ServiceRecordOid)));
|
||||
|
||||
var areAllForeignEntriesSigned = serviceRecordOidsFromOtherEmployees.All(srOid => serviceRecordOidsWithSignature.ContainsValueAtKey(SignatureType.Employee, srOid));
|
||||
var areAllOwnEntriesSigned = ownServiceRecordOids.All(srOid => serviceRecordOidsWithSignature.ContainsValueAtKey(SignatureType.Employee, srOid));
|
||||
@@ -1253,10 +1343,10 @@ namespace BeWoPlanerMobil.Controllers
|
||||
employeeOids.AddIfNotIn(serviceDetail.EmployeeOid);
|
||||
}
|
||||
|
||||
if(!AbstractModel.HasRightToProvideEmployeeSignatureForOthers)
|
||||
if(!Model.HasRightToProvideEmployeeSignatureForOthers)
|
||||
{
|
||||
var serviceRecordOidsFromOtherEmployees = reportObject.Services.Where(serviceDetail => !serviceDetail.EmployeeOid.Equals(Model.Employee.EmployeeOid)).Select(serviceDetail => serviceDetail.ServiceRecordOid).ToList();
|
||||
var ownServiceRecordOids = reportObject.Services.Where(serviceDetail => serviceDetail.EmployeeOid.Equals(Model.Employee.EmployeeOid)).Select(serviceDetail => serviceDetail.ServiceRecordOid).ToList();
|
||||
var serviceRecordOidsFromOtherEmployees = reportObject.Services.Where(serviceDetail => !serviceDetail.EmployeeOid.Equals(LoggedInEmployee.EmployeeOid)).Select(serviceDetail => serviceDetail.ServiceRecordOid).ToList();
|
||||
var ownServiceRecordOids = reportObject.Services.Where(serviceDetail => serviceDetail.EmployeeOid.Equals(LoggedInEmployee.EmployeeOid)).Select(serviceDetail => serviceDetail.ServiceRecordOid).ToList();
|
||||
|
||||
var areAllForeignEntriesSigned = serviceRecordOidsFromOtherEmployees.All(srOid => serviceRecordOidsWithSignature.ContainsValueAtKey(SignatureType.Employee, srOid));
|
||||
var areAllOwnEntriesSigned = ownServiceRecordOids.All(srOid => serviceRecordOidsWithSignature.ContainsValueAtKey(SignatureType.Employee, srOid));
|
||||
|
||||
@@ -33,29 +33,30 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return null;
|
||||
}
|
||||
|
||||
if(((ReportViewerModel)Session[ModelSessionConstants.ReportViewerModelKey])?.Employee is null)
|
||||
|
||||
if (_Model == null)
|
||||
{
|
||||
_Model = new ReportViewerModel { Employee = MobileSessionFacade.LoggedInEmployee, ReportCreator = GetReportCreator() };
|
||||
Session[ModelSessionConstants.ReportViewerModelKey] = _Model;
|
||||
}
|
||||
else
|
||||
{
|
||||
_Model = (ReportViewerModel)Session[ModelSessionConstants.ReportViewerModelKey];
|
||||
_Model = new ReportViewerModel { ReportCreator = GetReportCreator() };
|
||||
InitModel(_Model);
|
||||
InitViewModel();
|
||||
}
|
||||
|
||||
//if (((ReportViewerModel)Session[ModelSessionConstants.ReportViewerModelKey])?.LoggedInEmployee is null)
|
||||
//{
|
||||
// _Model = new ReportViewerModel { ReportCreator = GetReportCreator() };
|
||||
// Session[ModelSessionConstants.ReportViewerModelKey] = _Model;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// _Model = (ReportViewerModel)Session[ModelSessionConstants.ReportViewerModelKey];
|
||||
//}
|
||||
|
||||
return _Model;
|
||||
}
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
public ActionResult ReportViewer()
|
||||
private void InitViewModel()
|
||||
{
|
||||
if(Model is null)
|
||||
{
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
return Logout();
|
||||
}
|
||||
|
||||
Model.Report = null;
|
||||
|
||||
var month = DateTime.Today.Month;
|
||||
@@ -67,27 +68,39 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
|
||||
|
||||
Model.AllEmployees = AbstractModel.HasRightMitarbeiterstundenkontoViewAll
|
||||
? EmployeeService.GetAllActiveEmployeesCompact()
|
||||
: new List<CompactEmployeeDC> { MobileSessionFacade.LoggedInCompactEmployee };
|
||||
Model.AllEmployees = Model.HasRightMitarbeiterstundenkontoViewAll
|
||||
? EmployeeService.GetAllActiveEmployeesCompact()
|
||||
: new List<CompactEmployeeDC> { LoggedInUser.Employee };
|
||||
|
||||
// Alle Teams darf man nur sehen, wenn man das Recht "HasRightMitarbeiterstundenkontoViewAll" hat.
|
||||
// Hat man weder das Recht "HasRightMitarbeiterstundenkontoViewAll" noch "HasRightMitarbeiterstundenkontoViewTeams", sieht man die Teams gar nicht.
|
||||
// Hat man das Recht "HasRightMitarbeiterstundenkontoViewTeams", aber nicht das Recht "HasRightMitarbeiterstundenkontoViewAll", sieht man nur die Teams, deren Teamleiter man ist.
|
||||
|
||||
Model.AllTeams = AbstractModel.HasRightMitarbeiterstundenkontoViewAll
|
||||
? EmployeeService.GetAllActiveCompactTeamsForEmployee(MobileSessionFacade.LoggedInEmployee.EmployeeOid)
|
||||
: EmployeeService.FindLeadingCompactTeamsOfEmployee(MobileSessionFacade.LoggedInCompactEmployee.EmployeeOid);
|
||||
Model.AllTeams = Model.HasRightMitarbeiterstundenkontoViewAll
|
||||
? EmployeeService.GetAllActiveCompactTeamsForEmployee(LoggedInEmployee.EmployeeOid)
|
||||
: EmployeeService.FindLeadingCompactTeamsOfEmployee(LoggedInUser.Employee.EmployeeOid);
|
||||
|
||||
if(false == AbstractModel.HasRightMitarbeiterstundenkontoViewAll || Model.SelectedEmployee is null)
|
||||
if (false == Model.HasRightMitarbeiterstundenkontoViewAll || Model.SelectedEmployeeOid is null)
|
||||
{
|
||||
Model.SelectedEmployee = MobileSessionFacade.LoggedInCompactEmployee;
|
||||
Model.SelectedEmployeeOid = LoggedInUser.Employee.EmployeeOid;
|
||||
}
|
||||
|
||||
if (Model.SelectedEmployeeOid.HasValue)
|
||||
{
|
||||
Model.SelectedEmployee = Model.AllEmployees.FirstOrDefault(employee => employee.EmployeeOid.Equals(Model.SelectedEmployeeOid.Value));
|
||||
}
|
||||
|
||||
if (Model.SelectedTeamOid.HasValue)
|
||||
{
|
||||
Model.SelectedTeam = Model.AllTeams.FirstOrDefault(team => team.TeamOid.Equals(Model.SelectedTeamOid.Value));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Model.ReportTypes = new List<SelectListItem>();
|
||||
|
||||
#if DEBUG
|
||||
if(AbstractModel.HasRightToViewReports)
|
||||
if (Model.HasRightToViewReports)
|
||||
{
|
||||
Model.ReportTypes.Add(new SelectListItem
|
||||
{
|
||||
@@ -100,15 +113,20 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
Model.Queries = QueryService.GetAllQueriesOfType(QueryType.Public);
|
||||
|
||||
if (Model.SelectedQueryOid.HasValue)
|
||||
{
|
||||
Model.SelectedQuery = Model.Queries.FirstOrDefault(q => q.Oid.Equals(Model.SelectedQueryOid.Value));
|
||||
}
|
||||
|
||||
var names2ValueListEntryTypes = new Dictionary<string, ValueListEntryType>();
|
||||
|
||||
foreach(var query in Model.Queries.Where(q => q.Parameter?.Any() ?? false))
|
||||
foreach (var query in Model.Queries.Where(q => q.Parameter?.Any() ?? false))
|
||||
{
|
||||
foreach(var parameter in query.Parameter.Where(p => p.ParamType == QueryParameterType.ValueListEntryType))
|
||||
foreach (var parameter in query.Parameter.Where(p => p.ParamType == QueryParameterType.ValueListEntryType))
|
||||
{
|
||||
var parameterName = parameter.Name;
|
||||
|
||||
if(!(parameterName?.Contains("_") ?? false))
|
||||
if (!(parameterName?.Contains("_") ?? false))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -118,12 +136,12 @@ namespace BeWoPlanerMobil.Controllers
|
||||
var name = name2Type[0];
|
||||
var type = name2Type[1];
|
||||
|
||||
if(!int.TryParse(type, out var typeEnumInt))
|
||||
if (!int.TryParse(type, out var typeEnumInt))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var valueListEntryType = (ValueListEntryType) typeEnumInt;
|
||||
var valueListEntryType = (ValueListEntryType)typeEnumInt;
|
||||
names2ValueListEntryTypes.AddIfNotIn(new KeyValuePair<string, ValueListEntryType>(name, valueListEntryType));
|
||||
}
|
||||
}
|
||||
@@ -135,9 +153,9 @@ namespace BeWoPlanerMobil.Controllers
|
||||
Model.ValueListEntryTypes2ValueListEntries.AddOrUpdateValueInDictionary(valueListEntry.Type, valueListEntry);
|
||||
});
|
||||
|
||||
if(Model.Employee?.EmployeeOid.HasValue ?? false)
|
||||
if (Model.LoggedInEmployee?.EmployeeOid.HasValue ?? false)
|
||||
{
|
||||
Model.SupportConcepts = EmployeeService.GetActiveSupportConceptsForEmployee(Model.Employee.EmployeeOid, CustomerFilterEnum.All);
|
||||
Model.SupportConcepts = EmployeeService.GetActiveSupportConceptsForEmployee(Model.LoggedInEmployee.EmployeeOid, CustomerFilterEnum.All);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -146,9 +164,9 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
Model.SupportConcepts.DoForEach(sc => Model.CostBearer2SupportConceptRels.AddRangeIfElementsNotIn(sc.CostBearerRelations));
|
||||
|
||||
if(Model.SelectedCostBearer2SupportConceptRelListObject is null)
|
||||
if (Model.SelectedCostBearer2SupportConceptRelListObject is null)
|
||||
{
|
||||
Model.SelectedCostBearer2SupportConceptRelListObject = Model.CostBearer2SupportConceptRelListObjects.FirstOrDefault(f => f.CostBearer2SupportConceptOid == "-1") ?? Model.CostBearer2SupportConceptRelListObjects.First();
|
||||
Model.SelectedCostBearer2SupportConceptRelListObject = Model.CostBearer2SupportConceptRelListObjects.FirstOrDefault(f => f.CostBearer2SupportConceptOid == -1) ?? Model.CostBearer2SupportConceptRelListObjects.First();
|
||||
}
|
||||
|
||||
Model.AllOrganisationForQuery = CustomerService.GetAllActiveOrganisationsCompact();
|
||||
@@ -156,12 +174,12 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
Model.AllServiceCategoriesForQueries = OperationsService.GetAllServiceCategories();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
if(AbstractModel.HasRightToViewMitarbeiterstundenkonto)
|
||||
if (Model.HasRightToViewMitarbeiterstundenkonto)
|
||||
{
|
||||
Model.ReportTypes.Add(new SelectListItem
|
||||
{
|
||||
@@ -178,6 +196,18 @@ namespace BeWoPlanerMobil.Controllers
|
||||
#if DEBUG
|
||||
//Model.SelectedReportType = ReportType.Berichte;
|
||||
#endif
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
public ActionResult ReportViewer()
|
||||
{
|
||||
if(Model is null)
|
||||
{
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
return Logout();
|
||||
}
|
||||
|
||||
|
||||
|
||||
return View(Model);
|
||||
}
|
||||
@@ -198,7 +228,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
try
|
||||
{
|
||||
if(Model?.Employee?.EmployeeOid is null || reportOid is null)
|
||||
if(Model?.LoggedInEmployee?.EmployeeOid is null || reportOid is null)
|
||||
{
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
return PartialView("BeWoReportPartial");
|
||||
@@ -216,7 +246,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
Model.SelectedQuery = selectedQuery;
|
||||
|
||||
var dcid = $"{MobileSessionFacade.Tenant}queryeoid{Model.Employee.EmployeeOid.Value}";
|
||||
var dcid = $"{MobileSessionFacade.Tenant}queryeoid{Model.LoggedInEmployee.EmployeeOid.Value}";
|
||||
|
||||
var queryResult = QueryService.ExecuteQuery(selectedQuery.Oid, null);
|
||||
|
||||
@@ -249,7 +279,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
try
|
||||
{
|
||||
if(Model?.Employee?.EmployeeOid is null || reportOid is null)
|
||||
if(Model?.LoggedInEmployee?.EmployeeOid is null || reportOid is null)
|
||||
{
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
return PartialView("BerichteFormPartialView");
|
||||
@@ -318,7 +348,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
private string GetSiteOfOrigin()
|
||||
{
|
||||
if(Model?.Employee?.EmployeeOid is null)
|
||||
if(Model?.LoggedInEmployee?.EmployeeOid is null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -361,6 +391,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
Model.SelectedEmployeeOid = employeeOid;
|
||||
Model.SelectedEmployee = Model.AllEmployees.FirstOrDefault(employee => employee.EmployeeOid.Equals(employeeOid.Value));
|
||||
|
||||
return Model.SelectedEmployee?.DetailDescription ?? LeerzeichenFuerGetMethoden;
|
||||
@@ -381,6 +412,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
Model.SelectedTeamOid = teamOid;
|
||||
Model.SelectedTeam = Model.AllTeams.FirstOrDefault(team => team.TeamOid.Equals(teamOid.Value));
|
||||
|
||||
return Model.SelectedTeam?.DetailDescription ?? LeerzeichenFuerGetMethoden;
|
||||
@@ -389,7 +421,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
[Authorize]
|
||||
public ActionResult LoadMitarbeiterstundenkonto(int ansicht, int month, int year, bool all, bool isEmployee)
|
||||
{
|
||||
if(Model?.Employee?.EmployeeOid is null)
|
||||
if(Model?.LoggedInEmployee?.EmployeeOid is null)
|
||||
{
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
return PartialView("BeWoReportPartial");
|
||||
@@ -397,13 +429,14 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
var teamOids = new List<long>();
|
||||
var employeeOid = Model.SelectedEmployeeOid;
|
||||
var oid = isEmployee ? employeeOid ?? Model.Employee.EmployeeOid.Value : Model.SelectedTeamOid;
|
||||
var oid = isEmployee ? employeeOid ?? Model.LoggedInEmployee.EmployeeOid.Value : Model.SelectedTeamOid;
|
||||
|
||||
if(isEmployee)
|
||||
{
|
||||
teamOids = null;
|
||||
employeeOid = oid;
|
||||
|
||||
if(all || false == AbstractModel.HasRightMitarbeiterstundenkontoViewAll)
|
||||
if(all || false == Model.HasRightMitarbeiterstundenkontoViewAll)
|
||||
{
|
||||
employeeOid = null;
|
||||
}
|
||||
@@ -413,16 +446,18 @@ namespace BeWoPlanerMobil.Controllers
|
||||
employeeOid = oid;
|
||||
}
|
||||
|
||||
if(false == AbstractModel.HasRightMitarbeiterstundenkontoViewAll)
|
||||
if(false == Model.HasRightMitarbeiterstundenkontoViewAll)
|
||||
{
|
||||
employeeOid = Model.Employee.EmployeeOid;
|
||||
employeeOid = Model.LoggedInEmployee.EmployeeOid;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
employeeOid = null;
|
||||
|
||||
var teamOid = oid;
|
||||
|
||||
if(all || (!AbstractModel.HasRightMitarbeiterstundenkontoViewAll && !AbstractModel.HasRightMitarbeiterstundenkontoViewTeams))
|
||||
if(all || (!Model.HasRightMitarbeiterstundenkontoViewAll && !Model.HasRightMitarbeiterstundenkontoViewTeams))
|
||||
{
|
||||
teamOid = null;
|
||||
}
|
||||
@@ -723,7 +758,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
[Authorize]
|
||||
public ActionResult ExecuteQuery()
|
||||
{
|
||||
if(Model?.Employee?.EmployeeOid is null)
|
||||
if(Model?.LoggedInEmployee?.EmployeeOid is null)
|
||||
{
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
|
||||
@@ -748,7 +783,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
var dcid = $"{MobileSessionFacade.Tenant}queryeoid{Model.Employee.EmployeeOid.Value}";
|
||||
var dcid = $"{MobileSessionFacade.Tenant}queryeoid{Model.LoggedInEmployee.EmployeeOid.Value}";
|
||||
|
||||
var queryResult = QueryService.ExecuteQuery(query.Oid, paramList);
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Web.Mvc;
|
||||
|
||||
using BeWoPlanerMobil.Models;
|
||||
@@ -32,35 +34,37 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return null;
|
||||
}
|
||||
|
||||
if (((SchedulerModel) Session[ModelSessionConstants.SchedulerModelKey])?.Employee is null)
|
||||
if (_Model == null)
|
||||
{
|
||||
_Model = new SchedulerModel { Employee = MobileSessionFacade.LoggedInEmployee };
|
||||
Session[ModelSessionConstants.SchedulerModelKey] = _Model;
|
||||
}
|
||||
else
|
||||
{
|
||||
_Model = (SchedulerModel) Session[ModelSessionConstants.SchedulerModelKey];
|
||||
_Model = new SchedulerModel();
|
||||
InitModel(_Model);
|
||||
InitViewModel();
|
||||
}
|
||||
|
||||
//if (((SchedulerModel) Session[ModelSessionConstants.SchedulerModelKey])?.LoggedInEmployee is null)
|
||||
//{
|
||||
// _Model = new SchedulerModel();
|
||||
// InitModel(_Model);
|
||||
// Session[ModelSessionConstants.SchedulerModelKey] = _Model;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// _Model = (SchedulerModel) Session[ModelSessionConstants.SchedulerModelKey];
|
||||
//}
|
||||
|
||||
return _Model;
|
||||
}
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
public ActionResult Scheduler()
|
||||
private void InitViewModel()
|
||||
{
|
||||
if(Model is null || !MobileSessionFacade.IsUserLoggedIn() || Request.Browser.Browser.Equals("InternetExplorer") || !AbstractModel.IsAllowedToSeeScheduler)
|
||||
{
|
||||
return Logout();
|
||||
}
|
||||
|
||||
if(AbstractModel.HasRightToInsertRessourceAppointments || AbstractModel.HasRightToViewAllResourceAppointments)
|
||||
if (Model.HasRightToInsertRessourceAppointments || Model.HasRightToViewAllResourceAppointments)
|
||||
{
|
||||
var allResources = KalenderService.GetAllResources().OrderBy(r => r.Name).ToList();
|
||||
|
||||
var categories2Resources = new Dictionary<ValueListEntryDC, List<ResourceDC>>();
|
||||
|
||||
foreach(var category in allResources.Select(resource => resource.ResourceCategory))
|
||||
foreach (var category in allResources.Select(resource => resource.ResourceCategory))
|
||||
{
|
||||
categories2Resources.AddOrUpdateValueInDictionary(category, allResources.Where(resource => resource.ResourceCategory.Equals(category)).OrderBy(r => r.Name).ToList());
|
||||
}
|
||||
@@ -68,35 +72,107 @@ namespace BeWoPlanerMobil.Controllers
|
||||
Model.ResourceCategories2Resources = categories2Resources.OrderBy(kvp => kvp.Key.DisplayName).ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
|
||||
}
|
||||
|
||||
if(Model?.Employee?.EmployeeOid.HasValue ?? false)
|
||||
if (Model?.LoggedInEmployee?.EmployeeOid.HasValue ?? false)
|
||||
{
|
||||
var compactEmployee = EmployeeService.GetActiveCompactEmployeeWithOid(Model.Employee.EmployeeOid.Value);
|
||||
var compactEmployee = EmployeeService.GetActiveCompactEmployeeWithOid(Model.LoggedInEmployee.EmployeeOid.Value);
|
||||
|
||||
Model.MyTeamEmployees = EmployeeService.GetAllTeamMember(compactEmployee).OrderBy(employee => employee.LastName).ToList();
|
||||
}
|
||||
else if(!(Model is null))
|
||||
else if (!(Model is null))
|
||||
{
|
||||
Model.MyTeamEmployees = new List<CompactEmployeeDC>();
|
||||
}
|
||||
|
||||
if(AbstractModel.HasRightToViewTeams && (Model?.Employee?.EmployeeOid.HasValue ?? false))
|
||||
if (Model.HasRightToViewTeams && (Model?.LoggedInEmployee?.EmployeeOid.HasValue ?? false))
|
||||
{
|
||||
Model.MyTeams = EmployeeService.GetAllActiveCompactTeamsForEmployee(Model.Employee.EmployeeOid.Value).OrderBy(team => team.Name).ToList();
|
||||
Model.MyTeams = EmployeeService.GetAllActiveCompactTeamsForEmployee(Model.LoggedInEmployee.EmployeeOid.Value).OrderBy(team => team.Name).ToList();
|
||||
}
|
||||
|
||||
if(!(Model is null))
|
||||
if (!(Model is null))
|
||||
{
|
||||
Model.TeamMemberCustomerOids = EmployeeService.LoadTeamsRelatedCustomerOids(MobileSessionFacade.LoggedInCompactEmployee.EmployeeOid);
|
||||
Model.TeamMemberCustomerOids = EmployeeService.LoadTeamsRelatedCustomerOids(LoggedInUser.Employee.EmployeeOid);
|
||||
}
|
||||
|
||||
if (Model.HasRightToViewCustomerSelectionInScheduler)
|
||||
{
|
||||
Model.AllCustomers = CustomerService.GetAllActiveCompactCustomers().OrderBy(customer => customer.LastName).ToList();
|
||||
}
|
||||
|
||||
if (Model.HasRightToViewEmployeeAppointments)
|
||||
{
|
||||
Model.AllEmployees = EmployeeService.GetAllActiveEmployeesCompact().OrderBy(employee => employee.LastName).ToList();
|
||||
}
|
||||
|
||||
//LoadAppointmentsForDate();
|
||||
|
||||
if (Model.SelectedAppointmentOid.HasValue)
|
||||
{
|
||||
if (Model.Appointments == null)
|
||||
{
|
||||
LoadAppointmentsForDate();
|
||||
}
|
||||
Model.SelectedAppointment = Model.Appointments.FirstOrDefault(app => app.SchedulerAppointmentOid.HasValue && app.SchedulerAppointmentOid.Value == Model.SelectedAppointmentOid.Value);
|
||||
}
|
||||
SetHasResourcesEmployeesOrCustomers();
|
||||
UpdateSelectedObjects();
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void UpdateSelectedObjects()
|
||||
{
|
||||
//mache aus dem Ressourcenkategorien Dictionary eine flache Liste:
|
||||
var list = new List<ResourceDC>();
|
||||
Model.ResourceCategories2Resources.Values.DoForEach(l => l.DoForEach(s => list.AddIfNotIn(s)));
|
||||
|
||||
Model.SelectedEmployees = Model.AllEmployees.Where(employee => Model.SelectedEmployeeOids.Contains(employee.EmployeeOid)).ToList();
|
||||
Model.SelectedCustomers = Model.AllCustomers.Where(customer => Model.SelectedCustomerOids.Contains(customer.CustomerOid)).ToList();
|
||||
Model.SelectedResources = list.Where(resource => resource.ResourceOid.HasValue && Model.SelectedResourceOids.Contains(resource.ResourceOid.Value)).ToList();
|
||||
|
||||
Model.SelectedEmployeesForFiltering = Model.AllEmployees.Where(employee => Model.SelectedEmployeeOidsForFiltering.Contains(employee.EmployeeOid)).ToList();
|
||||
Model.SelectedCustomersForFiltering = Model.AllCustomers.Where(customer => Model.SelectedCustomerOidsForFiltering.Contains(customer.CustomerOid)).ToList();
|
||||
Model.SelectedResourcesForFiltering = list.Where(resource => resource.ResourceOid.HasValue && Model.SelectedResourceOidsForFiltering.Contains(resource.ResourceOid.Value)).ToList();
|
||||
|
||||
Model.SelectedEmployeesForIntervalFinder = Model.AllEmployees.Where(employee => Model.SelectedEmployeeOidsForIntervalFinder.Contains(employee.EmployeeOid)).ToList();
|
||||
Model.SelectedCustomersForIntervalFinder = Model.AllCustomers.Where(customer => Model.SelectedCustomerOidsForIntervalFinder.Contains(customer.CustomerOid)).ToList();
|
||||
Model.SelectedResourcesForIntervalFinder = list.Where(resource => resource.ResourceOid.HasValue && Model.SelectedResourceOidsForIntervalFinder.Contains(resource.ResourceOid.Value)).ToList();
|
||||
}
|
||||
|
||||
// ToDo: Überarbeiten? Es kam das Ansehen hinzu
|
||||
private void SetHasResourcesEmployeesOrCustomers()
|
||||
{
|
||||
var isOwnAppointment = !Model.IsInEditMode || Model.SelectedAppointment?.Originator.EmployeeOid == LoggedInEmployee.EmployeeOid;
|
||||
|
||||
var v1 = Model.HasRightToInsertEmployeeAppointments || Model.IsInEditMode && Model.HasRightToEditEmployeeAppointments;
|
||||
|
||||
var v2 = Model.HasRightToInsertRessourceAppointments || Model.IsInEditMode && Model.HasRightToEditResourceAppointments;
|
||||
|
||||
if (Model.IsInEditMode && !isOwnAppointment)
|
||||
{
|
||||
v2 = Model.HasRightToEditOthersResourceAppointments;
|
||||
}
|
||||
|
||||
var v3 = Model.HasRightToInsertCustomerAppointments || Model.IsInEditMode && Model.HasRightToEditCustomerAppointments;
|
||||
|
||||
Model.HasResourcesEmployeesOrCustomers = v1 || v2 || v3;
|
||||
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
public ActionResult Scheduler()
|
||||
{
|
||||
if(!MobileSessionFacade.IsUserLoggedIn() || Request.Browser.Browser.Equals("InternetExplorer") || !Model.IsAllowedToSeeScheduler)
|
||||
{
|
||||
return Logout();
|
||||
}
|
||||
|
||||
LoadAppointmentsForDate();
|
||||
|
||||
return View(Model);
|
||||
}
|
||||
|
||||
private void LoadAppointmentsForDate()
|
||||
{
|
||||
if(Model?.Employee.EmployeeOid is null)
|
||||
if(Model?.LoggedInEmployee.EmployeeOid is null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -119,16 +195,16 @@ namespace BeWoPlanerMobil.Controllers
|
||||
end = sunday;
|
||||
}
|
||||
|
||||
var selectedCustomers = Model.SelectedCustomersForFiltering?.Select(s => s.CustomerOid).ToList() ?? new List<long>();
|
||||
var selectedEmployees = Model.SelectedEmployeesForFiltering?.Select(s => s.EmployeeOid).ToList() ?? new List<long>();
|
||||
var selectedResources = Model.SelectedResourcesForFiltering?.Where(w => w.ResourceOid.HasValue).Select(s => s.ResourceOid.Value).ToList() ?? new List<long>();
|
||||
var selectedCustomers = Model.SelectedCustomerOidsForFiltering;
|
||||
var selectedEmployees = Model.SelectedEmployeeOidsForFiltering.Clone(); //Wird soinst im KalenderService geändert
|
||||
var selectedResources = Model.SelectedResourceOidsForFiltering;
|
||||
|
||||
var appointments = KalenderService.LoadFilteredAppointmentsMitAufgaben(AbstractModel.HasRightToViewEmployeeAppointments, Model.Employee.EmployeeOid.Value, start.Date, end, selectedEmployees, selectedCustomers, selectedResources, false, false, false, false, true, true).ToList();
|
||||
var appointments = KalenderService.LoadFilteredAppointmentsMitAufgaben(Model.HasRightToViewEmployeeAppointments, Model.LoggedInEmployee.EmployeeOid.Value, start.Date, end, selectedEmployees, selectedCustomers, selectedResources, false, false, false, false, true, true).ToList();
|
||||
|
||||
// Private Termine
|
||||
foreach(var appointment in appointments.Where(a => a.IsPrivate))
|
||||
{
|
||||
if(appointment.Originator.Equals(MobileSessionFacade.LoggedInCompactEmployee) || appointment.EmployeeList.Any(e2a => e2a.Employee.Equals(MobileSessionFacade.LoggedInCompactEmployee)))
|
||||
if(appointment.Originator.Equals(LoggedInUser.Employee) || appointment.EmployeeList.Any(e2a => e2a.Employee.Equals(LoggedInUser.Employee)))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -142,17 +218,17 @@ namespace BeWoPlanerMobil.Controllers
|
||||
var tasks = appointments.Where(w => w.IsTask && w.CompletedDate is null).ToList();
|
||||
|
||||
// Nur eigene Kliententermine ansehen
|
||||
if(!AbstractModel.HasRightToViewCustomerAppointments)
|
||||
if(!Model.HasRightToViewCustomerAppointments)
|
||||
{
|
||||
appointments = appointments.Where(a => a.CustomerList.All(c => MobileSessionFacade.LoggedInEmployee.RelatedCustomers.Any(rc => rc.Customer.Equals(c)))).ToList();
|
||||
appointments = appointments.Where(a => a.CustomerList.All(c => LoggedInEmployee.RelatedCustomers.Any(rc => rc.Customer.Equals(c)))).ToList();
|
||||
}
|
||||
|
||||
if(!AbstractModel.HasRightToViewAllResourceAppointments)
|
||||
if(!Model.HasRightToViewAllResourceAppointments)
|
||||
{
|
||||
appointments = appointments.Where(a => a.ResourceList.Count == 0).ToList();
|
||||
}
|
||||
|
||||
if(!AbstractModel.IsAllowedToSeeCustomers)
|
||||
if(!Model.IsAllowedToSeeCustomers)
|
||||
{
|
||||
appointments = appointments.Where(a => a.CustomerList.Count == 0).ToList();
|
||||
}
|
||||
@@ -189,19 +265,31 @@ namespace BeWoPlanerMobil.Controllers
|
||||
holySweetFlyingFuck.OrderByDescending(appointment => appointment.IsTask).ThenBy(appointment => appointment.StartDate).ToList() :
|
||||
holySweetFlyingFuck.Where(w => w.IsTask is false).OrderBy(appointment => appointment.StartDate).ToList();
|
||||
|
||||
Model.WeekViewObject = new WeekViewObject(Model.Appointments, Model.SelectedDate.GetInSameCalendarWeek(DayOfWeek.Monday), Model.Employee);
|
||||
UpdateAppointmentListItems();
|
||||
|
||||
if(AbstractModel.HasRightToViewCustomerSelectionInScheduler)
|
||||
Model.WeekViewObject = new WeekViewObject(Model.Appointments, Model.SelectedDate.GetInSameCalendarWeek(DayOfWeek.Monday), Model.LoggedInEmployee);
|
||||
|
||||
|
||||
}
|
||||
private void UpdateAppointmentListItems()
|
||||
{
|
||||
var md5 = new MD5CryptoServiceProvider();
|
||||
|
||||
|
||||
var list = new List<AppointmentListItem>();
|
||||
|
||||
foreach (var appointment in Model.Appointments)
|
||||
{
|
||||
//Model.AllCustomers = EmployeeService.GetActiveCompactCustomersForEmployee(Model.Employee.EmployeeOid).OrderBy(o => o.DetailDescription).ToList();
|
||||
Model.AllCustomers = CustomerService.GetAllActiveCompactCustomers().OrderBy(customer => customer.LastName).ToList();
|
||||
String key = String.Format("{0}_{1}", appointment.SchedulerAppointmentOid, appointment.RecurrenceInfo);
|
||||
String id = BitConverter.ToString(md5.ComputeHash(Encoding.UTF8.GetBytes(key))).Replace("-", "").ToLower();
|
||||
var listItem = new AppointmentListItem(id, appointment);
|
||||
|
||||
|
||||
|
||||
list.Add(listItem);
|
||||
}
|
||||
|
||||
if(AbstractModel.HasRightToViewEmployeeAppointments)
|
||||
{
|
||||
//Model.AllEmployees = EmployeeService.GetActiveCompactEmployeesForEmployee(Model.Employee.EmployeeOid.Value).OrderBy(o => o.DetailDescription).ToList();
|
||||
Model.AllEmployees = EmployeeService.GetAllActiveEmployeesCompact().OrderBy(employee => employee.LastName).ToList();
|
||||
}
|
||||
Model.AppointmentListItems = list;
|
||||
}
|
||||
|
||||
private static IEnumerable<SchedulerAppointmentDC> CalculateRecurrences(IEnumerable<SchedulerAppointmentDC> appointments, DateTime start, DateTime end, IReadOnlyCollection<RecurrenceInformation> changedOccurrences, IReadOnlyCollection<RecurrenceInformation> deletedOccurrences)
|
||||
@@ -341,7 +429,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
appointmentToInsert.StartDate = startDate;
|
||||
appointmentToInsert.Subject = subject;
|
||||
appointmentToInsert.Description = notice;
|
||||
appointmentToInsert.Originator = MobileSessionFacade.LoggedInCompactEmployee;
|
||||
appointmentToInsert.Originator = LoggedInUser.Employee;
|
||||
appointmentToInsert.Location = location;
|
||||
appointmentToInsert.ActivationType = ActivationTypeId.Active;
|
||||
appointmentToInsert.IsPrivate = isPrivate;
|
||||
@@ -376,10 +464,10 @@ namespace BeWoPlanerMobil.Controllers
|
||||
if(Model != null)
|
||||
{
|
||||
Model.IsAllDay = false;
|
||||
Model.SelectedAppointment = null;
|
||||
Model.SelectedResources?.Clear();
|
||||
Model.SelectedCustomers?.Clear();
|
||||
Model.SelectedEmployees?.Clear();
|
||||
Model.SelectedAppointmentOid = null;
|
||||
Model.SelectedResourceOids?.Clear();
|
||||
Model.SelectedCustomerOids?.Clear();
|
||||
Model.SelectedEmployeeOids?.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -400,7 +488,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
if(Model != null)
|
||||
{
|
||||
Model.SelectedAppointment = null;
|
||||
Model.SelectedAppointmentOid = null;
|
||||
//Model.SelectedResources.Clear();
|
||||
}
|
||||
|
||||
@@ -421,7 +509,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
if(!(Model is null))
|
||||
{
|
||||
Model.SelectedAppointment = null;
|
||||
Model.SelectedAppointmentOid = null;
|
||||
//Model.SelectedResources.Clear();
|
||||
}
|
||||
|
||||
@@ -443,9 +531,9 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
Model.SelectedDate = schedulerDate;
|
||||
|
||||
Model.SelectedAppointment = null;
|
||||
Model.SelectedResources.Clear();
|
||||
|
||||
Model.SelectedAppointmentOid = null;
|
||||
Model.SelectedResourceOids.Clear();
|
||||
|
||||
return RedirectToActionPermanent("Scheduler");
|
||||
}
|
||||
|
||||
@@ -471,9 +559,12 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return RedirectToActionPermanent("Scheduler");
|
||||
}
|
||||
|
||||
Model.SelectedAppointment = Model.Appointments.FirstOrDefault(app => app.SchedulerAppointmentOid.HasValue && app.SchedulerAppointmentOid.Value == appointmentOid);
|
||||
LoadAppointmentsForDate();
|
||||
|
||||
if(Model.SelectedAppointment != null)
|
||||
Model.SelectedAppointmentOid = appointmentOid;
|
||||
Model.SelectedAppointment = Model.Appointments.FirstOrDefault(app => app.SchedulerAppointmentOid.HasValue && app.SchedulerAppointmentOid.Value == appointmentOid);
|
||||
|
||||
if (Model.SelectedAppointment != null)
|
||||
{
|
||||
if(Model.SelectedAppointment.AllDay && Model.SelectedAppointment.EndDate.HasValue)
|
||||
{
|
||||
@@ -482,9 +573,9 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
Model.IsAllDay = Model.SelectedAppointment.AllDay;
|
||||
Model.IsPrivate = Model.SelectedAppointment.IsPrivate;
|
||||
Model.SelectedResources = Model.SelectedAppointment?.ResourceList ?? new List<ResourceDC>();
|
||||
Model.SelectedEmployees = Model.SelectedAppointment?.EmployeeList.Select(e2a => e2a.Employee).ToList() ?? new List<CompactEmployeeDC>();
|
||||
Model.SelectedCustomers = Model.SelectedAppointment?.CustomerList ?? new List<CompactCustomerDC>();
|
||||
Model.SelectedResourceOids = Model.SelectedAppointment?.ResourceList.Select(r => r.ResourceOid.Value).ToList() ?? new List<long>();
|
||||
Model.SelectedEmployeeOids = Model.SelectedAppointment?.EmployeeList.Select(e2a => e2a.Employee.EmployeeOid).ToList() ?? new List<long>();
|
||||
Model.SelectedCustomerOids = Model.SelectedAppointment?.CustomerList.Select(c => c.CustomerOid).ToList() ?? new List<long>();
|
||||
}
|
||||
|
||||
return RedirectToActionPermanent("Scheduler");
|
||||
@@ -495,14 +586,16 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if(Model != null)
|
||||
{
|
||||
Model.SelectedAppointment = null;
|
||||
Model.SelectedResources.Clear();
|
||||
Model.SelectedEmployees.Clear();
|
||||
Model.SelectedCustomers.Clear();
|
||||
Model.SelectedAppointmentOid = null;
|
||||
Model.SelectedResourceOids.Clear();
|
||||
Model.SelectedEmployeeOids.Clear();
|
||||
Model.SelectedCustomerOids.Clear();
|
||||
Model.IsAllDay = false;
|
||||
Model.IsPrivate = false;
|
||||
}
|
||||
|
||||
UpdateSelectedObjects();
|
||||
|
||||
return Json(null, JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
|
||||
@@ -516,7 +609,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
}
|
||||
|
||||
var isOverlapping = false;
|
||||
var oid = Model.SelectedAppointment?.SchedulerAppointmentOid;
|
||||
var oid = Model.SelectedAppointmentOid;
|
||||
|
||||
var isSuccessfulStartDate = DateTime.TryParseExact(startDateRaw, "dd.MM.yyyy", null, DateTimeStyles.None, out var startDate);
|
||||
var isSuccessfulStartTime = DateTime.TryParseExact(startTimeRaw, "HH:mm", null, DateTimeStyles.None, out var startTime);
|
||||
@@ -532,7 +625,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
var employeeOidList = Model.SelectedAppointment?.EmployeeList?.Select(employee2Appointment => employee2Appointment.Employee.EmployeeOid).ToList() ?? new List<long>();
|
||||
var resourceOidList = Model.SelectedResources.Where(resource => resource.ResourceOid.HasValue).Select(resource => resource.ResourceOid.Value).ToList() ?? new List<long>();
|
||||
|
||||
var originator = Model.SelectedAppointment?.Originator ?? MobileSessionFacade.LoggedInCompactEmployee;
|
||||
var originator = Model.SelectedAppointment?.Originator ?? LoggedInUser.Employee;
|
||||
|
||||
var recurrenceId = Model.SelectedAppointment?.RecurrenceId ?? string.Empty;
|
||||
var recurrenceIndex = Model.SelectedAppointment?.RecurrenceIndex ?? 0;
|
||||
@@ -560,7 +653,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
if(!AbstractModel.HasRightToInsertRessourceAppointments)
|
||||
if(!Model.HasRightToInsertRessourceAppointments)
|
||||
{
|
||||
return "Fehler! Sie haben nicht das Recht, Termine mit Ressourcen anzulegen!";
|
||||
}
|
||||
@@ -582,7 +675,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
dateTimes.EndDate = dateTimes.EndDate.AddDays(1);
|
||||
}
|
||||
|
||||
var info = KalenderService.CheckResourceAvailabilityWithEmployeeInformation(dateTimes.StartDate, dateTimes.EndDate, oidList, Model.SelectedAppointment?.SchedulerAppointmentOid, null);
|
||||
var info = KalenderService.CheckResourceAvailabilityWithEmployeeInformation(dateTimes.StartDate, dateTimes.EndDate, oidList, Model.SelectedAppointmentOid, null);
|
||||
|
||||
var result = string.Empty;
|
||||
|
||||
@@ -606,7 +699,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
[Authorize]
|
||||
public string HasSelectedAppointment()
|
||||
{
|
||||
return JsonConvert.SerializeObject(Model?.SelectedAppointment != null);
|
||||
return JsonConvert.SerializeObject(Model?.SelectedAppointmentOid.HasValue);
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
@@ -642,13 +735,13 @@ namespace BeWoPlanerMobil.Controllers
|
||||
var intervalEndDateString = formCollection["IntervalEnd"].Substring(0, 10);
|
||||
var intervalEndTimeString = formCollection["IntervalEndTime"];
|
||||
|
||||
if(int.TryParse(durationString, out var intervalDuration) && DateTime.TryParse($"{intervalStartDateString} {intervalStartTimeString}", out var intervalStart) && DateTime.TryParse($"{intervalEndDateString} {intervalEndTimeString}", out var intervalEnd) && Model.Employee.EmployeeOid.HasValue)
|
||||
if(int.TryParse(durationString, out var intervalDuration) && DateTime.TryParse($"{intervalStartDateString} {intervalStartTimeString}", out var intervalStart) && DateTime.TryParse($"{intervalEndDateString} {intervalEndTimeString}", out var intervalEnd) && Model.LoggedInEmployee.EmployeeOid.HasValue)
|
||||
{
|
||||
var customerOids = Model.SelectedCustomersForIntervalFinder.Select(customer => customer.CustomerOid).ToList();
|
||||
var employeeOids = Model.SelectedEmployeesForIntervalFinder.Select(employee => employee.EmployeeOid).ToList();
|
||||
var resourceOids = Model.SelectedResourcesForIntervalFinder.Where(resource => resource.ResourceOid.HasValue).Select(r => r.ResourceOid.Value).ToList();
|
||||
var customerOids = Model.SelectedCustomerOidsForIntervalFinder.Clone();
|
||||
var employeeOids = Model.SelectedEmployeeOidsForIntervalFinder.Clone();
|
||||
var resourceOids = Model.SelectedResourceOidsForIntervalFinder.Clone();
|
||||
|
||||
Model.FreeIntervals = KalenderService.FindAppointmentsInRangeForIntervalFinder(intervalDuration, intervalStart, intervalEnd, resourceOids, customerOids, employeeOids, Model.Employee.EmployeeOid.Value);
|
||||
Model.FreeIntervals = KalenderService.FindAppointmentsInRangeForIntervalFinder(intervalDuration, intervalStart, intervalEnd, resourceOids, customerOids, employeeOids, Model.LoggedInEmployee.EmployeeOid.Value);
|
||||
|
||||
Model.IntervalStartDate = intervalStart;
|
||||
Model.IntervalEndDate = intervalEnd;
|
||||
@@ -667,9 +760,9 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
var employeeOids = ConvertOidStringToList(oidString);
|
||||
|
||||
Model.SelectedEmployeesForIntervalFinder = Model.AllEmployees.Where(employee => employeeOids.Contains(employee.EmployeeOid)).ToList();
|
||||
|
||||
Model.SelectedEmployeeOidsForIntervalFinder = ConvertOidStringToList(oidString);
|
||||
UpdateSelectedObjects();
|
||||
|
||||
return JsonConvert.SerializeObject(Model.SelectedEmployeesForIntervalFinder.OrderBy(o => o.DetailDescription));
|
||||
}
|
||||
@@ -683,9 +776,8 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
var customerOids = ConvertOidStringToList(oidString);
|
||||
|
||||
Model.SelectedCustomersForIntervalFinder = Model.AllCustomers.Where(customer => customerOids.Contains(customer.CustomerOid)).ToList();
|
||||
Model.SelectedCustomerOidsForIntervalFinder = ConvertOidStringToList(oidString);
|
||||
UpdateSelectedObjects();
|
||||
|
||||
return JsonConvert.SerializeObject(Model.SelectedCustomersForIntervalFinder.OrderBy(o => o.LastNameFirstName));
|
||||
}
|
||||
@@ -699,13 +791,9 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
var resourceOidList = ConvertOidStringToList(resourceOids);
|
||||
|
||||
var list = new List<ResourceDC>();
|
||||
|
||||
Model.ResourceCategories2Resources.Values.DoForEach(l => l.DoForEach(s => list.AddIfNotIn(s)));
|
||||
|
||||
Model.SelectedResourcesForIntervalFinder = list.Where(resource => resource.ResourceOid.HasValue && resourceOidList.Contains(resource.ResourceOid.Value)).ToList();
|
||||
|
||||
Model.SelectedResourceOidsForIntervalFinder = ConvertOidStringToList(resourceOids);
|
||||
UpdateSelectedObjects();
|
||||
|
||||
return JsonConvert.SerializeObject(Model.SelectedResourcesForIntervalFinder);
|
||||
}
|
||||
@@ -726,9 +814,9 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
if(!newValue)
|
||||
{
|
||||
Model.SelectedEmployeesForIntervalFinder.Clear();
|
||||
Model.SelectedCustomersForIntervalFinder.Clear();
|
||||
Model.SelectedResourcesForIntervalFinder.Clear();
|
||||
Model.SelectedEmployeeOidsForIntervalFinder.Clear();
|
||||
Model.SelectedCustomerOidsForIntervalFinder.Clear();
|
||||
Model.SelectedResourceOidsForIntervalFinder.Clear();
|
||||
}
|
||||
|
||||
return RedirectToActionPermanent("Scheduler");
|
||||
@@ -766,18 +854,18 @@ namespace BeWoPlanerMobil.Controllers
|
||||
ActivationType = ActivationTypeId.Active,
|
||||
IsTask = false,
|
||||
IsPrivate = false,
|
||||
Originator = MobileSessionFacade.LoggedInCompactEmployee,
|
||||
Originator = LoggedInUser.Employee,
|
||||
StartDate = startDate,
|
||||
EndDate = endDate
|
||||
};
|
||||
|
||||
Model.SelectedCustomers = Model.SelectedCustomersForIntervalFinder.Clone();
|
||||
Model.SelectedEmployees = Model.SelectedEmployeesForIntervalFinder.Clone();
|
||||
Model.SelectedResources = Model.SelectedResourcesForIntervalFinder.Clone();
|
||||
Model.SelectedCustomerOids = Model.SelectedCustomerOidsForIntervalFinder.Clone();
|
||||
Model.SelectedEmployeeOids = Model.SelectedEmployeeOidsForIntervalFinder.Clone();
|
||||
Model.SelectedResourceOids = Model.SelectedResourceOidsForIntervalFinder.Clone();
|
||||
|
||||
Model.SelectedCustomersForIntervalFinder.Clear();
|
||||
Model.SelectedEmployeesForIntervalFinder.Clear();
|
||||
Model.SelectedResourcesForIntervalFinder.Clear();
|
||||
Model.SelectedCustomerOidsForIntervalFinder.Clear();
|
||||
Model.SelectedEmployeeOidsForIntervalFinder.Clear();
|
||||
Model.SelectedResourceOidsForIntervalFinder.Clear();
|
||||
|
||||
Model.IntervalStartDate = null;
|
||||
Model.IntervalEndDate = null;
|
||||
@@ -794,6 +882,10 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
Model.SelectedCustomerOidsForIntervalFinder.Clear();
|
||||
Model.SelectedEmployeeOidsForIntervalFinder.Clear();
|
||||
Model.SelectedResourceOidsForIntervalFinder.Clear();
|
||||
|
||||
Model.SelectedCustomersForIntervalFinder.Clear();
|
||||
Model.SelectedEmployeesForIntervalFinder.Clear();
|
||||
Model.SelectedResourcesForIntervalFinder.Clear();
|
||||
@@ -831,7 +923,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
Model.ResourceCategories2Resources.Values.DoForEach(l => l.DoForEach(s => list.AddIfNotIn(s)));
|
||||
|
||||
Model.SelectedResourcesForFiltering = list.Where(resource => resource.ResourceOid.HasValue && oidList.Contains(resource.ResourceOid.Value)).ToList();
|
||||
|
||||
Model.SelectedResourceOidsForFiltering = oidList;
|
||||
return JsonConvert.SerializeObject(Model.SelectedResourcesForFiltering);
|
||||
}
|
||||
|
||||
@@ -844,11 +936,9 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
var oidList = ConvertOidStringToList(oidString);
|
||||
Model.SelectedEmployeeOidsForFiltering = ConvertOidStringToList(oidString);
|
||||
|
||||
Model.SelectedEmployeesForFiltering = Model.AllEmployees.Where(employee => oidList.Contains(employee.EmployeeOid)).ToList();
|
||||
|
||||
return Model.SelectedEmployeesForFiltering.Count.ToString();
|
||||
return Model.SelectedEmployeeOidsForFiltering.Count.ToString();
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
@@ -860,17 +950,15 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
var oidList = ConvertOidStringToList(oidString);
|
||||
Model.SelectedCustomerOidsForFiltering = ConvertOidStringToList(oidString);
|
||||
|
||||
Model.SelectedCustomersForFiltering = Model.AllCustomers.Where(customer => oidList.Contains(customer.CustomerOid)).ToList();
|
||||
|
||||
return Model.SelectedCustomersForFiltering.Count.ToString();
|
||||
return Model.SelectedCustomerOidsForFiltering.Count.ToString();
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
public ActionResult FetchSelectedEmployeesForPopup()
|
||||
{
|
||||
if(Model is null)
|
||||
if (Model is null)
|
||||
{
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
}
|
||||
@@ -881,7 +969,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
[Authorize]
|
||||
public ActionResult FetchEmployeeFilteringModalBody()
|
||||
{
|
||||
if(Model is null)
|
||||
if (Model is null)
|
||||
{
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
}
|
||||
@@ -892,7 +980,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
[Authorize]
|
||||
public string SelectTeamForFiltering(string teamOidString)
|
||||
{
|
||||
if(Model?.Employee?.EmployeeOid is null)
|
||||
if(Model?.LoggedInEmployee?.EmployeeOid is null)
|
||||
{
|
||||
Logout();
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
@@ -900,14 +988,14 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
if(long.TryParse(teamOidString, out var teamOid))
|
||||
{
|
||||
var team = EmployeeService.FindTeamByOid(teamOid, Model.Employee.EmployeeOid.Value);
|
||||
var team = EmployeeService.FindTeamByOid(teamOid, Model.LoggedInEmployee.EmployeeOid.Value);
|
||||
|
||||
if(!(team is null))
|
||||
{
|
||||
Model.SelectedEmployeesForFiltering.AddRangeIfElementsNotIn(team.Member);
|
||||
Model.SelectedEmployeeOidsForFiltering.AddRangeIfElementsNotIn(team.Member.Select(m => m.EmployeeOid));
|
||||
}
|
||||
}
|
||||
|
||||
UpdateSelectedObjects();
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
@@ -918,7 +1006,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
[Authorize]
|
||||
public string SelectTeamForAppointment(string teamOidString)
|
||||
{
|
||||
if(Model?.Employee?.EmployeeOid is null)
|
||||
if(Model?.LoggedInEmployee?.EmployeeOid is null)
|
||||
{
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
@@ -931,15 +1019,16 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
var team = EmployeeService.FindTeamByOid(teamOid, Model.Employee.EmployeeOid.Value);
|
||||
var team = EmployeeService.FindTeamByOid(teamOid, Model.LoggedInEmployee.EmployeeOid.Value);
|
||||
|
||||
if(team is null)
|
||||
{
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
Model.SelectedEmployees.AddRangeIfElementsNotIn(team.Member);
|
||||
teamMemberOids.AddRangeIfElementsNotIn(team.Member.Select(member => member.EmployeeOid));
|
||||
Model.SelectedEmployeeOids.AddRangeIfElementsNotIn(team.Member.Select(m => m.EmployeeOid));
|
||||
|
||||
UpdateSelectedObjects();
|
||||
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
@@ -954,9 +1043,9 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return PartialView("SchedulerEmployeeSelectionPartial");
|
||||
}
|
||||
|
||||
var oidList = ConvertOidStringToList(oidString);
|
||||
|
||||
Model.SelectedEmployees = Model.AllEmployees.Where(employee => oidList.Contains(employee.EmployeeOid)).ToList();
|
||||
|
||||
Model.SelectedEmployeeOids = ConvertOidStringToList(oidString);
|
||||
UpdateSelectedObjects();
|
||||
|
||||
return PartialView("SchedulerEmployeeSelectionPartial", Model);
|
||||
}
|
||||
@@ -969,8 +1058,10 @@ namespace BeWoPlanerMobil.Controllers
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
return PartialView("EmployeeSelectionPopupListPartial");
|
||||
}
|
||||
|
||||
Model.SelectedEmployeeOids = isChecked ? Model.AllEmployees.Select(r => r.EmployeeOid).ToList() : new List<long>();
|
||||
|
||||
Model.SelectedEmployees = isChecked ? Model.AllEmployees : new List<CompactEmployeeDC>();
|
||||
UpdateSelectedObjects();
|
||||
|
||||
return PartialView("EmployeeSelectionPopupListPartial", Model);
|
||||
}
|
||||
@@ -978,7 +1069,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
[Authorize]
|
||||
public ActionResult LoadUpdatedEmployees()
|
||||
{
|
||||
if(Model is null)
|
||||
if (Model is null)
|
||||
{
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
return PartialView("SchedulerEmployeeSelectionPartial");
|
||||
@@ -990,7 +1081,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
[Authorize]
|
||||
public ActionResult LoadUpdatedEmployeePopupList()
|
||||
{
|
||||
if(Model is null)
|
||||
if (Model is null)
|
||||
{
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
return PartialView("EmployeeSelectionPopupListPartial");
|
||||
@@ -1012,8 +1103,9 @@ namespace BeWoPlanerMobil.Controllers
|
||||
Logout();
|
||||
return PartialView("CustomerSelectionPopupListPartial");
|
||||
}
|
||||
|
||||
Model.SelectedCustomers = isChecked ? Model.AllCustomers : new List<CompactCustomerDC>();
|
||||
|
||||
Model.SelectedCustomerOids = isChecked ? Model.AllCustomers.Select(r => r.CustomerOid).ToList() : new List<long>();
|
||||
UpdateSelectedObjects();
|
||||
|
||||
return PartialView("CustomerSelectionPopupListPartial", Model);
|
||||
}
|
||||
@@ -1021,7 +1113,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
[Authorize]
|
||||
public ActionResult LoadUpdatedCustomers()
|
||||
{
|
||||
if(Model is null)
|
||||
if (Model is null)
|
||||
{
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
return PartialView("SchedulerCustomerSelectionPartial");
|
||||
@@ -1033,7 +1125,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
[Authorize]
|
||||
public ActionResult LoadUpdatedCustomerPopupList()
|
||||
{
|
||||
if(Model is null)
|
||||
if (Model is null)
|
||||
{
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
return PartialView("CustomerSelectionPopupListPartial");
|
||||
@@ -1052,9 +1144,10 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return PartialView("SchedulerCustomerSelectionPartial");
|
||||
}
|
||||
|
||||
var oidList = ConvertOidStringToList(oidString);
|
||||
|
||||
Model.SelectedCustomerOids = ConvertOidStringToList(oidString);
|
||||
|
||||
Model.SelectedCustomers = Model.AllCustomers.Where(customer => oidList.Contains(customer.CustomerOid)).ToList();
|
||||
UpdateSelectedObjects();
|
||||
|
||||
return PartialView("SchedulerCustomerSelectionPartial", Model);
|
||||
}
|
||||
@@ -1072,7 +1165,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return PartialView("SchedulerResourceSelectionPartial");
|
||||
}
|
||||
|
||||
var oidList = ConvertOidStringToList(oidString);
|
||||
|
||||
|
||||
//var list = new List<ResourceDC>();
|
||||
|
||||
@@ -1080,7 +1173,9 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
//Model.SelectedResources = list.Where(resource => resource.ResourceOid.HasValue && oidList.Contains(resource.ResourceOid.Value)).ToList();
|
||||
|
||||
Model.SelectedResources = Model.AllResources.Where(resource => resource.ResourceOid.HasValue && oidList.Contains(resource.ResourceOid.Value)).ToList();
|
||||
Model.SelectedResourceOids = ConvertOidStringToList(oidString);
|
||||
|
||||
UpdateSelectedObjects();
|
||||
|
||||
return PartialView("SchedulerResourceSelectionPartial", Model);
|
||||
}
|
||||
@@ -1094,7 +1189,9 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return PartialView("ResourceSelectionPopupListPartial");
|
||||
}
|
||||
|
||||
Model.SelectedResources = isChecked ? Model.AllResources : new List<ResourceDC>();
|
||||
Model.SelectedResourceOids = isChecked ? Model.AllResources.Select(r => r.ResourceOid.Value).ToList() : new List<long>();
|
||||
|
||||
UpdateSelectedObjects();
|
||||
|
||||
return PartialView("ResourceSelectionPopupListPartial", Model);
|
||||
}
|
||||
@@ -1102,7 +1199,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
[Authorize]
|
||||
public ActionResult LoadUpdatedResourcePopupList()
|
||||
{
|
||||
if(Model is null)
|
||||
if (Model is null)
|
||||
{
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
return PartialView("ResourceSelectionPopupListPartial");
|
||||
@@ -1114,7 +1211,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
[Authorize]
|
||||
public ActionResult LoadUpdatedResources()
|
||||
{
|
||||
if(Model is null)
|
||||
if (Model is null)
|
||||
{
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
return PartialView("SchedulerResourceSelectionPartial");
|
||||
@@ -1129,7 +1226,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
[Authorize]
|
||||
public ActionResult FetchCustomersForFiltering()
|
||||
{
|
||||
if(Model is null)
|
||||
if (Model is null)
|
||||
{
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
}
|
||||
@@ -1140,7 +1237,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
[Authorize]
|
||||
public ActionResult FetchCustomerFilteringModalBody()
|
||||
{
|
||||
if(Model is null)
|
||||
if (Model is null)
|
||||
{
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
}
|
||||
@@ -1174,18 +1271,17 @@ namespace BeWoPlanerMobil.Controllers
|
||||
[Authorize]
|
||||
public string DeleteAppointment(string appointmentIdentifier, bool deleteSeries)
|
||||
{
|
||||
if(Model?.Employee?.EmployeeOid is null)
|
||||
|
||||
if(Model?.LoggedInEmployee?.EmployeeOid is null)
|
||||
{
|
||||
Logout();
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
if(!Guid.TryParse(appointmentIdentifier, out var identifier))
|
||||
{
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
var schedulerAppointment = Model.AppointmentListItems.FirstOrDefault(app => app.Identifier.Equals(identifier))?.SchedulerAppointment;
|
||||
LoadAppointmentsForDate();
|
||||
|
||||
var schedulerAppointment = Model.AppointmentListItems.FirstOrDefault(app => app.Identifier.Equals(appointmentIdentifier))?.SchedulerAppointment;
|
||||
|
||||
if(schedulerAppointment is null)
|
||||
{
|
||||
@@ -1216,14 +1312,14 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
var teamMemberCustomerOids = EmployeeService.LoadTeamsRelatedCustomerOids(Model.Employee.EmployeeOid.Value);
|
||||
var teamMemberCustomerOids = EmployeeService.LoadTeamsRelatedCustomerOids(Model.LoggedInEmployee.EmployeeOid.Value);
|
||||
|
||||
var customerList = schedulerAppointment.CustomerList;
|
||||
var employeeList = schedulerAppointment.EmployeeList;
|
||||
var resourceList = schedulerAppointment.ResourceList;
|
||||
var originator = schedulerAppointment.Originator;
|
||||
var isNew = schedulerAppointment.SchedulerAppointmentOid is null;
|
||||
var loggedOnUser = MobileSessionFacade.LoggedInUserDC;
|
||||
var loggedOnUser = LoggedInUser;
|
||||
|
||||
var isAllowedToDelete = BS.Shared.Core.Utils.CheckSchedulerRights(customerList, resourceList, employeeList, originator, isNew, SchedulerRightsCheckType.Edit, loggedOnUser, teamMemberCustomerOids);
|
||||
|
||||
@@ -1287,7 +1383,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
[Authorize]
|
||||
public string SelectTeamForIntervalFinder(string teamOidString)
|
||||
{
|
||||
if(Model?.Employee?.EmployeeOid is null)
|
||||
if(Model?.LoggedInEmployee?.EmployeeOid is null)
|
||||
{
|
||||
Logout();
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
@@ -1295,12 +1391,12 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
if(long.TryParse(teamOidString, out var teamOid))
|
||||
{
|
||||
var team = EmployeeService.FindTeamByOid(teamOid, Model.Employee.EmployeeOid.Value);
|
||||
var team = EmployeeService.FindTeamByOid(teamOid, Model.LoggedInEmployee.EmployeeOid.Value);
|
||||
|
||||
if(!(team is null))
|
||||
{
|
||||
var memberOids = team.Member.Select(member => member.EmployeeOid).ToList();
|
||||
|
||||
Model.SelectedEmployeeOidsForIntervalFinder.AddRangeIfElementsNotIn(memberOids);
|
||||
return JsonConvert.SerializeObject(memberOids);
|
||||
}
|
||||
}
|
||||
@@ -1318,11 +1414,12 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return Logout();
|
||||
}
|
||||
|
||||
if(!Guid.TryParse(formCollection[FormCollectionConstants.AppointmentIdInputKey], out var identifier))
|
||||
var identifier = formCollection[FormCollectionConstants.AppointmentIdInputKey];
|
||||
|
||||
if (Model.AppointmentListItems == null)
|
||||
{
|
||||
return RedirectToActionPermanent("PrepareServiceRecordInsert", "Main");
|
||||
LoadAppointmentsForDate();
|
||||
}
|
||||
|
||||
var appointmentListItem = Model.AppointmentListItems.FirstOrDefault(f => f.Identifier.Equals(identifier));
|
||||
|
||||
if(appointmentListItem is null)
|
||||
@@ -1332,13 +1429,13 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
var appointment = appointmentListItem.SchedulerAppointment;
|
||||
|
||||
var employeeOids = appointment.EmployeeList.Select(employee2Appointment => employee2Appointment.Employee.EmployeeOid).ToList();
|
||||
if(employeeOids.Count == 0)
|
||||
{
|
||||
employeeOids.Add(appointment.Originator.EmployeeOid);
|
||||
}
|
||||
//var employeeOids = appointment.EmployeeList.Select(employee2Appointment => employee2Appointment.Employee.EmployeeOid).ToList();
|
||||
//if(employeeOids.Count == 0)
|
||||
//{
|
||||
// employeeOids.Add(appointment.Originator.EmployeeOid);
|
||||
//}
|
||||
|
||||
TempData[TempDataConstants.AppointmentListItemKey] = appointmentListItem;
|
||||
TempData[TempDataConstants.AppointmentOidKey] = appointmentListItem.SchedulerAppointment?.SchedulerAppointmentOid;
|
||||
|
||||
return RedirectToActionPermanent("PrepareServiceRecordInsert", "Main");
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using BeWoPlanerMobil.Service;
|
||||
using BeWoPlanerMobil.Util;
|
||||
@@ -12,43 +13,52 @@ namespace BeWoPlanerMobil.Models
|
||||
{
|
||||
public class AbstractModel
|
||||
{
|
||||
public static bool IsDeleteBtnVisible => CheckRight(UserRightType.ServiceRecordView_Delete);
|
||||
public bool IsDeleteBtnVisible => CheckRight(UserRightType.ServiceRecordView_Delete);
|
||||
|
||||
public static bool IsAllowedToSeeScheduler => MobileSessionFacade.LoggedInUser != null && CheckRight(UserRightType.KalenderAnsehen) || CheckRight(UserRightType.ViewAll);
|
||||
public bool IsAllowedToSeeScheduler => LoggedInUser != null && CheckRight(UserRightType.KalenderAnsehen) || CheckRight(UserRightType.ViewAll);
|
||||
|
||||
public static bool IsAllowedToSeeCustomers => CheckRight(UserRightType.ViewAll) || CheckRight(UserRightType.CustomerView_View) || CheckRight(UserRightType.Customer_ViewMyCustomers);
|
||||
public bool IsAllowedToSeeCustomers => CheckRight(UserRightType.ViewAll) || CheckRight(UserRightType.CustomerView_View) || CheckRight(UserRightType.Customer_ViewMyCustomers);
|
||||
|
||||
public static bool IsEmployeeSelectionVisible => CheckRight(UserRightType.ServiceRecord_AllowCreationForOtherEmployees) || CheckRight(UserRightType.ServiceRecord_AllowCreationForOtherTeamMember);
|
||||
public bool IsEmployeeSelectionVisible => CheckRight(UserRightType.ServiceRecord_AllowCreationForOtherEmployees) || CheckRight(UserRightType.ServiceRecord_AllowCreationForOtherTeamMember);
|
||||
|
||||
public static bool HasRightForGroupBookings => CheckRight(UserRightType.ServiceRecord_AllowCreatingGroupBooking);
|
||||
public bool HasRightForGroupBookings => CheckRight(UserRightType.ServiceRecord_AllowCreatingGroupBooking);
|
||||
|
||||
public static bool HasRightToViewCustomerAppointments => CheckRight(UserRightType.KalenderKliententermineAlleAnsehen) || CheckRight(UserRightType.CustomerView_View) || CheckRight(UserRightType.Customer_ViewMyCustomers) || CheckRight(UserRightType.Customer_ViewMyTeams);
|
||||
public static bool HasRightToViewEmployeeAppointments => CheckRight(UserRightType.KalenderMitarbeitertermineAnsehen) || CheckRight(UserRightType.ViewAll);
|
||||
public static bool HasRightToViewAllResourceAppointments => CheckRight(UserRightType.KalenderRessourcentermineAnsehen) || CheckRight(UserRightType.ViewAll);
|
||||
public bool HasRightToViewCustomerAppointments => CheckRight(UserRightType.KalenderKliententermineAlleAnsehen) || CheckRight(UserRightType.CustomerView_View) || CheckRight(UserRightType.Customer_ViewMyCustomers) || CheckRight(UserRightType.Customer_ViewMyTeams);
|
||||
public bool HasRightToViewEmployeeAppointments => CheckRight(UserRightType.KalenderMitarbeitertermineAnsehen) || CheckRight(UserRightType.ViewAll);
|
||||
public bool HasRightToViewAllResourceAppointments => CheckRight(UserRightType.KalenderRessourcentermineAnsehen) || CheckRight(UserRightType.ViewAll);
|
||||
|
||||
public EmployeeDC Employee { get; set; }
|
||||
public ISessionModel SessionModel { get; internal set; }
|
||||
|
||||
public string LoggedInEmplyeeFirstNameLastName => Employee != null ? $"{Employee.FirstName} {Employee.LastName}" : "BeWoPlaner";
|
||||
public UserDC LoggedInUser { get; set; }
|
||||
|
||||
public static bool HasRightToSeeAllSupportConcepts => CheckRight(UserRightType.SupportConcept_ViewAllSupportConcepts) || CheckRight(UserRightType.ViewAll);
|
||||
public MokMandator Mandator { get; set; }
|
||||
|
||||
public static bool HasRightToSeeTextModules => CheckRight(UserRightType.TextbausteineNurEigeneAnsehen) || CheckRight(UserRightType.TextbausteineAlleAnsehen);
|
||||
public static bool HasRightToSeeOwnTextModules => CheckRight(UserRightType.TextbausteineNurEigeneAnsehen);
|
||||
public static bool HasRightToSeeGlobalTextModules => CheckRight(UserRightType.TextbausteineAlleAnsehen);
|
||||
public EmployeeDC LoggedInEmployee { get; set; }
|
||||
|
||||
public static bool HasRightToSeeServiceRecords => CheckRight(UserRightType.ServiceRecordView_View) && CheckRight(UserRightType.ServiceRecordView_Create);
|
||||
public string LoggedInEmplyeeFirstNameLastName => LoggedInEmployee != null ? $"{LoggedInEmployee.FirstName} {LoggedInEmployee.LastName}" : "BeWoPlaner";
|
||||
|
||||
public static string TimeOfLastAction { get; set; }
|
||||
public bool HasRightToSeeAllSupportConcepts => CheckRight(UserRightType.SupportConcept_ViewAllSupportConcepts) || CheckRight(UserRightType.ViewAll);
|
||||
|
||||
public static bool HasRightToInsertRessourceAppointments => CheckRight(UserRightType.KalenderRessourcentermineAnlegen) || CheckRight(UserRightType.CreateAll);
|
||||
public bool HasRightToSeeTextModules => CheckRight(UserRightType.TextbausteineNurEigeneAnsehen) || CheckRight(UserRightType.TextbausteineAlleAnsehen);
|
||||
public bool HasRightToSeeOwnTextModules => CheckRight(UserRightType.TextbausteineNurEigeneAnsehen);
|
||||
public bool HasRightToSeeGlobalTextModules => CheckRight(UserRightType.TextbausteineAlleAnsehen);
|
||||
|
||||
public static bool HasRightToViewQuittierungsbelege
|
||||
public bool HasRightToSeeServiceRecords => CheckRight(UserRightType.ServiceRecordView_View) && CheckRight(UserRightType.ServiceRecordView_Create);
|
||||
|
||||
public static string TimeOfLastAction
|
||||
{
|
||||
get { return MobileSessionFacade.TimeOfLastAction; }
|
||||
set { MobileSessionFacade.TimeOfLastAction = value; }
|
||||
}
|
||||
|
||||
public bool HasRightToInsertRessourceAppointments => CheckRight(UserRightType.KalenderRessourcentermineAnlegen) || CheckRight(UserRightType.CreateAll);
|
||||
|
||||
public bool HasRightToViewQuittierungsbelege
|
||||
{
|
||||
get
|
||||
{
|
||||
var mandator = MobileSessionFacade.Mandator;
|
||||
|
||||
var showEmployeeSignatureSetting = MobileUtils.GetSettingValue(mandator.Settings, SettingsKeys.ShowSignature);
|
||||
|
||||
var showEmployeeSignatureSetting = MobileUtils.GetSettingValue(Mandator.Settings, SettingsKeys.ShowSignature);
|
||||
#if DEBUG
|
||||
showEmployeeSignatureSetting = "1";
|
||||
#endif
|
||||
@@ -58,40 +68,45 @@ namespace BeWoPlanerMobil.Models
|
||||
|
||||
|
||||
|
||||
public static bool IsAllowedToSeeSupportConceptFilter
|
||||
public bool IsAllowedToSeeSupportConceptFilter
|
||||
{
|
||||
get
|
||||
{
|
||||
var user = MobileSessionFacade.LoggedInUser;
|
||||
var user = LoggedInUser;
|
||||
|
||||
if(user != null)
|
||||
{
|
||||
return
|
||||
user.CheckForAtLeastOneRight(new List<UserRightType> { UserRightType.ViewAll, UserRightType.SupportConcept_ViewAllSupportConcepts }) ||
|
||||
user.CheckForRight(UserRightType.SupportConcept_ViewMyTeams);
|
||||
user.HasRight(UserRightType.SupportConcept_ViewMyTeams);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static string UserSettings
|
||||
public string UserSettings
|
||||
{
|
||||
get
|
||||
{
|
||||
var user = MobileSessionFacade.LoggedInUser;
|
||||
var user = LoggedInUser;
|
||||
|
||||
return user?.SettingList.FirstOrDefault(f => f.Type.Equals(SettingsType.ApplicationSettings))?.Value;
|
||||
return user?.Settings.FirstOrDefault(f => f.Type.Equals(SettingsType.ApplicationSettings))?.Value;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsAllowedToSeeCustomerFilter => MobileSessionFacade.LoggedInUser?.CheckForAtLeastOneRight(new List<UserRightType> { UserRightType.ViewAll, UserRightType.CustomerView_View, UserRightType.Customer_ViewMyTeams }) ?? false;
|
||||
public MokSettings MokSettings { get; set; }
|
||||
|
||||
public bool IsAllowedToSeeCustomerFilter => LoggedInUser?.CheckForAtLeastOneRight(new List<UserRightType> { UserRightType.ViewAll, UserRightType.CustomerView_View, UserRightType.Customer_ViewMyTeams }) ?? false;
|
||||
|
||||
public static bool IsAllowedToSeeMedikamentenliste
|
||||
public bool IsAllowedToSeeMedikamentenliste
|
||||
{
|
||||
get
|
||||
{
|
||||
var mandator = MobileSessionFacade.Mandator;
|
||||
#if DEBUG
|
||||
return true;
|
||||
#endif
|
||||
var mandator = Mandator;
|
||||
|
||||
var hasSetting = MobileUtils.GetSettingValue(mandator.Settings, SettingsKeys.ShowMedication) == "1";
|
||||
|
||||
@@ -101,55 +116,55 @@ namespace BeWoPlanerMobil.Models
|
||||
}
|
||||
}
|
||||
|
||||
public static bool CheckRight(UserRightType userRightType)
|
||||
public bool CheckRight(UserRightType userRightType)
|
||||
{
|
||||
return MobileSessionFacade.CheckForUserRight(userRightType);
|
||||
return LoggedInUser.HasRight(userRightType);
|
||||
}
|
||||
|
||||
public static bool CheckRights(List<UserRightType> userRightTypes)
|
||||
public bool CheckRights(List<UserRightType> userRightTypes)
|
||||
{
|
||||
return userRightTypes.All(MobileSessionFacade.CheckForUserRight);
|
||||
return userRightTypes.All(LoggedInUser.HasRight);
|
||||
}
|
||||
|
||||
public static bool CheckForAtLeastOneRight(UserRightType[] rights)
|
||||
public bool CheckForAtLeastOneRight(UserRightType[] rights)
|
||||
{
|
||||
return rights.Any(MobileSessionFacade.CheckForUserRight);
|
||||
return rights.Any(LoggedInUser.HasRight);
|
||||
}
|
||||
|
||||
public static bool HasRightToInsertEmployeeAppointments => CheckRight(UserRightType.KalenderMitarbeitertermineAnlegen) ||
|
||||
public bool HasRightToInsertEmployeeAppointments => CheckRight(UserRightType.KalenderMitarbeitertermineAnlegen) ||
|
||||
CheckRight(UserRightType.CreateAll);
|
||||
|
||||
public static bool HasRightToEditEmployeeAppointments => CheckRight(UserRightType.KalenderMitarbeitertermineAendern) || CheckRight(UserRightType.EditAll);
|
||||
public bool HasRightToEditEmployeeAppointments => CheckRight(UserRightType.KalenderMitarbeitertermineAendern) || CheckRight(UserRightType.EditAll);
|
||||
|
||||
public static bool HasRightToEditResourceAppointments => CheckRight(UserRightType.KalenderRessourcentermineAendern) || CheckRight(UserRightType.EditAll);
|
||||
public static bool HasRightToEditOthersResourceAppointments => CheckRight(UserRightType.KalenderRessourcentermineAndererAendern) || CheckRight(UserRightType.EditAll);
|
||||
public bool HasRightToEditResourceAppointments => CheckRight(UserRightType.KalenderRessourcentermineAendern) || CheckRight(UserRightType.EditAll);
|
||||
public bool HasRightToEditOthersResourceAppointments => CheckRight(UserRightType.KalenderRessourcentermineAndererAendern) || CheckRight(UserRightType.EditAll);
|
||||
|
||||
public static bool HasRightToInsertCustomerAppointments => CheckRight(UserRightType.KalenderKliententermineAnlegen) &&
|
||||
public bool HasRightToInsertCustomerAppointments => CheckRight(UserRightType.KalenderKliententermineAnlegen) &&
|
||||
(CheckRight(UserRightType.CustomerView_View) ||
|
||||
CheckRight(UserRightType.Customer_ViewMyCustomers) ||
|
||||
CheckRight(UserRightType.Customer_ViewMyTeams)) ||
|
||||
CheckRight(UserRightType.CreateAll);
|
||||
public static bool HasRightToEditCustomerAppointments => CheckRight(UserRightType.KalenderKliententermineAendern) || CheckRight(UserRightType.EditAll);
|
||||
public bool HasRightToEditCustomerAppointments => CheckRight(UserRightType.KalenderKliententermineAendern) || CheckRight(UserRightType.EditAll);
|
||||
|
||||
public static bool ShowServiceRecordInsertedOn { get; set; }
|
||||
public bool ShowServiceRecordInsertedOn { get; set; }
|
||||
|
||||
public static bool HasRightToViewCustomerSelectionInScheduler => CheckRight(UserRightType.CustomerView_View) || CheckRight(UserRightType.Customer_ViewMyCustomers) || CheckRight(UserRightType.Customer_ViewMyTeams);
|
||||
public bool HasRightToViewCustomerSelectionInScheduler => CheckRight(UserRightType.CustomerView_View) || CheckRight(UserRightType.Customer_ViewMyCustomers) || CheckRight(UserRightType.Customer_ViewMyTeams);
|
||||
|
||||
public static bool HasRightToViewTeams => CheckRight(UserRightType.TeamView_ViewMyTeams) || CheckRight(UserRightType.TeamView_ViewAll);
|
||||
public bool HasRightToViewTeams => CheckRight(UserRightType.TeamView_ViewMyTeams) || CheckRight(UserRightType.TeamView_ViewAll);
|
||||
|
||||
public static bool HasRightForMultiBooking => CheckRight(UserRightType.ServiceRecord_AllowCreatingMultiBooking);
|
||||
public bool HasRightForMultiBooking => CheckRight(UserRightType.ServiceRecord_AllowCreatingMultiBooking);
|
||||
|
||||
public static bool HasRightToDeleteReceiptSignatures => CheckRight(UserRightType.ConfirmationReceiptSignatures_Delete);
|
||||
public bool HasRightToDeleteReceiptSignatures => CheckRight(UserRightType.ConfirmationReceiptSignatures_Delete);
|
||||
|
||||
public static bool HasRightToRateGoals => CheckRight(UserRightType.BewertenInZeiterfassung);
|
||||
public bool HasRightToRateGoals => CheckRight(UserRightType.BewertenInZeiterfassung);
|
||||
|
||||
public static bool HasRightToEditCustomers => CheckRight(UserRightType.CustomerView_Edit);
|
||||
public bool HasRightToEditCustomers => CheckRight(UserRightType.CustomerView_Edit);
|
||||
|
||||
public static bool HasRightMitarbeiterstundenkontoViewAll => CheckRight(UserRightType.Mitarbeiterstundenkonto_ViewAll);
|
||||
public static bool HasRightMitarbeiterstundenkontoViewTeams => CheckRight(UserRightType.Mitarbeiterstundenkonto_ViewTeams);
|
||||
public static bool HasRightMitarbeiterstundenkontoViewSelf => CheckRight(UserRightType.Mitarbeiterstundenkonto_ViewSelf);
|
||||
public bool HasRightMitarbeiterstundenkontoViewAll => CheckRight(UserRightType.Mitarbeiterstundenkonto_ViewAll);
|
||||
public bool HasRightMitarbeiterstundenkontoViewTeams => CheckRight(UserRightType.Mitarbeiterstundenkonto_ViewTeams);
|
||||
public bool HasRightMitarbeiterstundenkontoViewSelf => CheckRight(UserRightType.Mitarbeiterstundenkonto_ViewSelf);
|
||||
|
||||
public static bool HasRightToViewReports => CheckForAtLeastOneRight(new UserRightType[]
|
||||
public bool HasRightToViewReports => CheckForAtLeastOneRight(new UserRightType[]
|
||||
{
|
||||
UserRightType.ViewAll,
|
||||
UserRightType.QueryView_View,
|
||||
@@ -172,7 +187,7 @@ namespace BeWoPlanerMobil.Models
|
||||
UserRightType.Auswertungen_HilfeplanuebersichtAnsehen
|
||||
});
|
||||
|
||||
public static bool HasRightToViewMitarbeiterstundenkonto
|
||||
public bool HasRightToViewMitarbeiterstundenkonto
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -180,34 +195,34 @@ namespace BeWoPlanerMobil.Models
|
||||
}
|
||||
}
|
||||
|
||||
public static bool HasRightToViewDiagnosen => CheckRight(UserRightType.Customer_ViewDiagnosis);
|
||||
public bool HasRightToViewDiagnosen => CheckRight(UserRightType.Customer_ViewDiagnosis);
|
||||
|
||||
public static bool HasRightToProvideSingleSignature => CheckRight(UserRightType.Signature_ProvideSingleSignature);
|
||||
public bool HasRightToProvideSingleSignature => CheckRight(UserRightType.Signature_ProvideSingleSignature);
|
||||
|
||||
public static bool HasRightToViewOwnCustomersBargeldkassen => CheckRight(UserRightType.BargeldverwaltungNurEigeneAnsehen);
|
||||
public bool HasRightToViewOwnCustomersBargeldkassen => CheckRight(UserRightType.BargeldverwaltungNurEigeneAnsehen);
|
||||
|
||||
public static bool HasRightToViewAllCustomersBargeldkassen => CheckRight(UserRightType.BargeldverwaltungAnsehen);
|
||||
public bool HasRightToViewAllCustomersBargeldkassen => CheckRight(UserRightType.BargeldverwaltungAnsehen);
|
||||
|
||||
public static bool HasRightToDeleteCustomerBargeldkassen => CheckRight(UserRightType.BargeldverwaltungLoeschen);
|
||||
public bool HasRightToDeleteCustomerBargeldkassen => CheckRight(UserRightType.BargeldverwaltungLoeschen);
|
||||
|
||||
public static bool HasRightToCreateCustomerBargeldkassen => CheckRight(UserRightType.BargeldverwaltungAnlegen);
|
||||
public bool HasRightToCreateCustomerBargeldkassen => CheckRight(UserRightType.BargeldverwaltungAnlegen);
|
||||
|
||||
public static bool HasRightToEditCustomerBargeldkassen => CheckRight(UserRightType.BargeldverwaltungBearbeiten);
|
||||
public bool HasRightToEditCustomerBargeldkassen => CheckRight(UserRightType.BargeldverwaltungBearbeiten);
|
||||
|
||||
public static bool HasRightToViewCustomerAbsenceTimes => CheckRight(UserRightType.Customer_ViewAbsenceTimes);
|
||||
public bool HasRightToViewCustomerAbsenceTimes => CheckRight(UserRightType.Customer_ViewAbsenceTimes);
|
||||
|
||||
public static bool HasRightToProvideEmployeeSignatureForOthers => CheckRight(UserRightType.Signature_ProvideMonthlySignatureByProxy);
|
||||
public bool HasRightToProvideEmployeeSignatureForOthers => CheckRight(UserRightType.Signature_ProvideMonthlySignatureByProxy);
|
||||
|
||||
public static bool HasRightToViewBetreuung => CheckRight(UserRightType.Customer_ViewBetreuung);
|
||||
public bool HasRightToViewBetreuung => CheckRight(UserRightType.Customer_ViewBetreuung);
|
||||
|
||||
public static bool HasRightToViewCustomerDocuments => CheckForAtLeastOneRight(new[] { UserRightType.ViewAll, UserRightType.DokumenteKlienten });
|
||||
public bool HasRightToViewCustomerDocuments => CheckForAtLeastOneRight(new[] { UserRightType.ViewAll, UserRightType.DokumenteKlienten });
|
||||
|
||||
public static string UserMessage { get; set; }
|
||||
//public string UserMessage { get; set; }
|
||||
|
||||
public XtraReport Report { get; set; }
|
||||
public string ReportName { get; set; }
|
||||
|
||||
protected static string GetIsNotApproved(SupportConceptCostBearerRelDC rel)
|
||||
protected string GetIsNotApproved(SupportConceptCostBearerRelDC rel)
|
||||
{
|
||||
var result = string.Empty;
|
||||
|
||||
@@ -239,20 +254,20 @@ namespace BeWoPlanerMobil.Models
|
||||
|
||||
public Dictionary<string, bool> Collapsibles2IsShown { get; set; } = new Dictionary<string, bool>();
|
||||
|
||||
public static bool ShowDifferentQBInterval
|
||||
public bool ShowDifferentQBInterval
|
||||
{
|
||||
get
|
||||
{
|
||||
var settingsValue = MobileUtils.GetSettingValue(MobileSessionFacade.Mandator.Settings, SettingsKeys.ShowServicesOverviewHalfOrWholeMonth);
|
||||
var settingsValue = MobileUtils.GetSettingValue(Mandator.Settings, SettingsKeys.ShowServicesOverviewHalfOrWholeMonth);
|
||||
|
||||
return "1" == settingsValue;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool ShowDistanceField { get; set; }
|
||||
public bool ShowDistanceField { get; set; }
|
||||
|
||||
public static bool ShowBetrag { get; set; }
|
||||
public bool ShowBetrag { get; set; }
|
||||
|
||||
public static string LocalStorageKey => MobileSessionFacade.LoggedInUser is object ? $"bwp_{MobileSessionFacade.Tenant}_{MobileSessionFacade.LoggedInUser.Oid}" : null;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -15,13 +15,25 @@ namespace BeWoPlanerMobil.Models
|
||||
{
|
||||
public class CustomerModel : AbstractModel
|
||||
{
|
||||
|
||||
public CustomerModel()
|
||||
{
|
||||
SessionModel = new CustomerSessionModel();
|
||||
}
|
||||
|
||||
public CustomerSessionModel CustomerSessionModel
|
||||
{
|
||||
get
|
||||
{
|
||||
return SessionModel as CustomerSessionModel;
|
||||
}
|
||||
}
|
||||
|
||||
[Display(Name = "Klient")]
|
||||
public long? SelectedCustomerOid { get; set; }
|
||||
public long? SelectedCustomerOid { get { return CustomerSessionModel.SelectedCustomerOid; } set { CustomerSessionModel.SelectedCustomerOid = value; } }
|
||||
|
||||
public CustomerDC SelectedCustomer { get; set; }
|
||||
|
||||
public List<CompactCustomerDC> Customers { get; set; }
|
||||
|
||||
public IEnumerable<SelectListItem> CustomerListItems
|
||||
{
|
||||
get
|
||||
@@ -38,7 +50,7 @@ namespace BeWoPlanerMobil.Models
|
||||
public JsonCustomer SelectedJsonCustomer => SelectedCustomer != null ? new JsonCustomer(SelectedCustomer, FolderTree, ICD10Diagnosen) : null;
|
||||
|
||||
[Display(Name = "Filter")]
|
||||
public CustomerFilterEnum SelectedCustomerFilter { get; set; }
|
||||
public CustomerFilterEnum SelectedCustomerFilter { get { return CustomerSessionModel.SelectedCustomerFilter; } set { CustomerSessionModel.SelectedCustomerFilter = value; } }
|
||||
|
||||
public List<SelectListItem> CustomerFilter
|
||||
{
|
||||
@@ -46,7 +58,7 @@ namespace BeWoPlanerMobil.Models
|
||||
{
|
||||
var result = new List<SelectListItem>();
|
||||
|
||||
var user = MobileSessionFacade.LoggedInUser;
|
||||
var user = LoggedInUser;
|
||||
|
||||
const string allCustomers = "Alle Klienten anzeigen";
|
||||
const string myCustomersOnly = "Nur meine Klienten anzeigen";
|
||||
@@ -63,12 +75,12 @@ namespace BeWoPlanerMobil.Models
|
||||
result.Add(new SelectListItem { Text = allCustomers, Value = allCustomersValue });
|
||||
result.Add(new SelectListItem { Text = myCustomersOnly, Value = myCustomersValue });
|
||||
|
||||
if(user.CheckForRight(UserRightType.Customer_ViewMyTeams))
|
||||
if(user.HasRight(UserRightType.Customer_ViewMyTeams))
|
||||
{
|
||||
result.Add(new SelectListItem {Text = myTeamsCustomersOnly, Value = myTeamsCustomersValue });
|
||||
}
|
||||
}
|
||||
else if(user.CheckForRight(UserRightType.Customer_ViewMyTeams))
|
||||
else if(user.HasRight(UserRightType.Customer_ViewMyTeams))
|
||||
{
|
||||
result.Add(new SelectListItem { Text = myCustomersOnly, Value = myCustomersValue });
|
||||
result.Add(new SelectListItem { Text = myTeamsCustomersOnly, Value = myTeamsCustomersValue });
|
||||
@@ -84,7 +96,7 @@ namespace BeWoPlanerMobil.Models
|
||||
public List<CustomerReportType> ReportTypes { get; set; }
|
||||
|
||||
[Display(Name = "Bericht")]
|
||||
public CustomerReportType SelectedReportType { get; set; }
|
||||
public CustomerReportType SelectedReportType { get { return CustomerSessionModel.SelectedReportType; } set { CustomerSessionModel.SelectedReportType = value; } }
|
||||
|
||||
public List<SelectListItem> ReportTypeItems
|
||||
{
|
||||
@@ -108,7 +120,7 @@ namespace BeWoPlanerMobil.Models
|
||||
public List<BargeldkassenDC> Bargeldkassen { get; set; } = new List<BargeldkassenDC>();
|
||||
|
||||
[Display(Name = "Kategorie")]
|
||||
public long? SelectedAbsenceReason { get; set; }
|
||||
public long? SelectedAbsenceReasonOid { get { return CustomerSessionModel.SelectedAbsenceReasonOid; } set { CustomerSessionModel.SelectedAbsenceReasonOid = value; } }
|
||||
|
||||
public List<AbsenceReasonDC> AllAbsenceReasons { get; set; }
|
||||
|
||||
@@ -136,12 +148,24 @@ namespace BeWoPlanerMobil.Models
|
||||
}
|
||||
}
|
||||
|
||||
public long? SelectedAbsenceTimeOid { get { return CustomerSessionModel.SelectedAbsenceTimeOid; } set { CustomerSessionModel.SelectedAbsenceTimeOid = value; } }
|
||||
|
||||
public AbsenceTimeDC SelectedAbsenceTime { get; set; }
|
||||
//{
|
||||
// get { return selectedAbsenceTime; }
|
||||
// set
|
||||
// {
|
||||
// selectedAbsenceTime = value;
|
||||
// SelectedAbsenceTimeOid = selectedAbsenceTime != null ? selectedAbsenceTime.AbsenceTimeOid : null;
|
||||
// }
|
||||
//}
|
||||
|
||||
public long? SelectedBargeldkasseOid { get { return CustomerSessionModel.SelectedBargeldkasseOid; } set { CustomerSessionModel.SelectedBargeldkasseOid = value; } }
|
||||
|
||||
public BargeldkassenDC SelectedBargeldkasse { get; set; }
|
||||
|
||||
[Display(Name="Auszahlunsintervall")]
|
||||
public int SelectedAuszahlungsintervall { get; set; }
|
||||
public int SelectedAuszahlungsintervall { get { return CustomerSessionModel.SelectedAuszahlungsintervall; } set { CustomerSessionModel.SelectedAuszahlungsintervall = value; } }
|
||||
public List<SelectListItem> Auszahlungsintervalle =>
|
||||
new List<SelectListItem>
|
||||
{
|
||||
@@ -155,11 +179,13 @@ namespace BeWoPlanerMobil.Models
|
||||
public string BargeldkassenReportName { get; set; }
|
||||
|
||||
public XtraReport ZahlungsbelegsReportObject { get; set; }
|
||||
|
||||
|
||||
public long? SelectedBargeldtransaktionOid { get { return CustomerSessionModel.SelectedBargeldtransaktionOid; } set { CustomerSessionModel.SelectedBargeldtransaktionOid = value; } }
|
||||
|
||||
public BargeldtransaktionDC SelectedBargeldtransaktion { get; set; }
|
||||
|
||||
[Display(Name = "Art")]
|
||||
public int SelectedTransaktionsart { get; set; }
|
||||
public int SelectedTransaktionsart { get { return CustomerSessionModel.SelectedTransaktionsart; } set { CustomerSessionModel.SelectedTransaktionsart = value; } }
|
||||
public List<SelectListItem> Transaktionsarten =>
|
||||
new List<SelectListItem>
|
||||
{
|
||||
|
||||
51
BeWoPlanerMobil/Models/CustomerSessionModel.cs
Normal file
51
BeWoPlanerMobil/Models/CustomerSessionModel.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using BeWo.View.Navigation.Filter;
|
||||
using BeWoPlanerMobil.Controllers;
|
||||
using BeWoPlanerMobil.Service;
|
||||
using BeWoPlanerMobil.Util;
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using DevExpress.XtraReports.UI;
|
||||
|
||||
namespace BeWoPlanerMobil.Models
|
||||
{
|
||||
[Serializable]
|
||||
public class CustomerSessionModel : ISessionModel
|
||||
{
|
||||
public long? SelectedCustomerOid { get; set; }
|
||||
|
||||
public CustomerFilterEnum SelectedCustomerFilter { get; set; }
|
||||
|
||||
public CustomerReportType SelectedReportType { get; set; }
|
||||
|
||||
public long? SelectedAbsenceReasonOid { get; set; }
|
||||
|
||||
public long? SelectedAbsenceTimeOid { get; set; }
|
||||
|
||||
public long? SelectedBargeldkasseOid { get; set; }
|
||||
|
||||
public int SelectedAuszahlungsintervall { get; set; }
|
||||
|
||||
public long? SelectedBargeldtransaktionOid { get; set; }
|
||||
|
||||
public int SelectedTransaktionsart { get; set; }
|
||||
|
||||
public void ResetValues()
|
||||
{
|
||||
SelectedCustomerOid = null;
|
||||
//SelectedCustomerFilter = CustomerFilterEnum.All;
|
||||
//SelectedReportType = CustomerReportType.Medikamentenliste;
|
||||
SelectedAbsenceReasonOid = null;
|
||||
SelectedAbsenceTimeOid = null;
|
||||
SelectedBargeldkasseOid = null;
|
||||
//SelectedAuszahlungsintervall = 0;
|
||||
SelectedBargeldtransaktionOid = null;
|
||||
//SelectedTransaktionsart = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
9
BeWoPlanerMobil/Models/ISessionModel.cs
Normal file
9
BeWoPlanerMobil/Models/ISessionModel.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using BeWoPlanerMobil.Service;
|
||||
|
||||
namespace BeWoPlanerMobil.Models
|
||||
{
|
||||
public interface ISessionModel
|
||||
{
|
||||
void ResetValues();
|
||||
}
|
||||
}
|
||||
@@ -19,17 +19,33 @@ namespace BeWoPlanerMobil.Models
|
||||
{
|
||||
protected static readonly log4net.ILog Log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public MainModel()
|
||||
{
|
||||
SessionModel = new MainSessionModel();
|
||||
SessionModel.ResetValues();
|
||||
|
||||
NewServiceRecord = new ServiceRecordDC();
|
||||
ShowOnlyOwnSupportConcepts = true;
|
||||
ErrorWert = 1;
|
||||
}
|
||||
|
||||
public MainSessionModel MainSessionModel
|
||||
{
|
||||
get
|
||||
{
|
||||
return SessionModel as MainSessionModel;
|
||||
}
|
||||
}
|
||||
|
||||
public long? SelectedCostBearerSupportConceptRelOid { get; set; }
|
||||
public bool SessionInitialized { get { return MainSessionModel.SessionInitialized; } set { MainSessionModel.SessionInitialized = value; } }
|
||||
|
||||
[Display(Name = "Nur meine Klienten anzeigen")]
|
||||
public bool ShowOnlyOwnSupportConcepts { get; set; }
|
||||
public bool ShowOnlyOwnSupportConcepts { get { return MainSessionModel.ShowOnlyOwnSupportConcepts; } set { MainSessionModel.ShowOnlyOwnSupportConcepts = value; } }
|
||||
|
||||
[Display(Name = "Nur Klienten meiner Teams anzeigen")]
|
||||
public bool ShowOnlyMyTeamsSupportConcepts { get; set; }
|
||||
|
||||
public CustomerFilterEnum SelectedSupportConceptFilter { get; set; }
|
||||
public bool ShowOnlyMyTeamsSupportConcepts { get { return MainSessionModel.ShowOnlyMyTeamsSupportConcepts; } set { MainSessionModel.ShowOnlyMyTeamsSupportConcepts = value; } }
|
||||
|
||||
public CustomerFilterEnum SelectedSupportConceptFilter { get { return MainSessionModel.SelectedSupportConceptFilter; } set { MainSessionModel.SelectedSupportConceptFilter = value; } }
|
||||
|
||||
public List<SelectListItem> SupportConceptFilter
|
||||
{
|
||||
@@ -55,7 +71,7 @@ namespace BeWoPlanerMobil.Models
|
||||
|
||||
var result = new List<SelectListItem>();
|
||||
|
||||
var user = MobileSessionFacade.LoggedInUser;
|
||||
var user = LoggedInUser;
|
||||
|
||||
var alle = new CustomerFilterItem(CustomerFilterEnum.All);
|
||||
var nurMeine = new CustomerFilterItem(CustomerFilterEnum.MyCustomer);
|
||||
@@ -73,7 +89,7 @@ namespace BeWoPlanerMobil.Models
|
||||
{
|
||||
if(user.CheckForAtLeastOneRight(new List<UserRightType> { UserRightType.ViewAll, UserRightType.SupportConcept_ViewAllSupportConcepts }))
|
||||
{
|
||||
if(user.CheckForRight(UserRightType.SupportConcept_ViewMyTeams))
|
||||
if(user.HasRight(UserRightType.SupportConcept_ViewMyTeams))
|
||||
{
|
||||
result.Add(new SelectListItem { Text = allSupportConcepts, Value = allSupportConceptsValue });
|
||||
result.Add(new SelectListItem { Text = myTeamsSupportConceptsOnly, Value = myTeamsSupportConceptsOnlyValue });
|
||||
@@ -85,7 +101,7 @@ namespace BeWoPlanerMobil.Models
|
||||
result.Add(new SelectListItem { Text = mySupportConceptsOnly, Value = mySupportConceptsValue });
|
||||
}
|
||||
}
|
||||
else if(user.CheckForRight(UserRightType.SupportConcept_ViewMyTeams))
|
||||
else if(user.HasRight(UserRightType.SupportConcept_ViewMyTeams))
|
||||
{
|
||||
result.Add(new SelectListItem { Text = myTeamsSupportConceptsOnly, Value = myTeamsSupportConceptsOnlyValue });
|
||||
result.Add(new SelectListItem { Text = mySupportConceptsOnly, Value = mySupportConceptsValue });
|
||||
@@ -97,37 +113,25 @@ namespace BeWoPlanerMobil.Models
|
||||
}
|
||||
|
||||
[Display(Name = "Abgelaufene Hilfepläne anzeigen")]
|
||||
public bool ShowExpiredSupportConcepts { get; set; }
|
||||
|
||||
private long? _CostBearer2SupportConceptOid;
|
||||
|
||||
public bool ShowExpiredSupportConcepts { get { return MainSessionModel.ShowExpiredSupportConcepts; } set { MainSessionModel.ShowExpiredSupportConcepts = value; } }
|
||||
|
||||
[Display(Name = "Hilfeplan")]
|
||||
public long? CostBearer2SupportConceptOid
|
||||
{
|
||||
get => _CostBearer2SupportConceptOid;
|
||||
public long? SelectedCostBearerSupportConceptOid { get { return MainSessionModel.SelectedCostBearerSupportConceptOid; } set { MainSessionModel.SelectedCostBearerSupportConceptOid = value; } }
|
||||
|
||||
public long? SelectedServiceCategoryOid { get { return MainSessionModel.SelectedServiceCategoryOid; } set { MainSessionModel.SelectedServiceCategoryOid = value; } }
|
||||
|
||||
set
|
||||
{
|
||||
Log.Info($"CostBearer2SupportConceptOid ausgewählt: {value}. Vorher: {_CostBearer2SupportConceptOid}; Benutzer: {MobileSessionFacade.LoggedInUser.LoginName} UserOid: {MobileSessionFacade.LoggedInUser.Oid}");
|
||||
_CostBearer2SupportConceptOid = value;
|
||||
}
|
||||
}
|
||||
|
||||
public long? SelectedServiceCategoryOid => SelectedServiceCategory?.ServiceCategoryOid;
|
||||
|
||||
public long? SelectedServiceDescriptionOid => SelectedServiceDescription?.ServiceDescriptionOid;
|
||||
|
||||
public long? SelectedServiceRecordOid { get; set; }
|
||||
public long? SelectedServiceDescriptionOid { get { return MainSessionModel.SelectedServiceDescriptionOid; } set { MainSessionModel.SelectedServiceDescriptionOid = value; } }
|
||||
|
||||
|
||||
public bool IsAllowedToDeleteServiceRecord(ServiceRecordDC serviceRecord)
|
||||
{
|
||||
var allowed = false;
|
||||
|
||||
if(MobileSessionFacade.CheckForUserRight(UserRightType.ServiceRecordView_Delete))
|
||||
if(LoggedInUser.HasRight(UserRightType.ServiceRecordView_Delete))
|
||||
{
|
||||
allowed = true;
|
||||
}
|
||||
else if(MobileSessionFacade.CheckForUserRight(UserRightType.ServiceRecord_AllowChangeWithin24Hours))
|
||||
else if(LoggedInUser.HasRight(UserRightType.ServiceRecord_AllowChangeWithin24Hours))
|
||||
{
|
||||
if(serviceRecord.InsertedOn.HasValue)
|
||||
{
|
||||
@@ -140,7 +144,7 @@ namespace BeWoPlanerMobil.Models
|
||||
|
||||
if(allowed && ApplicationSettings.MaxDaysEditServiceRecordsAllowed > 0)
|
||||
{
|
||||
if(!MobileSessionFacade.CheckForUserRight(UserRightType.ServiceRecord_AllowEditAfterMaxDaysInNextMonth))
|
||||
if(!LoggedInUser.HasRight(UserRightType.ServiceRecord_AllowEditAfterMaxDaysInNextMonth))
|
||||
{
|
||||
if(serviceRecord.Start.HasValue)
|
||||
{
|
||||
@@ -158,7 +162,7 @@ namespace BeWoPlanerMobil.Models
|
||||
|
||||
if (allowed && ApplicationSettings.AnzTageZeiterfassErfolgt > 0)
|
||||
{
|
||||
if (!MobileSessionFacade.CheckForUserRight(UserRightType.ServiceRecordAllowEditAfterMindays))
|
||||
if (!LoggedInUser.HasRight(UserRightType.ServiceRecordAllowEditAfterMindays))
|
||||
{
|
||||
if (serviceRecord.Start != null)
|
||||
{
|
||||
@@ -172,9 +176,9 @@ namespace BeWoPlanerMobil.Models
|
||||
}
|
||||
}
|
||||
|
||||
if(allowed && !MobileSessionFacade.CheckForUserRight(UserRightType.ServiceRecord_AllowEditForOtherEmployees))
|
||||
if(allowed && !LoggedInUser.HasRight(UserRightType.ServiceRecord_AllowEditForOtherEmployees))
|
||||
{
|
||||
if(MobileSessionFacade.LoggedInEmployee.EmployeeOid != serviceRecord.Employee.EmployeeOid)
|
||||
if(LoggedInUser.Employee.EmployeeOid != serviceRecord.Employee.EmployeeOid)
|
||||
{
|
||||
allowed = false;
|
||||
}
|
||||
@@ -182,7 +186,7 @@ namespace BeWoPlanerMobil.Models
|
||||
|
||||
if(allowed && serviceRecord.GroupOid.HasValue)
|
||||
{
|
||||
if(!MobileSessionFacade.CheckForUserRight(UserRightType.ServiceRecord_AllowCreatingGroupBooking))
|
||||
if(!LoggedInUser.HasRight(UserRightType.ServiceRecord_AllowCreatingGroupBooking))
|
||||
{
|
||||
allowed = false;
|
||||
}
|
||||
@@ -191,33 +195,23 @@ namespace BeWoPlanerMobil.Models
|
||||
return allowed;
|
||||
}
|
||||
|
||||
public long? SelectedServiceRecordOid { get { return MainSessionModel.SelectedServiceRecordOid; } set { MainSessionModel.SelectedServiceRecordOid = value; } }
|
||||
|
||||
public ServiceRecordDC SelectedServiceRecord { 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 long? SelectedSupportConceptOid { get { return MainSessionModel.SelectedSupportConceptOid; } set { MainSessionModel.SelectedSupportConceptOid = value; } }
|
||||
|
||||
public SupportConceptDC SelectedSupportConcept { get; set; }
|
||||
|
||||
public int Zeitraum { get; set; }
|
||||
|
||||
public int ErrorWert { get; set; }
|
||||
|
||||
public bool ShowSignature { get; set; }
|
||||
|
||||
public long ServiceRecordOid { get; set; }
|
||||
public long LastCreatedServiceRecordOid { get { return MainSessionModel.LastCreatedServiceRecordOid; } set { MainSessionModel.LastCreatedServiceRecordOid = value; } }
|
||||
|
||||
public List<SupportConceptDC> SupportConcepts { get; set; }
|
||||
public List<SupportConceptDC> SupportConcepts { get; set; }
|
||||
|
||||
public List<TextModuleDC> Textbausteine { get; set; } = new List<TextModuleDC>();
|
||||
|
||||
@@ -239,6 +233,8 @@ namespace BeWoPlanerMobil.Models
|
||||
set => _ServiceRecords = value;
|
||||
}
|
||||
|
||||
public List<long> SelectedGoalOids { get { return MainSessionModel.SelectedGoalOids; } set { MainSessionModel.SelectedGoalOids = value; } }
|
||||
|
||||
private List<ValueListEntryDC> _SelectedGoals;
|
||||
|
||||
public List<ValueListEntryDC> SelectedGoals
|
||||
@@ -259,25 +255,21 @@ namespace BeWoPlanerMobil.Models
|
||||
|
||||
public long? ServiceRecordOidToDelete { get; set; }
|
||||
|
||||
public MainModel()
|
||||
{
|
||||
NewServiceRecord = new ServiceRecordDC();
|
||||
ShowOnlyOwnSupportConcepts = true;
|
||||
ErrorWert = 1;
|
||||
}
|
||||
|
||||
|
||||
public IEnumerable<CostBearer2SupportConceptRelListObject> SupportConceptListObjects
|
||||
{
|
||||
get
|
||||
{
|
||||
var allCostBearerRelations = new List<CostBearer2SupportConceptRelListObject> {new CostBearer2SupportConceptRelListObject("Hilfeplan auswählen", "", "-1", false, false), new CostBearer2SupportConceptRelListObject("Ohne Hilfeplan", "", "-2", false, false) };
|
||||
foreach(var sc in SupportConcepts.OrderBy(sc => sc.Customer.LastName))
|
||||
var allCostBearerRelations = new List<CostBearer2SupportConceptRelListObject> {new CostBearer2SupportConceptRelListObject("Hilfeplan auswählen", "", -1, false, false), new CostBearer2SupportConceptRelListObject("Ohne Hilfeplan", "", -2, false, false) };
|
||||
BS.Shared.Settings.ApplicationSettings.SupportConceptExpirationLimitInMonths = MokSettings.SupportConceptExpirationLimitInMonths;
|
||||
foreach (var sc in SupportConcepts.OrderBy(sc => sc.Customer.LastName))
|
||||
{
|
||||
allCostBearerRelations.AddRange(sc.CostBearerRelations.Where(w => ShowExpiredSupportConcepts || w.EndDate is null || w.EndDate.Value >= DateTime.Now.Date).Select(
|
||||
cb => new CostBearer2SupportConceptRelListObject(
|
||||
$"{sc.Customer.SimpleDescription} {(sc.Customer.DateOfBirth.HasValue ? "*" + sc.Customer.DateOfBirth.Value.ToString("dd.MM.yyyy") : string.Empty)}",
|
||||
$"{cb.AuswahlBezeichnung} {cb.StartDate?.ToShortDateString().Remove(6, 2) ?? string.Empty}-{cb.EndDate?.ToShortDateString().Remove(6, 2) ?? string.Empty} {cb.CostBearer.Name}{GetIsNotApproved(cb)}",
|
||||
cb.CostBearer2SupportConceptOid.ToString(),
|
||||
cb.CostBearer2SupportConceptOid.Value,
|
||||
cb.SupportConcept.IsAboutToExpire,
|
||||
cb.SupportConcept.ExpiresIn3MonthOrLess))
|
||||
);
|
||||
@@ -288,6 +280,8 @@ namespace BeWoPlanerMobil.Models
|
||||
|
||||
public CostBearer2SupportConceptRelListObject SelectedCostBearer2SupportConceptRelListObject { get; set; }
|
||||
|
||||
public List<long> SelectedConceptCostBearerRelationOids { get { return MainSessionModel.SelectedConceptCostBearerRelations; } set { MainSessionModel.SelectedConceptCostBearerRelations = value; } }
|
||||
|
||||
public List<SupportConceptCostBearerRelDC> SelectedConceptCostBearerRelations { get; set; }
|
||||
|
||||
public GroupBookingSelectionObject GroupBookingSelectionObject => new GroupBookingSelectionObject(SelectedConceptCostBearerRelations, GroupBookingSelectedGroupOfPeopleOids);
|
||||
@@ -304,7 +298,7 @@ namespace BeWoPlanerMobil.Models
|
||||
cb => new CostBearer2SupportConceptRelListObject(
|
||||
$"{sc.Customer.SimpleDescription} {(sc.Customer.DateOfBirth.HasValue ? "*" + sc.Customer.DateOfBirth.Value.ToString("dd.MM.yyyy") : string.Empty)}",
|
||||
$"{cb.AuswahlBezeichnung} {cb.StartDate?.ToShortDateString().Remove(6, 2) ?? string.Empty}-{cb.EndDate?.ToShortDateString().Remove(6, 2) ?? string.Empty} {cb.CostBearer.Name}",
|
||||
cb.CostBearer2SupportConceptOid.ToString(),
|
||||
cb.CostBearer2SupportConceptOid.Value,
|
||||
cb.SupportConcept.IsAboutToExpire,
|
||||
cb.SupportConcept.ExpiresIn3MonthOrLess))
|
||||
);
|
||||
@@ -322,16 +316,14 @@ namespace BeWoPlanerMobil.Models
|
||||
}
|
||||
}
|
||||
|
||||
public List<CompactEmployeeDC> Employees { get; set; }
|
||||
|
||||
public List<CompactEmployeeDC> EmployeesForGroupAndMultiBooking { get; set; }
|
||||
|
||||
public List<CompactEmployeeDC> AllEmployees { get; set; }
|
||||
|
||||
[Display(Name = "Mitarbeiter")]
|
||||
public long? SelectedEmployeeOid => SelectedEmployee?.EmployeeOid;
|
||||
public long? SelectedEmployeeOid { get { return MainSessionModel.SelectedEmployeeOid; } set { MainSessionModel.SelectedEmployeeOid = value; } }
|
||||
|
||||
public CompactEmployeeDC SelectedEmployee { get; set; }
|
||||
public CompactEmployeeDC SelectedEmployee { get; set; }
|
||||
|
||||
public List<GroupOfPeopleDC> GroupsOfPeople { get; set; } = new List<GroupOfPeopleDC>();
|
||||
|
||||
@@ -342,7 +334,7 @@ namespace BeWoPlanerMobil.Models
|
||||
get
|
||||
{
|
||||
var result = new List<SelectListItem>();
|
||||
result.AddRange(Employees.Select(item => new SelectListItem {Value = item.EmployeeOid.ToString(), Text = $"{item.LastName}, {item.FirstName}", Selected = item.Equals(MobileSessionFacade.LoggedInCompactEmployee)}).OrderBy(s => s.Text).ToList());
|
||||
result.AddRange(Employees.Select(item => new SelectListItem {Value = item.EmployeeOid.ToString(), Text = $"{item.LastName}, {item.FirstName}", Selected = item.Equals(LoggedInUser.Employee)}).OrderBy(s => s.Text).ToList());
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -369,36 +361,37 @@ namespace BeWoPlanerMobil.Models
|
||||
return maxDate;
|
||||
}
|
||||
|
||||
public List<SupportConceptDC> GroupBookingSelectedSupportConcepts { get; set; } = new List<SupportConceptDC>();
|
||||
public List<long> GroupBookingSelectedSupportConceptOids { get { return MainSessionModel.GroupBookingSelectedSupportConceptOids; } set { MainSessionModel.GroupBookingSelectedSupportConceptOids = value; } }
|
||||
public List<SupportConceptDC> GroupBookingSelectedSupportConcepts { get; set; } = new List<SupportConceptDC>();
|
||||
|
||||
public List<long> GroupBookingSelectedCostbearerRelOids { get; set; } = new List<long>();
|
||||
public List<long> GroupBookingSelectedCostbearerRelOids { get { return MainSessionModel.GroupBookingSelectedCostbearerRelOids; } set { MainSessionModel.GroupBookingSelectedCostbearerRelOids = value; } }
|
||||
|
||||
public List<CompactEmployeeDC> GroupBookingSelectedEmployees { get; set; } = new List<CompactEmployeeDC>();
|
||||
public List<long> GroupBookingSelectedEmployeeOids { get { return MainSessionModel.GroupBookingSelectedEmployeeOids; } set { MainSessionModel.GroupBookingSelectedEmployeeOids = value; } }
|
||||
public List<CompactEmployeeDC> GroupBookingSelectedEmployees { get; set; } = new List<CompactEmployeeDC>();
|
||||
|
||||
[Display(Name = "Gruppenbuchung")]
|
||||
public bool IsInGroupBookingMode
|
||||
{
|
||||
get => _IsInGroupBookingMode;
|
||||
get => MainSessionModel.IsInGroupBookingMode;
|
||||
|
||||
set
|
||||
{
|
||||
_IsInGroupBookingMode = value;
|
||||
MainSessionModel.IsInGroupBookingMode = value;
|
||||
|
||||
if(!_IsInGroupBookingMode)
|
||||
if(!MainSessionModel.IsInGroupBookingMode)
|
||||
{
|
||||
GroupBookingSelectedSupportConcepts?.Clear();
|
||||
GroupBookingSelectedEmployees?.Clear();
|
||||
}
|
||||
GroupBookingSelectedSupportConceptOids?.Clear();
|
||||
GroupBookingSelectedEmployeeOids?.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool _IsInGroupBookingMode;
|
||||
|
||||
|
||||
public bool IsInEditingMode { get { return MainSessionModel.IsInEditingMode; } set { MainSessionModel.IsInEditingMode = value; } }
|
||||
|
||||
public bool IsInEditingMode { get; set; }
|
||||
|
||||
public List<ServiceDescriptionDC> GetServiceDesctiptions()
|
||||
public List<ServiceDescriptionDC> GetServiceDesctiptions()
|
||||
{
|
||||
var result = new List<ServiceDescriptionDC>();
|
||||
|
||||
@@ -412,23 +405,27 @@ namespace BeWoPlanerMobil.Models
|
||||
|
||||
public bool IsServiceRecordNoticeMandatory { get; set; } = true;
|
||||
|
||||
public CompactEmployeeDC PreviouslySelectedEmployee { get; set; }
|
||||
public SupportConceptDC PreviouslySelectedSupportConcept { get; set; }
|
||||
private long? _PreviouslySelectedCostbearer2SupportConceptOid;
|
||||
public long? PreviouslySelectedEmployeeOid { get { return MainSessionModel.PreviouslySelectedEmployeeOid; } set { MainSessionModel.PreviouslySelectedEmployeeOid = value; } }
|
||||
|
||||
public CompactEmployeeDC PreviouslySelectedEmployee { get; set; }
|
||||
|
||||
public long? PreviouslySelectedSupportConceptOid { get { return MainSessionModel.PreviouslySelectedSupportConceptOid; } set { MainSessionModel.PreviouslySelectedSupportConceptOid = value; } }
|
||||
public SupportConceptDC PreviouslySelectedSupportConcept { get; set; }
|
||||
|
||||
|
||||
public long? PreviouslySelectedCostbearer2SupportConceptOid
|
||||
{
|
||||
get => _PreviouslySelectedCostbearer2SupportConceptOid;
|
||||
get => MainSessionModel.PreviouslySelectedCostbearer2SupportConceptOid;
|
||||
set
|
||||
{
|
||||
var stackTrace = new StackTrace();
|
||||
var callingMethodsName = stackTrace.GetFrame(1).GetMethod().Name;
|
||||
|
||||
var alt = _PreviouslySelectedCostbearer2SupportConceptOid;
|
||||
var alt = MainSessionModel.PreviouslySelectedCostbearer2SupportConceptOid;
|
||||
|
||||
Log.Info($"PreviouslySelectedCostbearer2SupportConceptOid-Set von {alt} zu {value} von Methode: {callingMethodsName}");
|
||||
|
||||
_PreviouslySelectedCostbearer2SupportConceptOid = value;
|
||||
MainSessionModel.PreviouslySelectedCostbearer2SupportConceptOid = value;
|
||||
}
|
||||
}
|
||||
public bool IsEndDateVisible { get; set; }
|
||||
@@ -479,11 +476,11 @@ namespace BeWoPlanerMobil.Models
|
||||
{
|
||||
var allowed = false;
|
||||
|
||||
if(MobileSessionFacade.CheckForUserRight(UserRightType.ServiceRecordView_Edit))
|
||||
if(LoggedInUser.HasRight(UserRightType.ServiceRecordView_Edit))
|
||||
{
|
||||
allowed = true;
|
||||
}
|
||||
else if(MobileSessionFacade.CheckForUserRight(UserRightType.ServiceRecord_AllowChangeWithin24Hours))
|
||||
else if(LoggedInUser.HasRight(UserRightType.ServiceRecord_AllowChangeWithin24Hours))
|
||||
{
|
||||
if(serviceRecord.InsertedOn != null)
|
||||
{
|
||||
@@ -496,7 +493,7 @@ namespace BeWoPlanerMobil.Models
|
||||
|
||||
if(allowed && ApplicationSettings.MaxDaysEditServiceRecordsAllowed > 0)
|
||||
{
|
||||
if(!MobileSessionFacade.CheckForUserRight(UserRightType.ServiceRecord_AllowEditAfterMaxDaysInNextMonth))
|
||||
if(!LoggedInUser.HasRight(UserRightType.ServiceRecord_AllowEditAfterMaxDaysInNextMonth))
|
||||
{
|
||||
if(serviceRecord.Start != null)
|
||||
{
|
||||
@@ -512,9 +509,9 @@ namespace BeWoPlanerMobil.Models
|
||||
}
|
||||
}
|
||||
|
||||
if(allowed && !MobileSessionFacade.CheckForUserRight(UserRightType.ServiceRecord_AllowEditForOtherEmployees))
|
||||
if(allowed && !LoggedInUser.HasRight(UserRightType.ServiceRecord_AllowEditForOtherEmployees))
|
||||
{
|
||||
if(MobileSessionFacade.LoggedInEmployee.EmployeeOid != serviceRecord.Employee.EmployeeOid)
|
||||
if(LoggedInUser.Employee.EmployeeOid != serviceRecord.Employee.EmployeeOid)
|
||||
{
|
||||
allowed = false;
|
||||
}
|
||||
@@ -522,7 +519,7 @@ namespace BeWoPlanerMobil.Models
|
||||
|
||||
if(allowed && serviceRecord.GroupOid.HasValue)
|
||||
{
|
||||
if(!MobileSessionFacade.CheckForUserRight(UserRightType.ServiceRecord_AllowCreatingGroupBooking))
|
||||
if(!LoggedInUser.HasRight(UserRightType.ServiceRecord_AllowCreatingGroupBooking))
|
||||
{
|
||||
allowed = false;
|
||||
}
|
||||
@@ -530,7 +527,7 @@ namespace BeWoPlanerMobil.Models
|
||||
|
||||
if(allowed && ApplicationSettings.AnzTageZeiterfassErfolgt > 0)
|
||||
{
|
||||
if(!MobileSessionFacade.CheckForUserRight(UserRightType.ServiceRecordAllowEditAfterMindays))
|
||||
if(!LoggedInUser.HasRight(UserRightType.ServiceRecordAllowEditAfterMindays))
|
||||
{
|
||||
if(serviceRecord.Start != null)
|
||||
{
|
||||
@@ -690,39 +687,29 @@ namespace BeWoPlanerMobil.Models
|
||||
/// </summary>
|
||||
public ServiceRecordTimeInterval ServiceRecordTimeInterval { get; set; }
|
||||
public int SelectedDayCount { get; set; }
|
||||
public NullableDateTimeSpan SelectedZeitraum { get; set; }
|
||||
public NullableDateTimeSpan SelectedZeitraum { get { return MainSessionModel.SelectedZeitraum; } set { MainSessionModel.SelectedZeitraum = value; } }
|
||||
|
||||
public bool IsOnlyYearMonthVisible { get; set; }
|
||||
|
||||
#region Mehrfachbuchung
|
||||
|
||||
private bool _IsInMultiBookingMode;
|
||||
|
||||
[Display(Name = "Mehrfachbuchung")]
|
||||
public bool IsInMultiBookingMode
|
||||
{
|
||||
get => _IsInMultiBookingMode;
|
||||
public bool IsInMultiBookingMode { get { return MainSessionModel.IsInMultiBookingMode; } set { MainSessionModel.IsInMultiBookingMode = value; } }
|
||||
|
||||
set
|
||||
{
|
||||
_IsInMultiBookingMode = value;
|
||||
|
||||
if(!_IsInMultiBookingMode)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
public List<long> MultiBookingSelectedSupportConceptOids { get { return MainSessionModel.MultiBookingSelectedSupportConceptOids; } set { MainSessionModel.MultiBookingSelectedSupportConceptOids = value; } }
|
||||
|
||||
public List<SupportConceptDC> MultiBookingSelectedSupportConcepts { get; set; } = new List<SupportConceptDC>();
|
||||
|
||||
public List<long> MultiBookingSelectedGroupOfPeopleOids { get; set; } = new List<long>();
|
||||
public List<long> MultiBookingSelectedGroupOfPeopleOids { get { return MainSessionModel.MultiBookingSelectedGroupOfPeopleOids; } set { MainSessionModel.MultiBookingSelectedGroupOfPeopleOids = value; } }
|
||||
|
||||
public List<SupportConceptCostBearerRelDC> MultiBookingSelectedConceptCostBearerRelations { get; set; }
|
||||
|
||||
public GroupBookingSelectionObject MultiBookingSelectionObject => new GroupBookingSelectionObject(MultiBookingSelectedConceptCostBearerRelations, MultiBookingSelectedGroupOfPeopleOids);
|
||||
|
||||
public List<long> MultiBookingSelectedCostbearerRelOids { get; set; } = new List<long>();
|
||||
public List<long> MultiBookingSelectedCostbearerRelOids { get { return MainSessionModel.MultiBookingSelectedCostbearerRelOids; } set { MainSessionModel.MultiBookingSelectedCostbearerRelOids = value; } }
|
||||
|
||||
public List<long> MultiBookingSelectedEmployeeOids { get { return MainSessionModel.MultiBookingSelectedEmployeeOids; } set { MainSessionModel.MultiBookingSelectedEmployeeOids = value; } }
|
||||
public List<CompactEmployeeDC> MultiBookingSelectedEmployees { get; set; } = new List<CompactEmployeeDC>();
|
||||
|
||||
public List<CostBearer2SupportConceptRelListObject> MultiBookingSupportConceptListObjects
|
||||
@@ -737,7 +724,7 @@ namespace BeWoPlanerMobil.Models
|
||||
cb => new CostBearer2SupportConceptRelListObject(
|
||||
$"{sc.Customer.SimpleDescription} {(sc.Customer.DateOfBirth.HasValue ? "*" + sc.Customer.DateOfBirth.Value.ToString("dd.MM.yyyy") : string.Empty)}",
|
||||
$"{cb.AuswahlBezeichnung} {cb.StartDate?.ToShortDateString().Remove(6, 2) ?? string.Empty}-{cb.EndDate?.ToShortDateString().Remove(6, 2) ?? string.Empty} {cb.CostBearer.Name}",
|
||||
cb.CostBearer2SupportConceptOid.ToString(),
|
||||
cb.CostBearer2SupportConceptOid.Value,
|
||||
cb.SupportConcept.IsAboutToExpire,
|
||||
cb.SupportConcept.ExpiresIn3MonthOrLess))
|
||||
);
|
||||
@@ -749,8 +736,6 @@ namespace BeWoPlanerMobil.Models
|
||||
|
||||
#endregion
|
||||
|
||||
public MandatorDC Mandator { get; set; }
|
||||
|
||||
public bool IsPasswordSecurityEnabled { get; set; }
|
||||
|
||||
public bool ShowMarker { get; set; }
|
||||
@@ -758,7 +743,7 @@ namespace BeWoPlanerMobil.Models
|
||||
#region ServiceRecord-Pagination
|
||||
public int ServiceRecordCount { get; set; }
|
||||
|
||||
public int CurrentPage { get; set; }
|
||||
public int CurrentPage { get { return MainSessionModel.CurrentPage; } set { MainSessionModel.CurrentPage = value; } }
|
||||
|
||||
public int MaxResults { get; set; } = 10;
|
||||
|
||||
@@ -783,6 +768,7 @@ namespace BeWoPlanerMobil.Models
|
||||
public ServiceCategoryDC SelectedServiceCategory { get; set; }
|
||||
|
||||
public ServiceDescriptionDC SelectedServiceDescription { get; set; }
|
||||
public List<ValueListEntryDC> AllGoals { get; internal set; }
|
||||
|
||||
public ServiceDescriptionDC GetSelectedOrFirstServiceDescription()
|
||||
{
|
||||
@@ -830,7 +816,7 @@ namespace BeWoPlanerMobil.Models
|
||||
|
||||
public string SupportConceptTimeSpan { get; }
|
||||
|
||||
public string CostBearer2SupportConceptOid { get; }
|
||||
public long CostBearer2SupportConceptOid { get; }
|
||||
|
||||
public string CostBearer2SupportConceptOidName { get; }
|
||||
|
||||
@@ -838,13 +824,13 @@ namespace BeWoPlanerMobil.Models
|
||||
public bool ExpiresInThreeMonthsOrLess { get; }
|
||||
|
||||
|
||||
public CostBearer2SupportConceptRelListObject(string pNameAndDateOfBirth, string pSupportConceptTimeSpan, string pCostBearer2SupportConceptOid, bool isAboutToExpire, bool expiresIn3MonthOrLess)
|
||||
public CostBearer2SupportConceptRelListObject(string pNameAndDateOfBirth, string pSupportConceptTimeSpan, long pCostBearer2SupportConceptOid, bool isAboutToExpire, bool expiresIn3MonthOrLess)
|
||||
{
|
||||
NameAndDateOfBirth = pNameAndDateOfBirth;
|
||||
SupportConceptTimeSpan = pSupportConceptTimeSpan;
|
||||
CostBearer2SupportConceptOid = pCostBearer2SupportConceptOid;
|
||||
|
||||
CostBearer2SupportConceptOidName = "OidHolder_" + CostBearer2SupportConceptOid;
|
||||
CostBearer2SupportConceptOidName = String.Format("OidHolder_{0}", CostBearer2SupportConceptOid);
|
||||
|
||||
IsAboutToExpire = isAboutToExpire;
|
||||
ExpiresInThreeMonthsOrLess = expiresIn3MonthOrLess;
|
||||
@@ -873,7 +859,7 @@ namespace BeWoPlanerMobil.Models
|
||||
|
||||
hash = (hash * hashingMultiplier) ^ (NameAndDateOfBirth?.GetHashCode() ?? 0);
|
||||
hash = (hash * hashingMultiplier) ^ (SupportConceptTimeSpan?.GetHashCode() ?? 0);
|
||||
hash = (hash * hashingMultiplier) ^ (CostBearer2SupportConceptOid?.GetHashCode() ?? 0);
|
||||
hash = (hash * hashingMultiplier) ^ (CostBearer2SupportConceptOid.GetHashCode());
|
||||
hash = (hash * hashingMultiplier) ^ IsAboutToExpire.GetHashCode();
|
||||
hash = (hash * hashingMultiplier) ^ ExpiresInThreeMonthsOrLess.GetHashCode();
|
||||
|
||||
|
||||
88
BeWoPlanerMobil/Models/MainSessionModel.cs
Normal file
88
BeWoPlanerMobil/Models/MainSessionModel.cs
Normal file
@@ -0,0 +1,88 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using BeWo.View.Navigation.Filter;
|
||||
using BeWoPlanerMobil.Controllers;
|
||||
using BeWoPlanerMobil.Service;
|
||||
using BeWoPlanerMobil.Util;
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using DevExpress.XtraReports.UI;
|
||||
|
||||
namespace BeWoPlanerMobil.Models
|
||||
{
|
||||
[Serializable]
|
||||
public class MainSessionModel : ISessionModel
|
||||
{
|
||||
public bool SessionInitialized { get; internal set; }
|
||||
public long? SelectedSupportConceptOid { get; internal set; }
|
||||
public long? SelectedCostBearerSupportConceptOid { get; internal set; }
|
||||
public bool ShowOnlyOwnSupportConcepts { get; internal set; }
|
||||
public bool ShowOnlyMyTeamsSupportConcepts { get; internal set; }
|
||||
public CustomerFilterEnum SelectedSupportConceptFilter { get; internal set; }
|
||||
public bool ShowExpiredSupportConcepts { get; internal set; }
|
||||
public long? SelectedServiceCategoryOid { get; internal set; }
|
||||
public long? SelectedServiceDescriptionOid { get; internal set; }
|
||||
public long? SelectedServiceRecordOid { get; internal set; }
|
||||
public long? SelectedEmployeeOid { get; internal set; }
|
||||
public NullableDateTimeSpan SelectedZeitraum { get; internal set; }
|
||||
public List<long> SelectedConceptCostBearerRelations { get; internal set; }
|
||||
public List<long> GroupBookingSelectedSupportConceptOids { get; internal set; }
|
||||
public List<long> GroupBookingSelectedEmployeeOids { get; internal set; }
|
||||
public List<long> GroupBookingSelectedCostbearerRelOids { get; internal set; }
|
||||
public bool IsInGroupBookingMode { get; internal set; }
|
||||
public bool IsInEditingMode { get; internal set; }
|
||||
public long? PreviouslySelectedEmployeeOid { get; internal set; }
|
||||
public long? PreviouslySelectedSupportConceptOid { get; internal set; }
|
||||
public long? PreviouslySelectedCostbearer2SupportConceptOid { get; internal set; }
|
||||
public bool IsInMultiBookingMode { get; internal set; }
|
||||
public List<long> MultiBookingSelectedSupportConceptOids { get; internal set; }
|
||||
public List<long> MultiBookingSelectedGroupOfPeopleOids { get; internal set; }
|
||||
public List<long> MultiBookingSelectedCostbearerRelOids { get; internal set; }
|
||||
public List<long> MultiBookingSelectedEmployeeOids { get; internal set; }
|
||||
public int CurrentPage { get; internal set; }
|
||||
public List<long> SelectedGoalOids { get; internal set; }
|
||||
public long LastCreatedServiceRecordOid { get; internal set; }
|
||||
|
||||
public void ResetValues()
|
||||
{
|
||||
SessionInitialized = false;
|
||||
SelectedSupportConceptOid = null;
|
||||
SelectedCostBearerSupportConceptOid = null;
|
||||
ShowOnlyOwnSupportConcepts = false;
|
||||
ShowOnlyMyTeamsSupportConcepts = false;
|
||||
SelectedSupportConceptFilter = CustomerFilterEnum.All;
|
||||
ShowExpiredSupportConcepts = false;
|
||||
SelectedServiceCategoryOid = null;
|
||||
SelectedServiceDescriptionOid = null;
|
||||
SelectedServiceRecordOid = null;
|
||||
SelectedEmployeeOid = null;
|
||||
SelectedZeitraum = null;
|
||||
|
||||
SelectedConceptCostBearerRelations = new List<long>();
|
||||
GroupBookingSelectedSupportConceptOids = new List<long>();
|
||||
GroupBookingSelectedEmployeeOids = new List<long>();
|
||||
GroupBookingSelectedCostbearerRelOids = new List<long>();
|
||||
MultiBookingSelectedSupportConceptOids = new List<long>();
|
||||
MultiBookingSelectedGroupOfPeopleOids = new List<long>();
|
||||
MultiBookingSelectedCostbearerRelOids = new List<long>();
|
||||
MultiBookingSelectedEmployeeOids = new List<long>();
|
||||
|
||||
SelectedGoalOids = new List<long>();
|
||||
|
||||
PreviouslySelectedEmployeeOid = null;
|
||||
PreviouslySelectedSupportConceptOid = null;
|
||||
PreviouslySelectedCostbearer2SupportConceptOid = null;
|
||||
|
||||
IsInGroupBookingMode = false;
|
||||
IsInEditingMode = false;
|
||||
IsInMultiBookingMode = false;
|
||||
|
||||
CurrentPage = 0;
|
||||
LastCreatedServiceRecordOid = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,19 @@ namespace BeWoPlanerMobil.Models
|
||||
{
|
||||
public class ReportModel : AbstractModel
|
||||
{
|
||||
public ReportModel()
|
||||
{
|
||||
SessionModel = new ReportSessionModel();
|
||||
}
|
||||
|
||||
public ReportSessionModel ReportSessionModel
|
||||
{
|
||||
get
|
||||
{
|
||||
return SessionModel as ReportSessionModel;
|
||||
}
|
||||
}
|
||||
|
||||
public QbSignatureIntervalSelection SelectedIntervalSelection { get; set; }
|
||||
|
||||
public List<SelectListItem> IntervalSelections => new List<SelectListItem>
|
||||
@@ -41,16 +54,16 @@ namespace BeWoPlanerMobil.Models
|
||||
}
|
||||
};
|
||||
|
||||
[Display(Name = "Klient")]
|
||||
public long? SelectedCustomerOid => SelectedCustomer?.CustomerOid;
|
||||
[Display(Name = "Klient")]
|
||||
public long? SelectedCustomerOid { get { return ReportSessionModel.SelectedCustomerOid; } set { ReportSessionModel.SelectedCustomerOid = value; } }
|
||||
|
||||
public CompactCustomerDC SelectedCustomer { get; set; }
|
||||
|
||||
[Display(Name = "Monat")]
|
||||
public int? SelectedMonth { get; set; }
|
||||
public int? SelectedMonth { get { return ReportSessionModel.SelectedMonth; } set { ReportSessionModel.SelectedMonth = value; } }
|
||||
|
||||
[Display(Name = "Jahr")]
|
||||
public int? SelectedYear { get; set; }
|
||||
public int? SelectedYear { get { return ReportSessionModel.SelectedYear; } set { ReportSessionModel.SelectedYear = value; } }
|
||||
|
||||
public List<SelectListItem> Months
|
||||
{
|
||||
@@ -115,27 +128,27 @@ namespace BeWoPlanerMobil.Models
|
||||
}
|
||||
|
||||
[Display(Name = "Vom")]
|
||||
public int? SelectedStartDay { get; set; }
|
||||
public int? SelectedStartDay { get { return ReportSessionModel.SelectedStartDay; } set { ReportSessionModel.SelectedStartDay = value; } }
|
||||
|
||||
[Display(Name = "Bis")]
|
||||
public int? SelectedEndDay { get; set; }
|
||||
public int? SelectedEndDay { get { return ReportSessionModel.SelectedEndDay; } set { ReportSessionModel.SelectedEndDay = value; } }
|
||||
|
||||
public ConfirmationReceiptObject ConfirmationReceiptObject { get; set; }
|
||||
|
||||
[Display(Name = "Mitarbeiter")]
|
||||
public long? SelectedEmployeeOid => SelectedEmployee?.EmployeeOid;
|
||||
public long? SelectedEmployeeOid { get { return ReportSessionModel.SelectedEmployeeOid; } set { ReportSessionModel.SelectedEmployeeOid = value; } }
|
||||
|
||||
public CompactEmployeeDC SelectedEmployee { get; set; }
|
||||
|
||||
[Display(Name="Kostenträger")]
|
||||
public long? SelectedOrganisationOid => SelectedOrganisation?.OrganisationOid;
|
||||
public long? SelectedOrganisationOid { get { return ReportSessionModel.SelectedOrganisationOid; } set { ReportSessionModel.SelectedOrganisationOid = value; } }
|
||||
|
||||
public CompactOrganisationDC SelectedOrganisation { get; set; }
|
||||
|
||||
public List<CompactOrganisationDC> Organisations { get; set; } = new List<CompactOrganisationDC>();
|
||||
|
||||
[Display(Name="Leistungskategorie")]
|
||||
public long? SelectedServiceCategoryOid => SelectedServiceCategory?.ServiceCategoryOid;
|
||||
public long? SelectedServiceCategoryOid { get { return ReportSessionModel.SelectedServiceCategoryOid; } set { ReportSessionModel.SelectedServiceCategoryOid = value; } }
|
||||
|
||||
public ServiceCategoryDC SelectedServiceCategory { get; set; }
|
||||
|
||||
@@ -166,21 +179,33 @@ namespace BeWoPlanerMobil.Models
|
||||
}
|
||||
|
||||
[Display(Name="Filter")]
|
||||
public QbFilterItem SelectedFilterItem { get; set; }
|
||||
|
||||
public int? SelectedFilterItemId
|
||||
{
|
||||
get
|
||||
{
|
||||
if(SelectedFilterItem is null)
|
||||
|
||||
public QbFilterItem SelectedFilterItem
|
||||
{
|
||||
get
|
||||
{
|
||||
if (QbFilters == null || !SelectedFilterItemId.HasValue)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return (int)SelectedFilterItem.FilterEnum;
|
||||
}
|
||||
return QbFilters.FirstOrDefault(f => f.FilterEnum == SelectedFilterItemId.Value);
|
||||
}
|
||||
}
|
||||
|
||||
public QBFilterEnum? SelectedFilterItemId { get { return ReportSessionModel.SelectedFilterItemId; } set { ReportSessionModel.SelectedFilterItemId = value; } }
|
||||
//{
|
||||
// get
|
||||
// {
|
||||
// if(SelectedFilterItem is null)
|
||||
// {
|
||||
// return null;
|
||||
// }
|
||||
|
||||
// return (int)SelectedFilterItem.FilterEnum;
|
||||
// }
|
||||
//}
|
||||
|
||||
public List<QbFilterItem> QbFilters { get; set; } = new List<QbFilterItem>();
|
||||
|
||||
public List<SelectListItem> QbFilterItems
|
||||
@@ -203,7 +228,7 @@ namespace BeWoPlanerMobil.Models
|
||||
}
|
||||
|
||||
[Display(Name = "Team")]
|
||||
public long? SelectedTeamOid => SelectedTeam?.TeamOid;
|
||||
public long? SelectedTeamOid { get { return ReportSessionModel.SelectedTeamOid; } set { ReportSessionModel.SelectedTeamOid = value; } }
|
||||
|
||||
public CompactTeamDC SelectedTeam { get; set; }
|
||||
|
||||
@@ -244,9 +269,9 @@ namespace BeWoPlanerMobil.Models
|
||||
ConfirmationReceiptSignatures.Where(crs => crs.ConfirmationReceiptSignatureOid != null && confirmationReceiptSignatureOids.Contains(crs.ConfirmationReceiptSignatureOid.Value)).ToList();
|
||||
}
|
||||
|
||||
public bool IsForSelectedEmployeesOnly { get; set; }
|
||||
public bool IsForSelectedCostbearersOnly { get; set; }
|
||||
public bool IsForSelectedCategoryOnly { get; set; }
|
||||
public bool IsForSelectedEmployeesOnly { get { return ReportSessionModel.IsForSelectedEmployeesOnly; } set { ReportSessionModel.IsForSelectedEmployeesOnly = value; } }
|
||||
public bool IsForSelectedCostbearersOnly { get { return ReportSessionModel.IsForSelectedCostbearersOnly; } set { ReportSessionModel.IsForSelectedCostbearersOnly = value; } }
|
||||
public bool IsForSelectedCategoryOnly { get { return ReportSessionModel.IsForSelectedCategoryOnly; } set { ReportSessionModel.IsForSelectedCategoryOnly = value; } }
|
||||
|
||||
public List<ConfirmationReceiptSignatureObject> SelectedConfirmationReceiptSignatures { get; set; }
|
||||
|
||||
@@ -254,7 +279,9 @@ namespace BeWoPlanerMobil.Models
|
||||
|
||||
public AbstractReportCreator ReportCreator { get; set; }
|
||||
|
||||
public XtraReport QuittierungsbelegsReportObject { get; set; }
|
||||
public QuittierungsbelegsReportSettings QuittierungsbelegsReportSettings { get { return ReportSessionModel.QuittierungsbelegsReportSettings; } set { ReportSessionModel.QuittierungsbelegsReportSettings = value; } }
|
||||
|
||||
public XtraReport QuittierungsbelegsReport { get; set; }
|
||||
|
||||
public int QbEntryCount { get; set; }
|
||||
public int MaxResults { get; set; } = 10;
|
||||
|
||||
54
BeWoPlanerMobil/Models/ReportSessionModel .cs
Normal file
54
BeWoPlanerMobil/Models/ReportSessionModel .cs
Normal file
@@ -0,0 +1,54 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using BeWo.View.Navigation.Filter;
|
||||
using BeWoPlanerMobil.Controllers;
|
||||
using BeWoPlanerMobil.Service;
|
||||
using BeWoPlanerMobil.Util;
|
||||
using BeWoPlanerMobil.Util.ReportUtils;
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using DevExpress.XtraReports.UI;
|
||||
|
||||
namespace BeWoPlanerMobil.Models
|
||||
{
|
||||
[Serializable]
|
||||
public class ReportSessionModel : ISessionModel
|
||||
{
|
||||
public long? SelectedCustomerOid { get; set; }
|
||||
public long? SelectedEmployeeOid { get; set; }
|
||||
public long? SelectedTeamOid { get; set; }
|
||||
public long? SelectedOrganisationOid { get; set; }
|
||||
public long? SelectedServiceCategoryOid { get; set; }
|
||||
public int? SelectedMonth { get; internal set; }
|
||||
public int? SelectedYear { get; internal set; }
|
||||
public int? SelectedStartDay { get; internal set; }
|
||||
public int? SelectedEndDay { get; internal set; }
|
||||
public QBFilterEnum? SelectedFilterItemId { get; internal set; }
|
||||
public bool IsForSelectedEmployeesOnly { get; internal set; }
|
||||
public bool IsForSelectedCostbearersOnly { get; internal set; }
|
||||
public bool IsForSelectedCategoryOnly { get; internal set; }
|
||||
public QuittierungsbelegsReportSettings QuittierungsbelegsReportSettings { get; internal set; }
|
||||
|
||||
public void ResetValues()
|
||||
{
|
||||
SelectedCustomerOid = null;
|
||||
SelectedEmployeeOid = null;
|
||||
SelectedTeamOid = null;
|
||||
SelectedOrganisationOid = null;
|
||||
SelectedServiceCategoryOid = null;
|
||||
SelectedMonth = null;
|
||||
SelectedYear = null;
|
||||
SelectedStartDay = null;
|
||||
SelectedEndDay = null;
|
||||
SelectedFilterItemId = null;
|
||||
IsForSelectedEmployeesOnly = false;
|
||||
IsForSelectedCostbearersOnly = false;
|
||||
IsForSelectedCategoryOnly = false;
|
||||
QuittierungsbelegsReportSettings = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,13 +12,26 @@ namespace BeWoPlanerMobil.Models
|
||||
{
|
||||
public class ReportViewerModel : AbstractModel
|
||||
{
|
||||
public ReportViewerModel()
|
||||
{
|
||||
SessionModel = new ReportViewerSessionModel();
|
||||
}
|
||||
|
||||
public ReportViewerSessionModel ReportViewerSessionModel
|
||||
{
|
||||
get
|
||||
{
|
||||
return SessionModel as ReportViewerSessionModel;
|
||||
}
|
||||
}
|
||||
|
||||
public List<CompactEmployeeDC> AllEmployees { get; set; }
|
||||
public List<CompactTeamDC> AllTeams { get; set; }
|
||||
public List<QueryDC> Queries { get; set; }
|
||||
public AbstractReportCreator ReportCreator { get; set; }
|
||||
|
||||
[Display(Name = "Monat")]
|
||||
public int? SelectedMonth { get; set; }
|
||||
public int? SelectedMonth { get { return ReportViewerSessionModel.SelectedMonth; } set { ReportViewerSessionModel.SelectedMonth = value; } }
|
||||
public List<SelectListItem> Months
|
||||
{
|
||||
get
|
||||
@@ -40,7 +53,7 @@ namespace BeWoPlanerMobil.Models
|
||||
|
||||
|
||||
[Display(Name = "Jahr")]
|
||||
public int? SelectedYear { get; set; }
|
||||
public int? SelectedYear { get { return ReportViewerSessionModel.SelectedYear; } set { ReportViewerSessionModel.SelectedYear = value; } }
|
||||
public List<SelectListItem> Years
|
||||
{
|
||||
get
|
||||
@@ -62,7 +75,7 @@ namespace BeWoPlanerMobil.Models
|
||||
|
||||
|
||||
[Display(Name="Bericht")]
|
||||
public ReportType SelectedReportType { get; set; }
|
||||
public ReportType SelectedReportType { get { return ReportViewerSessionModel.SelectedReportType; } set { ReportViewerSessionModel.SelectedReportType = value; } }
|
||||
public List<SelectListItem> ReportTypes { get; set; }
|
||||
|
||||
|
||||
@@ -94,7 +107,7 @@ namespace BeWoPlanerMobil.Models
|
||||
|
||||
|
||||
[Display(Name = "Mitarbeiter")]
|
||||
public long? SelectedEmployeeOid => SelectedEmployee?.EmployeeOid;
|
||||
public long? SelectedEmployeeOid { get { return ReportViewerSessionModel.SelectedEmployeeOid; } set { ReportViewerSessionModel.SelectedEmployeeOid = value; } }
|
||||
public CompactEmployeeDC SelectedEmployee { get; set; }
|
||||
public List<SelectListItem> Employees
|
||||
{
|
||||
@@ -109,7 +122,7 @@ namespace BeWoPlanerMobil.Models
|
||||
|
||||
if(HasRightMitarbeiterstundenkontoViewSelf && !HasRightMitarbeiterstundenkontoViewAll)
|
||||
{
|
||||
result.Add(new SelectListItem{ Text = Employee.LastNameFirstName, Value = Employee.EmployeeOid.ToString()});
|
||||
result.Add(new SelectListItem{ Text = LoggedInEmployee.LastNameFirstName, Value = LoggedInEmployee.EmployeeOid.ToString()});
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -126,7 +139,7 @@ namespace BeWoPlanerMobil.Models
|
||||
|
||||
|
||||
[Display(Name = "Team")]
|
||||
public long? SelectedTeamOid => SelectedTeam?.TeamOid;
|
||||
public long? SelectedTeamOid { get { return ReportViewerSessionModel.SelectedTeamOid; } set { ReportViewerSessionModel.SelectedTeamOid = value; } }
|
||||
public CompactTeamDC SelectedTeam { get; set; }
|
||||
public List<SelectListItem> Teams
|
||||
{
|
||||
@@ -151,11 +164,14 @@ namespace BeWoPlanerMobil.Models
|
||||
}
|
||||
|
||||
|
||||
public List<CompactEmployeeDC> SelectedEmployees { get; set; }
|
||||
public List<CompactTeamDC> SelectedTeams { get; set; }
|
||||
//public List<CompactEmployeeDC> SelectedEmployees { get; set; }
|
||||
//public List<CompactTeamDC> SelectedTeams { get; set; }
|
||||
|
||||
public long? SelectedQueryOid { get { return ReportViewerSessionModel.SelectedQueryOid; } set { ReportViewerSessionModel.SelectedQueryOid = value; } }
|
||||
public QueryDC SelectedQuery { get; set; }
|
||||
|
||||
|
||||
|
||||
public List<SupportConceptDC> SupportConcepts { get; set; }
|
||||
|
||||
public CostBearer2SupportConceptRelListObject SelectedCostBearer2SupportConceptRelListObject { get; set; }
|
||||
@@ -164,14 +180,14 @@ namespace BeWoPlanerMobil.Models
|
||||
{
|
||||
get
|
||||
{
|
||||
var allCostBearerRelations = new List<CostBearer2SupportConceptRelListObject> { new CostBearer2SupportConceptRelListObject("Hilfeplan auswählen", "", "0", false, false) };
|
||||
var allCostBearerRelations = new List<CostBearer2SupportConceptRelListObject> { new CostBearer2SupportConceptRelListObject("Hilfeplan auswählen", "", 0, false, false) };
|
||||
foreach(var sc in SupportConcepts.OrderBy(sc => sc.Customer.LastName))
|
||||
{
|
||||
allCostBearerRelations.AddRange(sc.CostBearerRelations.Select(
|
||||
cb => new CostBearer2SupportConceptRelListObject(
|
||||
$"{sc.Customer.SimpleDescription} {(sc.Customer.DateOfBirth.HasValue ? "*" + sc.Customer.DateOfBirth.Value.ToString("dd.MM.yyyy") : string.Empty)}",
|
||||
$"{cb.AuswahlBezeichnung} {cb.StartDate?.ToShortDateString().Remove(6, 2) ?? string.Empty}-{cb.EndDate?.ToShortDateString().Remove(6, 2) ?? string.Empty} {cb.CostBearer.Name}{GetIsNotApproved(cb)}",
|
||||
cb.CostBearer2SupportConceptOid.ToString(),
|
||||
cb.CostBearer2SupportConceptOid.Value,
|
||||
cb.SupportConcept.IsAboutToExpire,
|
||||
cb.SupportConcept.ExpiresIn3MonthOrLess))
|
||||
);
|
||||
@@ -231,6 +247,7 @@ namespace BeWoPlanerMobil.Models
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class ReportSelectListItem : SelectListItem
|
||||
{
|
||||
public long? QueryOid { get; set; }
|
||||
|
||||
37
BeWoPlanerMobil/Models/ReportViewerSessionModel.cs
Normal file
37
BeWoPlanerMobil/Models/ReportViewerSessionModel.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using BeWo.View.Navigation.Filter;
|
||||
using BeWoPlanerMobil.Controllers;
|
||||
using BeWoPlanerMobil.Service;
|
||||
using BeWoPlanerMobil.Util;
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using DevExpress.XtraReports.UI;
|
||||
|
||||
namespace BeWoPlanerMobil.Models
|
||||
{
|
||||
[Serializable]
|
||||
public class ReportViewerSessionModel : ISessionModel
|
||||
{
|
||||
public long? SelectedEmployeeOid { get; set; }
|
||||
public long? SelectedTeamOid { get; set; }
|
||||
public int? SelectedMonth { get; internal set; }
|
||||
public int? SelectedYear { get; internal set; }
|
||||
public ReportType SelectedReportType { get; internal set; }
|
||||
public long? SelectedQueryOid { get; internal set; }
|
||||
|
||||
public void ResetValues()
|
||||
{
|
||||
SelectedEmployeeOid = null;
|
||||
SelectedTeamOid = null;
|
||||
SelectedMonth = null;
|
||||
SelectedYear = null;
|
||||
SelectedReportType = ReportType.Berichte;
|
||||
SelectedQueryOid = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,49 +15,38 @@ namespace BeWoPlanerMobil.Models
|
||||
{
|
||||
public class SchedulerModel : AbstractModel
|
||||
{
|
||||
public List<long> TeamMemberCustomerOids { get; set; }
|
||||
|
||||
public DateTime SelectedDate { get; set; } = DateTime.Today;
|
||||
|
||||
public SchedulerAppointmentDC SelectedAppointment { get; set; }
|
||||
|
||||
private List<SchedulerAppointmentDC> _Appointments;
|
||||
|
||||
public List<SchedulerAppointmentDC> Appointments
|
||||
public SchedulerModel()
|
||||
{
|
||||
get => _Appointments ?? (_Appointments = new List<SchedulerAppointmentDC>());
|
||||
SessionModel = new SchedulerSessionModel();
|
||||
SessionModel.ResetValues();
|
||||
}
|
||||
|
||||
set
|
||||
public SchedulerSessionModel SchedulerSessionModel
|
||||
{
|
||||
get
|
||||
{
|
||||
var oldAppointments = AppointmentListItems.Select(li => li.SchedulerAppointment).ToList();
|
||||
|
||||
_Appointments = value ?? new List<SchedulerAppointmentDC>();
|
||||
|
||||
if(_Appointments.AreListEqual(oldAppointments))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_AppointmentListItems = new List<AppointmentListItem>();
|
||||
|
||||
foreach(var appointment in _Appointments)
|
||||
{
|
||||
var listItem = new AppointmentListItem(appointment);
|
||||
listItem.GenerateIdentifier(_AppointmentListItems.Select(a => a.Identifier).ToList());
|
||||
|
||||
_AppointmentListItems.Add(listItem);
|
||||
}
|
||||
return SessionModel as SchedulerSessionModel;
|
||||
}
|
||||
}
|
||||
|
||||
private List<AppointmentListItem> _AppointmentListItems;
|
||||
public List<AppointmentListItem> AppointmentListItems => _AppointmentListItems ?? (_AppointmentListItems = new List<AppointmentListItem>());
|
||||
|
||||
public bool HasRightToEditAppointment(Guid identifier)
|
||||
public List<long> TeamMemberCustomerOids { get; set; }
|
||||
|
||||
public DateTime SelectedDate { get { return SchedulerSessionModel.SelectedDate; } set { SchedulerSessionModel.SelectedDate = value; } }
|
||||
|
||||
public long? SelectedAppointmentOid { get { return SchedulerSessionModel.SelectedAppointmentOid; } set { SchedulerSessionModel.SelectedAppointmentOid = value; } }
|
||||
|
||||
public SchedulerAppointmentDC SelectedAppointment { get; set; }
|
||||
|
||||
|
||||
public List<SchedulerAppointmentDC> Appointments { get; set; }
|
||||
|
||||
public List<AppointmentListItem> AppointmentListItems { get; set; }
|
||||
|
||||
public bool HasRightToEditAppointment(String identifier)
|
||||
{
|
||||
var appointment = AppointmentListItems.FirstOrDefault(app => app.Identifier.Equals(identifier))?.SchedulerAppointment; //Appointments.FirstOrDefault(app => app.SchedulerAppointmentOid.HasValue && app.SchedulerAppointmentOid.Value == appointmentOid);
|
||||
|
||||
return appointment != null && Utils.CheckSchedulerRights(appointment.CustomerList, appointment.ResourceList, appointment.EmployeeList, appointment.Originator, appointment.SchedulerAppointmentOid is null, SchedulerRightsCheckType.Edit, MobileSessionFacade.LoggedInUserDC, TeamMemberCustomerOids ?? new List<long>());
|
||||
return appointment != null && BS.Shared.Core.Utils.CheckSchedulerRights(appointment.CustomerList, appointment.ResourceList, appointment.EmployeeList, appointment.Originator, appointment.SchedulerAppointmentOid is null, SchedulerRightsCheckType.Edit, LoggedInUser, TeamMemberCustomerOids ?? new List<long>());
|
||||
}
|
||||
|
||||
public string DescriptionToEdit => SelectedAppointment?.Description ?? string.Empty;
|
||||
@@ -85,7 +74,9 @@ namespace BeWoPlanerMobil.Models
|
||||
}
|
||||
}
|
||||
|
||||
public List<ResourceDC> SelectedResources { get; set; } = new List<ResourceDC>();
|
||||
public List<long> SelectedResourceOids { get { return SchedulerSessionModel.SelectedResourceOids; } set { SchedulerSessionModel.SelectedResourceOids = value; } }
|
||||
|
||||
public List<ResourceDC> SelectedResources { get; set; }
|
||||
|
||||
public Dictionary<ValueListEntryDC, List<ResourceDC>> ResourceCategories2Resources { get; set; } = new Dictionary<ValueListEntryDC, List<ResourceDC>>();
|
||||
|
||||
@@ -112,42 +103,30 @@ namespace BeWoPlanerMobil.Models
|
||||
|
||||
public List<CompactEmployeeDC> AllEmployees { get; set; } = new List<CompactEmployeeDC>();
|
||||
|
||||
public List<CompactEmployeeDC> SelectedEmployees { get; set; } = new List<CompactEmployeeDC>();
|
||||
public List<long> SelectedEmployeeOids { get { return SchedulerSessionModel.SelectedEmployeeOids; } set { SchedulerSessionModel.SelectedEmployeeOids = value; } }
|
||||
|
||||
public List<CompactEmployeeDC> SelectedEmployees { get; set; }
|
||||
|
||||
public List<CompactCustomerDC> AllCustomers { get; set; } = new List<CompactCustomerDC>();
|
||||
|
||||
public List<long> SelectedCustomerOids { get { return SchedulerSessionModel.SelectedCustomerOids; } set { SchedulerSessionModel.SelectedCustomerOids = value; } }
|
||||
|
||||
public List<CompactCustomerDC> SelectedCustomers { get; set; } = new List<CompactCustomerDC>();
|
||||
|
||||
public bool IsInEditMode => SelectedAppointment != null;
|
||||
public bool IsInEditMode => SelectedAppointmentOid.HasValue;
|
||||
|
||||
// ToDo: Überarbeiten? Es kam das Ansehen hinzu
|
||||
public bool HasResourcesEmployeesOrCustomers
|
||||
{
|
||||
get
|
||||
{
|
||||
var isOwnAppointment = !IsInEditMode || SelectedAppointment.Originator.EmployeeOid == Employee.EmployeeOid;
|
||||
|
||||
var v1 = HasRightToInsertEmployeeAppointments || IsInEditMode && HasRightToEditEmployeeAppointments;
|
||||
|
||||
var v2 = HasRightToInsertRessourceAppointments || IsInEditMode && HasRightToEditResourceAppointments;
|
||||
|
||||
if (IsInEditMode && !isOwnAppointment)
|
||||
{
|
||||
v2 = HasRightToEditOthersResourceAppointments;
|
||||
}
|
||||
|
||||
var v3 = HasRightToInsertCustomerAppointments || IsInEditMode && HasRightToEditCustomerAppointments;
|
||||
|
||||
return v1 || v2 || v3;
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasResourcesEmployeesOrCustomers { get; set; }
|
||||
|
||||
public bool ShowEmployeeButton => IsInEditMode ? HasRightToInsertEmployeeAppointments : HasRightToEditEmployeeAppointments;
|
||||
public bool ShowCustomerButton => IsInEditMode ? HasRightToInsertCustomerAppointments : HasRightToEditCustomerAppointments;
|
||||
|
||||
//IntervalFinder
|
||||
public List<long> SelectedEmployeeOidsForIntervalFinder { get { return SchedulerSessionModel.SelectedEmployeeOidsForIntervalFinder; } set { SchedulerSessionModel.SelectedEmployeeOidsForIntervalFinder = value; } }
|
||||
public List<CompactEmployeeDC> SelectedEmployeesForIntervalFinder { get; set; } = new List<CompactEmployeeDC>();
|
||||
public List<long> SelectedCustomerOidsForIntervalFinder { get { return SchedulerSessionModel.SelectedCustomerOidsForIntervalFinder; } set { SchedulerSessionModel.SelectedCustomerOidsForIntervalFinder = value; } }
|
||||
public List<CompactCustomerDC> SelectedCustomersForIntervalFinder { get; set; } = new List<CompactCustomerDC>();
|
||||
public List<long> SelectedResourceOidsForIntervalFinder { get { return SchedulerSessionModel.SelectedResourceOidsForIntervalFinder; } set { SchedulerSessionModel.SelectedResourceOidsForIntervalFinder = value; } }
|
||||
public List<ResourceDC> SelectedResourcesForIntervalFinder { get; set; } = new List<ResourceDC>();
|
||||
|
||||
public Dictionary<DateTimeSpan, Dictionary<DateTime, bool>> FreeIntervals { get; set; } = new Dictionary<DateTimeSpan, Dictionary<DateTime, bool>>();
|
||||
@@ -170,34 +149,38 @@ namespace BeWoPlanerMobil.Models
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsInIntervalFinderMode { get; set; }
|
||||
public DateTime? IntervalStartDate { get; set; }
|
||||
public DateTime? IntervalEndDate { get; set; }
|
||||
public bool IsInIntervalFinderMode { get { return SchedulerSessionModel.IsInIntervalFinderMode; } set { SchedulerSessionModel.IsInIntervalFinderMode = value; } }
|
||||
public DateTime? IntervalStartDate { get { return SchedulerSessionModel.IntervalStartDate; } set { SchedulerSessionModel.IntervalStartDate = value; } }
|
||||
public DateTime? IntervalEndDate { get { return SchedulerSessionModel.IntervalEndDate; } set { SchedulerSessionModel.IntervalEndDate = value; } }
|
||||
|
||||
public string IntervalStartDateStr => IntervalStartDate.HasValue ? IntervalStartDate.Value.ToString("yyyy-MM-ddTHH:mm") : string.Empty;
|
||||
public string IntervalEndDateStr => IntervalEndDate.HasValue ? IntervalEndDate.Value.ToString("yyyy-MM-ddTHH:mm") : string.Empty;
|
||||
public string IntervalStartTimeStr => IntervalStartDate.HasValue ? $"{IntervalStartDate:HH:mm}" : string.Empty;
|
||||
public string IntervalEndTimeStr => IntervalEndDate.HasValue ? $"{IntervalEndDate:HH:mm}" : string.Empty;
|
||||
|
||||
public int? IntervalDuration { get; set; }
|
||||
public int? IntervalDuration { get { return SchedulerSessionModel.IntervalDuration; } set { SchedulerSessionModel.IntervalDuration = value; } }
|
||||
|
||||
public string IntervalDurationStr => IntervalDuration.HasValue ? $"{IntervalDuration}" : string.Empty;
|
||||
|
||||
[Display(Name = "Ganztägig")]
|
||||
public bool IsAllDay { get; set; }
|
||||
|
||||
public bool IsAllDay { get { return SchedulerSessionModel.IsAllDay; } set { SchedulerSessionModel.IsAllDay = value; } }
|
||||
|
||||
[Display(Name = "Privat")]
|
||||
public bool IsPrivate { get; set; }
|
||||
public bool IsPrivate { get { return SchedulerSessionModel.IsPrivate; } set { SchedulerSessionModel.IsPrivate = value; } }
|
||||
|
||||
|
||||
public List<CompactEmployeeDC> MyTeamEmployees { get; set; }
|
||||
|
||||
public List<ResourceDC> SelectedResourcesForFiltering { get; set; } = new List<ResourceDC>();
|
||||
public List<CompactEmployeeDC> SelectedEmployeesForFiltering { get; set; } = new List<CompactEmployeeDC>();
|
||||
public List<CompactCustomerDC> SelectedCustomersForFiltering { get; set; } = new List<CompactCustomerDC>();
|
||||
public List<long> SelectedResourceOidsForFiltering { get { return SchedulerSessionModel.SelectedResourceOidsForFiltering; } set { SchedulerSessionModel.SelectedResourceOidsForFiltering = value; } }
|
||||
public List<ResourceDC> SelectedResourcesForFiltering { get; set; }
|
||||
public List<long> SelectedEmployeeOidsForFiltering { get { return SchedulerSessionModel.SelectedEmployeeOidsForFiltering; } set { SchedulerSessionModel.SelectedEmployeeOidsForFiltering = value; } }
|
||||
public List<CompactEmployeeDC> SelectedEmployeesForFiltering { get; set; }
|
||||
public List<long> SelectedCustomerOidsForFiltering { get { return SchedulerSessionModel.SelectedCustomerOidsForFiltering; } set { SchedulerSessionModel.SelectedCustomerOidsForFiltering = value; } }
|
||||
public List<CompactCustomerDC> SelectedCustomersForFiltering { get; set; }
|
||||
|
||||
public List<CompactTeamDC> MyTeams { get; set; } = new List<CompactTeamDC>();
|
||||
|
||||
public bool ShouldLoadTasks { get; set; }
|
||||
public bool ShouldLoadTasks { get { return SchedulerSessionModel.ShouldLoadTasks; } set { SchedulerSessionModel.ShouldLoadTasks = value; } }
|
||||
}
|
||||
|
||||
public class WeekViewObject
|
||||
@@ -240,13 +223,13 @@ namespace BeWoPlanerMobil.Models
|
||||
SaturdayAppointments = new KeyValuePair<DateTime, List<AppointmentListItem>>(saturday, new List<AppointmentListItem>());
|
||||
SundayAppointments = new KeyValuePair<DateTime, List<AppointmentListItem>>(last, new List<AppointmentListItem>());
|
||||
|
||||
mondays.DoForEach(app => MondayAppointments.Value.Add(new AppointmentListItem(app)));
|
||||
tuesdays.DoForEach(app => TuesdayAppointments.Value.Add(new AppointmentListItem(app)));
|
||||
wednesdays.DoForEach(app => WednesdayAppointments.Value.Add(new AppointmentListItem(app)));
|
||||
thursdays.DoForEach(app => ThursdayAppointments.Value.Add(new AppointmentListItem(app)));
|
||||
fridays.DoForEach(app => FridayAppointments.Value.Add(new AppointmentListItem(app)));
|
||||
saturdays.DoForEach(app => SaturdayAppointments.Value.Add(new AppointmentListItem(app)));
|
||||
sundays.DoForEach(app => SundayAppointments.Value.Add(new AppointmentListItem(app)));
|
||||
mondays.DoForEach(app => MondayAppointments.Value.Add(new AppointmentListItem("", app)));
|
||||
tuesdays.DoForEach(app => TuesdayAppointments.Value.Add(new AppointmentListItem("", app)));
|
||||
wednesdays.DoForEach(app => WednesdayAppointments.Value.Add(new AppointmentListItem("", app)));
|
||||
thursdays.DoForEach(app => ThursdayAppointments.Value.Add(new AppointmentListItem("", app)));
|
||||
fridays.DoForEach(app => FridayAppointments.Value.Add(new AppointmentListItem("", app)));
|
||||
saturdays.DoForEach(app => SaturdayAppointments.Value.Add(new AppointmentListItem("", app)));
|
||||
sundays.DoForEach(app => SundayAppointments.Value.Add(new AppointmentListItem("", app)));
|
||||
}
|
||||
}
|
||||
}
|
||||
61
BeWoPlanerMobil/Models/SchedulerSessionModel.cs
Normal file
61
BeWoPlanerMobil/Models/SchedulerSessionModel.cs
Normal file
@@ -0,0 +1,61 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using BeWo.View.Navigation.Filter;
|
||||
using BeWoPlanerMobil.Controllers;
|
||||
using BeWoPlanerMobil.Service;
|
||||
using BeWoPlanerMobil.Util;
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using DevExpress.XtraReports.UI;
|
||||
|
||||
namespace BeWoPlanerMobil.Models
|
||||
{
|
||||
[Serializable]
|
||||
public class SchedulerSessionModel : ISessionModel
|
||||
{
|
||||
public DateTime SelectedDate { get; set; }
|
||||
public long? SelectedAppointmentOid { get; internal set; }
|
||||
public List<long> SelectedResourceOids { get; internal set; }
|
||||
public List<long> SelectedEmployeeOids { get; internal set; }
|
||||
public List<long> SelectedCustomerOids { get; internal set; }
|
||||
public List<long> SelectedEmployeeOidsForIntervalFinder { get; internal set; }
|
||||
public List<long> SelectedCustomerOidsForIntervalFinder { get; internal set; }
|
||||
public List<long> SelectedResourceOidsForIntervalFinder { get; internal set; }
|
||||
public bool IsAllDay { get; set; }
|
||||
public bool IsPrivate { get; set; }
|
||||
public List<long> SelectedEmployeeOidsForFiltering { get; internal set; }
|
||||
public List<long> SelectedCustomerOidsForFiltering { get; internal set; }
|
||||
public List<long> SelectedResourceOidsForFiltering { get; internal set; }
|
||||
public bool ShouldLoadTasks { get; internal set; }
|
||||
public bool IsInIntervalFinderMode { get; internal set; }
|
||||
public DateTime? IntervalStartDate { get; internal set; }
|
||||
public DateTime? IntervalEndDate { get; internal set; }
|
||||
public int? IntervalDuration { get; internal set; }
|
||||
|
||||
public void ResetValues()
|
||||
{
|
||||
SelectedDate = DateTime.Today;
|
||||
SelectedAppointmentOid = null;
|
||||
SelectedResourceOids = new List<long>();
|
||||
SelectedEmployeeOids = new List<long>();
|
||||
SelectedCustomerOids = new List<long>();
|
||||
SelectedEmployeeOidsForIntervalFinder = new List<long>();
|
||||
SelectedCustomerOidsForIntervalFinder = new List<long>();
|
||||
SelectedResourceOidsForIntervalFinder = new List<long>();
|
||||
SelectedEmployeeOidsForFiltering = new List<long>();
|
||||
SelectedCustomerOidsForFiltering = new List<long>();
|
||||
SelectedResourceOidsForFiltering = new List<long>();
|
||||
IsAllDay = false;
|
||||
IsPrivate = false;
|
||||
ShouldLoadTasks = false;
|
||||
IsInIntervalFinderMode = false;
|
||||
IntervalStartDate = null;
|
||||
IntervalEndDate = null;
|
||||
IntervalDuration = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,7 @@ using System.Web;
|
||||
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Service.DCEntityMapper;
|
||||
using BeWo.Service.ServiceImplementations;
|
||||
using BeWoPlanerMobil.Util;
|
||||
using BS.Shared;
|
||||
@@ -110,10 +111,10 @@ namespace BeWoPlanerMobil.Service
|
||||
|
||||
var userLoaded = TryAuthenticateWithLoginForm(context);
|
||||
|
||||
if(!userLoaded && MobileSessionFacade.LoggedInUser != null && MobileSessionFacade.LoggedInUser.Oid.HasValue)
|
||||
{
|
||||
MobileSessionFacade.LoggedInUser = DAOFactory.GenericDAO.LoadByID<ApplicationUser>(MobileSessionFacade.LoggedInUser.Oid.Value);
|
||||
}
|
||||
//if(!userLoaded && MobileSessionFacade.LoggedInUser != null && MobileSessionFacade.LoggedInUser.UserOid.HasValue)
|
||||
//{
|
||||
// MobileSessionFacade.LoggedInUser = MapperFactory.UserDC_User.MapToNewDC(DAOFactory.GenericDAO.LoadByID<ApplicationUser>(MobileSessionFacade.LoggedInUser.UserOid.Value));
|
||||
//}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -203,7 +204,10 @@ namespace BeWoPlanerMobil.Service
|
||||
}
|
||||
|
||||
MobileSessionFacade.PasswordStrength = new PasswordUtils().EvaluatePasswordStrength(password);
|
||||
MobileSessionFacade.LoggedInUser = user;
|
||||
|
||||
MobileSessionFacade.LoggedInUserOid = user.Oid;
|
||||
MobileSessionFacade.EmployeeFullname = user.Employee.Person.FirstNameLastName;
|
||||
//MobileSessionFacade.LoggedInEmployee = MapperFactory.EmployeeDC_Employee.MapToNewDC(user.Employee);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -6,8 +6,7 @@ using BeWo.Data.Entities;
|
||||
using BeWo.Service.DCEntityMapper;
|
||||
using BeWo.Service.ServiceContracts;
|
||||
using BeWo.Service.ServiceImplementations;
|
||||
|
||||
|
||||
using BeWoPlanerMobil.Util;
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
@@ -43,52 +42,85 @@ namespace BeWoPlanerMobil.Service
|
||||
public IReportService ReportService { get; }
|
||||
public IQueryService QueryService { get; }
|
||||
|
||||
public static ApplicationUser LoggedInUser
|
||||
public static long? LoggedInUserOid
|
||||
{
|
||||
get => HttpContext.Current.Session["apuser"] as ApplicationUser;
|
||||
get => HttpContext.Current.Session["LoggedInUserOid"] as long?;
|
||||
|
||||
set => HttpContext.Current.Session["apuser"] = value;
|
||||
set => HttpContext.Current.Session["LoggedInUserOid"] = value;
|
||||
}
|
||||
|
||||
public static string EmployeeFullname => LoggedInUser != null ? LoggedInUser.Employee.Person.FirstNameLastName : string.Empty;
|
||||
//public static UserDC LoggedInUser
|
||||
//{
|
||||
// get => HttpContext.Current.Session["apuser"] as UserDC;
|
||||
|
||||
public static EmployeeDC LoggedInEmployee => LoggedInUser == null ? null : MapperFactory.EmployeeDC_Employee.MapToNewDC(LoggedInUser.Employee);
|
||||
// set => HttpContext.Current.Session["apuser"] = value;
|
||||
//}
|
||||
|
||||
public static CompactEmployeeDC LoggedInCompactEmployee => LoggedInUser == null ? null : MapperFactory.CompactEmployeeDC_Employee.MapToNewDC(LoggedInUser.Employee);
|
||||
//public static EmployeeDC LoggedInEmployee
|
||||
//{
|
||||
// get => HttpContext.Current.Session["LoggedInEmployee"] as EmployeeDC;
|
||||
|
||||
public static UserDC LoggedInUserDC => LoggedInUser == null ? null : MapperFactory.UserDC_User.MapToNewDC(LoggedInUser);
|
||||
// set => HttpContext.Current.Session["LoggedInEmployee"] = value;
|
||||
//}
|
||||
|
||||
public static List<SettingsDC> UserSettings => LoggedInUserDC.Settings;
|
||||
//public static string EmployeeFullname => LoggedInUser != null ? LoggedInUser.Employee.FirstNameLastName : string.Empty;
|
||||
|
||||
public static string Tenant
|
||||
// public static CompactEmployeeDC LoggedInCompactEmployee => LoggedInUser == null ? null : LoggedInUser.Employee;
|
||||
|
||||
|
||||
// public static List<SettingsDC> UserSettings => LoggedInUser.Settings;
|
||||
public static string LocalStorageKey => LoggedInUserOid.HasValue ? $"bwp_{MobileSessionFacade.Tenant}_{LoggedInUserOid}" : null;
|
||||
|
||||
public static string EmployeeFullname
|
||||
{
|
||||
get => HttpContext.Current.Session["EmployeeFullname"] as string;
|
||||
|
||||
set => HttpContext.Current.Session["EmployeeFullname"] = value;
|
||||
}
|
||||
|
||||
public static string Tenant
|
||||
{
|
||||
get => HttpContext.Current.Session["tenant"] as string;
|
||||
|
||||
set => HttpContext.Current.Session["tenant"] = value;
|
||||
}
|
||||
|
||||
public static MandatorDC Mandator
|
||||
public static string TimeOfLastAction
|
||||
{
|
||||
get => HttpContext.Current.Session["mandator"] as MandatorDC;
|
||||
get => HttpContext.Current.Session["TimeOfLastAction"] as string;
|
||||
|
||||
set => HttpContext.Current.Session["mandator"] = value;
|
||||
set => HttpContext.Current.Session["TimeOfLastAction"] = value;
|
||||
}
|
||||
|
||||
public static bool IsUserLoggedIn()
|
||||
//public long? MandatorOid
|
||||
//{
|
||||
// get => HttpContext.Current.Session["MandatorOid"] as long?;
|
||||
|
||||
// set => HttpContext.Current.Session["MandatorOid"] = value;
|
||||
//}
|
||||
|
||||
public static MokMandator Mandator
|
||||
{
|
||||
get => HttpContext.Current.Session["mandator"] as MokMandator;
|
||||
|
||||
set => HttpContext.Current.Session["mandator"] = value;
|
||||
}
|
||||
|
||||
public static bool IsUserLoggedIn()
|
||||
{
|
||||
return LoggedInUser != null;
|
||||
return LoggedInUserOid.HasValue;
|
||||
}
|
||||
|
||||
public static void LogUserOut()
|
||||
{
|
||||
HttpContext.Current.Session["apuser"] = null;
|
||||
HttpContext.Current.Session["LoggedInUserOid"] = null;
|
||||
HttpContext.Current.Session.Abandon();
|
||||
}
|
||||
|
||||
public static bool CheckForUserRight(UserRightType userRightType)
|
||||
{
|
||||
return LoggedInUser != null && LoggedInUser.UserGroups.Any(ug => ug.Rights.Any(rr => rr.RightType.Equals(userRightType)));
|
||||
}
|
||||
//public static bool CheckForUserRight(UserRightType userRightType)
|
||||
//{
|
||||
// return LoggedInUser != null && LoggedInUser.UserGroups.Any(ug => ug.Rights.Any(rr => rr.Equals(userRightType)));
|
||||
//}
|
||||
|
||||
public static string CookieName => "tenantKeks";
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
using BeWo.Data;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Service.DCEntityMapper;
|
||||
using BeWo.Service.ServiceContracts;
|
||||
using BeWo.Service.ServiceImplementations;
|
||||
using BeWoPlanerMobil.Service;
|
||||
@@ -50,7 +51,8 @@ namespace BeWoPlanerMobil
|
||||
}
|
||||
else
|
||||
{
|
||||
MobileSessionFacade.LoggedInUser = user;
|
||||
MobileSessionFacade.LoggedInUserOid = user.Oid;
|
||||
MobileSessionFacade.EmployeeFullname = user.Employee.Person.FirstNameLastName;
|
||||
|
||||
result = true;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace BeWoPlanerMobil.Util
|
||||
{
|
||||
public class AppointmentListItem
|
||||
{
|
||||
public Guid Identifier { get; private set; }
|
||||
public String Identifier { get; }
|
||||
|
||||
public long? Oid { get; }
|
||||
|
||||
@@ -71,20 +71,9 @@ namespace BeWoPlanerMobil.Util
|
||||
|
||||
public SchedulerAppointmentDC SchedulerAppointment { get; }
|
||||
|
||||
public void GenerateIdentifier(List<Guid> existingIdentifiers)
|
||||
public AppointmentListItem(String id, SchedulerAppointmentDC schedulerAppointment)
|
||||
{
|
||||
var identifier = Guid.NewGuid();
|
||||
while(existingIdentifiers.Contains(identifier))
|
||||
{
|
||||
identifier = Guid.NewGuid();
|
||||
}
|
||||
|
||||
Identifier = identifier;
|
||||
}
|
||||
|
||||
public AppointmentListItem(SchedulerAppointmentDC schedulerAppointment)
|
||||
{
|
||||
Identifier = Guid.NewGuid();
|
||||
Identifier = id;
|
||||
|
||||
Subject = schedulerAppointment.Subject;
|
||||
|
||||
|
||||
23
BeWoPlanerMobil/Util/DcToMokMapper.cs
Normal file
23
BeWoPlanerMobil/Util/DcToMokMapper.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using BS.Shared.DataContracts.Invoicing;
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace BeWoPlanerMobil.Util
|
||||
{
|
||||
|
||||
public class DcToMokMapper
|
||||
{
|
||||
public static MokMandator CreateMandator(MandatorDC dc)
|
||||
{
|
||||
return new MokMandator
|
||||
{
|
||||
Settings = dc.Settings
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -56,22 +56,22 @@
|
||||
public static string ServiceRecordOidForSignature => "ServiceRecordOidForSignature";
|
||||
}
|
||||
|
||||
public class ModelSessionConstants
|
||||
{
|
||||
public static string ReportModelKey => "ReportModel";
|
||||
public static string CustomerModelKey => "CustomerModelModel";
|
||||
public static string SchedulerModelKey => "SchedulerModel";
|
||||
public static string MainModelKey => "MainModel";
|
||||
public static string DevelopmentModelKey => "DevelopmentModel";
|
||||
public static string DevExpressReportModelKey => "DevExpressReportModel";
|
||||
public static string ReportViewerModelKey => "ReportViewerModel";
|
||||
public static string DebuggingToolsModelKey => "DebuggingToolsModel";
|
||||
}
|
||||
//public class ModelSessionConstants
|
||||
//{
|
||||
// public static string ReportModelKey => "ReportModel";
|
||||
// public static string CustomerModelKey => "CustomerModelModel";
|
||||
// public static string SchedulerModelKey => "SchedulerModel";
|
||||
// public static string MainModelKey => "MainModel";
|
||||
// public static string DevelopmentModelKey => "DevelopmentModel";
|
||||
// public static string DevExpressReportModelKey => "DevExpressReportModel";
|
||||
// public static string ReportViewerModelKey => "ReportViewerModel";
|
||||
// public static string DebuggingToolsModelKey => "DebuggingToolsModel";
|
||||
//}
|
||||
|
||||
public class TempDataConstants
|
||||
{
|
||||
public static string ShowSignatureSuggestionPopup => "ShowSignatureSuggestionPopup";
|
||||
public static string AppointmentListItemKey => "AppointmentListItem";
|
||||
public static string AppointmentOidKey => "AppointmentOid";
|
||||
public static string IsInTransferModeKey => "IsInTransferMode";
|
||||
public static string AfterValidationStateKey => "AfterValidation";
|
||||
public static string PwChErrKey => "passwd-change-error";
|
||||
|
||||
37
BeWoPlanerMobil/Util/MokMandator.cs
Normal file
37
BeWoPlanerMobil/Util/MokMandator.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using BS.Shared.DataContracts.Invoicing;
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace BeWoPlanerMobil.Util
|
||||
{
|
||||
[Serializable]
|
||||
public class MokMandator
|
||||
{
|
||||
//public long BeWoClientType { get; set; }
|
||||
//public string ClientId { get; set; }
|
||||
//public string Country { get; set; }
|
||||
//public long? MandatorOid { get; set; }
|
||||
//public long? MandatorVersion { get; set; }
|
||||
//public string Name { get; set; }
|
||||
//public string Website { get; set; }
|
||||
//public string PostalCode { get; set; }
|
||||
public string Settings { get; set; }
|
||||
//public string State { get; set; }
|
||||
//public string Street { get; set; }
|
||||
//public string Town { get; set; }
|
||||
//public string RssFeedUrl { get; set; }
|
||||
//public string SupportToolUrl { get; set; }
|
||||
//public bool IsSchedulerAllowed { get; set; }
|
||||
//public bool IsMedicationAllowed { get; set; }
|
||||
//public bool AllowSbd { get; set; }
|
||||
//public string Apikey { get; set; }
|
||||
//public string IKLeistungserbringer { get; set; }
|
||||
//public bool CanEditIKLeistungserbringer { get; set; }
|
||||
//public string ColorWaitTooLong { get; set; }
|
||||
//public string ColorSendUrbelege { get; set; }
|
||||
//public bool ShowGkvBzEinzel { get; set; }
|
||||
//public bool ShowGkvBzUrbelege { get; set; }
|
||||
}
|
||||
}
|
||||
13
BeWoPlanerMobil/Util/MokSettings.cs
Normal file
13
BeWoPlanerMobil/Util/MokSettings.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using BS.Shared.Core;
|
||||
|
||||
namespace BeWoPlanerMobil.Util
|
||||
{
|
||||
public class MokSettings
|
||||
{
|
||||
public int SupportConceptExpirationLimitInMonths { get; set; }
|
||||
public int AnzTageZeiterfassErfolgt { get; set; }
|
||||
public int MaxDaysEditServiceRecordsAllowed { get; set; }
|
||||
public int ServiceRecordAllowChangeHours { get; set; }
|
||||
public int TimeUntilUILock { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ using System.Diagnostics;
|
||||
namespace BeWoPlanerMobil.Util
|
||||
{
|
||||
[DebuggerDisplay("{StartDate} - {EndDate}")]
|
||||
[Serializable]
|
||||
public class NullableDateTimeSpan
|
||||
{
|
||||
public DateTime? StartDate { get; set; }
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
using BS.Shared;
|
||||
using System;
|
||||
|
||||
namespace BeWoPlanerMobil.Util.ReportUtils
|
||||
{
|
||||
[Serializable]
|
||||
public class QuittierungsbelegsReportSettings
|
||||
{
|
||||
public int Year { get; set; }
|
||||
public int Month { get; set; }
|
||||
public int StartDay { get; set; }
|
||||
public int EndDay { get; set; }
|
||||
public long? CustomerOid { get; internal set; }
|
||||
public long? TeamOid { get; internal set; }
|
||||
public long? EmployeeOid { get; internal set; }
|
||||
public long? OrganisationOid { get; internal set; }
|
||||
public long? ServiceCategoryOid { get; internal set; }
|
||||
public QBFilterEnum FilterEnum { get; internal set; }
|
||||
}
|
||||
}
|
||||
@@ -145,7 +145,7 @@
|
||||
|
||||
<div class="container mt-3 lg-max-width">
|
||||
<div class="row mb-3">
|
||||
@if(AbstractModel.IsAllowedToSeeCustomerFilter)
|
||||
@if(Model.IsAllowedToSeeCustomerFilter)
|
||||
{
|
||||
<div class="col-md mb-2">
|
||||
@using(Html.BeginForm("SetCustomerFilter", "Customer", FormMethod.Post))
|
||||
@@ -188,7 +188,7 @@
|
||||
<div class="card-body py-0">
|
||||
@using(Html.BeginForm("UpdateCustomer", "Customer", FormMethod.Post, new { id = "stammdaten-form", @class = "needs-validation", novalidate = "novalidate" }))
|
||||
{
|
||||
var inputDisabled = !AbstractModel.HasRightToEditCustomers ? "disabled" : string.Empty;
|
||||
var inputDisabled = !Model.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-2 px-1">
|
||||
@@ -519,7 +519,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if(AbstractModel.HasRightToEditCustomers)
|
||||
@if(Model.HasRightToEditCustomers)
|
||||
{
|
||||
<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>
|
||||
@@ -808,7 +808,7 @@
|
||||
}
|
||||
|
||||
@* ----- Dokumente ----- *@
|
||||
if(AbstractModel.HasRightToViewCustomerDocuments)
|
||||
if(Model.HasRightToViewCustomerDocuments)
|
||||
{
|
||||
<div class="col-12">
|
||||
<div class="card w-100 h-100 my-1">
|
||||
@@ -832,11 +832,10 @@
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
@* ----- Medikamentenliste ----- *@
|
||||
if(AbstractModel.IsAllowedToSeeMedikamentenliste && Model.SelectedCustomer.Medikamentenverordnungslisten.Any())
|
||||
{
|
||||
if (Model.IsAllowedToSeeMedikamentenliste && Model.SelectedCustomer.Medikamentenverordnungslisten.Any())
|
||||
{
|
||||
<div class="col-12">
|
||||
<div class="card w-100 h-100 my-1">
|
||||
<div class="card-header" onclick="cardHeaderClick2(this)">
|
||||
@@ -859,7 +858,7 @@
|
||||
}
|
||||
|
||||
@* ----- Diagnosen ----- *@
|
||||
if(AbstractModel.HasRightToViewDiagnosen && (Model.SelectedJsonCustomer.HasDiagnosen || Model.SelectedJsonCustomer.HasDisabilities || Model.SelectedJsonCustomer.HasSchwebi))
|
||||
if(Model.HasRightToViewDiagnosen && (Model.SelectedJsonCustomer.HasDiagnosen || Model.SelectedJsonCustomer.HasDisabilities || Model.SelectedJsonCustomer.HasSchwebi))
|
||||
{
|
||||
<div class="col-12">
|
||||
<div class="card w-100 h-100 my-1">
|
||||
@@ -989,9 +988,9 @@
|
||||
}
|
||||
|
||||
|
||||
var isRelatedCustomer = Model.SelectedCustomerOid.HasValue && Model.Employee.RelatedCustomers.Any(cer => cer.Customer.CustomerOid.Equals(Model.SelectedCustomerOid.Value));
|
||||
var isRelatedCustomer = Model.SelectedCustomerOid.HasValue && Model.LoggedInEmployee.RelatedCustomers.Any(cer => cer.Customer.CustomerOid.Equals(Model.SelectedCustomerOid.Value));
|
||||
|
||||
var isAllowedToViewBargeldkassen = AbstractModel.HasRightToViewAllCustomersBargeldkassen || (isRelatedCustomer && AbstractModel.HasRightToViewOwnCustomersBargeldkassen);
|
||||
var isAllowedToViewBargeldkassen = Model.HasRightToViewAllCustomersBargeldkassen || (isRelatedCustomer && Model.HasRightToViewOwnCustomersBargeldkassen);
|
||||
|
||||
|
||||
@* ----- Bargeldverwaltung ----- *@
|
||||
@@ -1021,7 +1020,7 @@
|
||||
}
|
||||
|
||||
@* ----- Abwesenheiten ----- *@
|
||||
if(AbstractModel.HasRightToViewCustomerAbsenceTimes)
|
||||
if(Model.HasRightToViewCustomerAbsenceTimes)
|
||||
{
|
||||
<div class="col-12">
|
||||
<div class="card w-100 h-100 my-1">
|
||||
@@ -1054,7 +1053,7 @@
|
||||
var hasRelatedEmployees = Model.SelectedCustomer?.RelatedEmployees.Any() ?? false;
|
||||
var hasRelatedTeams = Model.SelectedCustomer?.RelatedTeams.Any() ?? false;
|
||||
|
||||
if(AbstractModel.HasRightToViewBetreuung && (hasRelatedEmployees || hasRelatedTeams))
|
||||
if(Model.HasRightToViewBetreuung && (hasRelatedEmployees || hasRelatedTeams))
|
||||
{
|
||||
<div class="col-12">
|
||||
<div class="card w-100 h-100 my-1">
|
||||
@@ -1081,7 +1080,7 @@
|
||||
}
|
||||
</div>
|
||||
|
||||
@if(AbstractModel.HasRightToViewCustomerAbsenceTimes)
|
||||
@if(Model.HasRightToViewCustomerAbsenceTimes)
|
||||
{
|
||||
<div class="modal" tabindex="-1" role="dialog" id="customer-absence-times-form-popup">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
const selectedOption = $("#absence-reason-select option:selected");
|
||||
|
||||
if(!isInfinite && end.getTime() < start.getTime()) {
|
||||
validationMessage = "Das Enddatum muss vor dem Startdatum liegen.";
|
||||
validationMessage = "Das Startdatum muss vor dem Enddatum liegen.";
|
||||
}
|
||||
|
||||
if(selectedOption.val() === "-1") {
|
||||
@@ -221,7 +221,7 @@
|
||||
Kategorie
|
||||
</div>
|
||||
</div>
|
||||
@Html.DropDownListFor(m => m.SelectedAbsenceReason, Model.AbsenceReasonItems, new { @class = "custom-select", Id = "absence-reason-select", Name = "customer-absence-time-category" })
|
||||
@Html.DropDownListFor(m => m.SelectedAbsenceReasonOid, Model.AbsenceReasonItems, new { @class = "custom-select", Id = "absence-reason-select", Name = "customer-absence-time-category" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -665,7 +665,7 @@
|
||||
<input type="hidden" id="bk-to-delete-oid" name="bk-to-delete-oid" />
|
||||
}
|
||||
|
||||
@if(AbstractModel.HasRightToCreateCustomerBargeldkassen || AbstractModel.HasRightToEditCustomerBargeldkassen)
|
||||
@if(Model.HasRightToCreateCustomerBargeldkassen || Model.HasRightToEditCustomerBargeldkassen)
|
||||
{
|
||||
<div class="modal" tabindex="-1" role="dialog" id="customer-bargeldkassen-form-popup">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
|
||||
@@ -32,14 +32,14 @@
|
||||
</div>
|
||||
}
|
||||
|
||||
@if(AbstractModel.UserMessage != null)
|
||||
@*@if(AbstractModel.UserMessage != null)
|
||||
{
|
||||
<div class="alert alert-danger mx-3" role="alert">
|
||||
@AbstractModel.UserMessage;
|
||||
</div>
|
||||
|
||||
AbstractModel.UserMessage = null;
|
||||
}
|
||||
}*@
|
||||
|
||||
@using(Html.BeginForm("Index", "Login", FormMethod.Post, new { @class = "px-3 col-12", id = "loginForm" }))
|
||||
{
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
@if(AbstractModel.HasRightToRateGoals)
|
||||
@if(Model.HasRightToRateGoals)
|
||||
{
|
||||
<ul class="list-group">
|
||||
@foreach(var ratingType in Model.GoalRatingTypes)
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
<div class="custom-control custom-checkbox goal-card-header float-left" onclick="stopToggle(event)" >
|
||||
<input type="checkbox" class="custom-control-input goal-input" value="@goalTreeItem.ValueListEntryOid" @isCheckedValue id="goal-cb-@goalTreeItem.ValueListEntryOid" onchange="updateSelectedGoals()" />
|
||||
<label class="custom-control-label goal-name-label @textClass" for="goal-cb-@goalTreeItem.ValueListEntryOid">@goalTreeItem.Header</label>
|
||||
@if(AbstractModel.HasRightToRateGoals)
|
||||
@if(Model.HasRightToRateGoals)
|
||||
{
|
||||
<span style="cursor: pointer;" id="goal-rating-@goalTreeItem.ValueListEntryOid" class="badge badge-bewo-goal-rating goal-rating-badge ml-1" onclick="showGoalRatingPopup(@goalTreeItem.ValueListEntryOid)">
|
||||
@(ratingType?.DisplayName ?? goalTreeItem.RatingName)
|
||||
@@ -194,7 +194,7 @@
|
||||
<div class="custom-control custom-checkbox goal-text @marginBottom">
|
||||
<input type="checkbox" class="custom-control-input goal-input" id="goal-cb-@goalTreeItem.ValueListEntryOid" @isCheckedValue onchange="updateSelectedGoals()">
|
||||
<label for="goal-cb-@goalTreeItem.ValueListEntryOid" class="custom-control-label goal-name-label @textClass">@goalTreeItem.Header</label>
|
||||
@if(AbstractModel.HasRightToRateGoals)
|
||||
@if(Model.HasRightToRateGoals)
|
||||
{
|
||||
<span id="goal-rating-@goalTreeItem.ValueListEntryOid" style="cursor: pointer;" class="badge badge-bewo-goal-rating goal-rating-badge ml-1" onclick="showGoalRatingPopup(@goalTreeItem.ValueListEntryOid)">
|
||||
@(ratingType?.DisplayName ?? goalTreeItem.RatingName)
|
||||
|
||||
@@ -53,11 +53,9 @@
|
||||
$("#groupbooking-selection-container").load("@Url.Action("ReloadGroupBookingForm")", function () {
|
||||
toggleForm();
|
||||
|
||||
$("#goals-tree").load("@Url.Action("ReloadGoals")", function () {
|
||||
$("#goal-ratings-container").load("@Url.Action("ReloadGoalRatings")", function() {
|
||||
$("#goals-tree").load("@Url.Action("ReloadGoals")", function() {
|
||||
$("#tree").load("@Url.Action("LoadUpToDateTextModules")");
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -66,18 +64,14 @@
|
||||
$(`#cb2sc-checkbox-${relOid}`).prop("checked", false);
|
||||
|
||||
$("#groupbooking-selection-container").load("@Url.Action("RemoveSupportConceptCostbearerRel")", {relOid: relOid}
|
||||
, function () {
|
||||
$("#goals-tree").load("@Url.Action("ReloadGoals")"
|
||||
, function () {
|
||||
$("#goal-ratings-container").load("@Url.Action("ReloadGoalRatings")", function() {
|
||||
toggleForm();
|
||||
, function () {
|
||||
$("#goals-tree").load("@Url.Action("ReloadGoals")"
|
||||
, function () {
|
||||
toggleForm();
|
||||
|
||||
$("#tree").load("@Url.Action("LoadUpToDateTextModules")");
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
$("#tree").load("@Url.Action("LoadUpToDateTextModules")");
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -133,7 +127,7 @@
|
||||
}
|
||||
|
||||
@* ----- Betrag ----- *@
|
||||
@if(AbstractModel.ShowBetrag)
|
||||
@if(Model.ShowBetrag)
|
||||
{
|
||||
var betrag = string.Empty;
|
||||
if(Model.SelectedServiceRecord?.Betrag != null && Model.SelectedServiceRecord.Betrag.Value > 0)
|
||||
@@ -268,7 +262,7 @@
|
||||
</div>
|
||||
|
||||
@* Gefahrene Kilometer *@
|
||||
@if(AbstractModel.ShowDistanceField)
|
||||
@if(Model.ShowDistanceField)
|
||||
{
|
||||
<div class="form-row">
|
||||
<div class="col-md">
|
||||
@@ -285,7 +279,7 @@
|
||||
}
|
||||
|
||||
@* Textbausteine *@
|
||||
@if(AbstractModel.HasRightToSeeTextModules)
|
||||
@if(Model.HasRightToSeeTextModules)
|
||||
{
|
||||
<div class="form-row" id="textmodule-container">
|
||||
<div class="col-md">
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
@{
|
||||
var timeSpanColorClass2 = cb2Sc.IsAboutToExpire ? "text-bewo-is-about-to-expire" : cb2Sc.ExpiresInThreeMonthsOrLess ? "text-bewo-expires-in-three-months" : "text-dark";
|
||||
|
||||
var wasSuccessful = long.TryParse(cb2Sc.CostBearer2SupportConceptOid, out var cb2ScOid);
|
||||
|
||||
var checkedValue = wasSuccessful ? Model.SelectedConceptCostBearerRelations.Any(a => a.CostBearer2SupportConceptOid.Equals(cb2ScOid)) : wasSuccessful;
|
||||
var checkedValue = Model.SelectedConceptCostBearerRelations.Any(a => a.CostBearer2SupportConceptOid == cb2Sc.CostBearer2SupportConceptOid);
|
||||
|
||||
}
|
||||
|
||||
<div class="custom-control custom-checkbox custom-control-inline">
|
||||
|
||||
@@ -209,13 +209,13 @@
|
||||
@{
|
||||
var shouldShowSignaturePopup = TempData[TempDataConstants.ShowSignatureSuggestionPopup]?.GetType() == typeof(bool) && (bool) TempData[TempDataConstants.ShowSignatureSuggestionPopup];
|
||||
|
||||
if(Model.ServiceRecordOid > 0)
|
||||
if(Model.LastCreatedServiceRecordOid > 0)
|
||||
{
|
||||
if(shouldShowSignaturePopup && Model.ShowSignature)
|
||||
{
|
||||
<text>
|
||||
showMessagePopupWithCallback("Erfolgreich gespeichert", "Möchten Sie den Eintrag unterschreiben lassen?", function() {
|
||||
initializeSignature(@Model.ServiceRecordOid);
|
||||
initializeSignature(@Model.LastCreatedServiceRecordOid);
|
||||
}, false);
|
||||
</text>
|
||||
}
|
||||
@@ -356,7 +356,7 @@
|
||||
|
||||
<div class="container mt-3 lg-max-width" id="checkbox-container">
|
||||
<div class="row">
|
||||
@if(AbstractModel.IsAllowedToSeeSupportConceptFilter)
|
||||
@if(Model.IsAllowedToSeeSupportConceptFilter)
|
||||
{
|
||||
<div class="col-md">
|
||||
@using(Html.BeginForm("SetSupportConceptFilter", "Main", FormMethod.Post))
|
||||
@@ -376,7 +376,7 @@
|
||||
}
|
||||
</div>
|
||||
|
||||
@if(AbstractModel.HasRightForGroupBookings)
|
||||
@if(Model.HasRightForGroupBookings)
|
||||
{
|
||||
<div class="col-md pt-1">
|
||||
@using(Html.BeginForm("SetGroupBookingMode", "Main", FormMethod.Post))
|
||||
@@ -389,7 +389,7 @@
|
||||
</div>
|
||||
}
|
||||
|
||||
@if(AbstractModel.HasRightForMultiBooking)
|
||||
@if(Model.HasRightForMultiBooking)
|
||||
{
|
||||
<div class="col-md pt-1">
|
||||
@using(Html.BeginForm("SetMultiBookingMode", "Main", FormMethod.Post))
|
||||
@@ -578,7 +578,7 @@
|
||||
</div>
|
||||
|
||||
@* ----- Bewertungspopup für Ziele ----- *@
|
||||
@if(AbstractModel.HasRightToRateGoals)
|
||||
@if(Model.HasRightToRateGoals)
|
||||
{
|
||||
<div id="goal-rating-popup" class="modal" tabindex="-1" role="dialog" style="z-index: 9999 !important">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
}
|
||||
|
||||
@* ----- Betrag ----- *@
|
||||
@if(AbstractModel.ShowBetrag)
|
||||
@if(Model.ShowBetrag)
|
||||
{
|
||||
<div class="form-row mt-2">
|
||||
<div class="col-md">
|
||||
@@ -221,7 +221,7 @@
|
||||
</div>
|
||||
|
||||
@* Gefahrene Kilometer *@
|
||||
@if(AbstractModel.ShowDistanceField)
|
||||
@if(Model.ShowDistanceField)
|
||||
{
|
||||
<div class="form-row">
|
||||
<div class="col-md">
|
||||
@@ -240,7 +240,7 @@
|
||||
}
|
||||
|
||||
@* Textbausteinebutton *@
|
||||
@if(AbstractModel.HasRightToSeeTextModules)
|
||||
@if(Model.HasRightToSeeTextModules)
|
||||
{
|
||||
<div class="form-row" id="textmodule-container">
|
||||
<div class="col-md">
|
||||
|
||||
@@ -317,7 +317,7 @@
|
||||
<button type="button" data-toggle="modal" class="btn btn-outline-primary" onclick="getSignatureImage(@serviceRecord.ServiceRecordOid.Value, @serviceRecord.SignatureOid.Value)">
|
||||
<span class="fas fa-file-contract"></span>
|
||||
</button>
|
||||
if(AbstractModel.HasRightToDeleteReceiptSignatures)
|
||||
if(Model.HasRightToDeleteReceiptSignatures)
|
||||
{
|
||||
<button type="button" class="btn btn-outline-danger" onclick="deleteSigntarue(@serviceRecord.SignatureOid.Value, @serviceRecord.ServiceRecordOid.Value, '@serviceRecord.Customer', '@MainModel.GetServiceRecordTimeHeader(serviceRecord, false)')">
|
||||
<i class="fas fa-file-contract"></i>
|
||||
@@ -341,7 +341,7 @@
|
||||
</tr>
|
||||
|
||||
@* Gefahrene Kilometer *@
|
||||
@if(AbstractModel.ShowDistanceField && serviceRecord.DistanceInMeterDecimal != null && serviceRecord.DistanceInMeterDecimal.Value > 0)
|
||||
@if(Model.ShowDistanceField && serviceRecord.DistanceInMeterDecimal != null && serviceRecord.DistanceInMeterDecimal.Value > 0)
|
||||
{
|
||||
<tr>
|
||||
<td class="text-secondary">
|
||||
@@ -412,7 +412,7 @@
|
||||
</tr>
|
||||
|
||||
@* Angelegt von & angelegt am *@
|
||||
@if(AbstractModel.ShowServiceRecordInsertedOn)
|
||||
@if(Model.ShowServiceRecordInsertedOn)
|
||||
{
|
||||
<tr>
|
||||
<td class="text-secondary">
|
||||
@@ -433,7 +433,7 @@
|
||||
}
|
||||
|
||||
@* Betrag *@
|
||||
@if(AbstractModel.ShowBetrag && serviceRecord.Betrag.HasValue && serviceRecord.Betrag.Value > 0)
|
||||
@if(Model.ShowBetrag && serviceRecord.Betrag.HasValue && serviceRecord.Betrag.Value > 0)
|
||||
{
|
||||
var betrag = serviceRecord.Betrag.Value.ToString("#.00") + " €";
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
});
|
||||
|
||||
@{
|
||||
if(Model.SelectedSupportConcept != null || Model.CostBearer2SupportConceptOid == -2)
|
||||
if(Model.SelectedSupportConcept != null || Model.SelectedCostBearerSupportConceptOid == -2)
|
||||
{
|
||||
<text>
|
||||
initializeIntervalSelection();
|
||||
@@ -163,7 +163,7 @@
|
||||
? "text-bewo-expires-in-three-months"
|
||||
: "text-light";
|
||||
|
||||
var isFormDisabled = Model.SelectedCostBearerSupportConceptRelOid.HasValue ? string.Empty : "disabled";
|
||||
var isFormDisabled = Model.SelectedCostBearerSupportConceptOid.HasValue ? string.Empty : "disabled";
|
||||
|
||||
<div>
|
||||
<div class="container p-0">
|
||||
@@ -174,7 +174,7 @@
|
||||
<div class="d-flex">
|
||||
<h5 class="mb-1 text-light text-left" id="selectedSupportConceptCustomerInfo">@Model.SelectedCostBearer2SupportConceptRelListObject.NameAndDateOfBirth</h5>
|
||||
</div>
|
||||
@if(Model.SelectedCostBearerSupportConceptRelOid > 0)
|
||||
@if(Model.SelectedCostBearerSupportConceptOid > 0)
|
||||
{
|
||||
<div class="dropdown-divider my-0 py-0"></div>
|
||||
}
|
||||
@@ -184,7 +184,7 @@
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@if (Model.CostBearer2SupportConceptOid != null && Model.CostBearer2SupportConceptOid > 0)
|
||||
@if (Model.SelectedCostBearerSupportConceptOid != null && Model.SelectedCostBearerSupportConceptOid > 0)
|
||||
{
|
||||
<div class="col-md-auto mt-3">
|
||||
<button type="button" class="btn btn-outline-primary w-100 h-100" id="statistics-button" data-toggle="modal" data-target="#statistics-popup" onclick="showPieChart()">
|
||||
@@ -307,7 +307,7 @@
|
||||
}
|
||||
|
||||
@* ----- Betrag ----- *@
|
||||
@if(AbstractModel.ShowBetrag)
|
||||
@if(Model.ShowBetrag)
|
||||
{
|
||||
var betrag = string.Empty;
|
||||
if(Model.SelectedServiceRecord?.Betrag != null && Model.SelectedServiceRecord.Betrag.Value > 0)
|
||||
@@ -429,7 +429,7 @@
|
||||
</div>
|
||||
|
||||
@* ----- Einzelbuchung: Distanz ----- *@
|
||||
@if(AbstractModel.ShowDistanceField)
|
||||
@if(Model.ShowDistanceField)
|
||||
{
|
||||
<div class="form-row mt-2">
|
||||
<div class="col-md">
|
||||
@@ -448,7 +448,7 @@
|
||||
}
|
||||
|
||||
@* ----- Einzelbuchung: Textbausteine ----- *@
|
||||
@if(AbstractModel.HasRightToSeeTextModules)
|
||||
@if(Model.HasRightToSeeTextModules)
|
||||
{
|
||||
<script type="text/javascript">
|
||||
function textModuleButtonOnClick() {
|
||||
@@ -543,11 +543,16 @@
|
||||
<div class="col col-12 col-md-7">
|
||||
@if(Model != null)
|
||||
{
|
||||
if(Model.SelectedSupportConcept != null || Model.CostBearer2SupportConceptOid == -2)
|
||||
if(Model.SelectedSupportConcept != null || Model.SelectedCostBearerSupportConceptOid == -2)
|
||||
{
|
||||
var defaultStartDate = DateTime.Now.GetFirstOfMonth().ToShortDateString();
|
||||
var defaultEndDate = DateTime.Today.ToShortDateString();
|
||||
|
||||
if (Model.SelectedZeitraum != null && Model.SelectedZeitraum.StartDate.HasValue && Model.SelectedZeitraum.EndDate.HasValue)
|
||||
{
|
||||
defaultStartDate = Model.SelectedZeitraum.StartDate.Value.ToShortDateString();
|
||||
defaultEndDate = Model.SelectedZeitraum.EndDate.Value.ToShortDateString();
|
||||
}
|
||||
<div class="container-fluid w-100 mt-3 p-0">
|
||||
<div class="form-row">
|
||||
<div class="col">
|
||||
|
||||
@@ -296,7 +296,7 @@
|
||||
@durationStr
|
||||
</td>
|
||||
</tr>
|
||||
@if(AbstractModel.ShowDistanceField && serviceRecord.DistanceInMeterDecimal != null && serviceRecord.DistanceInMeterDecimal.Value > 0)
|
||||
@if(Model.ShowDistanceField && serviceRecord.DistanceInMeterDecimal != null && serviceRecord.DistanceInMeterDecimal.Value > 0)
|
||||
{
|
||||
<tr>
|
||||
<td class="text-secondary">
|
||||
@@ -358,7 +358,7 @@
|
||||
@serviceRecord.Employee.FirstNameLastName
|
||||
</td>
|
||||
</tr>
|
||||
@if(AbstractModel.ShowServiceRecordInsertedOn)
|
||||
@if(Model.ShowServiceRecordInsertedOn)
|
||||
{
|
||||
<tr>
|
||||
<td class="text-secondary">
|
||||
@@ -377,7 +377,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@if(AbstractModel.ShowBetrag && serviceRecord.Betrag.HasValue && serviceRecord.Betrag.Value > 0)
|
||||
@if(Model.ShowBetrag && serviceRecord.Betrag.HasValue && serviceRecord.Betrag.Value > 0)
|
||||
{
|
||||
var betrag = serviceRecord.Betrag.Value.ToString("#.00") + " €";
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
@if(Model.QuittierungsbelegsReportObject != null)
|
||||
@if(Model.QuittierungsbelegsReport != null)
|
||||
{
|
||||
@Html.DevExpress().WebDocumentViewer(settings =>
|
||||
{
|
||||
@@ -36,5 +36,5 @@
|
||||
settings.SettingsMobile.ReaderMode = true;
|
||||
settings.SettingsMobile.AnimationEnabled = false;
|
||||
settings.ClientSideEvents.Init = "quittierungsbelegsViewerInit";
|
||||
}).Bind(Model.QuittierungsbelegsReportObject).GetHtml()
|
||||
}).Bind(Model.QuittierungsbelegsReport).GetHtml()
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user