Vorlagen weiter bearbeitet
Div. Bugfixes Spitalstiftung Konstanz Feiertage BfpDus neuer CSV Export
This commit is contained in:
@@ -43,12 +43,12 @@
|
||||
<TargetCulture>de-DE</TargetCulture>
|
||||
<ProductName>BeWoPlaner</ProductName>
|
||||
<PublisherName>ownSoft GmbH</PublisherName>
|
||||
<MinimumRequiredVersion>2.0.1.253</MinimumRequiredVersion>
|
||||
<MinimumRequiredVersion>2.0.1.255</MinimumRequiredVersion>
|
||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||
<WebPage>publish.htm</WebPage>
|
||||
<OpenBrowserOnPublish>false</OpenBrowserOnPublish>
|
||||
<TrustUrlParameters>true</TrustUrlParameters>
|
||||
<ApplicationRevision>255</ApplicationRevision>
|
||||
<ApplicationRevision>256</ApplicationRevision>
|
||||
<ApplicationVersion>2.0.1.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||
@@ -455,6 +455,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="View\Document\SingleTemplateSelectionView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\HilfeplanImportView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
@@ -551,11 +555,11 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\Detail\TemplatePrintSelection.xaml">
|
||||
<Page Include="View\Document\TemplatePrintSelection.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\Detail\VorlageEditView.xaml">
|
||||
<Page Include="View\Document\VorlageEditView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
@@ -659,7 +663,7 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\Master\DokumenteView.xaml">
|
||||
<Page Include="View\Document\DokumenteView.xaml">
|
||||
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
||||
</Page>
|
||||
<Page Include="View\Master\SchedulingMasterView.xaml">
|
||||
@@ -1358,6 +1362,10 @@
|
||||
<Compile Include="View\Detail\Wohneinheit\WohneinheitVerwaltungViewV2.xaml.cs">
|
||||
<DependentUpon>WohneinheitVerwaltungViewV2.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Document\DokumentViewHelper.cs" />
|
||||
<Compile Include="View\Document\SingleTemplateSelectionView.xaml.cs">
|
||||
<DependentUpon>SingleTemplateSelectionView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\HilfeplanImportView.xaml.cs">
|
||||
<DependentUpon>HilfeplanImportView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -1445,10 +1453,10 @@
|
||||
<Compile Include="View\Detail\Suchergebnis.xaml.cs">
|
||||
<DependentUpon>Suchergebnis.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Detail\TemplatePrintSelection.xaml.cs">
|
||||
<Compile Include="View\Document\TemplatePrintSelection.xaml.cs">
|
||||
<DependentUpon>TemplatePrintSelection.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Detail\VorlageEditView.xaml.cs">
|
||||
<Compile Include="View\Document\VorlageEditView.xaml.cs">
|
||||
<DependentUpon>VorlageEditView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Detail\RatingTypeView.xaml.cs">
|
||||
@@ -1529,7 +1537,7 @@
|
||||
<Compile Include="View\HomeView.xaml.cs">
|
||||
<DependentUpon>HomeView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Master\DokumenteView.xaml.cs">
|
||||
<Compile Include="View\Document\DokumenteView.xaml.cs">
|
||||
<DependentUpon>DokumenteView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Master\SchedulingMasterView.xaml.cs">
|
||||
@@ -3430,6 +3438,7 @@
|
||||
<ItemGroup>
|
||||
<Resource Include="Ressources\Icons\chatbot.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace BeWo
|
||||
|
||||
public static MainControl MainControl;
|
||||
public static string ShortVersion = "3.22";
|
||||
public static string Version = "Version 3.22 TEST";
|
||||
public static string Version = "Version 3.23 TEST";
|
||||
|
||||
public static int RenderTier = 0;
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ using BeWo.ServiceProxy;
|
||||
using BeWo.View;
|
||||
using BeWo.View.Detail;
|
||||
using BeWo.View.Detail.Zeiterfassung;
|
||||
using BeWo.View.Document;
|
||||
using BeWo.View.Master;
|
||||
using BeWo.View.Navigation;
|
||||
using BeWo.ViewModel;
|
||||
|
||||
@@ -2066,6 +2066,7 @@ namespace BeWo.ServiceProxy
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<BS.Shared.DataContracts.Compact.CompactCustomerDC, bool>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<long, bool>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<BS.Shared.DataContracts.ServiceRecordDC, System.Collections.Generic.List<BS.Shared.ServiceRecordValidationResult>>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Invoicing.BankAccountDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Reports.AuslastungAnalysisRootDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AccountingReportDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Reports.AccountingReportRowDC>))]
|
||||
@@ -5493,6 +5494,13 @@ namespace BeWo.ServiceProxy
|
||||
public interface IOperationsService
|
||||
{
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetEmployeesServiceRecordsWithStartEndDateP" +
|
||||
"aginated", ReplyAction="http://tempuri.org/IOperationsService/GetEmployeesServiceRecordsWithStartEndDateP" +
|
||||
"aginatedResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetEmployeesServiceRecordsWithStartEndDateP" +
|
||||
"aginatedBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
System.Collections.Generic.List<BS.Shared.DataContracts.ServiceRecordDC> GetEmployeesServiceRecordsWithStartEndDatePaginated(out int rowCount, long pEmployeeOid, System.DateTime start, System.DateTime ende, int firstResult, int maxResults);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetEmployeesServiceRecords2Paginated", ReplyAction="http://tempuri.org/IOperationsService/GetEmployeesServiceRecords2PaginatedRespons" +
|
||||
"e")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetEmployeesServiceRecords2PaginatedBeWoFau" +
|
||||
@@ -5640,6 +5648,10 @@ namespace BeWo.ServiceProxy
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetDokumentvorlagenInFolderBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
System.Collections.Generic.List<BS.Shared.DataContracts.DokumentvorlageDC> GetDokumentvorlagenInFolder(long folderOid);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetDokumentvorlagenForType", ReplyAction="http://tempuri.org/IOperationsService/GetDokumentvorlagenForTypeResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetDokumentvorlagenForTypeBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
System.Collections.Generic.List<BS.Shared.DataContracts.DokumentvorlageDC> GetDokumentvorlagenForType(BS.Shared.TableID objecTid);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetSupportConceptsById", ReplyAction="http://tempuri.org/IOperationsService/GetSupportConceptsByIdResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetSupportConceptsByIdBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
System.Collections.Generic.List<BS.Shared.DataContracts.SupportConceptDC> GetSupportConceptsById(System.Collections.Generic.List<long> idList);
|
||||
@@ -6332,6 +6344,7 @@ namespace BeWo.ServiceProxy
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<BS.Shared.DataContracts.Compact.CompactCustomerDC, bool>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<long, bool>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<BS.Shared.DataContracts.ServiceRecordDC, System.Collections.Generic.List<BS.Shared.ServiceRecordValidationResult>>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Invoicing.BankAccountDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Reports.AuslastungAnalysisRootDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AccountingReportDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Reports.AccountingReportRowDC>))]
|
||||
@@ -6390,13 +6403,6 @@ namespace BeWo.ServiceProxy
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.QueryDC>))]
|
||||
string GetDakotaFileFormat(object param);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetEmployeesServiceRecordsWithStartEndDateP" +
|
||||
"aginated", ReplyAction="http://tempuri.org/IOperationsService/GetEmployeesServiceRecordsWithStartEndDateP" +
|
||||
"aginatedResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetEmployeesServiceRecordsWithStartEndDateP" +
|
||||
"aginatedBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
System.Collections.Generic.List<BS.Shared.DataContracts.ServiceRecordDC> GetEmployeesServiceRecordsWithStartEndDatePaginated(out int rowCount, long pEmployeeOid, System.DateTime start, System.DateTime ende, int firstResult, int maxResults);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/AnonymizeEmployee", ReplyAction="http://tempuri.org/IOperationsService/AnonymizeEmployeeResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/AnonymizeEmployeeBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
void AnonymizeEmployee(long pEmployeeOid);
|
||||
@@ -7580,6 +7586,11 @@ namespace BeWo.ServiceProxy
|
||||
{
|
||||
}
|
||||
|
||||
public System.Collections.Generic.List<BS.Shared.DataContracts.ServiceRecordDC> GetEmployeesServiceRecordsWithStartEndDatePaginated(out int rowCount, long pEmployeeOid, System.DateTime start, System.DateTime ende, int firstResult, int maxResults)
|
||||
{
|
||||
return base.Channel.GetEmployeesServiceRecordsWithStartEndDatePaginated(out rowCount, pEmployeeOid, start, ende, firstResult, maxResults);
|
||||
}
|
||||
|
||||
public System.Collections.Generic.List<BS.Shared.DataContracts.ServiceRecordDC> GetEmployeesServiceRecords2Paginated(out int rowCount, long pEmployeeOid, System.Nullable<long> days, int firstResult, int maxResults)
|
||||
{
|
||||
return base.Channel.GetEmployeesServiceRecords2Paginated(out rowCount, pEmployeeOid, days, firstResult, maxResults);
|
||||
@@ -7730,6 +7741,11 @@ namespace BeWo.ServiceProxy
|
||||
return base.Channel.GetDokumentvorlagenInFolder(folderOid);
|
||||
}
|
||||
|
||||
public System.Collections.Generic.List<BS.Shared.DataContracts.DokumentvorlageDC> GetDokumentvorlagenForType(BS.Shared.TableID objecTid)
|
||||
{
|
||||
return base.Channel.GetDokumentvorlagenForType(objecTid);
|
||||
}
|
||||
|
||||
public System.Collections.Generic.List<BS.Shared.DataContracts.SupportConceptDC> GetSupportConceptsById(System.Collections.Generic.List<long> idList)
|
||||
{
|
||||
return base.Channel.GetSupportConceptsById(idList);
|
||||
@@ -7960,11 +7976,6 @@ namespace BeWo.ServiceProxy
|
||||
return base.Channel.GetDakotaFileFormat(param);
|
||||
}
|
||||
|
||||
public System.Collections.Generic.List<BS.Shared.DataContracts.ServiceRecordDC> GetEmployeesServiceRecordsWithStartEndDatePaginated(out int rowCount, long pEmployeeOid, System.DateTime start, System.DateTime ende, int firstResult, int maxResults)
|
||||
{
|
||||
return base.Channel.GetEmployeesServiceRecordsWithStartEndDatePaginated(out rowCount, pEmployeeOid, start, ende, firstResult, maxResults);
|
||||
}
|
||||
|
||||
public void AnonymizeEmployee(long pEmployeeOid)
|
||||
{
|
||||
base.Channel.AnonymizeEmployee(pEmployeeOid);
|
||||
|
||||
@@ -94,40 +94,43 @@ namespace BeWo.View.Detail
|
||||
private List<TableObject> GetListForYear(List<AbwesenheitsInformationDC> information)
|
||||
{
|
||||
List<TableObject> tableObjects = new List<TableObject>();
|
||||
var absencetimes = ServiceFacade.DoEmployeeServiceSync(s => s.GetAllEmployeeAbsenceTimesForYear(Information[0].Year)); // Prüfen, ob z.B. 27.12.2020 - 05.01.2021 drin wäre
|
||||
|
||||
List<long?> empOids = new List<long?>();
|
||||
foreach (var info in information)
|
||||
empOids.Add(info.Employee.EmployeeOid);
|
||||
|
||||
var dictUrlaub = ServiceFacade.DoEmployeeServiceSync(s => s.BerechneAnzEinerAbwesenheitFuerMehrereMitarbeiter(empOids, information[0].Year, "urlaub"));
|
||||
var dictKrankheit = ServiceFacade.DoEmployeeServiceSync(s => s.BerechneAnzEinerAbwesenheitFuerMehrereMitarbeiter(empOids, information[0].Year, "krank"));
|
||||
|
||||
foreach (var info in information)
|
||||
if (information != null && information.Count > 0)
|
||||
{
|
||||
decimal anzGeschenkteTage = 0;
|
||||
foreach (var eintrag in info.GeschenkteUrlaubstage)
|
||||
var absencetimes = ServiceFacade.DoEmployeeServiceSync(s => s.GetAllEmployeeAbsenceTimesForYear(Information[0].Year)); // Prüfen, ob z.B. 27.12.2020 - 05.01.2021 drin wäre
|
||||
|
||||
List<long?> empOids = new List<long?>();
|
||||
foreach (var info in information)
|
||||
empOids.Add(info.Employee.EmployeeOid);
|
||||
|
||||
var dictUrlaub = ServiceFacade.DoEmployeeServiceSync(s => s.BerechneAnzEinerAbwesenheitFuerMehrereMitarbeiter(empOids, information[0].Year, "urlaub"));
|
||||
var dictKrankheit = ServiceFacade.DoEmployeeServiceSync(s => s.BerechneAnzEinerAbwesenheitFuerMehrereMitarbeiter(empOids, information[0].Year, "krank"));
|
||||
|
||||
foreach (var info in information)
|
||||
{
|
||||
anzGeschenkteTage += eintrag.AnzahlTage;
|
||||
decimal anzGeschenkteTage = 0;
|
||||
foreach (var eintrag in info.GeschenkteUrlaubstage)
|
||||
{
|
||||
anzGeschenkteTage += eintrag.AnzahlTage;
|
||||
}
|
||||
|
||||
TableObject to = new TableObject()
|
||||
{
|
||||
Name = info.Employee.LastNameFirstName,
|
||||
ResturlaubVorjahr = string.Format("{0:0.00}", info.Employee.Urlaubskonto.ResturlaubVorjahrTotal),
|
||||
VerfallenerResturlaub = string.Format("{0:0.00}", info.Employee.Urlaubskonto.VerfallenerUrlaub),
|
||||
Urlaubsanspruch = string.Format("{0:0.00}", info.Employee.Urlaubskonto.Urlaubsanspruch - anzGeschenkteTage),
|
||||
Resturlaub = string.Format("{0:0.00}", info.Employee.Urlaubskonto.Resturlaub),
|
||||
TageKrankheit = string.Format("{0:0.00}", dictKrankheit.First(d => d.Key == info.Employee.EmployeeOid).Value),
|
||||
TageUrlaub = string.Format("{0:0.00}", dictUrlaub.First(d => d.Key == info.Employee.EmployeeOid).Value),
|
||||
GeschenkteUrlaubstage = string.Format("{0:0.00}", anzGeschenkteTage)
|
||||
};
|
||||
|
||||
//TageKrankheit und TageUrlaub setzen
|
||||
|
||||
tableObjects.Add(to);
|
||||
}
|
||||
|
||||
TableObject to = new TableObject()
|
||||
{
|
||||
Name = info.Employee.LastNameFirstName,
|
||||
ResturlaubVorjahr = string.Format("{0:0.00}", info.Employee.Urlaubskonto.ResturlaubVorjahrTotal),
|
||||
VerfallenerResturlaub = string.Format("{0:0.00}", info.Employee.Urlaubskonto.VerfallenerUrlaub),
|
||||
Urlaubsanspruch = string.Format("{0:0.00}", info.Employee.Urlaubskonto.Urlaubsanspruch - anzGeschenkteTage),
|
||||
Resturlaub = string.Format("{0:0.00}", info.Employee.Urlaubskonto.Resturlaub),
|
||||
TageKrankheit = string.Format("{0:0.00}", dictKrankheit.First(d => d.Key == info.Employee.EmployeeOid).Value),
|
||||
TageUrlaub = string.Format("{0:0.00}", dictUrlaub.First(d => d.Key == info.Employee.EmployeeOid).Value),
|
||||
GeschenkteUrlaubstage = string.Format("{0:0.00}", anzGeschenkteTage)
|
||||
};
|
||||
|
||||
//TageKrankheit und TageUrlaub setzen
|
||||
|
||||
tableObjects.Add(to);
|
||||
}
|
||||
|
||||
return tableObjects;
|
||||
}
|
||||
|
||||
|
||||
171
BeWo/View/Document/DokumentViewHelper.cs
Normal file
171
BeWo/View/Document/DokumentViewHelper.cs
Normal file
@@ -0,0 +1,171 @@
|
||||
using BeWo.ViewModel;
|
||||
using BS.Shared.DataContracts;
|
||||
using DevExpress.Utils;
|
||||
using DevExpress.Xpf.Grid;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
namespace BeWo.View.Document
|
||||
{
|
||||
public class DokumentViewHelper
|
||||
{
|
||||
public static void CreateTemplateTreeViewItems(TreeListControl treeControl, IList<VorlagentabelleDC> vorlagentabellen)
|
||||
{
|
||||
treeControl.BeginDataUpdate();
|
||||
|
||||
foreach (var table in vorlagentabellen)
|
||||
{
|
||||
TreeListNode node = new TreeListNode();
|
||||
DocumentTreeItemDC dc = new DocumentTreeItemDC()
|
||||
{
|
||||
DocTreeItemOid = table.VorlagentabelleOid,
|
||||
ParentOid = null,
|
||||
Name = table.Tabellenname,
|
||||
Table = BS.Shared.TableID.Vorlagentabelle,
|
||||
ObjectOid = table.VorlagentabelleOid,
|
||||
Node = node,
|
||||
BeWoFolderDC = new BeWoFolderDC { Name = "RootFolder", SubFolders = new List<BeWoFolderDC>() }
|
||||
};
|
||||
DocumentTreeItemVM vm = new DocumentTreeItemVM(dc);
|
||||
node.Content = vm;
|
||||
treeControl.View.Nodes.Add(node);
|
||||
node.IsExpandButtonVisible = DefaultBoolean.True;
|
||||
node.Image = LoadImage(table.ImageName);
|
||||
|
||||
}
|
||||
treeControl.EndDataUpdate();
|
||||
}
|
||||
|
||||
public static void AddFolderToTemplateTreeView(TreeListControl treeControl, List<BeWoFolderDC> folders)
|
||||
{
|
||||
treeControl.BeginDataUpdate();
|
||||
|
||||
foreach (var folder in folders)
|
||||
{
|
||||
TreeListNode parentNode = null;
|
||||
DocumentTreeItemVM parentVm = null;
|
||||
foreach (var node in treeControl.View.Nodes)
|
||||
{
|
||||
var item = node.Content as DocumentTreeItemVM;
|
||||
if (item != null && item.DocTreeItemOid == folder.BeWoFolderOid)
|
||||
{
|
||||
parentNode = node;
|
||||
parentVm = item;
|
||||
}
|
||||
}
|
||||
|
||||
if (parentVm != null)
|
||||
{
|
||||
|
||||
DocumentTreeItemDC dc = new DocumentTreeItemDC()
|
||||
{
|
||||
DocTreeItemOid = folder.BeWoFolderOid,
|
||||
ParentOid = parentVm.DocTreeItemOid,
|
||||
Name = folder.Name,
|
||||
FilesInFolder = new List<FileAttachmentDC>(),
|
||||
BeWoFolderDC = folder,
|
||||
Table = parentVm.DataContract.Table,
|
||||
ObjectOid = parentVm.DataContract.ObjectOid
|
||||
};
|
||||
if (folder.Files.Count != 0)
|
||||
{
|
||||
foreach (var file in folder.Files)
|
||||
{
|
||||
dc.FilesInFolder.Add(file);
|
||||
}
|
||||
}
|
||||
DocumentTreeItemVM folder_vm = new DocumentTreeItemVM(dc);
|
||||
var newFolderNode = new TreeListNode()
|
||||
{
|
||||
Content = folder_vm,
|
||||
IsExpandButtonVisible = DefaultBoolean.True,
|
||||
Tag = false,
|
||||
Image = LoadFolderImage()
|
||||
};
|
||||
dc.Node = newFolderNode;
|
||||
parentNode.Nodes.Add(newFolderNode);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
treeControl.EndDataUpdate();
|
||||
}
|
||||
|
||||
private static void GenerateFolderStructureForSelectedNode(TreeListNode node, List<BeWoFolderDC> folderDCs, bool hideAlleOrdner)
|
||||
{
|
||||
if (node.Nodes.Count == 0)
|
||||
{
|
||||
var content = node.Content as DocumentTreeItemVM;
|
||||
|
||||
foreach (var folder in folderDCs)
|
||||
{
|
||||
TreeListNode newNode_folder = null;
|
||||
if (folder.BeWoFolderOid.HasValue || !hideAlleOrdner)
|
||||
{
|
||||
DocumentTreeItemDC folder_dc = new DocumentTreeItemDC()
|
||||
{
|
||||
DocTreeItemOid = folder.BeWoFolderOid,
|
||||
ParentOid = content.DocTreeItemOid,
|
||||
Name = folder.Name,
|
||||
FilesInFolder = new List<FileAttachmentDC>(),
|
||||
BeWoFolderDC = folder,
|
||||
Table = content.DataContract.Table,
|
||||
ObjectOid = content.DataContract.ObjectOid
|
||||
};
|
||||
if (folder.Files.Count != 0)
|
||||
{
|
||||
foreach (var file in folder.Files)
|
||||
{
|
||||
folder_dc.FilesInFolder.Add(file);
|
||||
}
|
||||
}
|
||||
DocumentTreeItemVM folder_vm = new DocumentTreeItemVM(folder_dc);
|
||||
newNode_folder = new TreeListNode()
|
||||
{
|
||||
Content = folder_vm,
|
||||
IsExpandButtonVisible = DefaultBoolean.True,
|
||||
Tag = false,
|
||||
Image = LoadFolderImage()
|
||||
};
|
||||
folder_dc.Node = newNode_folder;
|
||||
node.Nodes.Add(newNode_folder);
|
||||
}
|
||||
else
|
||||
{
|
||||
newNode_folder = node;
|
||||
if (content.DataContract.BeWoFolderDC == null)
|
||||
{
|
||||
content.DataContract.BeWoFolderDC = folder;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (folder.SubFolders.Count != 0)
|
||||
{
|
||||
GenerateFolderStructureForSelectedNode(newNode_folder, folder.SubFolders, hideAlleOrdner);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static BitmapImage LoadImage(string imageName)
|
||||
{
|
||||
if (String.IsNullOrEmpty(imageName))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return new BitmapImage(new Uri("/Ressources/Icons/" + imageName + ".png", UriKind.Relative));
|
||||
}
|
||||
|
||||
private static BitmapImage LoadFolderImage()
|
||||
{
|
||||
return LoadImage("Folder.png");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
<localView:BeWoView
|
||||
x:Class="BeWo.View.Master.DokumenteView"
|
||||
x:Class="BeWo.View.Document.DokumenteView"
|
||||
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"
|
||||
@@ -11,6 +11,7 @@
|
||||
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"
|
||||
@@ -79,8 +80,8 @@
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
<master:DeleteButtonVisibilityConverter x:Key="DeleteButtonVisibilityConverter" />
|
||||
<master:EditButtonVisibilityConverter x:Key="EditButtonVisibilityConverter" />
|
||||
<doc:DeleteButtonVisibilityConverter x:Key="DeleteButtonVisibilityConverter" />
|
||||
<doc:EditButtonVisibilityConverter x:Key="EditButtonVisibilityConverter" />
|
||||
|
||||
</localView:BeWoView.Resources>
|
||||
|
||||
@@ -536,6 +537,7 @@
|
||||
ShowNodeImages="True"
|
||||
ShowVerticalLines="False"
|
||||
VerticalScrollbarVisibility="Auto"
|
||||
AutoExpandOnDrag="True"
|
||||
NavigationStyle="Cell"/>
|
||||
</dxg:TreeListControl.View>
|
||||
</dxg:TreeListControl>
|
||||
@@ -41,7 +41,7 @@ using BS.Shared.Translation;
|
||||
using System.Windows.Data;
|
||||
using System.Globalization;
|
||||
|
||||
namespace BeWo.View.Master
|
||||
namespace BeWo.View.Document
|
||||
{
|
||||
public partial class DokumenteView
|
||||
{
|
||||
@@ -1268,46 +1268,36 @@ namespace BeWo.View.Master
|
||||
|
||||
public void InitTemplateMenuItems()
|
||||
{
|
||||
template_treeview_control.BeginDataUpdate();
|
||||
|
||||
Dictionary<string, string> firstLevel = GetFirstLevelDictionaryForTemplates();
|
||||
|
||||
alleVorlagenTabellen = ServiceFacade.DoOperationsServiceSync(s => s.GetVorlagentabelleDCs());
|
||||
|
||||
string[] iconNames = new string[] { "IDBadgeDisabled", "UserHomeMaleDisabled", "UserBusinessMaleDisabled" };
|
||||
DokumentViewHelper.CreateTemplateTreeViewItems(template_treeview_control, alleVorlagenTabellen);
|
||||
|
||||
|
||||
|
||||
foreach (var table in alleVorlagenTabellen)
|
||||
{
|
||||
TreeListNode node = new TreeListNode();
|
||||
DocumentTreeItemDC dc = new DocumentTreeItemDC()
|
||||
{
|
||||
DocTreeItemOid = table.VorlagentabelleOid,
|
||||
ParentOid = null,
|
||||
Name = table.Tabellenname,
|
||||
Table = TableID.Vorlagentabelle,
|
||||
ObjectOid = table.VorlagentabelleOid,
|
||||
Node = node,
|
||||
BeWoFolderDC = new BeWoFolderDC { Name = "RootFolder", SubFolders = new List<BeWoFolderDC>() }
|
||||
};
|
||||
DocumentTreeItemVM vm = new DocumentTreeItemVM(dc);
|
||||
node.Content = vm;
|
||||
TemplateTreeView.Nodes.Add(node);
|
||||
node.IsExpandButtonVisible = DefaultBoolean.True;
|
||||
node.Image = LoadImage(table.ImageName);
|
||||
|
||||
}
|
||||
template_treeview_control.EndDataUpdate();
|
||||
}
|
||||
//string[] iconNames = new string[] { "IDBadgeDisabled", "UserHomeMaleDisabled", "UserBusinessMaleDisabled" };
|
||||
|
||||
//foreach (var table in alleVorlagenTabellen)
|
||||
//{
|
||||
// TreeListNode node = new TreeListNode();
|
||||
// DocumentTreeItemDC dc = new DocumentTreeItemDC()
|
||||
// {
|
||||
// DocTreeItemOid = table.VorlagentabelleOid,
|
||||
// ParentOid = null,
|
||||
// Name = table.Tabellenname,
|
||||
// Table = TableID.Vorlagentabelle,
|
||||
// ObjectOid = table.VorlagentabelleOid,
|
||||
// Node = node,
|
||||
// BeWoFolderDC = new BeWoFolderDC { Name = "RootFolder", SubFolders = new List<BeWoFolderDC>() }
|
||||
// };
|
||||
// DocumentTreeItemVM vm = new DocumentTreeItemVM(dc);
|
||||
// node.Content = vm;
|
||||
// TemplateTreeView.Nodes.Add(node);
|
||||
// node.IsExpandButtonVisible = DefaultBoolean.True;
|
||||
// node.Image = LoadImage(table.ImageName);
|
||||
|
||||
private Dictionary<string, string> GetFirstLevelDictionaryForTemplates()
|
||||
{
|
||||
Dictionary<string, string> firstLevel = new Dictionary<string, string>();
|
||||
|
||||
firstLevel.Add("supportConcepts", "Hilfepläne");
|
||||
firstLevel.Add("customers", Translator.Translate("Klienten"));
|
||||
firstLevel.Add("employee", Translator.Translate("MitarbeiterPlural"));
|
||||
|
||||
return firstLevel;
|
||||
//}
|
||||
//template_treeview_control.EndDataUpdate();
|
||||
}
|
||||
|
||||
private void templateTreeListView_NodeExpanding(object sender, TreeListNodeAllowEventArgs e)
|
||||
64
BeWo/View/Document/SingleTemplateSelectionView.xaml
Normal file
64
BeWo/View/Document/SingleTemplateSelectionView.xaml
Normal file
@@ -0,0 +1,64 @@
|
||||
<localView:BeWoView x:Class="BeWo.View.Document.SingleTemplateSelectionView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:localView="clr-namespace:BeWo.View"
|
||||
xmlns:localViewControls="clr-namespace:BeWo.View.Controls"
|
||||
xmlns:localSearchView="clr-namespace:BeWo.View.Search"
|
||||
xmlns:val="clr-namespace:BeWo.Validation"
|
||||
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:core="clr-namespace:BS.Shared.Core;assembly=BS.Shared"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxre="http://schemas.devexpress.com/winfx/2008/xaml/richedit"
|
||||
xmlns:dxr="http://schemas.devexpress.com/winfx/2008/xaml/ribbon"
|
||||
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
Focusable="True">
|
||||
|
||||
<Grid Background="{StaticResource ObjectEditBackgroundBrush}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
|
||||
<Label Margin="0,0,0,0" Content="Vorlage:"/>
|
||||
<dxg:TreeListControl x:Name="treelistcontrol_template" Grid.Row="1" DefaultSorting="Name" Margin="5,0,5,0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" >
|
||||
<dxg:TreeListControl.Columns>
|
||||
<dxg:TreeListColumn FieldName="Name" AllowSorting="True"/>
|
||||
</dxg:TreeListControl.Columns>
|
||||
<dxg:TreeListControl.View>
|
||||
<dxg:TreeListView x:Name="TreeView_template" ShowColumnHeaders="False" ShowIndicator="False" ShowHorizontalLines="False" ShowVerticalLines="False"
|
||||
FocusedRowChanged="DocumentsTreeView_FocusedRowChanged" PreviewMouseLeftButtonDown="DocumentsTreeView_folderStructureForSelection_PreviewMouseLeftButtonDown"
|
||||
NodeExpanding="DocumentsTreeView_NodeExpanding" AllowEditing="False" ShowNodeImages="True" PrintNodeImages="True"
|
||||
KeyFieldName="{Binding DocumentTreeItemVM.DocTreeItemOid}" ParentFieldName="Binding DocumentTreeItemVM.ParentOid">
|
||||
</dxg:TreeListView>
|
||||
</dxg:TreeListControl.View>
|
||||
</dxg:TreeListControl>
|
||||
|
||||
<CheckBox Content="Dokument abspeichern" Grid.Row="2" Checked="CheckBox_Checked" Margin="5,8,0,0" Unchecked="CheckBox_Unchecked" />
|
||||
|
||||
<dxg:TreeListControl x:Name="treelistcontrol_folderStructureForSelection" Grid.Row="3" DefaultSorting="Name" Margin="5,5,5,0" VerticalAlignment="Stretch" Visibility="Visible">
|
||||
<dxg:TreeListControl.Columns>
|
||||
<dxg:TreeListColumn FieldName="Name" AllowSorting="True"/>
|
||||
</dxg:TreeListControl.Columns>
|
||||
<dxg:TreeListControl.View>
|
||||
<dxg:TreeListView x:Name="TreeView_folderStructureForSelection" ShowColumnHeaders="False" ShowIndicator="False" ShowHorizontalLines="False" ShowVerticalLines="False"
|
||||
FocusedRowChanged="DocumentsTreeView_FocusedRowChanged" PreviewMouseLeftButtonDown="DocumentsTreeView_folderStructureForSelection_PreviewMouseLeftButtonDown"
|
||||
NodeExpanding="DocumentsTreeView_NodeExpanding" AllowEditing="False" ShowNodeImages="True" PrintNodeImages="True"
|
||||
KeyFieldName="{Binding DocumentTreeItemVM.DocTreeItemOid}" ParentFieldName="Binding DocumentTreeItemVM.ParentOid">
|
||||
</dxg:TreeListView>
|
||||
</dxg:TreeListControl.View>
|
||||
</dxg:TreeListControl>
|
||||
|
||||
<WrapPanel Grid.Row="4" VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="0 5 5 5">
|
||||
<Button x:Name="Button_CreateTemplateBasedDocument_OnlyOne" Content="Dokument erstellen" Margin="0 0 5 0" Click="Button_CreateTemplateForSelection_Click" />
|
||||
<Button x:Name="Button_Cancel_OnlyOne" Content="Abbrechen" Click="Button_Cancel_Click" />
|
||||
</WrapPanel>
|
||||
</Grid>
|
||||
|
||||
|
||||
</localView:BeWoView>
|
||||
218
BeWo/View/Document/SingleTemplateSelectionView.xaml.cs
Normal file
218
BeWo/View/Document/SingleTemplateSelectionView.xaml.cs
Normal file
@@ -0,0 +1,218 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
|
||||
using BeWo.Controls;
|
||||
using BeWo.Core;
|
||||
using BeWo.ServiceProxy;
|
||||
using BeWo.Validation;
|
||||
using BeWo.View.Search;
|
||||
using BeWo.ViewModel;
|
||||
using BeWo.ViewModel.ListViewModel;
|
||||
using BeWo.Core.Service;
|
||||
|
||||
using BS.Shared;
|
||||
using BS.Shared.Extensions;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.ClientPartials;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using BS.Shared.Services;
|
||||
using BS.Shared.Translation;
|
||||
using DevExpress.Xpf.RichEdit;
|
||||
using SupportConceptService = BeWo.Core.Service.SupportConceptService;
|
||||
using System.Linq;
|
||||
using DevExpress.Xpf.Grid;
|
||||
using System.Windows.Media.Imaging;
|
||||
using DevExpress.Utils;
|
||||
|
||||
namespace BeWo.View.Document
|
||||
{
|
||||
public partial class SingleTemplateSelectionView
|
||||
{
|
||||
public event Action ButtonCreateClicked;
|
||||
public event Action ButtonCreateForSelectionClicked;
|
||||
public event Action ButtonCreateForAllClicked;
|
||||
public event Action ButtonCancelClicked;
|
||||
private TableID tableId;
|
||||
private List<DokumentvorlageDC> alleVorlagen;
|
||||
private List<BeWoFolderDC> alleOrdner;
|
||||
|
||||
public DocumentTreeItemVM selectedFolder = null;
|
||||
|
||||
public SingleTemplateSelectionView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void InitView(VorlagentabelleDC vt, List<DokumentvorlageDC> alleVorlagen, List<BeWoFolderDC> alleOrdner)
|
||||
{
|
||||
//tableId = tid;
|
||||
|
||||
this.alleVorlagen = alleVorlagen;
|
||||
this.alleOrdner = alleOrdner;
|
||||
|
||||
DokumentViewHelper.CreateTemplateTreeViewItems(treelistcontrol_template, new List<VorlagentabelleDC>() { vt } );
|
||||
|
||||
|
||||
|
||||
List<PrintSelectionVM> vms = new List<PrintSelectionVM>();
|
||||
|
||||
|
||||
|
||||
Focus();
|
||||
}
|
||||
|
||||
|
||||
//private void Button_CreateTemplateBasedDocument_Click(object sender, RoutedEventArgs e)
|
||||
//{
|
||||
// selectedFolder = null;
|
||||
|
||||
// var selected = GetSelectedElements();
|
||||
|
||||
// if (selected == null || selected.Count == 0)
|
||||
// {
|
||||
// MessageBox.Show("Es muss mindestens ein Datensatz ausgewählt werden.", "BeWoPlaner", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
// return;
|
||||
// }
|
||||
|
||||
// ButtonCreateClicked?.Invoke();
|
||||
//}
|
||||
|
||||
private void Button_CreateTemplateForSelection_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
//var selected = combobox_elementList.SelectedItem as PrintSelectionVM;
|
||||
|
||||
//if (selected == null)
|
||||
//{
|
||||
// MessageBox.Show("Es muss ein Datensatz ausgewählt werden.", "BeWoPlaner", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
// return;
|
||||
//}
|
||||
|
||||
|
||||
ButtonCreateForSelectionClicked?.Invoke();
|
||||
}
|
||||
|
||||
//private void Button_CreateTemplateBasedDocumentForAll_Click(object sender, RoutedEventArgs e)
|
||||
//{
|
||||
// var selected = datagrid_enabled_for_template.ItemsSource as List<PrintSelectionVM>;
|
||||
|
||||
// ButtonCreateForAllClicked?.Invoke();
|
||||
//}
|
||||
|
||||
private void Button_Cancel_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ButtonCancelClicked?.Invoke();
|
||||
}
|
||||
|
||||
private void CheckBox_Checked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
treelistcontrol_folderStructureForSelection.Visibility = Visibility.Visible;
|
||||
}
|
||||
|
||||
private void CheckBox_Unchecked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
selectedFolder = null;
|
||||
treelistcontrol_folderStructureForSelection.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
//private void GenerateFolderStructure(TableID table, TreeListNode node, List<BeWoFolderDC> folderDCs)
|
||||
//{
|
||||
|
||||
// if (node == null)
|
||||
// {
|
||||
// node = new TreeListNode()
|
||||
// {
|
||||
// IsExpandButtonVisible = DefaultBoolean.True,
|
||||
// Tag = false,
|
||||
// Image = LoadFolderImage()
|
||||
// };
|
||||
// }
|
||||
|
||||
// var content = node.Content as DocumentTreeItemVM;
|
||||
|
||||
// foreach (var folder in folderDCs)
|
||||
// {
|
||||
// //Falls kein übergeordneter Knoten exisitert
|
||||
// //if(content == null)
|
||||
// //{
|
||||
// // PrintSelectionVM selected = combobox_elementList.SelectedItem as PrintSelectionVM;
|
||||
// // var dc = new DocumentTreeItemDC()
|
||||
// // {
|
||||
// // DocTreeItemOid = 0,
|
||||
// // ParentOid = null,
|
||||
// // Name = "Alle Ordner",
|
||||
// // Table = table
|
||||
// // };
|
||||
// // content = new DocumentTreeItemVM(dc);
|
||||
// // node.Content = content;
|
||||
// // DocumentsTreeView_folderStructureForSelection.Nodes.Add(node);
|
||||
// //}
|
||||
|
||||
// PrintSelectionVM selected = combobox_elementList.SelectedItem as PrintSelectionVM;
|
||||
// DocumentTreeItemDC folder_dc = new DocumentTreeItemDC()
|
||||
// {
|
||||
// DocTreeItemOid = folder.BeWoFolderOid,
|
||||
// ParentOid = null,
|
||||
// Name = folder.Name,
|
||||
// FilesInFolder = new List<FileAttachmentDC>(),
|
||||
// BeWoFolderDC = folder,
|
||||
// Table = table,
|
||||
// ObjectOid = selected.ObjectOid
|
||||
// };
|
||||
// if (content != null)
|
||||
// folder_dc.ParentOid = content.DocTreeItemOid;
|
||||
// DocumentTreeItemVM folder_vm = new DocumentTreeItemVM(folder_dc);
|
||||
// TreeListNode newNode_folder = new TreeListNode()
|
||||
// {
|
||||
// Content = folder_vm,
|
||||
// IsExpandButtonVisible = DefaultBoolean.True,
|
||||
// Tag = false,
|
||||
// Image = LoadFolderImage()
|
||||
// };
|
||||
// folder_dc.Node = newNode_folder;
|
||||
|
||||
// if(node.Content == null)
|
||||
// DocumentsTreeView_folderStructureForSelection.Nodes.Add(newNode_folder);
|
||||
// else
|
||||
// node.Nodes.Add(newNode_folder);
|
||||
|
||||
// if (folder.SubFolders.Count != 0)
|
||||
// {
|
||||
// GenerateFolderStructure(table, newNode_folder, folder.SubFolders);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
private BitmapImage LoadFolderImage()
|
||||
{
|
||||
return new BitmapImage(new Uri("/Ressources/Icons/Folder.png", UriKind.Relative));
|
||||
}
|
||||
|
||||
private void DocumentsTreeView_FocusedRowChanged(object sender, DevExpress.Xpf.Grid.FocusedRowChangedEventArgs e)
|
||||
{
|
||||
//if(DocumentsTreeView_folderStructureForSelection.SelectedRows.Count != 0)
|
||||
// selectedFolder = DocumentsTreeView_folderStructureForSelection.SelectedRows[0] as DocumentTreeItemVM;
|
||||
}
|
||||
|
||||
private void DocumentsTreeView_NodeExpanding(object sender, DevExpress.Xpf.Grid.TreeList.TreeListNodeAllowEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void DocumentsTreeView_folderStructureForSelection_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
if (TreeView_template.SelectedRows.Count != 0)
|
||||
selectedFolder = TreeView_template.SelectedRows[0] as DocumentTreeItemVM;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//public List<PrintSelectionVM> SelectAllElements()
|
||||
//{
|
||||
// return datagrid_enabled_for_template.ItemsSource as List<PrintSelectionVM>;
|
||||
//}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
<localView:BeWoView x:Class="BeWo.View.Detail.TemplatePrintSelection"
|
||||
<localView:BeWoView x:Class="BeWo.View.Document.TemplatePrintSelection"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:localView="clr-namespace:BeWo.View"
|
||||
@@ -28,7 +28,7 @@ using DevExpress.Xpf.Grid;
|
||||
using System.Windows.Media.Imaging;
|
||||
using DevExpress.Utils;
|
||||
|
||||
namespace BeWo.View.Detail
|
||||
namespace BeWo.View.Document
|
||||
{
|
||||
public partial class TemplatePrintSelection
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
<localView:BeWoView x:Class="BeWo.View.Detail.VorlageEditView"
|
||||
<localView:BeWoView x:Class="BeWo.View.Document.VorlageEditView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:localView="clr-namespace:BeWo.View"
|
||||
@@ -28,7 +28,7 @@ using System.Drawing;
|
||||
using DevExpress.Office.Utils;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
namespace BeWo.View.Detail
|
||||
namespace BeWo.View.Document
|
||||
{
|
||||
public partial class VorlageEditView
|
||||
{
|
||||
@@ -65,7 +65,7 @@
|
||||
<Hyperlink TargetName="_NewWindow" Foreground="#FFFFFFFF" Click="Hyperlink_AusArchivHolen_Click" Tag="{Binding}">Aus Archiv holen</Hyperlink>
|
||||
</TextBlock>
|
||||
<TextBlock VerticalAlignment="Center" Grid.Column="6" Grid.Row="0" Grid.RowSpan="2">
|
||||
<Hyperlink TargetName="_NewWindow" Foreground="#FFFFFFFF" NavigateUri="{Binding Converter={StaticResource CustomerDCPrintURLConverter}}" RequestNavigate="Hyperlink_OnRequestNavigate">Drucken</Hyperlink>
|
||||
<Hyperlink TargetName="_NewWindow" Foreground="#FFFFFFFF" NavigateUri="{Binding Converter={StaticResource CustomerDCPrintURLConverter}}" RequestNavigate="Hyperlink_OnRequestNavigate" Tag="{Binding}">Drucken</Hyperlink>
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
@@ -24,6 +24,7 @@ using BS.Shared.Translation;
|
||||
|
||||
using Microsoft.Win32;
|
||||
using BeWo.AI;
|
||||
using BeWo.View.Document;
|
||||
|
||||
namespace BeWo.View.Navigation
|
||||
{
|
||||
@@ -357,9 +358,41 @@ namespace BeWo.View.Navigation
|
||||
|
||||
private void Hyperlink_OnRequestNavigate(object sender, RequestNavigateEventArgs e)
|
||||
{
|
||||
BeWoUtils.NavigateToReportUri(((Hyperlink)sender).NavigateUri.ToString(), "Druckvorschau");
|
||||
//var alleVorlagen = ServiceFacade.DoOperationsServiceSync(s => s.Getvor());
|
||||
|
||||
var alleVorlagen = ServiceFacade.DoOperationsServiceSync(s => s.GetDokumentvorlagenForType(TableID.Customer));
|
||||
if (alleVorlagen.Count > 0)
|
||||
{
|
||||
var c = (CompactCustomerDC)((Hyperlink)sender).Tag;
|
||||
OpenTemplateSelectionDialog(alleVorlagen, c);
|
||||
}
|
||||
else
|
||||
{
|
||||
BeWoUtils.NavigateToReportUri(((Hyperlink)sender).NavigateUri.ToString(), "Druckvorschau");
|
||||
}
|
||||
//var folderDCs = VMFactory.CreateFolderList(TableID.Vorlagentabelle, (long)vm.DocTreeItemOid);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void OpenTemplateSelectionDialog(List<DokumentvorlageDC> alleVorlagen, CompactCustomerDC c)
|
||||
{
|
||||
|
||||
//Angebot Netzwerk 19 Einrichtungen a 6 User durchschnittlich
|
||||
|
||||
var view = new SingleTemplateSelectionView();
|
||||
|
||||
var folderList = VMFactory.CreateFolderList(TableID.Customer, c.Oid.Value);
|
||||
var alleVorlagenTabellen = ServiceFacade.DoOperationsServiceSync(s => s.GetVorlagentabelleDCs());
|
||||
view.InitView(alleVorlagenTabellen.FirstOrDefault(v => v.VorlagentabelleObjectTid.HasValue && v.VorlagentabelleObjectTid.Value == (int)TableID.Customer), alleVorlagen, folderList);
|
||||
var beWoWindow = BeWoWindowBuilder.GetBeWoWindow(Translator.Translate("Vorlage auswählen"), view, 600, 600);
|
||||
|
||||
view.ButtonCancelClicked += () => beWoWindow.Close();
|
||||
|
||||
beWoWindow.ShowDialog();
|
||||
}
|
||||
|
||||
private void MainNavigationView_OnOpenMailMergeWindow(List<IFilterableDC> allCustomers, IFilterableDC selectedCustomer)
|
||||
{
|
||||
var mmw = new MailMergeWindow(this, typeof(CustomerDC), objectList.ToList(), selectedCustomer) { Sorter = new CustomerSorter() };
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<NameOfLastUsedPublishProfile>BeWo2.0</NameOfLastUsedPublishProfile>
|
||||
<UseIISExpress>true</UseIISExpress>
|
||||
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
||||
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||
<Use64BitIISExpress>false</Use64BitIISExpress>
|
||||
<IISExpressSSLPort />
|
||||
<IISExpressAnonymousAuthentication />
|
||||
@@ -12,5 +12,29 @@
|
||||
<UseGlobalApplicationHostFile />
|
||||
<ProjectView>ProjectFiles</ProjectView>
|
||||
</PropertyGroup>
|
||||
<ProjectExtensions />
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
||||
<WebProjectProperties>
|
||||
<StartPageUrl>
|
||||
</StartPageUrl>
|
||||
<StartAction>NoStartPage</StartAction>
|
||||
<AspNetDebugging>True</AspNetDebugging>
|
||||
<SilverlightDebugging>False</SilverlightDebugging>
|
||||
<NativeDebugging>False</NativeDebugging>
|
||||
<SQLDebugging>False</SQLDebugging>
|
||||
<ExternalProgram>
|
||||
</ExternalProgram>
|
||||
<StartExternalURL>
|
||||
</StartExternalURL>
|
||||
<StartCmdLineArguments>
|
||||
</StartCmdLineArguments>
|
||||
<StartWorkingDirectory>
|
||||
</StartWorkingDirectory>
|
||||
<EnableENC>False</EnableENC>
|
||||
<AlwaysStartWebServerOnDebug>True</AlwaysStartWebServerOnDebug>
|
||||
</WebProjectProperties>
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
||||
@@ -235,7 +235,22 @@ where sr.startdate >= ':Von' and sr.startdate < ':Bis'
|
||||
{
|
||||
|
||||
/*
|
||||
SELECT
|
||||
*
|
||||
ZG_ID K_ID Kostenträger Bereits gezahlt Bis dato geleistete FLS Betrag Saldo
|
||||
|
||||
Startdatum Alle HPs die ab dem Datum starten
|
||||
Enddatum Stichtag
|
||||
|
||||
alle mit Saldo 0 raus
|
||||
|
||||
KH Differenzen nicht berücksichtigen
|
||||
|
||||
|
||||
|
||||
Bezeichnung Saldenliste
|
||||
|
||||
|
||||
* SELECT
|
||||
sr.Oid,
|
||||
sr.startdate,
|
||||
sr.enddate,
|
||||
|
||||
@@ -14,8 +14,12 @@ namespace SpitalstiftungKonstanz.Service
|
||||
{
|
||||
var list = base.GetFeiertage(year, bundesland);
|
||||
|
||||
list.Add(new FeiertagDC { Datum = new DateTime(year, 12, 31), Name = "Silvester" });
|
||||
if (year > 2024)
|
||||
{
|
||||
list.Add(new FeiertagDC { Datum = new DateTime(year, 1, 6), Name = "Heilige Drei Könige" });
|
||||
}
|
||||
|
||||
list.Add(new FeiertagDC { Datum = new DateTime(year, 12, 31), Name = "Silvester" });
|
||||
var os = GetOsterSonntag(year);
|
||||
|
||||
list.Add(new FeiertagDC { Datum = os.AddDays(-52) , Name = "Fastnacht" });
|
||||
|
||||
@@ -167,7 +167,7 @@ namespace BeWo.Service.Plugins
|
||||
//t = "6548202677"; // VKM Aachen SBD
|
||||
//t = "7803602698"; // Taubblindendienst
|
||||
//t = "5518600303"; // Wetterleuchten e.V.
|
||||
//t = "4096649015"; // AWO Dortmund
|
||||
t = "4096649015"; // AWO Dortmund
|
||||
//t = "3614251071"; // Pusteblume
|
||||
//t = "7755740484"; // Sawo
|
||||
//t = "8275654834"; // Twg Jonathan
|
||||
@@ -303,7 +303,7 @@ namespace BeWo.Service.Plugins
|
||||
//t = "8251343124"; // Rat Plus Tat
|
||||
//t = "6819347851"; // Awo Kreisverband Plön
|
||||
//t = "2385915144"; // AKGG GmbH
|
||||
//t = "8002913382"; // AKGG GmbH (MID)
|
||||
t = "8002913382"; // AKGG GmbH (MID)
|
||||
//t = "5155880294"; // BHV Bergische Hauspflege
|
||||
//t = "8366649557"; // Münchner Aids-Hilfe e.V.
|
||||
//t = "2976949196"; // WHB Refrath gGmbH
|
||||
|
||||
@@ -1147,6 +1147,10 @@ namespace BeWo.Service.ServiceContracts
|
||||
[OperationContract]
|
||||
List<DokumentvorlageDC> GetDokumentvorlagenInFolder(long folderOid);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
List<DokumentvorlageDC> GetDokumentvorlagenForType(TableID objecTid);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
List<SupportConceptDC> GetSupportConceptsById(IEnumerable<long> supportConceptOids);
|
||||
|
||||
@@ -7852,6 +7852,19 @@ namespace BeWo.Service.ServiceImplementations
|
||||
}
|
||||
}
|
||||
|
||||
public List<DokumentvorlageDC> GetDokumentvorlagenForType(TableID objecTid)
|
||||
{
|
||||
try
|
||||
{
|
||||
var vm = PluginLoader.FindClass<VorlagenManager>();
|
||||
return vm.GetDokumentvorlagenForType(objecTid);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
public List<SupportConceptDC> GetSupportConceptsById(IEnumerable<long> supportConceptOids)
|
||||
{
|
||||
try
|
||||
|
||||
@@ -393,10 +393,19 @@ namespace BeWo.Service.Vorlagen
|
||||
public List<DokumentvorlageDC> GetDokumentvorlagenInFolder(long folderOid)
|
||||
{
|
||||
List<Dokumentvorlage> liste = DAOFactory.SearchDAO.GetAllDokumentvorlagenInFolder(folderOid) as List<Dokumentvorlage>;
|
||||
var DCs = MapperFactory.DokumentvorlageDC_Dokumentvorlage.MapToNewDCs(liste);
|
||||
var dcs = MapperFactory.DokumentvorlageDC_Dokumentvorlage.MapToNewDCs(liste);
|
||||
|
||||
return DCs;
|
||||
return dcs;
|
||||
}
|
||||
|
||||
public List<DokumentvorlageDC> GetDokumentvorlagenForType(TableID objecTid)
|
||||
{
|
||||
List<Dokumentvorlage> liste = DAOFactory.GenericDAO.GetAllActive<Dokumentvorlage>().Where(d => d.Tabellenzugehoerigkeit == (int)objecTid).ToList();
|
||||
var dcs = MapperFactory.DokumentvorlageDC_Dokumentvorlage.MapToNewDCs(liste);
|
||||
|
||||
return dcs;
|
||||
}
|
||||
|
||||
public void DeleteTemplates(List<DokumentvorlageDC> vorlagen)
|
||||
{
|
||||
for (int i = vorlagen.Count - 1; i >= 0; i--)
|
||||
|
||||
Reference in New Issue
Block a user