BeWoPlanerMobil:
Zeiterfassungseinträge auch ohne Uhrzeit möglich
This commit is contained in:
@@ -94,9 +94,6 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\Lib\Blacklight.Wpf.Controls.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="CsvHelper, Version=15.0.0.0, Culture=neutral, PublicKeyToken=8c4959082be5c823, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CsvHelper.15.0.5\lib\net45\CsvHelper.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Charts.v17.1.Core, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.Pdf.v17.1.Core, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.Printing.v17.1.Core, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
@@ -118,28 +115,18 @@
|
||||
<Reference Include="DevExpress.Xpf.Printing.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.Xpf.Ribbon.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.Xpf.RichEdit.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.Images.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.Xpf.Scheduler.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.Xpf.Themes.LightGray.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.Xpf.Themes.Office2007Black.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.Xpf.Themes.Office2010Black.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.Xpf.Themes.Office2013.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.Xpf.Themes.Office2016White.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.XtraBars.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.XtraEditors.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.XtraPivotGrid.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.XtraPrinting.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.XtraCharts.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.PivotGrid.v17.1.Core, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.Sparkline.v17.1.Core, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.CodeParser.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.RichEdit.v17.1.Export, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.XtraReports.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.XtraScheduler.v17.1.Reporting.Extensions, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.XtraGrid.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.XtraScheduler.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.XtraScheduler.v17.1.Core, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.XtraScheduler.v17.1.Reporting, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
@@ -1232,7 +1219,6 @@
|
||||
<Compile Include="View\Master\ReportView.xaml.cs">
|
||||
<DependentUpon>ReportView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Reference Include="WindowsFormsIntegration" />
|
||||
<Resource Include="Ressources\Icons\Search.png" />
|
||||
<Reference Include="System.Xaml" />
|
||||
</ItemGroup>
|
||||
@@ -2276,18 +2262,6 @@
|
||||
<Project>{D5E53B0F-BF5A-41E8-93E2-0F32845FC729}</Project>
|
||||
<Name>Controls</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Data\Data.csproj">
|
||||
<Project>{B0D73E3D-4AE7-4024-93A6-DB1F46D7CCEE}</Project>
|
||||
<Name>Data</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Report\Report.csproj">
|
||||
<Project>{40D8B312-EA64-49E3-A31A-5E57ED4D5654}</Project>
|
||||
<Name>Report</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Service\Service.csproj">
|
||||
<Project>{094331C3-ECEE-4C89-BBFD-4C9DED89F0EF}</Project>
|
||||
<Name>Service</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Shared\Shared.csproj">
|
||||
<Project>{2F50B83D-A3F0-4EC4-979A-3F9B7E3D8ED4}</Project>
|
||||
<Name>Shared</Name>
|
||||
|
||||
@@ -286,6 +286,11 @@ namespace BeWo.ServiceProxy
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IEmployeeService/GetAllActiveEmployeesBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
System.Collections.Generic.List<BS.Shared.DataContracts.EmployeeDC> GetAllActiveEmployees();
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IEmployeeService/GetActiveCompactCustomersForEmployee", ReplyAction="http://tempuri.org/IEmployeeService/GetActiveCompactCustomersForEmployeeResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IEmployeeService/GetActiveCompactCustomersForEmployeeBeWoFault" +
|
||||
"Fault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactCustomerDC> GetActiveCompactCustomersForEmployee(System.Nullable<long> employeeOid);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IEmployeeService/ArchiveEmployee", ReplyAction="http://tempuri.org/IEmployeeService/ArchiveEmployeeResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IEmployeeService/ArchiveEmployeeBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
void ArchiveEmployee(long pOid, long pVersion);
|
||||
@@ -732,6 +737,11 @@ namespace BeWo.ServiceProxy
|
||||
return base.Channel.GetAllActiveEmployees();
|
||||
}
|
||||
|
||||
public System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactCustomerDC> GetActiveCompactCustomersForEmployee(System.Nullable<long> employeeOid)
|
||||
{
|
||||
return base.Channel.GetActiveCompactCustomersForEmployee(employeeOid);
|
||||
}
|
||||
|
||||
public void ArchiveEmployee(long pOid, long pVersion)
|
||||
{
|
||||
base.Channel.ArchiveEmployee(pOid, pVersion);
|
||||
@@ -1417,28 +1427,12 @@ namespace BeWo.ServiceProxy
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.GoalRatingDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.GoalRatingDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.RatingTypeDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ServiceRecordDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ServiceDescriptionDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ServiceAccountingDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ServiceAccountingDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.PersonDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.OrganisationDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.OrganisationDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.OrganisationPersonRelationDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.OrganisationPersonRelationDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.AppointmentDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AppointmentDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AppointmentCategoryDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.MedArtDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.DarreichungsformDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.DepotRhythmusDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.WohnheimbuchungDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.WohnheimbuchungDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Wohnheimbuchung2Costbearer2SupportConceptRelationDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnheimbuchung2Costbearer2SupportConceptRelationDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.WohnheimbuchungEmployeeRelationDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.WohnheimbuchungEmployeeRelationDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ServiceRecordDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.CustomerPersonRelationDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.CustomerPersonRelationDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.CustomerOrganisationRelationDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.CustomerOrganisationRelationDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.MedRecordDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.MedRecordDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.DarreichungsformDC))]
|
||||
@@ -1490,34 +1484,6 @@ namespace BeWo.ServiceProxy
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.WohnheimCustomerRelationDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.WohnheimEmployeeRelationDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.WohnheimEmployeeRelationDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.AppointmentCategoryDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactPersonDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactOrganisationDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactPersonDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactWohnheimDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactWohnheimDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.SupportConceptApprovalInterval))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Bewilligungsart))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.SystemEntryID))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.AccountingIntervalType))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.AccountingvisibilityType))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.Behinderungsart>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Behinderungsart))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.Merkzeichen>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Merkzeichen))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Pflegegrad))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.SettingsType))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.UserRightType>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.UserRightType))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ZeiterfassungsDauer))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ServiceUnit))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ServiceRecordFormate))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ServiceRecordTypeId))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.FileAttachmentType))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.TableID))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Priority))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Status))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<object>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.UserValidationResult))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.SupportPinDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.SupportPinDC>))]
|
||||
|
||||
@@ -174,9 +174,11 @@
|
||||
<Compile Include="Controllers\AbstractBaseController.cs" />
|
||||
<Compile Include="Controllers\ChatController.cs" />
|
||||
<Compile Include="Controllers\CustomerController.cs" />
|
||||
<Compile Include="Controllers\ReportController.cs" />
|
||||
<Compile Include="Controllers\SchedulerController.cs" />
|
||||
<Compile Include="Models\AbstractModel.cs" />
|
||||
<Compile Include="Models\CustomerModel.cs" />
|
||||
<Compile Include="Models\ReportModel.cs" />
|
||||
<Compile Include="Models\SchedulerModel.cs" />
|
||||
<Compile Include="Util\AppointmentListItem.cs" />
|
||||
<Compile Include="Util\BeWoLoginState.cs" />
|
||||
@@ -383,6 +385,7 @@
|
||||
<Content Include="Scripts\umd\popper.js" />
|
||||
<Content Include="Scripts\umd\popper.min.js" />
|
||||
<Content Include="Scripts\utils\dateUtils.js" />
|
||||
<Content Include="Scripts\view-scripts\report.js" />
|
||||
<Content Include="Scripts\view-scripts\scheduler.js" />
|
||||
<Content Include="Scripts\view-scripts\customer.js" />
|
||||
<Content Include="Scripts\view-scripts\main.js" />
|
||||
@@ -410,6 +413,7 @@
|
||||
<Content Include="Scripts\popper.min.js.map" />
|
||||
<Content Include="Scripts\README.md" />
|
||||
<Content Include="Scripts\support-concept-statistics.js" />
|
||||
<Content Include="Views\Report\Report.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="App_Data\" />
|
||||
|
||||
@@ -6,6 +6,7 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
using System.Windows.Forms;
|
||||
using BeWo.Service.ServiceImplementations;
|
||||
|
||||
@@ -2109,11 +2110,13 @@ namespace BeWoPlanerMobil.Controllers
|
||||
}
|
||||
|
||||
// Menünavigation
|
||||
[Authorize]
|
||||
public ActionResult RedirectToScheduler()
|
||||
{
|
||||
return RedirectToActionPermanent("Scheduler", "Scheduler");
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
public ActionResult RedirectToCustomer()
|
||||
{
|
||||
if(Model?.SelectedSupportConcept?.Customer?.Oid.HasValue ?? false)
|
||||
@@ -2131,6 +2134,12 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return RedirectToActionPermanent("Customer", "Customer");
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
public ActionResult RedirectToReportView()
|
||||
{
|
||||
return AbstractModel.IsAllowedToSeeBills ? RedirectToActionPermanent("Report", "Report") : RedirectToMain();
|
||||
}
|
||||
|
||||
public ActionResult RedirectToMain()
|
||||
{
|
||||
return RedirectToActionPermanent("Main", "Main");
|
||||
|
||||
85
BeWoPlanerMobil/Controllers/ReportController.cs
Normal file
85
BeWoPlanerMobil/Controllers/ReportController.cs
Normal file
@@ -0,0 +1,85 @@
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using BeWoPlanerMobil.Models;
|
||||
using BeWoPlanerMobil.Service;
|
||||
|
||||
namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
/*
|
||||
* Quittierungsbeleg wie im Fat-Client implementieren
|
||||
* Mit Unterschriftenfunktion für den Mitarbeiter.
|
||||
* Liste mit allen ServiceRecords des Mitarbeiters für einen Klienten.
|
||||
*
|
||||
* Felder: Mitarbeiter(Ist der eingeloggte, denn nur der darf unterschreiben), Klient, Monat, Vom, Bis, Jahr
|
||||
*/
|
||||
|
||||
public class ReportController : AbstractBaseController
|
||||
{
|
||||
private const string ReportModelSessionKey = "ReportModel";
|
||||
|
||||
private ReportModel _Model;
|
||||
|
||||
public ReportModel Model
|
||||
{
|
||||
get
|
||||
{
|
||||
if(!MobileSessionFacade.IsUserLoggedIn())
|
||||
{
|
||||
RedirectToActionPermanent("Index", "Login");
|
||||
return null;
|
||||
}
|
||||
|
||||
if(((ReportModel) Session[ReportModelSessionKey])?.Employee == null)
|
||||
{
|
||||
_Model = new ReportModel {Employee = MobileSessionFacade.LoggedInEmployee};
|
||||
Session[ReportModelSessionKey] = _Model;
|
||||
}
|
||||
else
|
||||
{
|
||||
_Model = (ReportModel) Session[ReportModelSessionKey];
|
||||
}
|
||||
|
||||
return _Model;
|
||||
}
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
public ActionResult Report()
|
||||
{
|
||||
if(!MobileSessionFacade.IsUserLoggedIn() || Request.Browser.Browser.Equals("InternetExplorer") || !AbstractModel.IsAllowedToSeeScheduler)
|
||||
{
|
||||
return RedirectToActionPermanent("Index", "Login");
|
||||
}
|
||||
|
||||
var customers = EmployeeService.GetActiveCompactCustomersForEmployee(null);
|
||||
|
||||
Model.Customers = customers;
|
||||
|
||||
return View(Model);
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
[HttpPost]
|
||||
public ActionResult CreateServiceOverview(FormCollection formCollection)
|
||||
{
|
||||
var test1 = formCollection["CustomerSelect"];
|
||||
var test2 = formCollection["MonthSelect"];
|
||||
var test3 = formCollection["YearSelect"];
|
||||
|
||||
return RedirectToActionPermanent("Report");
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
public string SetCustomer(long customerOid)
|
||||
{
|
||||
if(Model == null)
|
||||
{
|
||||
return _LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
Model.SelectedCustomer = Model.Customers.FirstOrDefault(customer => customer.CustomerOid == customerOid);
|
||||
|
||||
return _LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -34,6 +34,6 @@ namespace BeWoPlanerMobil.Models
|
||||
public static string TimeOfLastAction { get; set; }
|
||||
|
||||
public static bool HasRightToInsertRessourceAppointments => MobileSessionFacade.CheckForUserRight(UserRightType.KalenderRessourcentermineAnlegen) || MobileSessionFacade.CheckForUserRight(UserRightType.CreateAll);
|
||||
public static bool IsAllowedToSeeBills => MobileSessionFacade.CheckForUserRight(UserRightType.Analysis_ServiceOverview_View);
|
||||
public static bool IsAllowedToSeeBills => false;//MobileSessionFacade.CheckForUserRight(UserRightType.Analysis_ServiceOverview_View);
|
||||
}
|
||||
}
|
||||
66
BeWoPlanerMobil/Models/ReportModel.cs
Normal file
66
BeWoPlanerMobil/Models/ReportModel.cs
Normal file
@@ -0,0 +1,66 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
|
||||
namespace BeWoPlanerMobil.Models
|
||||
{
|
||||
public class ReportModel : AbstractModel
|
||||
{
|
||||
[Display(Name = "Klient")] public long? SelectedCustomerOid => SelectedCustomer?.CustomerOid;
|
||||
|
||||
public CompactCustomerDC SelectedCustomer { get; set; }
|
||||
|
||||
public List<CompactCustomerDC> Customers { get; set; }
|
||||
|
||||
public IEnumerable<SelectListItem> CustomerListItems
|
||||
{
|
||||
get
|
||||
{
|
||||
var result = new List<SelectListItem>();
|
||||
|
||||
result.AddRange(Customers.Select(customer => new SelectListItem {Value = customer.CustomerOid.ToString(), Text = customer.ToString()}));
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
[Display(Name = "Monat")]
|
||||
public int SelectedMonth { get; set; }
|
||||
|
||||
[Display(Name = "Jahr")]
|
||||
public int SelectedYear { get; set; }
|
||||
|
||||
public List<SelectListItem> Months
|
||||
{
|
||||
get
|
||||
{
|
||||
var result = new List<SelectListItem>();
|
||||
|
||||
for(var i = 1; i < 13; i++)
|
||||
{
|
||||
result.Add(new SelectListItem {Value = i.ToString(), Text = i.ToString()});
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public List<SelectListItem> Years
|
||||
{
|
||||
get
|
||||
{
|
||||
var result = new List<SelectListItem>();
|
||||
|
||||
for(var i = DateTime.Today.Year + 1; i > DateTime.Today.Year - 11; i--)
|
||||
{
|
||||
result.Add(new SelectListItem {Value = i.ToString(), Text = i.ToString()});
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -503,8 +503,12 @@ function getStartAndEndDate() {
|
||||
var startDatePicker = $("#start-date-picker");
|
||||
var endDatePicker = $("#end-date-picker");
|
||||
|
||||
if ($("#start-time").val().length === 0 || $("#end-time").val().length === 0) {
|
||||
return null;
|
||||
// Bei leeren Start- und Endfeldern. Muss ein Dummydate zurückgeben,
|
||||
// damit das Speichern ohne Angabe der Start- und Endzeit möglich ist.
|
||||
if($("#start-time").val().length === 0 || $("#end-time").val().length === 0) {
|
||||
var dummyDate = moment(new Date(0, 0, 1));
|
||||
|
||||
return [dummyDate, dummyDate];
|
||||
}
|
||||
|
||||
startTimePicker.datetimepicker("show");
|
||||
|
||||
3
BeWoPlanerMobil/Scripts/view-scripts/report.js
Normal file
3
BeWoPlanerMobil/Scripts/view-scripts/report.js
Normal file
@@ -0,0 +1,3 @@
|
||||
function setSelectedCustomer() {
|
||||
|
||||
}
|
||||
61
BeWoPlanerMobil/Views/Report/Report.cshtml
Normal file
61
BeWoPlanerMobil/Views/Report/Report.cshtml
Normal file
@@ -0,0 +1,61 @@
|
||||
@model BeWoPlanerMobil.Models.ReportModel
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Quittierungsbeleg";
|
||||
}
|
||||
|
||||
<!-- Klient, Monat, Jahr
|
||||
|
||||
Liste:
|
||||
Info:
|
||||
Name Klient, Vorname Klient, Aktenzeichen, Bewilligte FLS wöchentlich:
|
||||
|
||||
Datum, Uhrzeit, Anzahl Minuten, Gruppe, Mitarbeiter
|
||||
|
||||
-->
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col col-12 col-md-6 col-lg-5">
|
||||
@using(Html.BeginForm("CreateServiceOverview", "Report", FormMethod.Post))
|
||||
{
|
||||
<div class="mt-3">
|
||||
<div class="form-row">
|
||||
<div class="col-md">
|
||||
<div class="form-group mb-1">
|
||||
@Html.LabelFor(m => m.SelectedCustomerOid)
|
||||
@Html.DropDownListFor(m => m.SelectedCustomerOid, Model.CustomerListItems, new { id = "customers-drop-down", @class = "form-control", name = "CustomerSelect" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-3">
|
||||
<div class="form-row">
|
||||
<div class="col-md">
|
||||
<div class="form-group mb-1">
|
||||
@Html.LabelFor(m => m.SelectedMonth)
|
||||
@Html.DropDownListFor(m => m.SelectedMonth, Model.Months, new { @class = "form-control", name = "MonthSelect" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md">
|
||||
<div class="form-group mb-1">
|
||||
@Html.LabelFor(m => m.SelectedYear)
|
||||
@Html.DropDownListFor(m => m.SelectedYear, Model.Years, new { @class = "form-control", name = "YearSelect" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex bd-highlight mt-3">
|
||||
<div class="mr-auto bd-highlight">
|
||||
<!-- Abstandshalter -->
|
||||
</div>
|
||||
<div class="ml-3 bd-highlight">
|
||||
<button type="submit" class="btn btn-primary" id="create-button">Erstellen</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -105,136 +105,136 @@
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<hr/>
|
||||
<div class="row">
|
||||
<div class="col col-12 col-md-6 col-lg-5">
|
||||
<div id="form-container" class="d-none d-sm-none d-md-block">
|
||||
@using(Html.BeginForm("InsertOrUpdateAppointment", "Scheduler", FormMethod.Post, new { id = "insert-appointment-form" }))
|
||||
{
|
||||
<div class="mt-3">
|
||||
<div class="form-row">
|
||||
<div class="col-md">
|
||||
<div class="form-group mb-1">
|
||||
<label for="scheduler-start-date">Start</label>
|
||||
<div class="input-group date" id="scheduler-start-date-picker" data-target-input="nearest">
|
||||
<input type="text" id="scheduler-start-date" name="StartDate" class="form-control datetimepicker-input" data-target="#scheduler-start-date-picker" data-toggle="datetimepicker" value="@Model.StartDateToEdit" />
|
||||
<div class="input-group-append" data-target="#scheduler-start-date-picker" data-toggle="datetimepicker">
|
||||
<div class="input-group-text"><i class="fas fa-calendar-alt"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md">
|
||||
<div class="form-group mb-1">
|
||||
<label for="scheduler-start-time">Von</label>
|
||||
<div class="input-group date" id="scheduler-start-time-picker" data-target-input="nearest">
|
||||
<input type="text" id="scheduler-start-time" name="StartTime" class="form-control datetimepicker-input" data-target="#scheduler-start-time-picker" value="@Model.StartTimeToEdit" />
|
||||
<div class="input-group-append" data-target="#scheduler-start-time-picker" data-toggle="datetimepicker">
|
||||
<div class="input-group-text"><i class="fas fa-clock"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="col-md">
|
||||
<div class="form-group mb-1">
|
||||
<label for="scheduler-end-date">Ende</label>
|
||||
<div class="input-group date" id="scheduler-end-date-picker" data-target-input="nearest">
|
||||
<input type="text" id="scheduler-end-date" name="EndDate" class="form-control datetimepicker-input" data-target="#scheduler-end-date-picker" data-toggle="datetimepicker" value="@Model.EndDateToEdit" />
|
||||
<div class="input-group-append" data-target="#scheduler-end-date-picker" data-toggle="datetimepicker">
|
||||
<div class="input-group-text"><i class="fas fa-calendar-alt"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md">
|
||||
<div class="form-group mb-1">
|
||||
<label for="scheduler-end-time">Bis</label>
|
||||
<div class="input-group date" id="scheduler-end-time-picker" data-target-input="nearest">
|
||||
<input type="text" id="scheduler-end-time" name="EndTime" class="form-control datetimepicker-input" data-target="#scheduler-end-time-picker" value="@Model.EndTimeToEdit" />
|
||||
<div class="input-group-append" data-target="#scheduler-end-time-picker" data-toggle="datetimepicker">
|
||||
<div class="input-group-text"><i class="fas fa-clock"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@if(AbstractModel.HasRightToInsertRessourceAppointments && Model.ResourceCategories2Resources.Any())
|
||||
{
|
||||
<hr/>
|
||||
<div class="row">
|
||||
<div class="col col-12 col-md-6 col-lg-5">
|
||||
<div id="form-container" class="d-none d-sm-none d-md-block">
|
||||
@using(Html.BeginForm("InsertOrUpdateAppointment", "Scheduler", FormMethod.Post, new { id = "insert-appointment-form" }))
|
||||
{
|
||||
<div class="mt-3">
|
||||
<div class="form-row">
|
||||
<div class="col-md">
|
||||
<div class="form-group my-1">
|
||||
<button type="button" class="btn btn-primary w-100" data-toggle="modal" data-target="#resources-popup">Ressourcen hinzufügen</button>
|
||||
<div class="form-group mb-1">
|
||||
<label for="scheduler-start-date">Start</label>
|
||||
<div class="input-group date" id="scheduler-start-date-picker" data-target-input="nearest">
|
||||
<input type="text" id="scheduler-start-date" name="StartDate" class="form-control datetimepicker-input" data-target="#scheduler-start-date-picker" data-toggle="datetimepicker" value="@Model.StartDateToEdit" />
|
||||
<div class="input-group-append" data-target="#scheduler-start-date-picker" data-toggle="datetimepicker">
|
||||
<div class="input-group-text"><i class="fas fa-calendar-alt"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md">
|
||||
<div class="form-group mb-1">
|
||||
<label for="scheduler-start-time">Von</label>
|
||||
<div class="input-group date" id="scheduler-start-time-picker" data-target-input="nearest">
|
||||
<input type="text" id="scheduler-start-time" name="StartTime" class="form-control datetimepicker-input" data-target="#scheduler-start-time-picker" value="@Model.StartTimeToEdit" />
|
||||
<div class="input-group-append" data-target="#scheduler-start-time-picker" data-toggle="datetimepicker">
|
||||
<div class="input-group-text"><i class="fas fa-clock"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="col-md">
|
||||
<div class="form-group my-1">
|
||||
<div class="list-group" id="selected-resources-list">
|
||||
@foreach(var selectedResource in Model.SelectedResources)
|
||||
{
|
||||
<div class="list-group-item my-auto" id="relation-item-@selectedResource.ResourceOid">
|
||||
<div class="row">
|
||||
<div class="col my-auto">
|
||||
<i class="fas fa-cubes text-bewo-resource mr-2"></i>
|
||||
@selectedResource.Name
|
||||
</div>
|
||||
<div class="col-auto my-auto">
|
||||
<button type="button" class="btn btn-primary" onclick="removeSelectedResource(@selectedResource.ResourceOid)">
|
||||
<span class="fas fa-times-circle"></span>
|
||||
</button>
|
||||
<div class="form-group mb-1">
|
||||
<label for="scheduler-end-date">Ende</label>
|
||||
<div class="input-group date" id="scheduler-end-date-picker" data-target-input="nearest">
|
||||
<input type="text" id="scheduler-end-date" name="EndDate" class="form-control datetimepicker-input" data-target="#scheduler-end-date-picker" data-toggle="datetimepicker" value="@Model.EndDateToEdit" />
|
||||
<div class="input-group-append" data-target="#scheduler-end-date-picker" data-toggle="datetimepicker">
|
||||
<div class="input-group-text"><i class="fas fa-calendar-alt"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md">
|
||||
<div class="form-group mb-1">
|
||||
<label for="scheduler-end-time">Bis</label>
|
||||
<div class="input-group date" id="scheduler-end-time-picker" data-target-input="nearest">
|
||||
<input type="text" id="scheduler-end-time" name="EndTime" class="form-control datetimepicker-input" data-target="#scheduler-end-time-picker" value="@Model.EndTimeToEdit" />
|
||||
<div class="input-group-append" data-target="#scheduler-end-time-picker" data-toggle="datetimepicker">
|
||||
<div class="input-group-text"><i class="fas fa-clock"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@if(AbstractModel.HasRightToInsertRessourceAppointments && Model.ResourceCategories2Resources.Any())
|
||||
{
|
||||
<div class="form-row">
|
||||
<div class="col-md">
|
||||
<div class="form-group my-1">
|
||||
<button type="button" class="btn btn-primary w-100" data-toggle="modal" data-target="#resources-popup">Ressourcen hinzufügen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="col-md">
|
||||
<div class="form-group my-1">
|
||||
<div class="list-group" id="selected-resources-list">
|
||||
@foreach(var selectedResource in Model.SelectedResources)
|
||||
{
|
||||
<div class="list-group-item my-auto" id="relation-item-@selectedResource.ResourceOid">
|
||||
<div class="row">
|
||||
<div class="col my-auto">
|
||||
<i class="fas fa-cubes text-bewo-resource mr-2"></i>
|
||||
@selectedResource.Name
|
||||
</div>
|
||||
<div class="col-auto my-auto">
|
||||
<button type="button" class="btn btn-primary" onclick="removeSelectedResource(@selectedResource.ResourceOid)">
|
||||
<span class="fas fa-times-circle"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
<div class="form-row">
|
||||
<div class="col-md">
|
||||
<div class="form-group mb-1">
|
||||
<label for="subject">Betreff</label>
|
||||
<input type="text" id="subject" name="Subject" class="form-control" value="@Model.SubjectToEdit" />
|
||||
<div class="form-row">
|
||||
<div class="col-md">
|
||||
<div class="form-group mb-1">
|
||||
<label for="subject">Betreff</label>
|
||||
<input type="text" id="subject" name="Subject" class="form-control" value="@Model.SubjectToEdit" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="col-md">
|
||||
<div class="form-group mb-1">
|
||||
<label for="location">Ort</label>
|
||||
<input type="text" id="location" name="Location" class="form-control" value="@Model.LocationToEdit" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="col-md">
|
||||
<div class="form-group mb-1">
|
||||
<label for="notice">Notiz</label>
|
||||
<textarea class="form-control" id="notice" name="Notice">@Model.DescriptionToEdit</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="col-md">
|
||||
<div class="form-group mb-1">
|
||||
<label for="location">Ort</label>
|
||||
<input type="text" id="location" name="Location" class="form-control" value="@Model.LocationToEdit" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="col-md">
|
||||
<div class="form-group mb-1">
|
||||
<label for="notice">Notiz</label>
|
||||
<textarea class="form-control" id="notice" name="Notice">@Model.DescriptionToEdit</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
<div class="d-flex bd-highlight mt-3">
|
||||
<div class="mr-auto bd-highlight">
|
||||
<!-- Abstandshalter -->
|
||||
</div>
|
||||
<div class="ml-3 bd-highlight">
|
||||
<button type="button" class="btn btn-primary" id="reset-button" onclick="resetInsertAppointmentForm()">Abbrechen</button>
|
||||
</div>
|
||||
<div class="ml-3 bd-highlight">
|
||||
<button type="button" class="btn btn-primary" id="create-button" onclick="submitInsertAppointmentForm()">Speichern</button>
|
||||
<div class="d-flex bd-highlight mt-3">
|
||||
<div class="mr-auto bd-highlight">
|
||||
<!-- Abstandshalter -->
|
||||
</div>
|
||||
<div class="ml-3 bd-highlight">
|
||||
<button type="button" class="btn btn-primary" id="reset-button" onclick="resetInsertAppointmentForm()">Abbrechen</button>
|
||||
</div>
|
||||
<div class="ml-3 bd-highlight">
|
||||
<button type="button" class="btn btn-primary" id="create-button" onclick="submitInsertAppointmentForm()">Speichern</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Terminliste -->
|
||||
<div class="col col-12 col-md-6 col-lg-7 mt-3">
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@*@if(AbstractModel.IsAllowedToSeeBills)
|
||||
@if(AbstractModel.IsAllowedToSeeBills)
|
||||
{
|
||||
using(Html.BeginForm("RedirectToReportView", "Main", FormMethod.Post))
|
||||
{
|
||||
@@ -155,7 +155,7 @@
|
||||
</button>
|
||||
</li>
|
||||
}
|
||||
}*@
|
||||
}
|
||||
|
||||
<li class="nav-item">
|
||||
@using(Html.BeginForm("Logout", "Main", FormMethod.Post))
|
||||
|
||||
@@ -75,12 +75,10 @@
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="DevExpress.Pdf.v17.1.Core, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.Printing.v17.1.Core, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.Data.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.Mvvm.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.Xpf.Core.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.Xpf.Printing.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.Xpf.Grid.v17.1.Core, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.Xpf.Grid.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="PresentationFramework.Aero">
|
||||
@@ -90,12 +88,6 @@
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data.DataSetExtensions">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="UIAutomationProvider">
|
||||
|
||||
@@ -3386,5 +3386,57 @@ namespace BeWo.Data.Access
|
||||
{
|
||||
return FindListOfCustomerServiceRecordsForKilometerauswertung(customerOids, span).Any();
|
||||
}
|
||||
|
||||
public List<Customer> GetAllCustomersForEmployee(long? employeeOid)
|
||||
{
|
||||
ApplicationUser user;
|
||||
|
||||
if(employeeOid.HasValue)
|
||||
{
|
||||
var employee = CreateCriteria<Employee>().Add(Restrictions.Eq(nameof(Employee.Oid), employeeOid)).UniqueResult<Employee>();
|
||||
user = FindUserForEmployee(employee);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(LoggedInUserOperationContextExt.Current != null && LoggedInUserOperationContextExt.Current.User != null)
|
||||
{
|
||||
user = LoggedInUserOperationContextExt.Current.User;
|
||||
}
|
||||
else
|
||||
{
|
||||
user = SessionFacade.LoggedInUser;
|
||||
}
|
||||
}
|
||||
|
||||
var rights = new List<UserRightType>();
|
||||
|
||||
user.UserGroups.DoForEach(s => s.Rights.DoForEach(right => rights.AddIfNotIn(right.RightType)));
|
||||
|
||||
var lCriteria = CreateCriteriaIsActive<Customer>();
|
||||
|
||||
if(rights.Contains(UserRightType.ViewAll) || rights.Contains(UserRightType.CustomerView_View))
|
||||
{
|
||||
return lCriteria.List<Customer>().ToList();
|
||||
}
|
||||
|
||||
var result = new List<Customer>();
|
||||
|
||||
if(rights.Contains(UserRightType.Customer_ViewMyCustomers))
|
||||
{
|
||||
result = user.Employee.Employee2CustomerList.Select(employee2Customer => employee2Customer.Customer).Distinct().ToList();
|
||||
}
|
||||
|
||||
if(rights.Contains(UserRightType.Customer_ViewMyTeams))
|
||||
{
|
||||
var teams = FindAllActiveTeamsOfEmployee(user.Employee.Oid.Value);
|
||||
|
||||
teams.DoForEach(team =>
|
||||
{
|
||||
team.MemberList.DoForEach(member => result.AddRangeIfElementsNotIn(member.Employee2CustomerList.Select(employee2Customer => employee2Customer.Customer)));
|
||||
});
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,6 +74,9 @@
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="DevExpress.Data.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.Mvvm.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraScheduler.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.XtraScheduler.v17.1.Core, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL">
|
||||
|
||||
@@ -334,7 +334,7 @@ namespace demo_reports.Export
|
||||
|
||||
var stringWriter = new StringWriter();
|
||||
|
||||
using(var csv = new CsvWriter(stringWriter, CultureInfo.InvariantCulture))
|
||||
using(var csv = new CsvWriter(stringWriter, CultureInfo.GetCultureInfo("de-DE")))
|
||||
{
|
||||
csv.WriteRecords(dataList);
|
||||
}
|
||||
|
||||
@@ -379,5 +379,9 @@ namespace BeWo.Service.ServiceContracts
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
List<EmployeeDC> GetAllActiveEmployees();
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
List<CompactCustomerDC> GetActiveCompactCustomersForEmployee(long? employeeOid);
|
||||
}
|
||||
}
|
||||
@@ -1631,5 +1631,19 @@ namespace BeWo.Service.ServiceImplementations
|
||||
throw Utils.CreateBeWoFaultException(exception);
|
||||
}
|
||||
}
|
||||
|
||||
public List<CompactCustomerDC> GetActiveCompactCustomersForEmployee(long? employeeOid)
|
||||
{
|
||||
try
|
||||
{
|
||||
var customers = DAOFactory.SearchDAO.GetAllCustomersForEmployee(employeeOid);
|
||||
|
||||
return MapperFactory.CompactCustomerDC_Customer.MapToNewDCs(customers);
|
||||
}
|
||||
catch(Exception exception)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(exception);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user